diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-08-20 15:50:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 15:50:38 -0500 |
commit | 01a9d18f2b2ce20cf7a0672a865cf0c2873d6f6a (patch) | |
tree | 52e7dfc5d157b11fa4bd00855ad46238b6615338 /src/theory/fp | |
parent | c110363ccf39c9415c1a32bda6273fe8221db182 (diff) |
Add TheoryState objects to each Theory (#4920)
This initializes all theories with a TheoryState object (apart from bool and builtin which do not require one).
Two additional theories are known to require special state objects: TheoryArith, which has a custom way of detecting when in conflict, and TheoryQuantifiers, which can leverage a special state object for the purposes of refactoring and splitting apart QuantifiersEngine further. All other theories use default TheoryState objects.
Notice this PR does not update the theories to use these states yet, it simply adds the objects.
Diffstat (limited to 'src/theory/fp')
-rw-r--r-- | src/theory/fp/theory_fp.cpp | 5 | ||||
-rw-r--r-- | src/theory/fp/theory_fp.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/theory/fp/theory_fp.cpp b/src/theory/fp/theory_fp.cpp index ff0855889..82086aafe 100644 --- a/src/theory/fp/theory_fp.cpp +++ b/src/theory/fp/theory_fp.cpp @@ -119,8 +119,11 @@ TheoryFp::TheoryFp(context::Context* c, d_toRealMap(u), realToFloatMap(u), floatToRealMap(u), - abstractionMap(u) + abstractionMap(u), + d_state(c, u, valuation) { + // indicate we are using the default theory state object + d_theoryState = &d_state; } /* TheoryFp::TheoryFp() */ TheoryRewriter* TheoryFp::getTheoryRewriter() { return &d_rewriter; } diff --git a/src/theory/fp/theory_fp.h b/src/theory/fp/theory_fp.h index 2584d574e..ad052f92a 100644 --- a/src/theory/fp/theory_fp.h +++ b/src/theory/fp/theory_fp.h @@ -153,6 +153,8 @@ class TheoryFp : public Theory { /** The theory rewriter for this theory. */ TheoryFpRewriter d_rewriter; + /** A (default) theory state object */ + TheoryState d_state; }; /* class TheoryFp */ } // namespace fp |