summaryrefslogtreecommitdiff
path: root/src/decision
AgeCommit message (Collapse)Author
2021-06-09Update CVC4 URLs/macros (#6666)Andres Noetzli
2021-05-27Enable new justification heuristic by default (#6613)Andrew Reynolds
This enables the new implementation of justification heuristic by default. Fixes #5454, fixes #5785. Fixes wishues 114, 115, 149, 160.
2021-05-24Implementation of the new justification heuristic (#6465)Andrew Reynolds
This adds the new implementation of the justification heuristic. It does not enable this strategy yet. A followup PR will activate this strategy within DecisionEngine.
2021-05-13Add std::hash overloads for Node, TNode and TypeNode. (#6534)Mathias Preiner
Eliminates NodeHashFunction, TNodeHashFunction and TypeNodeHashFunction.
2021-05-04Move current decision engine to decision engine old (#6466)Andrew Reynolds
The decision engine is the class that contains strategies for doing e.g. justification heuristic. The current implementation is hardcoded for the old implementation of justification heuristic. Since both implementations will be maintained in the short term, this splits the parts of DecisionEngine that are specific to the old implementation to a class DecisionEngineOld. It refactors the interface of DecisionEngine in a way that is compatible with both implementations.
2021-04-29Add assertion list utility for justification heuristic (#6414)Andrew Reynolds
2021-04-22 Reorganizing use of skolem definition manager in prop engine (#6415)Andrew Reynolds
Towards setting up the proper callbacks into the new justification heuristic. Moves ownership of skolem definition manager from TheoryProxy to PropEngine.
2021-04-21Add basic utilities for new implementation of justification heuristic (#6333)Andrew Reynolds
This sets up the core utilities for the new implementation of justification heuristic
2021-04-14Refactor / reimplement statistics (#6162)Gereon Kremer
This PR refactors how we collect statistics. It splits the current statistic values into the values and a proxy object. The actual values now live inside the registry (making the ownership model way easier) while the proxy object are handed to whoever wants to collect a new statistic. It also extends the C++ API to obtain and inspect the statistics. To change the ownership, this PR needs to touch every single statistic in the whole codebase and change how it is registered.
2021-04-14Rename public and private headers in src/include. (#6352)Aina Niemetz
2021-04-12Refactor resource manager (#6322)Gereon Kremer
This PR does another round of refactoring of the resource manager and related code. - it moves the Resource enum out of the ResourceManager class - it treats the resources in a generic way (storing the statistics in a vector) instead of the manual treatment we had before - weights no longer live in the options, but in the ResourceManager and are changed accordingly in the ResourceManager constructor - following the generic treatment of resources, it also removes all the resource-specific options --x-step in favor of a generic --rweight name=weight - removed several unused methods from the ResourceManager Note that we handle the Resource enum in a way that allows to easily use other enums as additional resources, for example InferenceId. The general idea is that we will at some point have sensible default weights (so that the cumulative resources somewhat simulate the solver runtime) and users (almost) never need to modify them.
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-09Rename CVC4__ header guards to CVC5__. (#6326)Aina Niemetz
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-11First refactoring of statistics classes (#6105)Gereon Kremer
This PR does a first round of refactoring on the statistics, in particular the Stat class and derived classes. It significantly shrinks the class hierarchy, modernizes some code (e.g. use std::chrono instead of clock_gettime), removes unused features (e.g. nesting of statistics) and does some general cleanup and consolidation. Subsequent PRs are planned to change the ownership model (right now every module owns the Stat object) which makes the whole register / unregister mechanism obsolete.
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-03-08Fix justification heuristic again (#6074)Gereon Kremer
This PR replaces all TNode types in datatypes by Node within justification heuristic. Fixes #6073. Unfortunately, the example from #6073 times out now, thus there is no new regression.
2021-03-03More cleanup of includes to reduce compilation times (#6037)Gereon Kremer
Similar to #6031, this PR implements suggestions from iwyu to reduce the number of includes in header files by introducing forward declarations and moving includes to source files.
2021-02-25Store Node instead of TNode (#5993)Gereon Kremer
The justification heuristic stores a "copy" of assertions as TNode. As witnessed by #5938, these TNodes may invalid. This PR changes this to store Nodes instead. Fixes #5938.
2021-02-12Simplify and fix decision engine's handling of skolem definitions (#5888)Andrew Reynolds
This PR changes the front end of prop engine to distinguish input formulas from skolem definitions, which is required by the decision engine. This PR breaks the dependency of PropEngine on the AssertionsPipeline, as now the determining of whether an input formula is a skolem definition is handled externally, in SmtSolver. With this PR, we should not be required to satisfy skolem definitions that are not relevant based on the techniques already implemented in the decision engine. Currently, we are not distinguishing input formulas from skolem definitions properly, meaning we assert more literals than we need to. This also simplifies related interfaces within decision engine. We should test this PR with --decision=justification on SMT-LIB.
2020-12-14[proof-new] Updating interfaces between prop engine and minisat (#5664)Haniel Barbosa
This is in preparation to make the prop engine proof producing. This PR also renames "DPLLSatSolverInterface" to the more appropriate name "CDCLTSatSolverInterface". Note that most of the diff is due to formatting of the previously super ad-hoc formatting of the minisat code.
2020-12-09Make decision engine independent of AssertionsPipeline (#5626)Andrew Reynolds
This PR makes decision engine independent of AssertionsPipeline, which consequently allows some of the key PropEngine interfaces to be consolidated. It also modifies PropEngine to take TrustNode for assertLemma, which is the first step for making PropEngine manage proofs from TheoryEngine. This is in preparation for modifying the interplay between PropEngine, TheoryEngine, TheoryPreprocessor, and new proposed SAT relevancy heuristic. There are no intended behavior changes in this PR. Marking "major" since this impacts several current directions (including proof-new integration, lazy theory preprocessing, SAT relevancy).
2020-09-22Update copyright header script to support CMake and Python files (#5067)Mathias Preiner
This PR updates the update-copyright.pl script to also update/add copyright headers to CMake specific files. It further fixes a small typo in the header.
2020-06-16Update copyright headers.Aina Niemetz
2020-06-05Fix handling of Boolean term variables (#4550)Andres Noetzli
Fixes #4446. This commit fixes two issues related to the handling of Boolean term variables: Removing Boolean subterms and replacing them with a Boolean term variable introduces an equality of the form (= v t) where v is the Boolean term variable and t is the term. It is important that these equalities do not get removed. This commit changes Theory::isLegalElimination() to take this into account. The incorrect model reported in the issue was caused by some of the Boolean term variables not being assigned values by the SAT solver when we decided that the benchmark is satisfiable. Our justification heuristic (correctly) decided that it is enough to satisfy one of the disjuncts in the assertion to satisfy the whole assertion. However, the assignments that we received from the SAT solver restricted us to pick a specific value for one of the Boolean constants: Literal | Value | Expr --------------------------------------------------------- '7 ' 0 c '0 ' 1 true '1 ' 0 false '2 ' 0 (a BOOLEAN_TERM_VARIABLE_274) '5 ' _ b '3 ' 1 (a BOOLEAN_TERM_VARIABLE_277) '4 ' _ BOOLEAN_TERM_VARIABLE_274 '6 ' 0 BOOLEAN_TERM_VARIABLE_277 This meant that we had to pick true for BOOLEAN_TERM_VARIABLE_274 but we picked false since we simply treated it as an unassigned variable. In general, the justification heuristic handles embedded skolems introduced by term removal first and asks the SAT solver to decide on Boolean term variables. However, for some logics, such as QF_AUFLIA, we use the justification heuristic not for decisions but only to decide when to stop, so those decisions were not done. This commit introduces a conservative fix that adds a check after satsifying all the assertions that makes sure that the equalities introduced for Boolean terms are satisfied as well. Due to the eager treatment of Boolean term variables when we use the justification heuristic also for decisions, it is likely that we don't really have the problem in that case but it doesn't hurt to enable the fix. It is also possible that this fix is only required with models but it is definitely safer to just always enable it (there could be tricky corner cases involving the theory combination between UF and Boolean terms). Additionally, this commit changes the ITE-specific naming in the justification heuristic to reflect more accurately that we are in general dealing with skolems introduced by term removals and not only due to ITE removal.
2020-04-09Towards proper use of resource managers (#4233)Andrew Reynolds
Resource manager will be owned by SmtEngine in the future. This passes the resource manager cached by SmtEnginePrivate to the PropEngine created by SmtEngine instead of using the global pointer. It also makes a few preprocessing passes use the resource manager they already have access to and should use.
2020-03-16DecisionEngine: Use single unique pointer for ITE strategy . (#4078)Aina Niemetz
Previously, DecisionEngine maintained a vector of ITE strategies. However, only one was ever created. This uses a single unique_ptr member for the ITE strategy instead of a vector.
2020-03-10Fix issue with reset-assertions. (#3988)Aina Niemetz
Calling (reset-assertions) in start mode was not handled correctly. Additionally, when calling (check-sat) after (reset-assertions) after a (check-sat) call that answered unsat, we answered unsat instead of sat. This cleans up and fixes reset-assertions) handling.
2020-03-09DecisionEngine: Use unique_ptr for enabled strategies. (#3984)Aina Niemetz
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-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-10-30Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)Mathias Preiner
2019-04-24Do not use __ prefix for header guards. (#2974)Mathias Preiner
Fixes 2887.
2019-03-26Update copyright headers.Aina Niemetz
2018-09-22cmake: Working build infrastructure.Mathias Preiner
TODO: cvc4autoconfig.h
2018-09-22cmake: Added initial build infrastructure.Aina Niemetz
2018-09-14Refactor how assertions are added to decision engine (#2396)Andres Noetzli
Before refactoring the preprocessing passes, we were using three arguments to add assertions to the decision engine. Now all that information lives in the AssertionPipeline. This commit moves the AssertionPipeline to its own file and changes the `addAssertions()` methods related to the decision engine to take an AssertionPipeline as an arguement instead of three separate ones. Additionally, the TheoryEngine now uses an AssertionPipeline for lemmas.
2018-06-25Updated copyright headers.Aina Niemetz
2018-03-05Enable -Wsuggest-override by default. (#1643)Mathias Preiner
Adds missing override keywords.
2018-01-04Removing miscellaneous throw specifiers. (#1474)Tim King
2017-11-17Add random number generator. (#1370)Aina Niemetz
This adds a deterministic (seeded) random number generator (RNG). It implements the xorshift* generator (see S. Vigna, An experimental exploration of Marsaglia's xorshift generators, scrambled. ACM Trans. Math. Softw. 42(4): 30:1-30:23, 2016).
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-03-02Minor cleanup and reorganization related to last commit.ajreynol
2017-03-02Eliminate Boolean term conversion. Generalizes removeITE pass to remove ↵ajreynol
Boolean terms, treats distinguished BOOLEAN_TERM_VARIABLE kind as theory literal. Fixes bugs 597, 604, 651, 652, 691, 694. Add regressions.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback