summaryrefslogtreecommitdiff
path: root/src/theory/bv
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/bv
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/bv')
-rw-r--r--src/theory/bv/theory_bv.cpp18
-rw-r--r--src/theory/bv/theory_bv.h5
2 files changed, 9 insertions, 14 deletions
diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp
index 547d24b23..1976177b7 100644
--- a/src/theory/bv/theory_bv.cpp
+++ b/src/theory/bv/theory_bv.cpp
@@ -30,35 +30,33 @@ namespace cvc5 {
namespace theory {
namespace bv {
-TheoryBV::TheoryBV(context::Context* c,
- context::UserContext* u,
+TheoryBV::TheoryBV(Env& env,
OutputChannel& out,
Valuation valuation,
- const LogicInfo& logicInfo,
- ProofNodeManager* pnm,
std::string name)
- : Theory(THEORY_BV, c, u, out, valuation, logicInfo, pnm, name),
+ : Theory(THEORY_BV, env, out, valuation, name),
d_internal(nullptr),
d_rewriter(),
- d_state(c, u, valuation),
+ d_state(getSatContext(), getUserContext(), valuation),
d_im(*this, d_state, nullptr, "theory::bv::"),
d_notify(d_im),
- d_invalidateModelCache(c, true),
+ d_invalidateModelCache(getSatContext(), true),
d_stats("theory::bv::")
{
switch (options::bvSolver())
{
case options::BVSolver::BITBLAST:
- d_internal.reset(new BVSolverBitblast(&d_state, d_im, pnm));
+ d_internal.reset(new BVSolverBitblast(&d_state, d_im, d_pnm));
break;
case options::BVSolver::LAYERED:
- d_internal.reset(new BVSolverLayered(*this, c, u, pnm, name));
+ d_internal.reset(new BVSolverLayered(
+ *this, getSatContext(), getUserContext(), d_pnm, name));
break;
default:
AlwaysAssert(options::bvSolver() == options::BVSolver::BITBLAST_INTERNAL);
- d_internal.reset(new BVSolverBitblastInternal(&d_state, d_im, pnm));
+ d_internal.reset(new BVSolverBitblastInternal(&d_state, d_im, d_pnm));
}
d_theoryState = &d_state;
d_inferManager = &d_im;
diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h
index da44d7022..b4afb5f5d 100644
--- a/src/theory/bv/theory_bv.h
+++ b/src/theory/bv/theory_bv.h
@@ -39,12 +39,9 @@ class TheoryBV : public Theory
friend class BVSolverLayered;
public:
- TheoryBV(context::Context* c,
- context::UserContext* u,
+ TheoryBV(Env& env,
OutputChannel& out,
Valuation valuation,
- const LogicInfo& logicInfo,
- ProofNodeManager* pnm = nullptr,
std::string name = "");
~TheoryBV();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback