Skip to content

Commit 9544732

Browse files
committed
new news and format
1 parent 4c3eb5c commit 9544732

7 files changed

+25
-20
lines changed

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 1.9.4
2+
-------------
3+
4+
- Simplified code by removing reimply again (but keeping ILB).
5+
16
Version 1.9.3
27
-------------
38

src/assume.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ void Internal::reset_assumptions () {
518518
struct sort_assumptions_positive_rank {
519519
Internal *internal;
520520
const int max_level;
521-
sort_assumptions_positive_rank (Internal *s) : internal (s), max_level (s->level + 1) {}
521+
sort_assumptions_positive_rank (Internal *s)
522+
: internal (s), max_level (s->level + 1) {}
522523

523524
typedef int Type;
524525
// set assumptions first, then sorted by position on the trail
@@ -529,7 +530,7 @@ struct sort_assumptions_positive_rank {
529530
const Var &v = internal->var (a);
530531
uint64_t res = (assigned ? v.level : max_level);
531532
res <<= 32;
532-
res |= (assigned ? v.trail : abs(a));
533+
res |= (assigned ? v.trail : abs (a));
533534
return res;
534535
}
535536
};
@@ -550,8 +551,8 @@ void Internal::sort_and_reuse_assumptions () {
550551
if (assumptions.empty ())
551552
return;
552553
MSORT (opts.radixsortlim, assumptions.begin (), assumptions.end (),
553-
sort_assumptions_positive_rank (this),
554-
sort_assumptions_smaller (this));
554+
sort_assumptions_positive_rank (this),
555+
sort_assumptions_smaller (this));
555556

556557
int max_level = 0;
557558
for (auto lit : assumptions) {

src/external_propagate.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ bool Internal::external_propagate () {
173173
#endif
174174
(void) res;
175175
bool trail_changed =
176-
(num_assigned != assigned || level != level_before || propagated < trail.size ());
176+
(num_assigned != assigned || level != level_before ||
177+
propagated < trail.size ());
177178

178179
if (unsat || conflict)
179180
break;
@@ -191,10 +192,9 @@ bool Internal::external_propagate () {
191192
}
192193

193194
#ifndef NDEBUG
194-
LOG (
195-
"External propagation ends (decision level: %d, trail size: %zd, "
196-
"notified %zd)",
197-
level, trail.size (), notified);
195+
LOG ("External propagation ends (decision level: %d, trail size: %zd, "
196+
"notified %zd)",
197+
level, trail.size (), notified);
198198
#endif
199199
if (!unsat && !conflict) {
200200
bool has_external_clause =
@@ -214,7 +214,8 @@ bool Internal::external_propagate () {
214214

215215
add_external_clause (0);
216216
bool trail_changed =
217-
(num_assigned != assigned || level != level_before || propagated < trail.size ());
217+
(num_assigned != assigned || level != level_before ||
218+
propagated < trail.size ());
218219

219220
if (unsat || conflict)
220221
break;
@@ -426,7 +427,7 @@ void Internal::explain_external_propagations () {
426427
int open = 0; // Seen but not explained literal
427428

428429
explain_reason (0, reason, open); // marks conflict clause lits as seen
429-
int i = trail.size (); // Start at end-of-trail
430+
int i = trail.size (); // Start at end-of-trail
430431
while (i > 0) {
431432
const int lit = trail[--i];
432433
if (!flags (lit).seen)
@@ -690,7 +691,8 @@ bool Internal::external_check_solution () {
690691
size_t assigned = num_assigned;
691692
add_external_clause (0);
692693
bool trail_changed =
693-
(num_assigned != assigned || level != level_before || propagated < trail.size ());
694+
(num_assigned != assigned || level != level_before ||
695+
propagated < trail.size ());
694696
added_new_clauses = true;
695697
//
696698
// There are many possible scenarios here:

src/internal.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Internal::Internal ()
2020
tainted_literal (0), notified (0), probe_reason (0), propagated (0),
2121
propagated2 (0), propergated (0), best_assigned (0),
2222
target_assigned (0), no_conflict_until (0), unsat_constraint (false),
23-
marked_failed (true), num_assigned (0),
24-
proof (0), lratbuilder (0), opts (this),
23+
marked_failed (true), num_assigned (0), proof (0), lratbuilder (0),
24+
opts (this),
2525
#ifndef QUIET
2626
profiles (this), force_phase_messages (false),
2727
#endif

src/internal.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct Internal {
243243
vector<int> shrinkable; // removable or poison in 'shrink'
244244
Reap reap; // radix heap for shrink
245245

246-
size_t num_assigned; // check for satisfied
246+
size_t num_assigned; // check for satisfied
247247

248248
vector<int> probes; // remaining scheduled probes
249249
vector<Level> control; // 'level + 1 == control.size ()'
@@ -512,7 +512,6 @@ struct Internal {
512512
LOG (c, "watch %d blit %d in", lit, blit);
513513
}
514514

515-
516515
// Add two watches to a clause. This is used initially during allocation
517516
// of a clause and during connecting back all watches after preprocessing.
518517
//

src/propagate.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ void Internal::build_chain_for_empty () {
9898
lrat_chain.push_back (conflict->id);
9999
}
100100

101-
102-
103101
/*------------------------------------------------------------------------*/
104102

105103
inline void Internal::search_assign (int lit, Clause *reason) {
@@ -566,5 +564,4 @@ void Internal::propergate () {
566564
}
567565
}
568566

569-
570567
} // namespace CaDiCaL

src/shrink.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ unsigned inline Internal::shrink_next (int blevel, unsigned &open,
199199
assert (pos < t->size ());
200200
const int uip = (*t)[pos];
201201
assert (val (uip) > 0);
202-
LOG ("trying to shrink literal %d at trail[%u] and level %d", uip, pos, blevel);
202+
LOG ("trying to shrink literal %d at trail[%u] and level %d", uip, pos,
203+
blevel);
203204
return uip;
204205
} else {
205206
int uip;

0 commit comments

Comments
 (0)