summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.h
AgeCommit message (Collapse)Author
2020-06-16Update copyright headers.Aina Niemetz
2020-06-11(proof-new) Split TheoryEngine (#4558)Andrew Reynolds
This PR splits two classes from TheoryEngine (EngineOutputChannel and TheoryPreprocess) that will be undergoing further refactoring for proofs. This PR does not change their behavior and is code-move only modulo a few cosmetic changes.
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-04-08Perform theory widening eagerly (#4044)Andres Noetzli
Fixes #3971 and fixes #3991. In incremental mode, the logic can change from one (check-sat) call to another. In the reported issue, we start with QF_NIA but then switch to QF_UFNIA because there is a div term (which has a UF in its expanded form). Dealing with this issue is challenging in general. As a result, we have decided not to allow theory widening in Theory::expandDefinitions() anymore but instead to do it eagerly in SmtEngine::setDefaults().
2020-04-03Update theory rewriter ownership, add stats to strings (#4202)Andres Noetzli
This commit adds statistics for string rewrites. This is work towards proof support in the string solver. At a high level, this commit adds a pointer to a `SequenceStatistics` in the rewriters and modifies `SequencesRewriter::returnRewrite()` to count the rewrites done. In practice, to make this work requires a couple of changes, some of them temporary: - We can't have a single `Rewriter` instance shared between different `SmtEngine` instances anymore. Thus the `Rewriter` is now owned by the `SmtEngine` and calling the rewriter retrieves the rewriter associated with the current `SmtEngine`. This is a temporary workaround before we get rid of singletons. - Methods in the `SequencesRewriter` and the `StringsRewriter` are made non-`static` because they need access to the statistics instance. - `StringsEntail` now has non-`static` methods because it needs a reference to the sequences rewriter that it can call. - The interaction between the `StringsRewriter` and the `SequencesRewriter` changed: the `StringsRewriter` is now a proper `TheoryRewriter` that inherits from `SequencesRewriter` and calls its `postRewrite()` before applying its own rewrites (this is essentially a reversal of roles from before: the `SequencesRewriter` used to call `static` methods in the `StringsRewriter`). - The theory rewriters are now owned by the individual theories. This design mirrors the `EqualityEngine`s owned by the individual theories.
2020-04-01Initialize theory rewriters in theories (#4197)Andres Noetzli
Until now, the `Rewriter` was responsible for creating `TheoryRewriter` instances. This commit adds a method `mkTheoryRewriter()` that theories override to create an instance of their corresponding theory rewriter. The advantage is that the theories can pass additional information to their theory rewriter (e.g. a statistics object).
2020-03-31Remove replay and use-theory options and idl (#4186)Andrew Reynolds
Towards disentangling Options / NodeManager / SmtEngine. This PR removes options --use-theory=NAME and --replay/--replay-log. Both of these options are highly complex, unused, and lead to complications when implementing the way options and our build system work. The first is motivated by making TheoryEngine use an "alternate" theory, which appears to e.g. make it so that TheoryIdl could entirely replace TheoryArith. I believe this is too heavy handed of a solution: there should a consistent TheoryArith class, and options should be used to enable/disable alternate modules within it. The second attempts to replay low level decisions from the SAT solver. It is documented as not working (in 1.0). I do not believe this is worth salvaging. It also removes the solver in src/theory/idl, which cannot be enabled after this commit.
2020-03-11reset-assertions: Update TheoryEngine's PropEngine* (#4032)Andres Noetzli
Fixes #4028. TheoryEngine's pointer was not updated to the new PropEngine when resetting assertions. This commit fixes that. As far as I can tell, this was the only class storing a PropEngine* that isn't owned by PropEngine, so we should hopefully not have other similar issues.
2020-03-05Move ownership of DecisionEngine into PropEngine. (#3850)Aina Niemetz
This is in preparation of fixing the issue we currently have with reset-assertions. This also removes a competition hack for QF_LRA.
2020-03-05Revert "Move ownership of DecisionEngine into PropEngine. (#3850)"Aina Niemetz
This reverts commit bbba915f44f9e75eaa6238a10ba667643dacb00b.
2020-03-05Move ownership of DecisionEngine into PropEngine. (#3850)Andrew Reynolds
This is in preparation of fixing the issue we currently have with reset-assertions. This also removes a competition hack for QF_LRA.
2020-02-26Initial work towards -Wshadow (#3817)Andrew Reynolds
2020-02-26Remove portfolio leftovers (#3821)Andres Noetzli
Commit 1c09572e0e2031519a103caa2a4af0d9bd34a9c5 removed the portfolio build but there were some leftovers. This commit removes them.
2020-02-19resource manager: Add statistic for every resource. (#3772)Mathias Preiner
This commit adds statistics for all resource steps. A resource statistic is incremented by 1 if the resource is spent (via `spendResource`). Fixes #3751.
2019-12-17Generate code for options with modes. (#3561)Mathias Preiner
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
2019-11-04Make check synth solution robust to auxiliary assertions (#3432)Andrew Reynolds
2019-11-04Make getSynthSolution return a Bool (#3306)Andrew Reynolds
2019-10-30Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)Mathias Preiner
2019-10-15Fix OOB access (#3383)Andres Noetzli
In theory_engine.cpp, we were calling `theoryOf()` with `THEORY_SAT_SOLVER` as the theory id. However, `THEORY_SAT_SOLVER` is defined as `THEORY_LAST` and thus out-of-bounds of the `d_theoryTable` defined in theory_engine.h (which is of size `THEORY_LAST`. This commit adds an assertion that detects the out-of-bound access and introduces a method to turn a theory id into a string which correctly handles `THEORY_SAT_SOLVER`.
2019-09-16Remove equality inference option for quantifiers (#3282)Andrew Reynolds
2019-09-16Return RecoverableModalException when model is not available. (#3283)Andrew Reynolds
2019-04-24Do not use __ prefix for header guards. (#2974)Mathias Preiner
Fixes 2887.
2019-03-26Update copyright headers.Aina Niemetz
2018-11-27Lazy model construction in TheoryEngine (#2633)Andrew Reynolds
2018-10-04Clean remaining references to getNextDecisionRequest and simplify (#2500)Andrew Reynolds
2018-09-12 Initial infrastructure for theory decision manager (#2447)Andrew Reynolds
2018-08-25Refactor unconstrained simplification pass (#2374)Andres Noetzli
2018-08-23Refactor ITE simplification preprocessing pass. (#2360)Aina Niemetz
2018-08-17Remove support for flipDecision (#2319)Andrew Reynolds
2018-08-02 Remove references to deprecated propagate as decision feature (#2258)Andrew Reynolds
2018-06-25Updated copyright headers.Aina Niemetz
2018-05-27Fix cegqi assertions for quantified non-linear cases. (#1999)Andrew Reynolds
2018-05-10Refactored BVAckermann preprocessing pass. (#1889)Aina Niemetz
2018-05-08Refactor bv-abstraction preprocessing pass. (#1860)Mathias Preiner
2018-04-25Refactor bv-to-bool and bool-to-bv preprocessing passes (#1788)yoni206
2018-03-05Enable -Wsuggest-override by default. (#1643)Mathias Preiner
Adds missing override keywords.
2018-02-02Option to check solutions produced by SyGuS solver (#1553)Haniel Barbosa
2018-01-15Removing more miscellaneous throw specifiers. (#1509)Tim King
Removing more miscellaneous throw specifiers. Also fixing the spelling of amount in several places.
2017-12-08Make collect model info return a Bool (#1421)Andrew Reynolds
2017-12-06Add command for define-fun-rec and add to API (#1412)Andrew Reynolds
2017-11-15Adding garbage collection for Proof objects. (#1294)Tim King
2017-11-13Initializes NodeTheoryPair::timestamp in the default constructor. (#1356)Tim King
2017-10-25Removing throw specifiers from OutputChannel and subclasses. (#1209)Tim King
2017-10-02Unify hash functions for pairs (#1161)Andres Noetzli
CVC4 was implementing multiple, slightly different hash functions for pairs. With pull request #1157, we have a decent generic hash function for pairs. This commit replaces the existing hash function implementations with a typedef of the generic hash function.
2017-09-13Floating point symfpu support (#1093)Martin
Changes needed for the bit-blasting floating-point solver which are outside of it's area and / or applicable independently.
2017-08-23Fix typosAndres Noetzli
2017-07-20Moving from the gnu extensions for hash maps to the c++11 hash mapsTim King
* Replacing __gnu_cxx::hash_map with std::unordered_map. * Replacing __gnu_cxx::hash_set with std::unordered_set. * Replacing __gnu_cxx::hash with std::hash. * Adding missing includes.
2017-07-07Update copyright headers.Mathias Preiner
2017-04-04Simplify Theory::collectModelInfo interface to not take deprecated fullModel ↵ajreynol
argument.
2017-03-27Making ppNotifyAssertions take a const vector.Tim King
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback