summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-04Update Java tests to match changes in API (#4535)Andres Noetzli
Commit cfeaf40ed6a9d4d7fec925352e30d2470a1ca567 renamed `Result::Validity` and `SmtEngine::query()` to `Result::Entailment` and `SmtEngine::checkEntailed()`, respectively. The commit did not update the Java tests which lead to issues in debug builds with Java bindings. The commit also adds a corresponding `NEWS` entry.
2020-06-04Wrap Result in Python API (#4473)makaimann
This PR would change the Python API to wrap the C++ Result class instead of translating it to a pure Python class. This is more convenient because there are several possibilities other than sat/unsat/unknown. Furthermore, this PR updates the bitvectors.py example which had an incorrect function name "checkEntailment" and adds a floating point example contributed by Eva Darulova.
2020-06-04New C++ Api: Second and last batch of API guards. (#4563)Aina Niemetz
This adds the remaining API guards in the Solver object (incl. unit tests).
2020-06-04Add sygus datatype substitution utility method (#4390)Andrew Reynolds
This makes the method for substiutiton and generalization of sygus datatypes a generic utility method. It updates the abduction method to use it. Interpolation is another target user of this utility.
2020-06-04Fix abduction with datatypes (#4566)Andrew Reynolds
Previously we were treating constructor/selector/tester symbols as arguments to the abduct-to-synthesize.
2020-06-04Theory strings preprocess (#4534)Andrew Reynolds
This makes it so that the main reduce function in TheoryStringsPreprocess is static, so that it can be used both by the solver and the proof checker. It also updates the functions to make use of IndexVar for constructing canonical universal variables.
2020-06-03New C++ Api: First batch of API guards. (#4557)Aina Niemetz
This is the first batch of API guards, mainly extending existing guards in the Solver object with checks that Ops, Terms, Sorts, and datatype objects are associated to this solver object. This further changes how DatatypeConstructorDecl objects are created. Previously, they were not created via the Solver object (while DatatypeDecl was). Now, they are created via Solver::mkDatatypeConstructorDecl, consistent with how DatatypeDecl objects are created.
2020-06-03(proof-new) Adding rules and proof checker for EUF (#4559)Haniel Barbosa
2020-06-03(proof-new) Adding rules and proof checker for Boolean reasoning (#4560)Haniel Barbosa
2020-06-03(proof-new) Add builtin proof checker (#4537)Andrew Reynolds
This adds the proof checker for TheoryBuiltin, which handles the core proof rules (SCOPE and ASSUME) and all proof rules corresponding to generic operations on Node objects. This includes proof rules for rewriting and substitution, which are added in this PR.
2020-06-03Fix normalization of author names in contrib/get-authors. (#4553)Mathias Preiner
2020-06-03Do not apply unconstrained simplification when quantifiers are present (#4532)Andrew Reynolds
Fixes #4437. This is a simpler fix that aborts the preprocessing pass when a quantifier is encountered. It also updates our smt2 parser to throw a logic exception when forall/exists is used in non-quantified logics. This is required to ensure that unconstrained simplification does not throw an exception to a user as a result of accidentally setting the wrong logic.
2020-06-03Update CEGQI to use lemma status instead of forcing preprocess (#4551)Andrew Reynolds
This PR removes a hack in counterexample-guided quantifier instantiation. The issue is the CEGQI needs to know the form of certain lemmas, after theory preprocessing. CEGQI needs to know this since it must construct solutions (e.g. solved form of equalities) for free variables in these lemmas, which includes fresh variables in the lemma after postprocess like ITE skolems. Previously, CEGQI was hacked so that it applied the preprocessing eagerly so that it had full knowledge of the postprocessed lemma. This PR updates CEGQI so that it uses the returned LemmaStatus as the way of getting the lemma after postprocess. It also fixes the lemma status returned by TheoryEngine so that all lemmas not just the "main lemma" are returned as a conjunction. This PR is in preparation for major refactoring to theory preprocessing for the sake of proofs.
2020-06-02Use prenex normal form when using cegqi-nested-qe (#4522)Andrew Reynolds
Previously, we used a specialized variant of prenex normal form that allowed top level disjunctions. However, the method to put quantifiers into this form led to variable shadowing on some benchmarks in SMT-LIB LRA. This simplifies the code so that we use standard prenex normal form when cegqi-nested-qe is used and deletes the old variant (DISJ_NORMAL).
2020-06-02Add Term::substitute to Python bindings (#4499)makaimann
2020-06-02Add hash Op, Sort and Term in Python bindings (#4498)makaimann
2020-06-02Fix scope issue with pulling ITEs in extended rewriter. (#4547)Andrew Reynolds
Fixes #4476.
2020-06-02Do not handle universal quantification on functions in model-based FMF (#4226)Andrew Reynolds
Fixes #4225, fixes CVC4/cvc4-projects#159, fixes CVC4/cvc4-projects#157, fixes #4289, fixes #4483. This makes it so that the main model-based instantiation algorithm is not applied to quantified formulas with universally quantified functions. Identation changed in a FMF function, this was refactored to conform to guidelines, and further cleaned.
2020-06-02New C++ API: Keep reference to solver object in non-solver objects. (#4549)Aina Niemetz
This is in preparation for adding guards to ensure that sort and term arguments belong to the same solver.
2020-06-01(proof-new) Proof step buffer utilities (#4533)Andrew Reynolds
This class is used for delaying proof node creation until it is necessary.
2020-06-01Move non-linear files to src/theory/arith/nl (#4548)Andrew Reynolds
Also makes CVC4::theory::arith::nl namespace. This includes some formatting changes.
2020-06-01Set theoryof-mode after theory widening (#4545)Andres Noetzli
Fixes #4367. We set the theoryof-mode depending on whether sharing is enabled or not. However, we were checking whether sharing was enabled before theory widening, leading to unexpected results. This commit moves the check after widening the theories. For the benchmark in the issue, setting the theoryof-mode before theory widening lead to problems because of the following: The main solver checks the condition for enabling term-based theoryof-mode, decides not to do it because sharing is not enabled Main solver adds UF to the logic Main solver does a check-sat all Unsat core check runs, sees both UF and NRA enabled, and switches to term-based mode Main solver gets to second check-sat call, now the theoryof-mode is suddenly changed, which leads to problems in the equality engine This commit fixes the issue in this particular instance but it is important to note that it does not address the issue of the subsolver changing settings in general. This can only really be solved by separating the options from the ExprManager/NodeManager and having separate options for each SmtEngine/Solver instance.
2020-06-01Do not parse ->/lambda unless --uf-ho enabled (#4544)Andres Noetzli
Fixes #4477. Logic ALL includes higher-order but we currently do not support solving higher-order problems unless --uf-ho is enabled. This commit changes the condition under which we parse -> and lambda to only enabled parsing of those symbols if the logic allows higher-order constraints and --uf-ho is enabled.
2020-06-01Incorporate sequences into the word interface (#4543)Andrew Reynolds
Also renames a function mkWord -> mkWordFlatten.
2020-05-31Do not cache operator eliminations in arith (#4542)Andres Noetzli
Fixes #4525. The actual problem in the issue is not that the unsat core is satisfiable but that our unsat core check is not working as intended. Our unsat core check uses the same `ExprManager` as the main `SmtEngine` and thus also shares the same attributes for nodes. However, since we have a different `SmtEngine` instance for the check, we also have different instances of `TheoryArith`. This leads to the check failing due to the following: - Our only input assertion is `(> (cot 0.0) (/ 1 0)))`. - `TheoryArith::expandDefinition()` gets called on `(> (cot 0.0) (/ 1 0))` but nothing happens. - `TheoryArith::expandDefinition()` gets called on `(/ 1 0)`, which gets expanded as expected but no attribute is set because it happens in a simple `TheoryArith::eliminateOperators()` call. - `TheoryArith::expandDefinition()` on `(cot (/ 0 1))` first expands to `(/ 1 0)` (not cached) and then we expand it recursively to the expected term and cache `(/ 1 0) ---> (ite (= 0 0) (divByZero 1.0) (/ 1 0))`. Up to this point, things are suboptimal but there are no correctness issues. The problem starts when we do the same process in the unsat core check: - Our only input assertion is again `(> (cot 0.0) (/ 1 0)))`. - `TheoryArith::expandDefinition()` gets called on `(> (cot 0.0) (/ 1 0))` but nothing happens. - `TheoryArith::expandDefinition()` gets called on `(/ 1 0)`, which gets expanded as expected but no attribute is set or checked because it happens in a simple `TheoryArith::eliminateOperators()` call. Note that the skolem introduced here for the division-by-zero case is different from the skolem introduced above because this is in a different `TheoryArith` instance that does not know the existing skolems. - `TheoryArith::expandDefinition()` on `(cot (/ 0 1))` first expands to `(/ 1 0)` (not cached) and then we use the cache from our solving call to expand it `(/ 1 0) ---> (ite (= 0 0) (divByZero 1.0) (/ 1 0))`. Note that `divByZero` here is the skolem from the main solver. As a result, the preprocessed assertions mix skolems from the main `SmtEngine` with the `SmtEngine` of the unsat core check, making the constraints satisfiable. To solve this problem, this commit removes the caching-by-attribute mechanism. The reason for removing it is that it is currently ineffective (since most eliminations do not seem to be cached) and there are caches at other levels, e.g. when expanding definitions. If we deem the operator elimination to be a bottleneck, we can introduce a similar mechanism at the level of `TheoryArith`.
2020-05-30update example in README to use ctest. (#4540)yoni206
An example for restricting timeout in tests uses the old `make regress0` instead of the new `ctest -L regress0`
2020-05-30Add the sequence type (#4539)Andrew Reynolds
This adds basic infrastructure for the sequence type, including its type rules, type enumerator and extensions to type functions. The next step will be to finalize the support in TheoryStrings for sequences and then add front end support for sequences in the API/parsers.
2020-05-28Fix term registry for constant case, simplify. (#4538)Andrew Reynolds
We were getting an assertion failure (causing nightlies to fail) due to the recent optimization to the strings skolem cache (978f455). This ensures we ignore constant strings in TermRegistry::getRegisterTermAtomicLemma. It also removes a deprecated option that is deleted in the proof-new branch.
2020-05-27Add the Expr-level sequence datatype (#4526)Andrew Reynolds
This adds the expr-level sequence datatypes. This is required for further progress on sequences. However, note that this class may be deleted in the further when the Expr level is replaced.
2020-05-27Tweak the use of static_assert to support older compilers. (#4536)Martin
C++11 introduces static_assert(bool, string). C++17 introduces static_assert(bool) By adding a message we can support older compilers such as those used by our nightly build system...
2020-05-26Fix an incorrect limit in conversion from real to float (#4418)Martin
This error is a bit inexplicable but very very definitely wrong. A test case from the original bug report is included.
2020-05-26Convert more uses of strings to words (#4527)Andrew Reynolds
2020-05-26Fix mismatched iterators (CID 1493892). (#4531)Mathias Preiner
Issue found by coverity.
2020-05-26(proof-new) Update proof checker. (#4511)Andrew Reynolds
This adds new required features to proof checker and the base class of proof rule checker. This is required as the first dependency towards merging further infrastructure related to proofs.
2020-05-26(proof-new) Updates to strings skolem cache. (#4524)Andrew Reynolds
This PR makes strings skolem cache call the ProofSkolemCache. This is required for proper proof checking, as it makes all skolems be associated with their formal definition, encapsulated by a witness term. It furthermore makes skolem sharing more uniform and aggressive by noting that most string skolems correspond to purification variables (typically for some substr term). A purification variable for a term that rewrites to a constant can be replaced by the constant itself. It also introduces an attribute IndexVarAttribute which is used to ensure reductions involving universal variables are deterministic.
2020-05-25Update to CaDiCaL version 1.2.1. (#4530)Mathias Preiner
2020-05-23[SMT-COMP] Redirect non-answers to /dev/null (#4528)Andres Noetzli
Commit 00badd3a63a2fa568373d5c58553944b579d42bb changed our run script to write output other than `sat`/`unsat` to a file if `$2` is passed to it. However, it looks like StarExec does not pass that parameter to our script despite the documentation claiming that it does [0]. This commit makes our check more defensive by redirecting our unnecessary output to `/dev/null` if `STAREXEC_WALLCLOCK_LIMIT` is set. I've done a quick test run on StarExec and it looks like this does the trick. [0] https://wiki.uiowa.edu/display/stardev/User+Guide#UserGuide-SpecialVariables
2020-05-23remove unused field d_emp_exp in TheorySetsPrivate (#4521)mudathirmahgoub
Remove unused field d_emp_exp in TheorySetsPrivate
2020-05-23Add the sequence datatype (#4153)Andrew Reynolds
This class is the Node-level representation of a sequence. It is analogous to CVC4::String.
2020-05-22Fix mistakes in sygus API comments. (#4520)Abdalrhman Mohamed
2020-05-22Refactor operator elimination in arithmetic (#4519)Andrew Reynolds
This is a major refactor of how operators are eliminated in arithmetic. Currently there were (at least) two things wrong: (1) ppRewriteTerm sent lemmas on the output channel. This behavior is incompatible with how preprocessing works. In particular, this caused unconstrained simplification to be unaware of terms from such lemmas, leading to incorrect "sat" answers. (2) Lemmas used to eliminate certain "div-like" terms were processed in a context-independent way. However, lemmas should be cached in a user-context-dependent way. This was leading to incorrect "sat" answers in incremental. The solution to these issues is to eliminate operators via the construction of witness terms. No lemmas are sent out, and instead these lemmas are the consequence of term formula removal in the standard way. As a result of the refactor, 2 quantifiers regressions time out due to infinite branch and bound issues (one only during --check-unsat-cores). These appear to be random and I've changed the options to avoid these issues. 3 others now have check-model warnings, which I've added --quiet to. Improving check-model will be addressed on a future PR. This PR is not required for SMT COMP since we have workarounds that avoid both the incorrect behaviors in our scripts. Also notice that --rewrite-divk is effectively now enabled by default always. Fixes #4484, fixes #4486, fixes #4481.
2020-05-22[SMT-COMP] Use tear-down-incremental for arithmetic (#4518)Andres Noetzli
This commit changes the run-script for the incremental track to use `--tear-down-incremental=1` for all logics that involve arithmetic. The main motivation for this change is avoid issues that we have with the lemmas generated for `mod`/`div` during `ppRewrite` that cause model-soundness issues.
2020-05-22CaDiCaL: Clean up initialization on creation. (#4516)Aina Niemetz
2020-05-22(proof-new) Add rewrite corresponding to regular expression inclusion (#4513)Andrew Reynolds
This introduces a rewrite based on regular expression inclusion (using calls to the RegExpEntail utility function). This allows us to justify the regular expression inclusion inference as a rewrite.
2020-05-22Cryptominisat: Clean up initialization on creation. (#4515)Aina Niemetz
2020-05-22Add support for SAT solver Kissat. (#4514)Aina Niemetz
2020-05-22(proof-new) Proof node to SExpr utility. (#4512)Andrew Reynolds
This is required for dag-ifying ProofNode output.
2020-05-21Update string kind names in new API (#4509)Andrew Reynolds
To match the smt2 Unicode standard. The internal ones are left unchanged for now.
2020-05-21(proof-new) Minor update to strings solver state (#4510)Andrew Reynolds
2020-05-21Disable re-elim by default (#4508)Andrew Reynolds
Disabling re-elim performs better overall in many recent experiments.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback