summaryrefslogtreecommitdiff
path: root/src/theory
AgeCommit message (Collapse)Author
2021-07-16Do not exhaustive instantiation when FMF is disabled (#6899)Andrew Reynolds
This makes FMF not handle quantified formulas when FMF options are disabled, apart from those marked internal. This is required for combinations of sequences + quantified formulas.
2021-07-15Fix context for proofs of instantiations (#6890)Andrew Reynolds
Caught by a regression on proof-new, where an instantiation was the symmetric equality of an instantiation on a previous call to check-sat. Proofs of instantiation should be user-context dependent.
2021-07-15Distinguish quantifiers preprocess as its own proof rule (#6897)Andrew Reynolds
2021-07-15Connect the equality solver to theory arith (#6894)Andrew Reynolds
--arith-eq-solver is a new option to enable the equality solver in arithmetic, disabled by default. This PR connects the equality solver to TheoryArith when this option is enabled. This is in preparation for the central equality engine.
2021-07-15Arithmetic equality solver (#6876)Andrew Reynolds
This is work towards the central equality engine. This adds a module of arithmetic that uses the equality engine in the default way. This class will be incorporated into theory_arith.cpp. It will be the replacement for CongruenceManager when we use the central equality engine architecture.
2021-07-15Move master equality engine notification to own file (#6877)Andrew Reynolds
Preparation for central equality engine.
2021-07-15bv: Rename BBSimple to NodeBitblaster. (#6891)Mathias Preiner
2021-07-15bv: Rename lazy solver to layered solver. (#6889)Mathias Preiner
2021-07-14bv: Rename simple solver to bitblast-internal. (#6888)Mathias Preiner
2021-07-14Generalize congruence handling for HO in eq proofs (#6883)Haniel Barbosa
Previously we were not considering proofs for HO equalities (i.e., between operators) that were transitivity chains. This commit generalizes the elaboration procedure in eq_proof to do so.
2021-07-14Move synthesis verification check to own file (#6882)Andrew Reynolds
In preparation for more extensions to this aspect of the synthesis solver.
2021-07-14Refactor setup of proof equality engine for central EE (#6831)Andrew Reynolds
Users of an equality engine should each use the same proof equality engine that wraps it. This ensures that theory inference managers do so, by tracking the official proof equality engine for an equality engine in theory inference manager. This is in preparation for (proper equality proofs for) central equality engine. It also adds some debugging code that is highly useful for debugging issues related to when equalities are processed in theory inference manager.
2021-07-14Fix models for sequences of infinite element type (#6870)Andrew Reynolds
This fixes our model construction for sequences of infinite element type. We were relying on getModelValue in our model construction which is incorrect since it assumes that the element type's theory can provide concrete values during model generation time. This makes the sequence model construction more robust by generalizing how model values are assigned: we use skeletons instead of concrete values when the element type is infinite. This fixes some open model generation issues with Facebook benchmarks.
2021-07-13bv: Add missing BV_EAGER_ATOM proof rule. (#6874)Mathias Preiner
Fixes an issue with --proof-eager-checking and --bitblast=eager.
2021-07-13bv: Simplify BV_BITBLAST_* proof rules. (#6871)Mathias Preiner
Introduces BV_BITBLAST_STEP rule, which replaces BV_BITBLAST_X rules.
2021-07-13[rewriter] Add rewrite to order IFF (equality for Booleans) (#6872)Haniel Barbosa
Not doing this rewrite for Booleans is probably an artifact of the old IFF kind being removed. This rewrite is important to simplify the generation of proofs for the SAT solver, as clarified in the new comment in the SAT proof manager.
2021-07-13bv: Do not rewrite below BV leafs in BBProof's TConvProofGenerator. (#6869)Mathias Preiner
Introduces a TermContext class that can be used to skip rewrites below theory leafs. Fixes issues related to bit-vector leafs begin incorrectly rewritten.
2021-07-13Add branch and bound lemma if linear arithmetic generates a non-integer ↵Andrew Reynolds
assignment (#6868) This double checks that TheoryArithPrivate generates a model that does not assign real values to integer variables. This is done outside of TheoryArithPrivate intentionally, so that it can be checked independently. This code should very rarely be applied but would have caught the incorrect model which led to wrong results in the UFNIA division of smtcomp 2021.
2021-07-13bv: Expand bitblast proof steps in the proof post processor. (#6867)Mathias Preiner
This commit changes BV proof logging to record coarse-grained bit-blast steps during solving and expanding these steps on-demand in the proof post processor.
2021-07-12Add branch and bound (#6865)Andrew Reynolds
This PR moves https://github.com/cvc5/cvc5/blob/master/src/theory/arith/theory_arith_private.cpp#L3451 to its own module. The next PR will connect this module to theory_arith / theory_arith_private. Towards ensuring type constraints are met for linear arithmetic models.
2021-07-12Add arithmetic preprocess rewrite equality module (#6860)Andrew Reynolds
This is the first part of a refactoring which will ensure that the linear arithmetic solver does not violate integer type constraints in its model. This PR moves the method https://github.com/ajreynol/CVC4/blob/master/src/theory/arith/theory_arith.cpp#L129 to its own module / file.
2021-07-12Add trace for combination splits (#6862)Andrew Reynolds
Followup PRs will unify these with the lemmas / stats infrastructure in theory inference manager.
2021-07-12Improvements to debug check model (#6861)Andrew Reynolds
This makes it so that debug-check-models applies in production mode, not just in debug mode. It also verifies that type constraints are met.
2021-07-09Fix sets cardinality inference involving equivalent parents (#6855)Andrew Reynolds
This fixes an unsoundness issue in the sets + cardinality solver. One rule of this solver applies in sets when two parents of a child of a cardinality graph are equal, in which case we know that child or one of its siblings must be equal to the opposite parent. For example, this rule tells us that: if T = (union T S), then (intersect T S) = S. The explanation of this rule could consider the representative term of one the parents instead of the term itself say (union T S) is representative T, giving the unsound inference: if (union T S) = (union T S), then (intersect T S) = S. This ensures we use the original terms. This PR also does some minor cleanup.
2021-07-07Standard output for trigger selection (#6841)Andrew Reynolds
Fixes #6259.
2021-07-06Integrate Lazard into CAD module (#6812)Gereon Kremer
This PR adds two new command line options that govern how the CAD module does projection and lifting, allowing to use the new Lazard evaluation. By default, we use McCallum with regular lifting which does not require CoCoA. Additionally, this PR adds a bunch of unit tests for the CAD module.
2021-07-05[Strings] Fix incorrect rewrite (#6837)Andres Noetzli
Fixes #6834. There were two cases in our extended rewriter for string equalities that were modifying the node without returning and without updating information computed from the original node. This mismatch led to incorrect rewrites. This commit fixes the issue by adding a flag to returnRewrite() that determines whether node that was an equality before and after the rewrite should be rewritten again with the extended rewriter. We generally do not do that (we'd run in danger of rewriting equality nodes with the extended rewriter even though we shouldn't) but for the rewrites that were previously continuing to rewrite the node, we set this flag and return. This ensures that we do not have an issue with information being out of date. The commit additionally fixes an issue where we would apply the rewrite STR_EQ_UNIFY even though the node hadn't changed.
2021-07-05Make buffered inference manager more robust to backtracking (#6833)Andrew Reynolds
This makes TheoryEngine notify all theories when a theory sends a conflict. This means that buffered inference managers always clear their buffers when any theory sends a conflict. This is required for making theories robust to conflicts that may arise when using the central equality engine, where a different theory may raise a conflict during another theory's check.
2021-07-03Fix performance of string regression (#6832)Andres Noetzli
Regression cmu-dis-0707-3.smt2 has been timing out when using an ASan build after commit a4f38d6. Before that commit --strings-exp implicitly enabled --fmf-bound. After the commit, the solver was supposed to apply the same reasoning but only to interal quantifiers and without enabling --fmf-bound. However, the commit missed some options checks that now also have to check whether --strings-exp is enabled. This commit updates those option checks. With this fix, we get a slightly different value for bug590.smt2 after replying unknown. This commit updates the regression to be more lenient with the value returned.
2021-07-03Add output tags -o, --output. (#6826)Mathias Preiner
Output tags are similar to debug/trace tags, but are always enabled (except for muzzled builds) to provide useful information for users. Available output tags can be queried via -o help/--output help and are specified in the base options module via enum values. Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2021-07-02Fix bv assert input reset assertions (#6820)Mathias Preiner
If reset-assertions was called it will now reset the SAT solver and the CNF stream if clauses were permanently added to the SAT solver via option --bv-assert-input.
2021-07-02Fix rewriter for negative constant seq.nth (#6827)Andrew Reynolds
Fixes #6777.
2021-07-01Add recursive function definitions to subsolver in sygus (#6824)Andrew Reynolds
This passes recursive function definitions to the verification subsolver in sygus, with a default bounded limit of 3. This required improving the interface for setting up subsolvers by allowing custom options; the sygus solver statically computes an instance of the options that it uses in all calls. This allows us to solve non-PBE sygus problems with recursive function definitions. The PR adds an example.
2021-07-01Add option to limit the number of instantiation rounds (#6818)Andrew Reynolds
This adds an option to limit the number of instantiation rounds used by quantifiers engine. This option may be generally useful for making quantifiers terminating. It also is necessary to update the new default behavior of SyGuS + recursive functions. A followup PR will make sygus verification calls set the option added on this PR automatically, so that we use incomplete + termination strategies for (non-PBE) sygus in the presence of recursive functions. This PR also makes minor improvements to the quantifier utility infrastructure.
2021-06-30Use SAT context level for --bv-assert-input instead of decision level. (#6758)Mathias Preiner
The decision level as previously implemented was not accurate since it did not consider the user context level. This resulted in facts being incorrectly recognized as input assertions, which happened for incremental benchmarks.
2021-06-30Do not notify during equality engine initialization (#6817)Andrew Reynolds
This is an alternative fix to https://github.com/cvc5/cvc5/pull/6808. This ensures that we do not notify the provided class of an equality engine during initialization.
2021-06-30Do not apply fmfBound to standard quantifiers when only stringsExp is ↵Andrew Reynolds
enabled (#6816) There are compelling use cases that combine strings/sequences and quantifiers. Prior to this PR, strings enabled "bounded integer" quantifier instantiation so that internally generated quantifiers for strings reductions are handled in a complete manner. However, this enabled bounded integer quantifier instantiation globally. This degrades performance for "unsat" on quantified formulas in general. After this PR, we do not enable bounded integer quantifier globally. Instead, we ensure that bounded integer quantification is applied to at least the internally generated quantified formulas; all other quantified formulas are handled as usual. Notice this required ensuring that all quantified formulas generated by strings are marked properly. It also required adding --fmf-bound to a few regressions that explicitly require it.
2021-06-30Fix pre vs. post-rewrite in proofs for theory preprocessor (#6801)Andrew Reynolds
This changes an annotation of a step of rewriting from "post" to "pre" in the theory preprocessor. Fixes #6754.
2021-06-29Add new variants for the CAD projection (#6794)Gereon Kremer
This PR adds variants for the CAD projection operator to use Lazard's projection operator.
2021-06-29Fix statistics in AigBitblaster. (#6810)Mathias Preiner
Fixes #6788
2021-06-29FP: Refactor, rewrite and clean up word blasting. (#6802)Aina Niemetz
This rewrites the word blasting function FpConverter::convert to be easier to follow and read. It further cleans up several things. This additionally prepares for allowing to convert incoming facts rather than terms registered with theory FP. That is, when word blasting more lazily, in preNotifyFact rather than in registerTerm.
2021-06-28Rewrite POW to POW2 when the base is 2 (#6806)yoni206
This PR introduces a rewrite from (^ 2 t) to (pow2 t) in order to make use of the specialized pow2 solver. One regression that expects an error when t is not a constant is changed accordingly.
2021-06-28Rename internal string kinds to match API (#6797)Andrew Reynolds
This commit replaces (old) internal string kind names to match the API / smt2 standard names.
2021-06-25pow2 -- final changes (#6800)yoni206
This commit adds the remaining changes for a working and integrated `pow2` solver. In particular, it adds a rewrite and a lemma that identify `pow2(x)` with `0` whenever `x<0`. Regressions are added as well, including `pow2-native-0.smt2` that shows the semantics of `pow2` on negative values. The next steps are new rewrites and and more lemma schemas.
2021-06-24pow2: Adding monotonicity lemma (#6793)yoni206
We add the lemma x<=y --> pow2(x)<=pow2(y) to the pow2 solver. Additionally, some renaming of variables is introduced for better clarity.
2021-06-24Fix linear arithmetic for duplicate lemmas in incremental (#6784)Andrew Reynolds
The linear arithmetic solver was not robust to cases where a duplicate lemma is emitted. This leads to non-linear arithmetic not being called to check at full effort, leading to potential model soundness issues. Fixes #6773.
2021-06-24Add CoCoA implementation (#6733)Gereon Kremer
This PR adds the actual implementation for the Lazard evaluation based on CoCoALib. It is only used if CoCoALib is available and falls back to a default libpoly-based implementation otherwise.
2021-06-23pow2: more implementations (#6756)yoni206
This PR adds implementations of functions from the pow2 solver, rewriter and type checker.
2021-06-23FP: Remove sections guarded with undefined macro SYMFPUPROPISBOOL. (#6786)Aina Niemetz
2021-06-22Avoid full normalization of lambdas in getValue (#6787)Andrew Reynolds
This ensures that we don't apply lambda rewriting, which involves array value normalization, to lambda terms returned by TheoryModel::getValue. This can significantly speed up our time to return function terms for getValue.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback