diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2020-03-10 14:51:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 14:51:32 -0700 |
commit | e9f4cec2cad02e270747759223090c16b9d2d44c (patch) | |
tree | ff902073b926d48cb0ae23848bee4b90e96000c7 /src/prop | |
parent | bcaebfa163bb27e1cf14c0f763afb47b185a5f99 (diff) |
Fix issue with reset-assertions. (#3988)
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.
Diffstat (limited to 'src/prop')
-rw-r--r-- | src/prop/minisat/minisat.h | 3 | ||||
-rw-r--r-- | src/prop/prop_engine.cpp | 1 | ||||
-rw-r--r-- | src/prop/sat_solver.h | 11 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/prop/minisat/minisat.h b/src/prop/minisat/minisat.h index 3cc0ed120..f00bba000 100644 --- a/src/prop/minisat/minisat.h +++ b/src/prop/minisat/minisat.h @@ -27,8 +27,7 @@ class MinisatSatSolver : public DPLLSatSolverInterface { public: MinisatSatSolver(StatisticsRegistry* registry); - virtual ~MinisatSatSolver(); -; + ~MinisatSatSolver() override; static SatVariable toSatVariable(Minisat::Var var); static Minisat::Lit toMinisatLit(SatLiteral lit); diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp index 546567b98..19ee29191 100644 --- a/src/prop/prop_engine.cpp +++ b/src/prop/prop_engine.cpp @@ -120,6 +120,7 @@ PropEngine::PropEngine(TheoryEngine* te, PropEngine::~PropEngine() { Debug("prop") << "Destructing the PropEngine" << endl; d_decisionEngine->shutdown(); + d_decisionEngine.reset(nullptr); delete d_cnfStream; delete d_registrar; delete d_satSolver; diff --git a/src/prop/sat_solver.h b/src/prop/sat_solver.h index 9898f3f87..b9c518fd6 100644 --- a/src/prop/sat_solver.h +++ b/src/prop/sat_solver.h @@ -132,10 +132,13 @@ public: };/* class BVSatSolverInterface */ +class DPLLSatSolverInterface : public SatSolver +{ + public: + virtual ~DPLLSatSolverInterface(){}; -class DPLLSatSolverInterface: public SatSolver { -public: - virtual void initialize(context::Context* context, prop::TheoryProxy* theoryProxy) = 0; + virtual void initialize(context::Context* context, + prop::TheoryProxy* theoryProxy) = 0; virtual void push() = 0; @@ -152,7 +155,7 @@ public: virtual void requirePhase(SatLiteral lit) = 0; virtual bool isDecision(SatVariable decn) const = 0; -};/* class DPLLSatSolverInterface */ +}; /* class DPLLSatSolverInterface */ inline std::ostream& operator <<(std::ostream& out, prop::SatLiteral lit) { out << lit.toString(); |