summaryrefslogtreecommitdiff
path: root/src/theory/builtin
diff options
context:
space:
mode:
authorGereon Kremer <nafur42@gmail.com>2021-08-16 07:20:22 -0700
committerGitHub <noreply@github.com>2021-08-16 14:20:22 +0000
commit5e31ee3a34388d6d44129e898897bdb1297009de (patch)
treeb12a86a3737c23555444d2ed6c5c3f13b737b7a4 /src/theory/builtin
parent0711ec521f01888b059d152d1c1f20382d5ce432 (diff)
Make Theory class use Env (#7011)
This PR changes the Theory base class and the constructors of all theories to use the Env class to access contexts, logic information and the proof node manager.
Diffstat (limited to 'src/theory/builtin')
-rw-r--r--src/theory/builtin/theory_builtin.cpp13
-rw-r--r--src/theory/builtin/theory_builtin.h7
2 files changed, 5 insertions, 15 deletions
diff --git a/src/theory/builtin/theory_builtin.cpp b/src/theory/builtin/theory_builtin.cpp
index 1db03d22b..f12d2caf9 100644
--- a/src/theory/builtin/theory_builtin.cpp
+++ b/src/theory/builtin/theory_builtin.cpp
@@ -25,15 +25,10 @@ namespace cvc5 {
namespace theory {
namespace builtin {
-TheoryBuiltin::TheoryBuiltin(context::Context* c,
- context::UserContext* u,
- OutputChannel& out,
- Valuation valuation,
- const LogicInfo& logicInfo,
- ProofNodeManager* pnm)
- : Theory(THEORY_BUILTIN, c, u, out, valuation, logicInfo, pnm),
- d_state(c, u, valuation),
- d_im(*this, d_state, pnm, "theory::builtin::")
+TheoryBuiltin::TheoryBuiltin(Env& env, OutputChannel& out, Valuation valuation)
+ : Theory(THEORY_BUILTIN, env, out, valuation),
+ d_state(getSatContext(), getUserContext(), valuation),
+ d_im(*this, d_state, d_pnm, "theory::builtin::")
{
// indicate we are using the default theory state and inference managers
d_theoryState = &d_state;
diff --git a/src/theory/builtin/theory_builtin.h b/src/theory/builtin/theory_builtin.h
index 72485f0ea..29a3cfb36 100644
--- a/src/theory/builtin/theory_builtin.h
+++ b/src/theory/builtin/theory_builtin.h
@@ -31,12 +31,7 @@ namespace builtin {
class TheoryBuiltin : public Theory
{
public:
- TheoryBuiltin(context::Context* c,
- context::UserContext* u,
- OutputChannel& out,
- Valuation valuation,
- const LogicInfo& logicInfo,
- ProofNodeManager* pnm = nullptr);
+ TheoryBuiltin(Env& env, OutputChannel& out, Valuation valuation);
/** get the official theory rewriter of this theory */
TheoryRewriter* getTheoryRewriter() override;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback