Commit graph

73 commits

Author SHA1 Message Date
Simon Cruanes
5d18086e53
fix(sat): resolution at level 0 is not recursive
recursion is implicit in the structure of the proof of the clause
that is unit at level 0, and thus responsible for propagating the
level-0 atom in the first place.
2021-11-14 22:50:12 -05:00
Simon Cruanes
f500704905
fix(sat): level-0 resolution needs to be recursive 2021-11-10 13:20:00 -05:00
Simon Cruanes
0abe4b7020
wip: decode more proof steps to quip 2021-10-27 21:50:28 -04:00
Simon Cruanes
992b93abcf
fix(sat): clause in a unsat result must not contain 0-level literals 2021-10-27 20:19:01 -04:00
Simon Cruanes
597a6c378e
wip: split VecI32 and VecSmallInt
- use VecSmallInt for small integers of type `int`
- use VecI32 to store actual int32 (in particular for proof steps)
2021-10-16 20:31:56 -04:00
Simon Cruanes
fd1d068997
proof stubs and sat proof 2021-10-12 22:13:28 -04:00
Simon Cruanes
d3537f2c3f
wip: refactor proof 2021-10-07 20:49:39 -04:00
Simon Cruanes
bbb995b0d5
refactor some names related to proofs; wip add unit paramod 2021-10-03 20:32:37 -04:00
Simon Cruanes
df40b5a5c1
wip: refactor(sat): generate detailed proofs again
because proofs now require hypotheses but not in a resolution order, we
can still do conflict minimization.
2021-09-29 22:18:36 -04:00
Simon Cruanes
bbe366989c
perf(sat): use Atom.Vec for temporary atom array 2021-09-27 19:28:45 -04:00
Simon Cruanes
c9e257d40b
cleanup 2021-09-27 12:14:04 -04:00
Simon Cruanes
5bed2d1c5f
detail 2021-09-26 23:56:40 -04:00
Simon Cruanes
a22bfe06c1
remove debug msgs 2021-08-31 23:19:06 -04:00
Simon Cruanes
debd8bcaf8
fix warning 2021-08-31 23:06:48 -04:00
Simon Cruanes
350a23d99e
feat: minimize conflicts
similar to minisat's level 2 of minimization.
2021-08-31 23:04:32 -04:00
Simon Cruanes
5080195c5b
feat: conflict minimization à la minisat 2021-08-31 22:59:38 -04:00
Simon Cruanes
521340a23f
feat: first full implem of clause pools 2021-08-31 22:56:42 -04:00
Simon Cruanes
10dca21f59
refactor: remove history in conflict resolution; remove simpls
no need to simplify reasons anymore, we rely on DRUP for that.
2021-08-31 22:56:11 -04:00
Simon Cruanes
f86498b386
feat: make it compile 2021-08-31 18:59:44 -04:00
Simon Cruanes
16bb65ebfa
wip: clause pools 2021-08-31 09:30:28 -04:00
Simon Cruanes
4a2367b1bd
refactor: use Atom.Vec (a VecI32) for atom vectors 2021-08-31 09:30:05 -04:00
Simon Cruanes
1877c00c02
wip: clauses pools 2021-08-30 09:32:32 -04:00
Simon Cruanes
73b39fe075
fix more warnings 2021-08-27 21:34:26 -04:00
Simon Cruanes
782afa4415
feat: move Int_id into its own module 2021-08-25 23:52:08 -04:00
Simon Cruanes
bb682b8080
fix(sat): emit proofs where needed 2021-08-23 00:08:09 -04:00
Simon Cruanes
baecce0946
feat: use Stat in SAT solver 2021-08-22 01:56:54 -04:00
Simon Cruanes
672f828c82
perf: return to default-pol=true
previous commit fixed sign error (move from `negated` to `same_sign`
so restore good behavior
2021-08-22 01:44:37 -04:00
Simon Cruanes
27796da5a8
fix preprocessing in th-bool 2021-08-22 01:29:01 -04:00
Simon Cruanes
e93e084eac
refactor: eager proofs; stronger preprocessing
proofs are now directly emitted (almost) everywhere, which simplifies
a lot of things. preprocessing is more recursive (a bit too much
really).
2021-08-22 01:13:41 -04:00
Simon Cruanes
075e251aed
fix: bad sign in SAT solver 2021-08-21 13:41:30 -04:00
Simon Cruanes
0e77c9ef33
perf(solver): default-pol=false 2021-08-20 18:49:15 -04:00
Simon Cruanes
1ab7d34a7d
refactor: make it compile again 2021-08-20 18:18:30 -04:00
Simon Cruanes
1d3867acb5
perf: use VecI32 for clause vector 2021-08-20 18:18:26 -04:00
Simon Cruanes
3fbb9af664 refactor(sat): hide atoms, API now talks only about literals 2021-08-19 09:35:54 -04:00
Simon Cruanes
8bc1f1c864 feat: inner DRUP proof checking for pure-sat-solver 2021-08-19 00:15:00 -04:00
Simon Cruanes
9f01b98cde wip: imperative proofs
- getting closer to having the SMT solver compile again
- dummy proof implementation
- DRUP proof implementation for pure SAT solver
2021-08-18 23:59:39 -04:00
Simon Cruanes
7bead748a6 refactor: move SAT_PROOF into sidekick.core
SAT proofs are part of bigger proofs, now. And we expect them to work on
the literals of CDCL(T) directly, bypassing the low level boolean atoms
2021-08-17 23:59:02 -04:00
Simon Cruanes
27e775ee04 wip: refactor proofs for SMT 2021-08-12 22:05:49 -04:00
Simon Cruanes
b9800023ec feat(sat): missing call to on_learnt; better API 2021-08-02 23:48:52 -04:00
Simon Cruanes
233df98229 perf(sat): proper GC for clauses
GC is now eager in the cleanup of watchlists and more elaborate.

It starts by marking all clauses justifying literals on the trail,
because we cannot remove them yet (they might be used in resolution
steps during clause analysis).

Then, we sort set of learnt clauses by decreasing activity, and pop them
one by one until the target size is reached.  Clauses that are marked,
because they are on the trail, are kept on the side so we can push them
back at the end.

For each clause we want to remove, we start by marking it "dead".
Then we mark its two watch literals are "dirty", which means we will
need to purge their watchlists from dead clauses.

Then we purge watchlists (remove deadclauses entirely). At this point
the dead clauses are unreachable from both trail and watchlists.
We can remove all data for each such clause, and put their index for
recycling so another new clause can reuse their slot.

Finally we unmark dirty literals and saved-by-trail-explanation
explanation clauses.
2021-07-21 20:29:27 -04:00
Simon Cruanes
77c61b536e refactor(sat): rename some bitfields, leaner clause creation 2021-07-21 20:24:03 -04:00
Simon Cruanes
3aa25cb2a2 sat: use an atom array for clauses again
allocator is not worth the complexity, and has a lot of double
indirections anyway.
2021-07-21 10:02:56 -04:00
Simon Cruanes
8b94e8404f wip: data-oriented clauses 2021-07-20 23:34:58 -04:00
Simon Cruanes
97d87cc58f perf: tiny detail in int indices in solver 2021-07-20 23:34:38 -04:00
Simon Cruanes
a03d7f6bef fix 2021-07-20 23:31:21 -04:00
Simon Cruanes
89051fd3ad perf(solver): use VecI32 in the heap
this reduces the size of the heap (4 bits per element, not 8), and
reduces GC work by not scanning the bigarray
2021-07-20 10:07:43 -04:00
Simon Cruanes
347e098fc2 misc 2021-07-20 09:20:14 -04:00
Simon Cruanes
f2b2bbb973 some stats for the SAT solver 2021-07-19 21:44:58 -04:00
Simon Cruanes
b624a1ca5d cleanup: remove commented code 2021-07-19 21:15:16 -04:00
Simon Cruanes
e30cf9fdbf perf: allocate less in conflict analysis
use preallocated vectors
2021-07-19 21:13:00 -04:00