summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-08-11Remove instantiation model true option (#4861)Andrew Reynolds
This was an option that rejected instantiations that are true according to the current model's equality engine. This option was never helpful and will be burdensome to maintain with new updates to equality engine infrastructure.
2020-08-11New C++ API: Remove redundant API functions for mkReal. (#4870)Aina Niemetz
This further removes redundant API functions with a `const char*` parameter. These are redundant (and can create ambiguity) since they have `const string&` counterparts.
2020-08-09Make valuation class more robust to null underlying TheoryEngine. (#4864)Andrew Reynolds
In some use cases (unit tests, old proofs infrastructure), we use a Theory with no associated TheoryEngine. This PR makes the Valuation class more robust to this case. This includes making the "unevaluated kinds" a no-op in this case (this is necessary for Theory::finishInit with no TheoryEngine) and adding some assertions to cases that the Theory should never call without TheoryEngine. This is required for a new policy for dynamically configuring equality engine infrastructure in Theory.
2020-08-09Splitting a few utility classes from EqualityEngine to their own file (#4862)Andrew Reynolds
Includes iterators and notification callbacks. These classes will be highly relevant for planned extensions to the core theory engine infrastructure.
2020-08-07Move datatype index constant to its own file (#4859)Andrew Reynolds
Towards removing the Expr-level datatype. Moves DatatypeIndex to its own file, which is the only thing that is necessary remaining from expr/datatype.h. Also updates the datatype kinds file in preparation for the removal.
2020-08-06Updates not related to creation for eliminating Expr-level datatype (#4838)Andrew Reynolds
This updates remaining uses of the Expr-level Datatype that are not related to their creation / memory management in ExprManager. This required updating a unit test from Expr -> Node.
2020-08-06Split preprocessor from SmtEngine (#4854)Andrew Reynolds
This splits a collection of utilities from SmtEngine that work in cooperation to preprocess assertions (Boolean circuit propagator, preprocessing context, process assertions, term formula removal). It updates various interfaces in SmtEngine from Expr -> Node and simplifies SmtEngine to use this utility.
2020-08-06(proof-new) Refactor regular expression operation (#4596)Andrew Reynolds
This refactors the regular expression operation class so that some of its key methods are static, so that they can used by both the regular expression solver and the strings proof checker. Notice that many cases of regular expression unfolding are deleted by this PR, since they are unnecessary. This is due to the fact that all regular expression memberships are rewritten except those whose RHS are re.++ or re.*.
2020-08-05Split Assertions from SmtEngine (#4788)Andrew Reynolds
This splits all things related to storing assertions in the SmtEngine into a separate class "Assertions". It also converts the interface for its methods from Expr to Node.
2020-08-05Improve error message for unsupported exponents (#4852)Gereon Kremer
We have had a few issues where essentially users misinterpreted the error message about which types of exponents are supported for (^ base exp). Given that this is rewritten to a multiplication of length exp, we only support reasonably small natural numbers. This PR improves the error message. Fixes #4692
2020-08-05When checking models, ensure that error message is correctly formatted (#4853)Andrew V. Jones
Issue When CVC4 is checking models and encounters an issue, it presents an message like this: Internal error detectedTHEORY_ARITH has an asserted fact that the model doesn't satisfy. Notice: there's no space between detected and THEORY_ARITH. Resolution This PR ensures that the error message is correctly formatted. Signed-off-by: Andrew V. Jones andrew.jones@vector.com
2020-08-05[Strings] Add eager context-dependent evaluation (#4847)Andres Noetzli
This commit adds eager evaluation of string terms based on the current context. To do so, it declares the string kinds to be "interpreted" in the equality engine. This allows us to avoid making a series of decisions such as: ** (= "describe" (str.substr actionName 0 8)) :DE-DECISION: *** (= actionName "deletecertificate") :DE-DECISION: **** (= resource_partition "aws") :DE-DECISION: ***** (= resource_region "af-south-1") :DE-DECISION: ****** (= resource_account "") :DE-DECISION: ******* (= (str.len (str.substr actionName 0 3)) 0) :DE-DECISION: ******** (= (str.len (str.substr actionName 0 4)) 0) :DE-DECISION: ********* (= (str.len (str.substr actionName 0 6)) 0) :DE-DECISION: ********** (= (str.len (str.substr actionName 0 5)) 0) :DE-DECISION: *********** (= (str.len (str.substr actionName 0 9)) 0) :DE-DECISION: ************ (= (str.len (str.substr actionName 0 7)) 0) :DE-DECISION: ************* (= (str.len (str.substr actionName 0 10)) 0) :DE-DECISION: ************** (= (str.len (str.substr actionName 0 2)) 0) :DE-DECISION: *************** (= (str.len (str.substr actionName 0 13)) 0) :DE-DECISION: **************** (= (str.len (str.substr actionName 0 12)) 0) :DE-DECISION: ***************** (= (str.len resource_service) 0) :DE-DECISION: ****************** (= (str.len resource_account) 0) :DE-DECISION: In such a case, we can detect that there is a conflict after the first two decisions because (str.substr "deletecertificate" 0 8) is deletece which is different from describe. The equality engine uses the rewriter to evaluate interpreted kinds with constant arguments. This technique leads to a significant speedup on some of the newer Amazon benchmarks.
2020-08-04Add dummy returns if libpoly is unavailable. (#4845)Gereon Kremer
This PR adds dummy return statements do CadSolver in case libpoly is not available.
2020-08-04Fixes for getInterpolant and getAbduct API methods (#4846)Andrew Reynolds
This fixes three issues in the getInterpolant method in the API, which was also copied to the getAbduct method: (1) Use Node not Expr (2) Must set up ExprManager scope (3) The wrong solver pointer was passed to the returned term, which was causing segfaults on all abduction regressions. We should also consider changing the interface of this method to return the term instead of a Boolean. This could be done as future work. This fixes regress1.
2020-08-04Add documentation and build instructions for recompilation (LGPL). (#4844)Mathias Preiner
2020-08-04Modify the smt2 parser to use the Sygus grammar. (#4829)Abdalrhman Mohamed
2020-08-04Add API interface for specialized constructor term (#4817)Andrew Reynolds
This is an interface to get the instantiated parametric datatype constructor operator to apply when the type of this operator cannot be inferred without a cast. This is required for eliminating the Expr-level datatype and calls to ExprManager from the parsers.
2020-08-04Properly initialize d_fullyInited. (#4840)Gereon Kremer
Fixed #4839. The Boolean flag d_fullyInited is not properly initialized and is thus flagged by --ubsan.
2020-08-04Add CAD-based solver (#4834)Gereon Kremer
Based on #4774, this PR adds a new CadSolver class that allows the NonlinearExtension to actually employ the CAD-based method. In more detail: add --nl-cad option add CadSolver class that wraps cad::CDCAC with support for checks, model construction and conflict generation add new Inference types for the NlLemma class use CadSolver in NonlinearExtension (if --nl-cad is given)
2020-08-03Update documentation for Solver::mkVar() (#4833)Andres Noetzli
The documentation of `Solver::mkVar()` was not very clear regarding what it could be used for. This lead to some confusion (see e.g. #4828). This commit makes the documentation more explicit.
2020-08-03Add implementation for SyGuS interpolation module (step4) (#4811)Ying Sheng
This is the 4th step of adding interface for SyGuS Interpolation module. The whole change will be adding the API for (get-interpol s B), which is aim for computes an I that A->I and I->B. Here A is the assertions in the stack. The 4th step finished the implementation of the interpolation module.
2020-08-03New BV rewrite rules aimed at bv_to_int preprocessing pass (#4769)yoni206
This PR adds new rewrite rules for BV. None of them is meant to be used by the default BV rewriter. However, they are planned to be used in bv_to_int preprocessing pass. In the pass we use FixpointRewriteStrategy to call various rewrite rules. After consulting @4tXJ7f , we thought that the best way to include more rewrite rules in that call is to implement them using the existing BV rewrites infrastructure.
2020-08-03Generalize interface for candidate rewrite database (#4797)Andrew Reynolds
This class will be used as a utility in a new algorithm for solution reconstruction and requires a generalized interface. FYI @abdoo8080
2020-08-03Update datatypes in cvc parser to the new API (#4826)Andrew Reynolds
This is leftover from the parser conversion. This is towards eliminating all remaining Expr-level calls in the parser. Notice that 2 parser-level checks for records are eliminated in this PR, since we do not export record objects in the new API.
2020-08-03Delete solver pointer in Cython __dealloc__ (#4799)makaimann
2020-08-03Split expression names from SmtEngine (#4832)Andrew Reynolds
Towards splitting SmtEngine / deleting SmtEnginePrivate.
2020-08-03Split dump manager from SmtEngine (#4824)Andrew Reynolds
Towards splitting SmtEngine. This moves utilities related to managing information for dumping to its own utility, DumpManager. Its current responsibilities are to track information about how to print a model, and the implementation of some dumping traces, although its responsibilities should be extended further so that SmtEngine is not responsible for any command dumping. This is future work.
2020-08-02Updates to dtype constructor in preparation for eliminating Expr-level ↵Andrew Reynolds
datatype (#4825)
2020-08-02Fix ASan failure in interactive_shell_black (#4827)Andres Noetzli
This commit fixes an issue reported by ASan for unit test interactive_shell_black. The unit test was failing because nodes were created in the wrong node manager. The issue was likely introduced with e8bbee7.
2020-08-01Ensure strict length constraint for decompose rule (#4821)Andres Noetzli
Fixes #4820. The performance issue was caused by 0988217562006d3f59e01dc261f39121df6d75f5. That commit introduced an option (`--strings-len-conc`) that optionally moves the length constraint for skolems to the conclusion of an inference instead of making it part of the term registration. However, for `DEQ_DISL_STRINGS_SPLIT`, we were only asserting that `LENGTH_GEQ_ONE` in the case where this option was not enabled, instead of asserting that the length of the skolem is equal to the component on the other side of the disequality. This lead to an infinite loop of inferences because we effectively were just splitting a component into two skolems and the only restriction was that the first one was non-empty. We guessed the second skolem to be empty, so the first skolem was equal to the component, the skolem was marked congruent, and we ended up with the same normal form as before. The commit fixes the issue by adding an argument to `getDecomposeConclusion()` that specifies whether to add the length constraint or not. This option is used to always add the length constraint in the case of `DEQ_DISL_STRINGS_SPLIT`.
2020-08-01Add methods for constructing datatype types from NodeManager (#4823)Andrew Reynolds
This is work towards eliminating the Expr-level datatype. This PR implements the required methods for constructing datatype types from NodeManager. In particular, this PR copies the "mkMutualDatatypeTypes" methods and converts them to Node-level. The next PRs will be in preparation for using these methods instead of the Expr-level ones. It also adds a flag d_isRecord to DType, which is required for supporting record printing in the cvc printer, which will be updated in another PR. It also eliminates an interface for constructing constructor types via Expr-level DatatypeConstructor objects, which was unused.
2020-08-01Fix component contains for splicing due to substring. (#4705)Andrew Reynolds
Fixes #4701. That benchmark now times out.
2020-07-31Add SyGuS Python API (#4812)yoni206
This commit extends the Python API with support for SyGuS functionality. This required the addition of a nullary constructor for `Grammar` in the C++ API. A unit test is also included, and is a translation of the corresponding C++ API unit test. Examples are not added yet, but are ready and planned for a next PR (in order to keep this one shorter).
2020-07-31Split listener classes from SmtEngine (#4816)Andrew Reynolds
This moves listener classes owned by SmtEngine to their own file. The SmtEnginePrivate class previously what itself a NodeManagerListener. This class will be deleted. Instead a new NodeManagerListener is introduced here whose sole responsibility is to do the work required for node manager listening. Note I had to add a (temporary) friend relationship to SmtEngine, which will be removed in an upcoming PR to split the management of dumping to its own utility.
2020-07-30Standardize explanations in arrays (#4804)Andrew Reynolds
Some internal inferences had a non-standard way of providing (disjunctive) reasons and a custom way of explaining them. This PR simplifies the array solver so that its explanations are analogous to the other equality engine based theory solvers (strings, datatypes, sets, ...). This is done in preparation for the incorporation of the proof equality engine in arrays, which follows a standard design for reasons/explanations. The performance impact on QF arrays is negligible
2020-07-30Python API: Add support for sequences (#4757)Andres Noetzli
Commit 9678f58a7fedab4fc061761c58382f4023686108 added front end support for sequences. This commit extends that support to the Python API. It also adds simple C++ and Python examples that demonstrate how the API works for sequences.
2020-07-30Cad implementation (#4774)Gereon Kremer
This commit implements the CAD interface added in #4773.
2020-07-30Adds the interface for the CAD-based arithmetic solver. (#4773)Gereon Kremer
This PR adds some utilities and, most importantly, the interface of the new CAD-based solver. The approach is based on https://arxiv.org/pdf/2003.05633.pdf and the code structure follows the paper rather closely.
2020-07-30When linking Editline, use 'pkg-config' to correctly find the link-time ↵Andrew V. Jones
dependencies (#4809) Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-30Fix null case for sygus printing (#4793)Andrew Reynolds
Avoids crashing on some of our debug traces.
2020-07-30(proof-new) Stream output for ProofNode (#4789)Andrew Reynolds
2020-07-29(proof-new) Fixes for getFreeAssumptions (#4802)Andrew Reynolds
Free assumptions weren't getting cleaned up due to not doing a postorder traversal. This issue came up when doing subproof sharing involving SCOPE proofs.
2020-07-28fixing issue #4808. (#4810)Ying Sheng
fixing issue #4808. Remove structural binding, which only supported by c++17.
2020-07-28Remove arrays lazy rintro option (#4806)Andrew Reynolds
This option has model soundness issues (#4771) and moreover is overall worse performance on SMT-LIB {QF_ABV QF_ABVFP QF_ABVFPLRA QF_ALIA QF_ANIA QF_AUFBV QF_AUFLIA QF_AUFNIA QF_AX}: Configuration #unsat time #sat time #solved #total CVC4-072720_def 9428 9405.46 24932 16631.6 34360 35399 CVC4-072720_nalr1 9446 9536.41 24924 16146.3 34370 35399 where def = default, nalr1 = --no-arrays-lazy-rintro1. Fixes #4771. FYI @barrettcw
2020-07-28Replace Expr with Node in Term/Op (#4781)Andres Noetzli
This commit changes Term and Op to use Nodes internally instead of Exprs. This is a step towards removing the Expr-layer. This commit also adds some missing checks regarding the number of arguments for a given kind that were previously missing, which caused issues in unit tests when using Node instead of Expr.
2020-07-28Fix regular expression delta for complement (#4765)Andrew Reynolds
Fixes #4759 . Also refactors this method.
2020-07-28Supporting seq.nth (#4723)yoni206
This PR adds support for seq.nth operator by eliminating it during expandDefinitions, based on sub-sequences. Tests that use this operator are also included.
2020-07-28Interpolation: Add interface for SyGuS interpolation module (step3) (#4726)Ying Sheng
This is the 3rd step of adding interface for SyGuS Interpolation module. The whole change will be adding the API for (get-interpol s B), which is aim for computes an I that A->I and I->B. Here A is the assertions in the stack. The 3rd step partially implemented the interpolation module.
2020-07-28Use lemma property enum for OutputChannel::lemma (#4755)Andrew Reynolds
There are 3 Boolean flags for OutputChannel::lemma, and plans to add another for relevance. This makes them into a enum.
2020-07-27(proof-new) Proof production for term formula removal (#4687)Andrew Reynolds
This adds proof support in the term formula removal pass. It also refactors this class heavily so that its interface is more intuitive and does not depend on AssertionPipeline.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback