ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
propbeyond.c
Go to the documentation of this file.
1#include "propbeyond.h"
2#include "fastassign.h"
3#include "trail.h"
4
6
7#define PROPAGATE_LITERAL propagate_literal_beyond_conflicts
8#define CONTINUE_PROPAGATING_AFTER_CONFLICT
9#define PROPAGATION_TYPE "beyond conflict"
10
11#include "proplit.h"
12
13static inline void
14update_beyond_propagation_statistics (kissat *solver,
15 const unsigned *saved_propagate) {
16 KISSAT_assert (saved_propagate <= solver->propagate);
17 const unsigned propagated = solver->propagate - saved_propagate;
18
19 LOG ("propagated %u literals", propagated);
20 LOG ("propagation took %" PRIu64 " ticks", solver->ticks);
21
22 ADD (ticks, solver->ticks);
23
24 ADD (propagations, propagated);
25 ADD (warming_propagations, propagated);
26}
27
28static void propagate_literals_beyond_conflicts (kissat *solver) {
29 unsigned *propagate = solver->propagate;
30 while (propagate != END_ARRAY (solver->trail))
31 if (propagate_literal_beyond_conflicts (solver, *propagate++))
32 INC (warming_conflicts);
33 solver->propagate = propagate;
34}
35
37 KISSAT_assert (!solver->probing);
38 KISSAT_assert (solver->watching);
39 KISSAT_assert (solver->warming);
40 KISSAT_assert (!solver->inconsistent);
41
42 START (propagate);
43
44 solver->ticks = 0;
45 const unsigned *saved_propagate = solver->propagate;
46 propagate_literals_beyond_conflicts (solver);
47 update_beyond_propagation_statistics (solver, saved_propagate);
48
49 STOP (propagate);
50}
51
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define END_ARRAY
Definition array.h:51
#define ADD(NAME, DELTA)
#define INC(NAME)
#define LOG(...)
#define KISSAT_assert(ignore)
Definition global.h:13
#define solver
Definition kitten.c:211
#define STOP(P)
Definition profile.hpp:158
#define START(P)
Definition profile.hpp:150
void kissat_propagate_beyond_conflicts(kissat *solver)
Definition propbeyond.c:36