1
- diff -urN mergesat-3.0.orig/core/OnlineProofChecker.h mergesat-3.0/core/OnlineProofChecker.h
2
- --- mergesat-3.0.orig/core/OnlineProofChecker.h 2021-03-25 07:15:00.000000000 +0000
3
- +++ mergesat-3.0/core/OnlineProofChecker.h 2021-11-04 09:43:19.934897933 +0000
4
- @@ -832,6 +832,6 @@
1
+ diff --git a/minisat/core/OnlineProofChecker.h b/minisat/core/OnlineProofChecker.h
2
+ index 6bd9ff9..e642781 100644
3
+ --- a/minisat/core/OnlineProofChecker.h
4
+ +++ b/minisat/core/OnlineProofChecker.h
5
+ @@ -833,6 +833,6 @@ inline void OnlineProofChecker::fullCheck()
5
6
}
6
7
}
7
8
8
9
- }; // namespace MERGESAT_NSPACE
9
10
+ } // namespace MERGESAT_NSPACE
10
11
11
12
#endif
12
- diff -urN mergesat-3.0.orig/core/Solver.cc mergesat-3.0/core/Solver.cc
13
- --- mergesat-3.0.orig/core/Solver.cc 2021-03-25 07:15:00.000000000 +0000
14
- +++ mergesat-3.0/core/Solver.cc 2021-11-04 10:04:45.252778350 +0000
15
- @@ -215,22 +215,22 @@
13
+ diff --git a/minisat/core/Proofs.h b/minisat/core/Proofs.h
14
+ index b835924..08c31f0 100644
15
+ --- a/minisat/core/Proofs.h
16
+ +++ b/minisat/core/Proofs.h
17
+ @@ -329,6 +329,6 @@ inline void Proof::flushToFile()
18
+ inline void Proof::setVerbosity(int v) { verbosity = v; }
19
+
20
+
21
+ - }; // namespace MERGESAT_NSPACE
22
+ + } // namespace MERGESAT_NSPACE
23
+
24
+ #endif
25
+ diff --git a/minisat/core/Solver.cc b/minisat/core/Solver.cc
26
+ index b708a48..eec8d36 100644
27
+ --- a/minisat/core/Solver.cc
28
+ +++ b/minisat/core/Solver.cc
29
+ @@ -224,22 +224,22 @@ bool MERGESAT_NSPACE::updateOptions()
16
30
if (!args) return false;
17
31
char *original_args = args;
18
32
@@ -42,7 +56,7 @@ diff -urN mergesat-3.0.orig/core/Solver.cc mergesat-3.0/core/Solver.cc
42
56
free(original_args);
43
57
return false;
44
58
}
45
- @@ -2601 ,7 +2601 ,7 @@
59
+ @@ -2599 ,7 +2599 ,7 @@ lbool Solver::search(int &nof_conflicts)
46
60
47
61
/* grow limit after each rephasing */
48
62
state_change_time = state_change_time + state_change_time_inc;
@@ -51,7 +65,16 @@ diff -urN mergesat-3.0.orig/core/Solver.cc mergesat-3.0/core/Solver.cc
51
65
52
66
/* actually rephase */
53
67
if (rand() % 100 < 50)
54
- @@ -3042,7 +3042,8 @@
68
+ @@ -2755,7 +2755,7 @@ lbool Solver::search(int &nof_conflicts)
69
+
70
+ if (verbosity >= 1 && (conflicts % status_every) == 0)
71
+ printf("c | %9d | %7d %8d %8d | %8d %8d %6.0f | %6.3f %% |\n", (int)conflicts,
72
+ - (int)dec_vars - (trail_lim.size() == 0 ? trail.size() : trail_lim[0]), nClauses(), (int)clauses_literals,
73
+ + (int)dec_vars - (trail_lim.size() == 0 ? trail.size() : trail_lim[0]), (int)nClauses(), (int)clauses_literals,
74
+ (int)max_learnts, nLearnts(), (double)learnts_literals / nLearnts(), progressEstimate() * 100);
75
+
76
+ // the top_trail_soln should be update after each conflict
77
+ @@ -3013,7 +3013,8 @@ void Solver::disableDISTANCEheuristic()
55
78
order_heap_CHB.build(order_heap_DISTANCE.elements());
56
79
order_heap = &order_heap_CHB;
57
80
break;
@@ -61,7 +84,7 @@ diff -urN mergesat-3.0.orig/core/Solver.cc mergesat-3.0/core/Solver.cc
61
84
break;
62
85
}
63
86
assert(!considersDISTANCE() && "we should have disabled DISTANCE heuristic");
64
- @@ -3062 ,7 +3063 ,8 @@
87
+ @@ -3033 ,7 +3034 ,8 @@ void Solver::enableDISTANCEheuristic()
65
88
order_heap_DISTANCE.build(order_heap_CHB.elements());
66
89
order_heap = &order_heap_DISTANCE;
67
90
break;
@@ -71,10 +94,47 @@ diff -urN mergesat-3.0.orig/core/Solver.cc mergesat-3.0/core/Solver.cc
71
94
break;
72
95
}
73
96
assert(considersDISTANCE() && "we should have enabled DISTANCE heuristic");
74
- diff -urN mergesat-3.0.orig/core/SolverTypes.h mergesat-3.0/core/SolverTypes.h
75
- --- mergesat-3.0.orig/core/SolverTypes.h 2021-03-25 07:15:00.000000000 +0000
76
- +++ mergesat-3.0/core/SolverTypes.h 2021-11-04 09:47:03.613323317 +0000
77
- @@ -187,6 +187,16 @@
97
+ @@ -3081,7 +3083,7 @@ lbool Solver::solve_()
98
+ if (assumptions.size() > 0) solved_by_ls = false;
99
+
100
+ /* allow to disable SLS for larger clauses */
101
+ - if ((sls_var_lim != -1 && nVars() > sls_var_lim) || (sls_clause_lim != -1 && nClauses() > sls_clause_lim)) {
102
+ + if ((sls_var_lim != -1 && nVars() > sls_var_lim) || (sls_clause_lim != -1 && nClauses() > (size_t)sls_clause_lim)) {
103
+ use_ccnr = false;
104
+ }
105
+
106
+ diff --git a/minisat/core/Solver.h b/minisat/core/Solver.h
107
+ index ed63db4..fc3b648 100644
108
+ --- a/minisat/core/Solver.h
109
+ +++ b/minisat/core/Solver.h
110
+ @@ -198,9 +198,9 @@ class Solver
111
+ lbool modelValue(Var x) const; // The value of a variable in the last model. The last call to solve must have been satisfiable.
112
+ lbool modelValue(Lit p) const; // The value of a literal in the last model. The last call to solve must have been satisfiable.
113
+ int nAssigns() const; // The current number of assigned literals.
114
+ - int nClauses() const; // The current number of original clauses.
115
+ + size_t nClauses() const; // The current number of original clauses.
116
+ int nLearnts() const; // The current number of learnt clauses.
117
+ - int nUnits() const; // The current number of unit clauses.
118
+ + size_t nUnits() const; // The current number of unit clauses.
119
+ const Lit getUnit(size_t unit_idx) const; // The clause with a given index;
120
+ const Clause &getClause(size_t cls_idx) const; // The clause with a given index;
121
+ int nVars() const; // The current number of variables.
122
+ @@ -895,8 +895,8 @@ inline lbool Solver::value(Lit p) const { return assigns[var(p)] ^ sign(p); }
123
+ inline lbool Solver::modelValue(Var x) const { return model[x]; }
124
+ inline lbool Solver::modelValue(Lit p) const { return model[var(p)] ^ sign(p); }
125
+ inline int Solver::nAssigns() const { return trail.size(); }
126
+ - inline int Solver::nClauses() const { return clauses.size(); }
127
+ - inline int Solver::nUnits() const { return trail_lim.size() < 1 ? trail.size() : trail_lim[0]; }
128
+ + inline size_t Solver::nClauses() const { return clauses.size(); }
129
+ + inline size_t Solver::nUnits() const { return trail_lim.size() < 1 ? trail.size() : trail_lim[0]; }
130
+ inline const Lit Solver::getUnit(size_t unit_idx) const
131
+ {
132
+ assert(unit_idx < nUnits() && "can only access valid unit clauses");
133
+ diff --git a/minisat/core/SolverTypes.h b/minisat/core/SolverTypes.h
134
+ index 4e366ac..3a150dd 100644
135
+ --- a/minisat/core/SolverTypes.h
136
+ +++ b/minisat/core/SolverTypes.h
137
+ @@ -189,6 +189,16 @@ class Clause
78
138
unsigned onQueue : 1;
79
139
unsigned size : 30;
80
140
} header;
@@ -91,7 +151,7 @@ diff -urN mergesat-3.0.orig/core/SolverTypes.h mergesat-3.0/core/SolverTypes.h
91
151
union {
92
152
Lit lit;
93
153
float act;
94
- @@ -194 ,6 +204 ,13 @@
154
+ @@ -196 ,6 +206 ,13 @@ class Clause
95
155
uint32_t touched;
96
156
CRef rel;
97
157
} data[0];
@@ -106,30 +166,32 @@ diff -urN mergesat-3.0.orig/core/SolverTypes.h mergesat-3.0/core/SolverTypes.h
106
166
friend class ClauseAllocator;
107
167
108
168
diff --git a/minisat/mtl/Vec.h b/minisat/mtl/Vec.h
169
+ index 4abb5db..e9c0d93 100644
109
170
--- a/minisat/mtl/Vec.h
110
171
+++ b/minisat/mtl/Vec.h
111
- @@ -159 ,8 +159 ,7 @@
172
+ @@ -167 ,8 +167 ,7 @@ template <class T> void vec<T>::capacity(int min_cap)
112
173
int add = imax((min_cap - cap + 1) & ~1, ((cap >> 1) + 2) & ~1); // NOTE: grow by approximately 3/2
113
174
if (add > INT_MAX - cap) throw OutOfMemoryException();
114
175
115
176
- T *newdata = (T *)::realloc(data, (cap + add) * sizeof(T));
116
- + T *newdata = (T *)xrealloc(data, (cap + add) * sizeof(T));
117
177
- if (newdata == NULL && errno == ENOMEM) throw OutOfMemoryException();
178
+ + T *newdata = (T *)xrealloc(data, (cap + add) * sizeof(T));
118
179
119
180
cap += add;
120
181
data = newdata;
121
182
diff --git a/minisat/mtl/XAlloc.h b/minisat/mtl/XAlloc.h
183
+ index 1f43745..50809cb 100644
122
184
--- a/minisat/mtl/XAlloc.h
123
185
+++ b/minisat/mtl/XAlloc.h
124
- @@ -21,7 +21,6 @@
186
+ @@ -21,7 +21,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
125
187
#ifndef MergeSat_XAlloc_h
126
188
#define MergeSat_XAlloc_h
127
189
128
190
- #include <errno.h>
129
191
#include <stdlib.h>
130
192
131
193
// To not introduce this multiple times, use this header, as it's rather central
132
- @@ -41,7 +40,7 @@
194
+ @@ -41,7 +40,7 @@ class OutOfMemoryException
133
195
static inline void *xrealloc(void *ptr, size_t size)
134
196
{
135
197
void *mem = realloc(ptr, size);
@@ -138,3 +200,29 @@ diff --git a/minisat/mtl/XAlloc.h b/minisat/mtl/XAlloc.h
138
200
throw OutOfMemoryException();
139
201
} else
140
202
return mem;
203
+ diff --git a/minisat/parallel/ParSolver.cc b/minisat/parallel/ParSolver.cc
204
+ index ad4c235..b76566b 100644
205
+ --- a/minisat/parallel/ParSolver.cc
206
+ +++ b/minisat/parallel/ParSolver.cc
207
+ @@ -44,7 +44,7 @@ ParSolver::ParSolver()
208
+ : par_reparsed_options(updateOptions())
209
+ , parsing(false)
210
+ , verbosity(0)
211
+ - , use_simplification(true)
212
+ + , use_simplification(false)
213
+ , sync_mode(opt_sync_mode == 0 ? NON_DETERMINISTIC : (opt_sync_mode == 1 ? DETERMINISTIC_STATIC : DETERMINISTIC_DYNAMIC))
214
+ , cores(opt_cores)
215
+ , initialized(false)
216
+ diff --git a/minisat/simp/SimpSolver.cc b/minisat/simp/SimpSolver.cc
217
+ index a5d9581..3c8d2bf 100644
218
+ --- a/minisat/simp/SimpSolver.cc
219
+ +++ b/minisat/simp/SimpSolver.cc
220
+ @@ -45,7 +45,7 @@ static BoolOption opt_use_asymm(_cat, "asymm", "Shrink clauses by asymmetric bra
221
+ static BoolOption opt_use_rcheck(_cat, "rcheck", "Check if a clause is already implied. (costly)", false, false);
222
+ static BoolOption opt_use_elim(_cat, "elim", "Perform variable elimination.", true);
223
+ static IntOption opt_grow(_cat, "grow", "Allow a variable elimination step to grow by a number of clauses.", 0);
224
+ - static BoolOption opt_grow_iterations(_cat, "grow-iter", "Run iterative eliminations with growing.", true);
225
+ + static BoolOption opt_grow_iterations(_cat, "grow-iter", "Run iterative eliminations with growing.", false);
226
+ static IntOption opt_clause_lim(_cat,
227
+ "cl-lim",
228
+ "Variables are not eliminated if it produces a resolvent with a length above this "
0 commit comments