cvc5.git
2 years agoFix ascription check for return types on ordinary functions (#7290)
Andrew Reynolds [Fri, 1 Oct 2021 21:38:15 +0000 (16:38 -0500)]
Fix ascription check for return types on ordinary functions (#7290)

Fixes #7274.

2 years agoMake preregistration safe for uninterpreted constants (#7292)
Andrew Reynolds [Fri, 1 Oct 2021 21:19:01 +0000 (16:19 -0500)]
Make preregistration safe for uninterpreted constants (#7292)

Work towards addressing #6908.

2 years agoRemove (apparently obsolete) checks in cms config (#7294)
Gereon Kremer [Fri, 1 Oct 2021 20:59:07 +0000 (13:59 -0700)]
Remove (apparently obsolete) checks in cms config (#7294)

This removes checks from the CryptoMiniSat config for the existence of a couple of static libraries. Apparently, these are not necessary any more.

2 years agoClean options handlers (#7201)
Gereon Kremer [Fri, 1 Oct 2021 20:40:05 +0000 (13:40 -0700)]
Clean options handlers (#7201)

Some cleanup on the option handlers, starting with handlers for base and main options.

2 years agoFix some python docstrings which lead to sphinx warnings (#7293)
Gereon Kremer [Fri, 1 Oct 2021 19:40:15 +0000 (12:40 -0700)]
Fix some python docstrings which lead to sphinx warnings (#7293)

This PR fixes some docstrings that are not properly indented for sphinx.

2 years agoAdd the LFSC printer (#7158)
Andrew Reynolds [Fri, 1 Oct 2021 14:07:34 +0000 (09:07 -0500)]
Add the LFSC printer (#7158)

This adds the LFSC printer for proof nodes. This PR has been split to not include support for DSL rewrite rules yet, or its main print method which will be added in a followup PR.

Further PRs will connect this printer as a possible output format for cvc5.

2 years agoAdd the print benchmark utility (#7196)
Andrew Reynolds [Fri, 1 Oct 2021 13:58:14 +0000 (08:58 -0500)]
Add the print benchmark utility (#7196)

This utility is capable of printing a vector of Node as a valid (SMT-LIB) benchmark with no prior bookkeeping. It also optionally allows for taking a vector Node corresponding to define-fun.

It will be used to replace the old internal benchmark dumping infrastructure which was error prone.

2 years agoUse the proper evaluator for optimized SyGuS datatype rewriting (#7266)
Andrew Reynolds [Fri, 1 Oct 2021 04:49:08 +0000 (23:49 -0500)]
Use the proper evaluator for optimized SyGuS datatype rewriting (#7266)

This updates the datatypes rewriter to use the evaluator from Env instead of creating local copies of Evaluator. This makes all uses of the Evaluator dependent on the proper options (e.g. which will be based later on the cardinality of the alphabet for strings).

This moves one utility method (sygusToBuiltinEval) to the datatypes rewriter, as it uses an Evaluator that will be dependent on options.

Notice that this is another instance where it is important for us to make the cache for the rewriter local. The same issue occurs for other places where rewriting is dependent on options. This issue will be revisited when the option for strings alphabet cardinality is added.

2 years agoRename SmtEngine to SolverEngine. (#7282)
Aina Niemetz [Fri, 1 Oct 2021 01:57:24 +0000 (18:57 -0700)]
Rename SmtEngine to SolverEngine. (#7282)

2 years agoRename files smt_engine.(cpp|h) to solver_engine.(cpp|h). (#7279)
Aina Niemetz [Thu, 30 Sep 2021 21:14:59 +0000 (14:14 -0700)]
Rename files smt_engine.(cpp|h) to solver_engine.(cpp|h). (#7279)

This is in preparation for renaming SmtEngine to SolverEngine.

2 years agoIntegrate javadoc documentation (#7278)
Gereon Kremer [Thu, 30 Sep 2021 20:34:33 +0000 (13:34 -0700)]
Integrate javadoc documentation  (#7278)

This PR adds the cmake setup to generate javadoc documentation for the java API and integrates it into the sphinx documentation. Right now, we simply link to the javadoc. This PR also modifies a bunch of javadoc comments to use proper javadoc syntax.

2 years agoconfigure: Fix --static flag. (#7280)
Mathias Preiner [Thu, 30 Sep 2021 20:07:38 +0000 (13:07 -0700)]
configure: Fix --static flag. (#7280)

2 years agobv: Refactor ppRewrite and move to TheoryBV. (#7271)
Mathias Preiner [Thu, 30 Sep 2021 19:52:09 +0000 (12:52 -0700)]
bv: Refactor ppRewrite and move to TheoryBV. (#7271)

This commit moves and refactors the ppRewrite() and ppStaticLearn() code from the layered solver to TheoryBV in order to apply a default set of preprocessing rules for each solver. BV solver can still implement additional rules.

Note: Some of the rewrite rules in ppRewrite() have been removed since cluster runs showed that they don't improve anything, but actually makes the solver a lot worse.

2 years agoRefactor our static builds (#7251)
Gereon Kremer [Thu, 30 Sep 2021 19:15:24 +0000 (12:15 -0700)]
Refactor our static builds (#7251)

This PR does a major refactoring on how we organize our builds to allow both shared and static builds. We now build the libraries using object libraries to allow building the libraries both dynamically and statically in the same build folder, though the static library is optional (ENABLE_STATIC_LIBRARY). The binary is linked either dynamically or statically (depending on ENABLE_STATIC_BINARY).

2 years agoProperly cache assertions in static learning preprocessing pass. (#7242)
Mathias Preiner [Thu, 30 Sep 2021 17:20:04 +0000 (10:20 -0700)]
Properly cache assertions in static learning preprocessing pass. (#7242)

The cache is user-context dependent and guarantees that ppStaticLearn is only called once per assertion in a given context - if assertions are popped from the context and added again ppStaticLearn is called again on that assertion. Further, the preprocessing pass now also handles the splitting of top-level AND terms. Before that each theory was responsible for splitting and caching. Refactoring the corresponding ppStaticLearn theory methods will be part of future PRs.

Marking do-not-merge until cluster runs finished.

2 years agoFinish the Java Api (#6396)
mudathirmahgoub [Thu, 30 Sep 2021 17:07:39 +0000 (12:07 -0500)]
Finish the Java Api (#6396)

This commit finishes the implementation of the Java API.
It also includes all java files in the build along with their unit tests.

2 years agoMake theory engine modules use Env (#7277)
Andrew Reynolds [Thu, 30 Sep 2021 16:48:12 +0000 (11:48 -0500)]
Make theory engine modules use Env (#7277)

This updates several core modules of TheoryEngine to use Env and eliminates some getters from TheoryEngine.

2 years agoSimplify the syntax and representation of the separation logic empty heap constraint...
Andrew Reynolds [Thu, 30 Sep 2021 15:38:44 +0000 (10:38 -0500)]
Simplify the syntax and representation of the separation logic empty heap constraint (#7268)

Since ~1 year ago, we insist that the location and data types of the separation logic heap are set upfront, analogous to the set-logic command. This means that the separation logic empty heap constraint does not need to be annotated with its types.

This makes SEP_EMP a nullary Boolean operator instead of binary predicate (taking dummy arguments whose types specify the heap type). It changes the smt2 extended syntax from (_ emp T1 T2) to sep.emp.

2 years agoRemove usage of static options in arithmetic theory (#7221)
Gereon Kremer [Thu, 30 Sep 2021 13:59:52 +0000 (06:59 -0700)]
Remove usage of static options in arithmetic theory (#7221)

This PR removes the usage of static accesses to options from the arithmetic theory, mostly by making more classes inherit from EnvObj.

2 years agoPrint `str.is_digit` and `int.pow2` correctly. (#7276)
Abdalrhman Mohamed [Thu, 30 Sep 2021 02:59:18 +0000 (21:59 -0500)]
Print `str.is_digit` and `int.pow2` correctly. (#7276)

2 years ago[Printer] Only quote `set-info` value if necessary (#7262)
Andres Noetzli [Thu, 30 Sep 2021 02:37:22 +0000 (19:37 -0700)]
[Printer] Only quote `set-info` value if necessary (#7262)

PR #7240 changed the printing of set-info to always include quote the
value. This commit changes the policy to only quote a symbol if
necessary using existing an existing helper method. Otherwise,
(set-info :status sat) is for example printed as (set-info :status |sat|), which is a bit unusual and may break certain scripts.

2 years ago[API] Update comments w.r.t. SymFPU, fix typos (#7263)
Andres Noetzli [Wed, 29 Sep 2021 22:06:36 +0000 (15:06 -0700)]
[API] Update comments w.r.t. SymFPU, fix typos (#7263)

Previously, SymFPU was an optional dependency but it is now required.
The comments in the API were not updated to reflect that. This commit
fixes the comments.

2 years agoRemove support for extended `(check-sat <term>)` command. (#7270)
Abdalrhman Mohamed [Wed, 29 Sep 2021 21:32:31 +0000 (16:32 -0500)]
Remove support for extended `(check-sat <term>)` command. (#7270)

This commit removes support for the extended `(check-sat <term>)` command which overlaps in functionality with the standard `(check-sat-assuming (<prop_literal>*))` command.

2 years agoProperly restrict PBE symmetry breaking for abduction queries (#7269)
Andrew Reynolds [Wed, 29 Sep 2021 21:23:27 +0000 (16:23 -0500)]
Properly restrict PBE symmetry breaking for abduction queries (#7269)

This ensures we infer when a conjecture is PBE based on the conjecture plus the side condition for abduction. This fixes issues where the sygus solver was over-pruning solutions for abduction queries.

It also changes the names of internal symbols used for abduction/interpolation queries. These names are used when the experimental sygus-stream is used. These symbols are changed (from "A") to avoid confusion with user symbols.

2 years agoUpdate the syntax for tuples in smt2 (#7265)
Andrew Reynolds [Wed, 29 Sep 2021 18:40:08 +0000 (13:40 -0500)]
Update the syntax for tuples in smt2 (#7265)

This changes mkTuple -> tuple and tupSel -> tuple_select.

This is in line with the most recent syntax for tuples in preparation for the theory of tables in smt2.

2 years agoAdd the strings array solver (#7232)
Andrew Reynolds [Wed, 29 Sep 2021 15:39:50 +0000 (10:39 -0500)]
Add the strings array solver (#7232)

This adds the arrays subsolver utility. It does not yet connect it down to the core array solver, or up to TheoryStrings.

It adds implementation of its lemma schemas for processing nth/update over concat.

2 years agoUpdate `--lang=help` (#7260)
Andres Noetzli [Wed, 29 Sep 2021 04:41:37 +0000 (21:41 -0700)]
Update `--lang=help` (#7260)

Support for the CVC language was removed in #7219 but the help message
for languages was not updated. This removes the mention of CVC from the
help message.

2 years agoAdd Statistics and Stat to the Java API (#7243)
mudathirmahgoub [Wed, 29 Sep 2021 03:28:36 +0000 (22:28 -0500)]
Add Statistics and Stat to the Java API (#7243)

This adds Statistics and Stat to the Java API

2 years agoremove stuff (#7258)
Gereon Kremer [Wed, 29 Sep 2021 03:10:45 +0000 (20:10 -0700)]
remove stuff (#7258)

This PR removes the BUILD_LIB_ONLY cmake option, and the associated --lib-only configure script option.
If you only want the library, just run make cvc5 instead of make.

2 years agocontrib: Fix check for get-script-header.sh. (#7259)
Mathias Preiner [Wed, 29 Sep 2021 02:59:47 +0000 (19:59 -0700)]
contrib: Fix check for get-script-header.sh. (#7259)

PR #7219 removed CVC language support and therefore also the file src/parser/cvc/Cvc.g. This commit fixes the check (and the nightlies).

2 years agoAdd Sort.java to the java API (#6382)
mudathirmahgoub [Wed, 29 Sep 2021 00:30:24 +0000 (19:30 -0500)]
Add Sort.java to the java API (#6382)

This adds Sort.java SortTest.java and cvc5_Sort.cpp to the java api.

2 years agoRemove linking against RT (#7257)
Gereon Kremer [Tue, 28 Sep 2021 23:20:24 +0000 (16:20 -0700)]
Remove linking against RT (#7257)

This PR removes long obsolete cmake code that is only required when using a pre-2013 glibc.

2 years agoEliminate calls to Rewriter::rewrite from strings entailment checks (#7203)
Andrew Reynolds [Fri, 24 Sep 2021 05:11:24 +0000 (00:11 -0500)]
Eliminate calls to Rewriter::rewrite from strings entailment checks (#7203)

There are a few further circular references that prevent us from not passing Rewriter to the strings TheoryRewriter constructor, this can be cleaned in future PRs.

2 years agoGeneralize string enumerator for fixed length sequences (#7234)
Andrew Reynolds [Thu, 23 Sep 2021 23:50:16 +0000 (18:50 -0500)]
Generalize string enumerator for fixed length sequences (#7234)

This adds a utility to get enumerators for fixed length constants of a given sequence type.

This will be used to construct fixed length gaps in array models.

2 years agoEliminate Output macro in favor of simple Env functions (#7223)
Gereon Kremer [Thu, 23 Sep 2021 23:14:08 +0000 (16:14 -0700)]
Eliminate Output macro in favor of simple Env functions (#7223)

This PR eliminates the Output macro together with the associated output stream (stored in a static variable). It is replaces by a set of simple utility functions of the Env class, and we instead use the output stream from options.base.out.
To achieve this, a couple of quantifier classes are now derived from EnvObj.

2 years ago[proofs[ Alethe: Fix Order of Arguments of addAletheStepFromOr (#7237)
Lachnitt [Thu, 23 Sep 2021 22:35:32 +0000 (15:35 -0700)]
[proofs[ Alethe: Fix Order of Arguments of addAletheStepFromOr (#7237)

Changes the order of the arguments of addAletheStepFromOr to be consistent with addAletheStep.

2 years ago[proofs] Alethe: Translate THEORY_REWRITE (#7236)
Lachnitt [Thu, 23 Sep 2021 22:08:31 +0000 (15:08 -0700)]
[proofs] Alethe: Translate THEORY_REWRITE (#7236)

Implementation of the translation of THEORY_REWRITE rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Add Alethe Files to be Compiled (#7241)
Lachnitt [Thu, 23 Sep 2021 21:46:05 +0000 (14:46 -0700)]
[proofs] Alethe: Add Alethe Files to be Compiled  (#7241)

Adds Alethe proof rule and option. Adds alethe_post_processor and alethe_proof_rule files to list of files to be compiled.
During incorporating these changes errors occurred in the SCOPE rule that are also fixed in this PR.

2 years agoRefactor check interface of nonlinear extension (#7235)
Gereon Kremer [Thu, 23 Sep 2021 21:20:42 +0000 (14:20 -0700)]
Refactor check interface of nonlinear extension (#7235)

This PR does a first step for refactoring the main check interface of the nonlinear extension. It does not change anything yet, but merely moves code around.

2 years agoMore uses of EnvObj (#7230)
Andrew Reynolds [Thu, 23 Sep 2021 18:54:03 +0000 (13:54 -0500)]
More uses of EnvObj (#7230)

2 years ago[proofs] Alethe: Translate SCOPE rule (#7224)
Lachnitt [Thu, 23 Sep 2021 17:38:27 +0000 (10:38 -0700)]
[proofs] Alethe: Translate SCOPE rule (#7224)

Implementation of the translation of SCOPE rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoUse `|` to print quoted strings in `set-info` command. (#7240)
Abdalrhman Mohamed [Thu, 23 Sep 2021 16:30:07 +0000 (11:30 -0500)]
Use `|` to print quoted strings in `set-info` command. (#7240)

This PR is a step towards enabling raw-benchmark for cvc5 regressions. cvc5 fails to reparse 57 regressions (in regress0) printed be raw-benchmark because they contain multi-line strings in set-info that we don't print between vertical bars right now. This PR fixes that bug and removes 2 commands (derived from set-info commands) that are not used by the parsers anymore.

2 years agoImplement alpha equivalence proofs (#7066)
Andrew Reynolds [Thu, 23 Sep 2021 03:03:29 +0000 (22:03 -0500)]
Implement alpha equivalence proofs (#7066)

This is a modified version of #6137 which accounts for extended rewriting between quantified formulas that are considered alpha equivalent.

It also generalizes the proof rule ALPHA_EQUIV. Notice that if we were to make this rule more pedantic, we would check for variable shadowing during substitution, although this is not currently done.

2 years agoMake cegqi subsolvers EnvObj (#7205)
Andrew Reynolds [Wed, 22 Sep 2021 22:03:26 +0000 (17:03 -0500)]
Make cegqi subsolvers EnvObj (#7205)

Makes a few places do multiplication for Rational directly instead of invoking the rewriter.

2 years agoRemove CVC language support (#7219)
Mathias Preiner [Wed, 22 Sep 2021 20:38:46 +0000 (13:38 -0700)]
Remove CVC language support (#7219)

This commit removes the support for the CVC language and converts all *.cvc regression tests to SMT-LIBv2.

2 years agoTowards standard usage of evaluator (#7189)
Andrew Reynolds [Wed, 22 Sep 2021 20:05:44 +0000 (15:05 -0500)]
Towards standard usage of evaluator (#7189)

This makes the evaluator accessible via EnvObj through the Rewriter. It furthermore removes Rewriter::rewrite from inside the evaluator itself.

Construction of Evaluator utilities is now discouraged.

The include dependencies were cleaned slightly in this PR, leading to more precise includes throughout.

This is work towards having a configurable cardinality for strings, as well as eliminating SmtEngineScope.

2 years agoFix solver_black unit test (#7233)
Ouyancheng [Wed, 22 Sep 2021 19:52:44 +0000 (12:52 -0700)]
Fix solver_black unit test (#7233)

In file `test/unit/api/solver_black.cpp` line 1499,
`for (const std::pair<Term, Term>& t : dmap)` is not the correct way of iterating through the element pairs,
it should be `for (const std::pair<const Term, Term>& t : dmap)` as the keys are immutable.
This triggers a warning on LLVM clang 12.0.1 (not AppleClang) on macOS.

2 years agoAdd extensionality option for strings disequalities (#7229)
Andrew Reynolds [Wed, 22 Sep 2021 18:03:38 +0000 (13:03 -0500)]
Add extensionality option for strings disequalities (#7229)

Towards the strings array solver.

Extensionality for disequalities is disabled by default, but will be used when the strings array solver is enabled.

2 years agoarrays: Use EnvObj::rewrite and EnvObj::options. (#7217)
Aina Niemetz [Wed, 22 Sep 2021 17:46:53 +0000 (10:46 -0700)]
arrays: Use EnvObj::rewrite and EnvObj::options. (#7217)

This does not yet clean up the usage of Rewriter::rewrite in the arrays
type enumerator yet. Will be cleaned up in a follow-up PR.

2 years agoarrays: Move type enumerator implementation to .cpp. (#7216)
Aina Niemetz [Wed, 22 Sep 2021 17:08:34 +0000 (10:08 -0700)]
arrays: Move type enumerator implementation to .cpp. (#7216)

This further cleans up the class declaration in the header to comply
with code style guidelines.

2 years agoEliminate arithmetic proof macros (#7226)
Gereon Kremer [Wed, 22 Sep 2021 05:39:32 +0000 (22:39 -0700)]
Eliminate arithmetic proof macros (#7226)

This PR eliminates some macros for arithmetic proofs, that only slightly simplified access to the produce-proofs option. Now that static access is deprecated, these checks needed to be implemented differently anyway.

2 years agoMinimal fixing version for tuple update parsing (#7228)
Andrew Reynolds [Wed, 22 Sep 2021 05:28:22 +0000 (00:28 -0500)]
Minimal fixing version for tuple update parsing (#7228)

This takes the essential changes from #7218 so that the current ANTLR issues are avoided.

2 years ago[Proofs] Alethe: Translate ASSUME rule (#7213)
Lachnitt [Tue, 21 Sep 2021 19:59:27 +0000 (12:59 -0700)]
[Proofs] Alethe: Translate ASSUME rule (#7213)

Implementation of the translation of ASSUME rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Implementation of AletheProofPostprocessCallback (#7212)
Lachnitt [Tue, 21 Sep 2021 18:17:14 +0000 (11:17 -0700)]
[proofs] Alethe: Implementation of AletheProofPostprocessCallback (#7212)

Implementation of addAletheStep and addAletheStepFromOr. Added stub for AletheProofPostprocessCallback update function that will be populated by subsequent PRs.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoREADME: Fix link to INSTALL.rst. (#7222)
Aina Niemetz [Tue, 21 Sep 2021 00:23:43 +0000 (17:23 -0700)]
README: Fix link to INSTALL.rst. (#7222)

2 years agoFix handling of conversions between FP and reals (#7149)
Andres Noetzli [Tue, 21 Sep 2021 00:10:46 +0000 (17:10 -0700)]
Fix handling of conversions between FP and reals (#7149)

Fixes #7056. Currently, we introduce a UF for conversions between FP
numbers and reals. This is done as part of `ppRewrite()`. The problem is
that terms sent to `ppRewrite()` are not fully preprocessed yet and the
FP theory solver was storing terms that were not fully preprocessed in a
map for later lookup. For the issue at hand, the conversion term
contained an `ite`, which was later removed. As a result, the theory
solver did not consider the term to be relevant when refining
abstractions. This commit changes the handling of conversion functions
to instead adding purification lemmas for conversion terms when they are
registered. The purification lemmas are needed, because otherwise, we
can't retrieve the model values for the term without the rewriter
interferring.

2 years agoStart python API Solver documentation (#7064)
Alex Ozdemir [Mon, 20 Sep 2021 22:12:17 +0000 (15:12 -0700)]
Start python API Solver documentation (#7064)

2 years ago[proofs] Alethe: adds a node converter
Haniel Barbosa [Mon, 20 Sep 2021 19:49:22 +0000 (16:49 -0300)]
[proofs] Alethe: adds a node converter

Currently the only transformation it applies is removing attributes from quantifiers. Others may be added later.

2 years agoAdd the LFSC proof post-processor (#7134)
Andrew Reynolds [Mon, 20 Sep 2021 18:02:59 +0000 (13:02 -0500)]
Add the LFSC proof post-processor (#7134)

Includes the necessary conversions to LFSC for the core rules of the internal calculus.

2 years agoTheoryModel: Use EnvObj::rewrite instead of Rewriter::rewrite. (#7215)
Aina Niemetz [Mon, 20 Sep 2021 17:51:15 +0000 (10:51 -0700)]
TheoryModel: Use EnvObj::rewrite instead of Rewriter::rewrite. (#7215)

2 years agoOptionally enable interprocedural optimization (#7209)
Andres Noetzli [Mon, 20 Sep 2021 16:22:57 +0000 (09:22 -0700)]
Optionally enable interprocedural optimization (#7209)

This commit adds support for enabling interprocedural optimization. The
option is enabled by default for --best builds and cuts down our
executable size from about 33M to 20M.

2 years agoAdd anchors to cmdline options (#7210)
Gereon Kremer [Mon, 20 Sep 2021 16:12:57 +0000 (18:12 +0200)]
Add anchors to cmdline options (#7210)

This PR adds anchors to the auto-generates command line option documentation. This allows to link to specific options from other parts of the documentation.

2 years agoFix printer for datatype udpater (#7208)
Andrew Reynolds [Sat, 18 Sep 2021 00:49:51 +0000 (19:49 -0500)]
Fix printer for datatype udpater (#7208)

2 years agoRefactor tag suggestion mechanism (#7199)
Gereon Kremer [Sat, 18 Sep 2021 00:13:16 +0000 (02:13 +0200)]
Refactor tag suggestion mechanism (#7199)

This refactors the internal tag suggestion mechanism to no longer rely on C-style char arrays, but use a C++ vector of strings instead.

2 years agoUse a single `NodeManager` per thread (#7204)
Andres Noetzli [Fri, 17 Sep 2021 23:14:42 +0000 (16:14 -0700)]
Use a single `NodeManager` per thread (#7204)

This changes cvc5 to use a single `NodeManager` per thread (using
`thread_local`). We have decided that this is more convenient because
nodes between solvers in the same thread could be exchanged and that
there isn't really an advantage of having multiple `NodeManager`s per
thread.

One wrinkle of this change is that `NodeManager::init()` must be called
explicitly before the `NodeManager` can be used. This code can currently
not be moved to the constructor of `NodeManager` because the code
indirectly calls `NodeManager::currentNM()`, which leads to a loop
because the `NodeManager` is created in `NodeManager::currentNM()`.
Further refactoring is required to get rid of this restriction.

2 years ago[proofs] Alethe: Added Proof Postprocessor to alethe_proof_processor (#7202)
Lachnitt [Fri, 17 Sep 2021 21:03:01 +0000 (14:03 -0700)]
[proofs] Alethe: Added Proof Postprocessor to alethe_proof_processor (#7202)

Added proof postprocessor class to alethe_proof_processor header file.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Added Final Callback Function to alethe_proof_processor (#7200)
Lachnitt [Fri, 17 Sep 2021 20:37:53 +0000 (13:37 -0700)]
[proofs] Alethe: Added Final Callback Function to alethe_proof_processor (#7200)

Added final callback class to alethe_proof_processor header file.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoReplace write access to options by a local variable (#7207)
Gereon Kremer [Fri, 17 Sep 2021 18:14:24 +0000 (20:14 +0200)]
Replace write access to options by a local variable (#7207)

This PR replaces a write to the options object by a local variable in the simplex procedure base class. The write was used to temporarily lower a limit for a single simplex call.

2 years agoMinor cleanup related to EnvObj (#7206)
Gereon Kremer [Fri, 17 Sep 2021 18:03:37 +0000 (20:03 +0200)]
Minor cleanup related to EnvObj (#7206)

This PR does a bit of cleanup in the nonlinear arithmetic code related to the usage of EnvObj.

2 years agoFix relevant domain for parametric operators (#7198)
Andrew Reynolds [Thu, 16 Sep 2021 17:14:07 +0000 (12:14 -0500)]
Fix relevant domain for parametric operators (#7198)

Fixes #6531.

This issue also occurs when using `--full-saturate-quant` on facebook benchmarks that combine multiple sequence types.

It does some cleanup on relevant domain in the process.

2 years ago[proofs] Alethe: Added Callback Function to alethe_proof_processor (#7186)
Lachnitt [Wed, 15 Sep 2021 18:19:53 +0000 (11:19 -0700)]
[proofs] Alethe: Added Callback Function to alethe_proof_processor (#7186)

Added alethe_proof_processor header file and introduced callback class.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoMinor changes to E-matching utilities (#7062)
Andrew Reynolds [Wed, 15 Sep 2021 18:08:27 +0000 (13:08 -0500)]
Minor changes to E-matching utilities (#7062)

2 years agoremove options that are no longer used (#7197)
Gereon Kremer [Wed, 15 Sep 2021 17:06:51 +0000 (19:06 +0200)]
remove options that are no longer used (#7197)

This PR removes a handful of options that are no longer used anywhere.

2 years ago[proof] Added printer for proof rule names (#7185)
Lachnitt [Wed, 15 Sep 2021 14:01:33 +0000 (07:01 -0700)]
[proof] Added printer for proof rule names (#7185)

Implementation file for Alethe proof rules.

2 years ago[proof] Alethe proof rules (#7180)
Lachnitt [Wed, 15 Sep 2021 13:25:54 +0000 (06:25 -0700)]
[proof] Alethe proof rules (#7180)

Adds header for Alethe proof rules

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoEliminate global access to options:: from quantifiers rewriter (#7192)
Andrew Reynolds [Wed, 15 Sep 2021 02:04:11 +0000 (21:04 -0500)]
Eliminate global access to options:: from quantifiers rewriter (#7192)

2 years agoAdd get-difficulty to the API (#7194)
Andrew Reynolds [Tue, 14 Sep 2021 23:29:22 +0000 (18:29 -0500)]
Add get-difficulty to the API (#7194)

Adds smt2 parsing, printing and API support for get-difficulty. Adds unit tests.

2 years agoFinal cleanup (#7193)
Gereon Kremer [Tue, 14 Sep 2021 22:09:19 +0000 (00:09 +0200)]
Final cleanup (#7193)

This PR does some final cleanup on the options generation code.

2 years agoMake `-o raw-benchmark` work with `--parse-only` (#7195)
Andres Noetzli [Tue, 14 Sep 2021 21:54:42 +0000 (14:54 -0700)]
Make `-o raw-benchmark` work with `--parse-only` (#7195)

Before, cvc5 was returning with --parse-only before the code could
reach the code responsible for dumping the raw benchmark. This moves the
check for --parse-only to the appropriate place and updates the
run_regression.py script to use --parse-only.

2 years agoSupport sygus version 2.1 command assume (#7081)
Andrew Reynolds [Tue, 14 Sep 2021 21:29:32 +0000 (16:29 -0500)]
Support sygus version 2.1 command assume (#7081)

Adds support for global assumptions in sygus files.

Also guards against cases of declare-const, which should be prohibited in sygus.

2 years agoUtilities in preparation for print benchmark utility (#7190)
Andrew Reynolds [Tue, 14 Sep 2021 20:43:47 +0000 (15:43 -0500)]
Utilities in preparation for print benchmark utility (#7190)

This adds a few utilities in preparation for the print benchmark utility, which will replace our own dumping infrastructure.

2 years agoAdd proof manager method to translate difficulty map (#7159)
Andrew Reynolds [Tue, 14 Sep 2021 19:58:01 +0000 (14:58 -0500)]
Add proof manager method to translate difficulty map (#7159)

This method will be called from SmtEngine in the implementation for (get-difficulty).

2 years agoRefactor code generation for option modules (#7182)
Gereon Kremer [Tue, 14 Sep 2021 18:19:29 +0000 (20:19 +0200)]
Refactor code generation for option modules (#7182)

This PR refactors the code generation for options/<module>_options.(h|cpp).

2 years agoTurn sphinx generation into a function (#7181)
Gereon Kremer [Tue, 14 Sep 2021 18:09:27 +0000 (20:09 +0200)]
Turn sphinx generation into a function (#7181)

This PR refactors the generation of the command line help for sphinx to a function, just like all the other code generation methods.

2 years agobv: Unify bit-blasting code for udiv and urem. (#7188)
Mathias Preiner [Tue, 14 Sep 2021 18:00:13 +0000 (11:00 -0700)]
bv: Unify bit-blasting code for udiv and urem. (#7188)

This refactor additionally removes the caching for urem/udiv cases when
bit-blasting udiv/urem and eliminates the only rewrite() calls in the
bit-blaster. Caching is not required since repeated calls to udiv/urem
with the same arguments will produce the same circuit. Further, the rewrite()
calls during bit-blasting would further complicate the recording of
bit-blasting proofs and hence is removed.

2 years agoproofs: Properly track pre- and post-rewrites in bbAtom(). (#7147)
Mathias Preiner [Tue, 14 Sep 2021 17:39:43 +0000 (10:39 -0700)]
proofs: Properly track pre- and post-rewrites in bbAtom(). (#7147)

This commit refactors the proof bit-blaster to properly track the pre- and post-rewrites in bbAtom(). The individual bit-blast steps are recorded in a term conversion proof generator. The overall bit-blast proof is stored in a BitblastProofGenerator, which tracks the pre- and post-rewrite and includes the bit-blast proof of the TCPG.

2 years agoReimplement `--dump=raw-benchmark` as `-o raw-benchmark` (#7191)
Andrew Reynolds [Tue, 14 Sep 2021 15:31:07 +0000 (10:31 -0500)]
Reimplement `--dump=raw-benchmark` as `-o raw-benchmark` (#7191)

Printing the original benchmark is simple, as it is exactly the commands we execute.

This removes the previous code from SmtEngine, which is currently broken.

2 years agoRemove context getters from `TheoryState` (#7174)
Andres Noetzli [Mon, 13 Sep 2021 23:14:54 +0000 (16:14 -0700)]
Remove context getters from `TheoryState` (#7174)

This removes TheoryState::getSatContext() and
TheoryState::getUserContext().

2 years agoConnect difficulty manager to TheoryEngine (#7161)
Andrew Reynolds [Mon, 13 Sep 2021 20:04:09 +0000 (15:04 -0500)]
Connect difficulty manager to TheoryEngine (#7161)

This also introduces the produceDifficulty option which is analogous to produceUnsatCores.

It requires another unsat cores mode PP_ONLY, indicating that we are only tracking proofs of preprocessing. This option should perhaps be renamed to proofMode instead of unsatCoresMode, since its use is more general than for unsat cores. This will be addressed in a future refactoring.

2 years agoAdd Solver::isOutputOn() (#7187)
Gereon Kremer [Mon, 13 Sep 2021 19:21:50 +0000 (21:21 +0200)]
Add Solver::isOutputOn() (#7187)

This PR adds a new api::Solver::isOutputOn() method, including unit tests for both isOutputOn() and getOutput().

2 years agoFP: Rename FpConverter to FpWordBlaster. (#7170)
Aina Niemetz [Mon, 13 Sep 2021 16:39:19 +0000 (09:39 -0700)]
FP: Rename FpConverter to FpWordBlaster. (#7170)

2 years agoRefactor generation code for getInfo() (#7176)
Gereon Kremer [Mon, 13 Sep 2021 16:29:32 +0000 (18:29 +0200)]
Refactor generation code for getInfo() (#7176)

This PR refactors the code generation for options::getInfo()

2 years agoAdd main options to cmake (#7178)
Gereon Kremer [Mon, 13 Sep 2021 16:14:58 +0000 (18:14 +0200)]
Add main options to cmake (#7178)

This PR adds main/options.cpp to cmake. Also, it removes the old (now obsolete and unused) options script.

2 years agoReorder code (#7175)
Gereon Kremer [Mon, 13 Sep 2021 16:05:11 +0000 (18:05 +0200)]
Reorder code (#7175)

This PR reorders some options generation code that is out of order after some merges.

2 years agoRefactor options parsing (#7143)
Gereon Kremer [Mon, 13 Sep 2021 15:54:55 +0000 (17:54 +0200)]
Refactor options parsing (#7143)

This PR refactors the code for options parsing.

2 years agoUse StatisticsRegistry from Env (#7166)
Gereon Kremer [Sat, 11 Sep 2021 19:13:34 +0000 (21:13 +0200)]
Use StatisticsRegistry from Env (#7166)

This commit better integrates the StatisticsRegistry with the environment. It makes the registry an `EnvObj` itself and adds a getter to `EnvObj` to get the registry. It also refactors parts of cvc5 to use this new mechanism to obtain the registry instead of using the (global, static) `smtStatisticsRegistry()` function.

2 years agocheckModel: Extend documentation. (#7177)
Aina Niemetz [Sat, 11 Sep 2021 04:33:19 +0000 (21:33 -0700)]
checkModel: Extend documentation. (#7177)

Add comment that partial operators are one reason that the current
assertion cannot be checked.

2 years agobv: Move IsPowerOfTwo rule to preprocessing pass and use EnvObj. (#7179)
Mathias Preiner [Sat, 11 Sep 2021 03:23:47 +0000 (20:23 -0700)]
bv: Move IsPowerOfTwo rule to preprocessing pass and use EnvObj. (#7179)

IsPowerOfTwo rule is specific to the BvIntroPow2 preprocessing pass and should not be a general bit-vector rewrite rule.

2 years agoAdd casc 28 scripts (#7070)
Andrew Reynolds [Sat, 11 Sep 2021 02:54:40 +0000 (21:54 -0500)]
Add casc 28 scripts (#7070)

2 years agoFP: Enable caching in the theory inference manager. (#7168)
Aina Niemetz [Fri, 10 Sep 2021 19:27:52 +0000 (12:27 -0700)]
FP: Enable caching in the theory inference manager. (#7168)