diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-09-14 22:15:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 22:15:37 -0700 |
commit | 2060f439c873c8b1928cbd5f54967571176f2aba (patch) | |
tree | 45fab904b632b6174ee66807081465693a5da83f /src/preprocessing/preprocessing_pass_context.h | |
parent | c2111c86973b8a80e20a3fdf3cbd0b2ff0dc7010 (diff) |
Refactor how assertions are added to decision engine (#2396)
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.
Diffstat (limited to 'src/preprocessing/preprocessing_pass_context.h')
-rw-r--r-- | src/preprocessing/preprocessing_pass_context.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/preprocessing/preprocessing_pass_context.h b/src/preprocessing/preprocessing_pass_context.h index ae989d700..3eb0f10b5 100644 --- a/src/preprocessing/preprocessing_pass_context.h +++ b/src/preprocessing/preprocessing_pass_context.h @@ -21,6 +21,7 @@ #ifndef __CVC4__PREPROCESSING__PREPROCESSING_PASS_CONTEXT_H #define __CVC4__PREPROCESSING__PREPROCESSING_PASS_CONTEXT_H +#include "context/cdo.h" #include "context/context.h" #include "decision/decision_engine.h" #include "preprocessing/util/ite_utilities.h" @@ -70,6 +71,16 @@ class PreprocessingPassContext /* Widen the logic to include the given theory. */ void widenLogic(theory::TheoryId id); + unsigned getSubstitutionsIndex() const { return d_substitutionsIndex.get(); } + + void setSubstitutionsIndex(unsigned i) { d_substitutionsIndex = i; } + + /** Gets a reference to the top-level substitution map */ + theory::SubstitutionMap& getTopLevelSubstitutions() + { + return d_topLevelSubstitutions; + } + /* Enable Integers. */ void enableIntegers(); @@ -90,6 +101,12 @@ class PreprocessingPassContext /** Instance of the ITE remover */ RemoveTermFormulas* d_iteRemover; + /* Index for where to store substitutions */ + context::CDO<unsigned> d_substitutionsIndex; + + /* The top level substitutions */ + theory::SubstitutionMap d_topLevelSubstitutions; + /** Instance of the circuit propagator */ theory::booleans::CircuitPropagator* d_circuitPropagator; |