forked from karpiu/kp-minisatp
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcadical.patch
31 lines (28 loc) · 1.07 KB
/
cadical.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
31
diff --git a/src/cadical.hpp b/src/cadical.hpp
index b681260..42be9dc 100644
--- a/src/cadical.hpp
+++ b/src/cadical.hpp
@@ -490,6 +490,7 @@ public:
int64_t redundant () const; // Number of active redundant clauses.
int64_t irredundant () const; // Number of active irredundant clauses.
+ int64_t conflicts () const; // Number of conflicts
//------------------------------------------------------------------------
// This function executes the given number of preprocessing rounds. It is
// similar to 'solve' with 'limits ("preprocessing", rounds)' except that
diff --git a/src/solver.cpp b/src/solver.cpp
index b111dde..6ce8f57 100644
--- a/src/solver.cpp
+++ b/src/solver.cpp
@@ -760,6 +760,14 @@ int64_t Solver::irredundant () const {
return res;
}
+int64_t Solver::conflicts () const {
+ TRACE ("conflicts");
+ REQUIRE_VALID_STATE ();
+ int64_t res = internal->stats.conflicts;
+ LOG_API_CALL_RETURNS ("conflicts", res);
+ return res;
+}
+
/*------------------------------------------------------------------------*/
void Solver::freeze (int lit) {