summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-14correctly parse sygus lang option (#4884)E Polgreen
--lang sygus is a synonym for --lang sygus2 also fixes typo in error message for language options parsing Signed-off-by: polgreen <epolgreen@gmail.com>
2020-08-14Inspect roots to avoid certain resultants (Algorithm 4, lines 8,9). (#4892)Gereon Kremer
This PR adds a small improvement to the CAD solver. In Algorithm 4 of https://arxiv.org/pdf/2003.05633.pdf in lines 8 and 9, we only consider polynomials for resultant computations that have roots outside of the current interval. This PR implements this check. Fixes CVC4/cvc4-projects#210.
2020-08-13Split SmtSolver from SmtEngine (#4880)Andrew Reynolds
This class is responsible for maintaining TheoryEngine and PropEngine and implementing the check-sat command. It also has an interface for processing/pushing the current assertions into the PropEngine. This class will be used directly by other extension solvers (for abduction, interpolation, qe, sygus, etc.).
2020-08-13Fixes for corner case of decision tree learning with different types (#4887)Andrew Reynolds
There was a last minute change was a typo when merging 103b5ea . Also the fix in that commit needed to be slightly more robust to the case when either branch of an ITE had a different sygus type. Fixes regress1.
2020-08-13More basic fix for dumping synth-fun (#4886)Andrew Reynolds
The commit (079a04b) appears to have broken the nightlies due to compile issues related a necessary addition to the Dump class (so that std::string could be printing on Dump streams). This changes the temporary solution so that we simply print a string on the standard output, when the Dump is enabled. This is required for temporarily keeping dump=raw-benchmark working for synth-fun commands.
2020-08-13Add the distributed equality engine manager (#4867)Andrew Reynolds
This is the first step towards making the approach for theory combination in CVC4 configurable. This PR introduces the "distributed equality engine manager", which encapsulates the current policy that TheoryEngine uses regarding equality engines: each Theory creates a separate copy of an equality engine. The eventual plan is that the official equality engine of Theory is not necessarily unique to the theory, if equality engines are shared. A variant of this class could implement that policy. This PR does not impact the code, it simply adds the definition of the class. A forthcoming PR will integrate this class into TheoryEngine, which will use dynamic allocation for equality engine objects. FYI @barrettcw
2020-08-12[proof-new] Adding support for corner case of transitivity simulating ↵Haniel Barbosa
MERGED_THROUGH_CONSTANTS (#4879)
2020-08-12generalize handling MERGED_THROUGH_CONSTANST in EqProof conversion (#4878)Haniel Barbosa
Now that we are using the constant folding in equality engine for more than equality it is necessary to generalize the previously-hard-coded handling of MERGED_THROUGH_CONSTANTS.
2020-08-12Refactor functions that print commands (Part 1) (#4869)Abdalrhman Mohamed
This PR is a step towards migrating commands to the Term/Sort level. The functions for printing synth-fun command and its grammar were modified to remove their dependency on command objects and use nodes instead of exprs and types. Similar changes to other functions that print commands will follow.
2020-08-12Fixes for degenerate case of sygus decision tree learning (#4800)Andrew Reynolds
Fixes #4790. Fixes two bugs in the decision tree learning solver for sygus, one involving evaluation of "templated" enumerators, and one involving ITE strategies where child types are different than the root.
2020-08-12(proof-new) Improve robustness of CONG rule (#4882)Andrew Reynolds
This makes it so that the explicit Kind is wrapped in a Node as an argument to the CONG proof rule. This allows us to distinguish applications with the same parameterized operator but different kinds (e.g. APPLY_SELECTOR vs APPLY_SELECTOR_TOTAL).
2020-08-12(proof-new) Proof support in the strings term registry. (#4876)Andrew Reynolds
Adds basic support for proofs in the strings term registry. This code is not yet active until further parts of proof-new are merged.
2020-08-12(proof-new) Improve interfaces to proof generators (#4803)Andrew Reynolds
This includes configurable naming and a caching policy for term conversion proof generator. Also corrects a subtle issue in LazyCDProof related to making getProofFor idempotent using the notion of owned proofs.
2020-08-12Add option to only build library (#4801)makaimann
This PR would add an option to only build the CVC4 library and not the parser or executable. This can be used for projects that only intend to use CVC4 through the API. It seems to be working now, but it's not necessarily the cleanest solution. In particular, if you'd like the polarity to be different I'm happy to change that. Polarity meaning something like "${WITH_BINARY}" STREQUAL "YES" instead of NOT "${LIB_ONLY} STREQUAL "YES" which is admittedly a little strange.
2020-08-12(proof-new) Witness form proof generator (#4782)Andrew Reynolds
This class is responsible for the connection between terms and their witness form in the final proof.
2020-08-12Add naive support for integer variables. (#4835)Gereon Kremer
This PR adds naive support for integer reasoning to the CAD-based solver. Essentially, it checks whether the sampled value is integral. If this is not the case, we "invent" a new interval covering the area between the two neighbouring integers with appropriate border polynomials.
2020-08-12(proof-new) Improving proof-production in Equality Engine (#4871)Haniel Barbosa
This commit improves functionalities of the equality engine so that it is easier to produce proofs for its reasoning. They are: avoiding assertion of already entailed predicates/equalities. better EqProof of disequalities with constants correct EqProof involving n-ary congruence kinds
2020-08-12Fix connection to master equality engine in sets (#4877)Andrew Reynolds
This corrects an issue introduced by a merge of a previous commit (b5b2858) which dropped the connection from sets to its master equality engine. Fixes several issues in sets regressions, including a timeout in regress0.
2020-08-12Fix infinite loop in arith_ite_simp (#4805)Gereon Kremer
We have an open issue with an infinite loop with --ite-simp for a long time in #789 , for example on (declare-fun a () Int) (declare-fun b () Int) (assert (and (= 1 (+ a b)) (or (= 0 a) (= 0 b)) (or (= 0 b) (>= b 8)) (or (= 0 a) (not (>= b 8))) ) ) (check-sat) The problem goes back to arith_ite_utils.cpp and roughly is as follows: The method solveBinOr looks for patterns like (or (= b 0) (= b 1)). It introduces a new Boolean variable deor_1 and substitutes b -> (ite deor_1 1 0). The method also stores another mapping in d_skolems: deor_1 -> (>= b 8) here which is also used in selectForCmp. However, these skolems are also used to add even more substitutions here after applying the already added substitutions to it. Eventually, we have a substitution deor_1 -> (>= (ite deor_1 1 0) 8) which inevitably leads to an infinite loop. I have found no reason for the second mapping (deor_1 -> (>= b 8)) to be added as a substitution, and thus this PR removes it. Benchmarks are running to check whether there are further issues with this, and whether this simplification is beneficial. Fixes #789.
2020-08-11Fix unsupported option in regress1. (#4874)Andrew Reynolds
Fixes regress1.
2020-08-11Split SmtEngineState from SmtEngine (#4855)Andrew Reynolds
This splits a utility for tracking the "basic" state of the SmtEngine. This class tracks its high-level state, including the "SMT mode", last/expected status and manages the contexts. It is not responsible more detailed state information (e.g. the assertions).
2020-08-11Prepare theory of sets for dynamic allocation of equality engine (#4868)Andrew Reynolds
In forthcoming PRs, Theory objects will be assigned equality engine objects dynamically. This PR prepares the theory of sets for this update, which involves refactoring of its internal members.
2020-08-11Final preparations for changing API to use the Node-level datatype (#4863)Andrew Reynolds
This includes all fixes encountered while fixing unit tests with the Term -> Node version of Datatypes in the API. After all pending PRs are merged, the next step will be to convert the new API to use e.g. CVC4::DType instead of CVC4::Datatype everywhere.
2020-08-11(proof-new) Extensions to proof checker interface (#4857)Andrew Reynolds
This includes support for pedantic levels, as well as a utility for wrapping Kind in a Node (for the updated CONG rule, to be updated in a later PR).
2020-08-11Update Expr-level unit tests that depend on datatypes to Node (#4860)Andrew Reynolds
In preparation for eliminating the Expr-level datatype.
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-07GH Actions: Remove cancel action. (#4843)Aina Niemetz
The previously introduced action to cancel running builds is not able to cancel builds on other branches, only on the same branch. As a consequence, when pushing to a branch for which a PR has been submitted, builds on the main repository are not cancelled. This removes the cancel build. If we want behavior similar to how it was on Travis, we need a workaround / more sophisticated solution since GH Actions doesn't really allow / support this (due to permission issues).
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.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback