-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathminisat.h.patch
30 lines (27 loc) · 1.47 KB
/
minisat.h.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -Naur minisat/minisat/core/Solver.h minisat-mod/minisat/core/Solver.h
--- minisat/minisat/core/Solver.h 2018-09-10 15:01:12.898158196 +0200
+++ minisat-mod/minisat/core/Solver.h 2018-09-10 15:38:58.349220610 +0200
@@ -56,6 +56,12 @@
bool addClause_( vec<Lit>& ps); // Add a clause to the solver without making superflous internal copy. Will
// change the passed vector 'ps'.
+ // Portfolio support
+ void (*learnedClsCallback)(const vec<Lit>&, void* issuer); // callback for clause learning
+ void *issuer; // used as the callback parameter
+ void addLearnedClause(const vec<Lit>& cls); // add a learned clause by hand
+ int lastDecision; // the last decision made by the solver
+
// Solving:
//
bool simplify (); // Removes already satisfied clauses.
@@ -300,6 +306,13 @@
//=================================================================================================
// Implementation of inline methods:
+inline void Solver::addLearnedClause(const vec<Lit>& cls) {
+ CRef cr = ca.alloc(cls, true);
+ learnts.push(cr);
+ attachClause(cr);
+ claBumpActivity(ca[cr]);
+}
+
inline CRef Solver::reason(Var x) const { return vardata[x].reason; }
inline int Solver::level (Var x) const { return vardata[x].level; }