summaryrefslogtreecommitdiff
path: root/src/prop/sat_solver.h
diff options
context:
space:
mode:
authorLiana Hadarean <lianahady@gmail.com>2012-05-08 21:54:55 +0000
committerLiana Hadarean <lianahady@gmail.com>2012-05-08 21:54:55 +0000
commit8a0c0562cb8d0e26ea019ff782b25c1997a49a0b (patch)
tree28239db9bcb26b03d893ad61dd1a7ea099391fbe /src/prop/sat_solver.h
parent5082cb8349efbb287084293cd4bc6c3fa5a34f26 (diff)
Merging in bvprop branch, with proper bit-vector propagation.
This should also fix bug 325.
Diffstat (limited to 'src/prop/sat_solver.h')
-rw-r--r--src/prop/sat_solver.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/prop/sat_solver.h b/src/prop/sat_solver.h
index 4fe24fc60..898709c43 100644
--- a/src/prop/sat_solver.h
+++ b/src/prop/sat_solver.h
@@ -73,15 +73,33 @@ public:
class BVSatSolverInterface: public SatSolver {
public:
+ /** Interface for notifications */
+ class Notify {
+ public:
+
+ virtual ~Notify() {};
+
+ /**
+ * If the notify returns false, the solver will break out of whatever it's currently doing
+ * with an "unknown" answer.
+ */
+ virtual bool notify(SatLiteral lit) = 0;
+
+ /**
+ * Notify about a learnt clause.
+ */
+ virtual void notify(SatClause& clause) = 0;
+};
+
+ virtual void setNotify(Notify* notify) = 0;
+
virtual void markUnremovable(SatLiteral lit) = 0;
virtual void getUnsatCore(SatClause& unsatCore) = 0;
virtual void addMarkerLiteral(SatLiteral lit) = 0;
- virtual bool getPropagations(std::vector<SatLiteral>& propagations) = 0;
-
- virtual void explainPropagation(SatLiteral lit, std::vector<SatLiteral>& explanation) = 0;
+ virtual void explain(SatLiteral lit, std::vector<SatLiteral>& explanation) = 0;
virtual SatValue assertAssumption(SatLiteral lit, bool propagate = false) = 0;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback