Commit graph

454 commits

Author SHA1 Message Date
Simon Cruanes
badf58ffdd update doc by merging everything into one dir 2016-11-21 15:02:35 +01:00
Simon Cruanes
21206cb166 remove useless modules and update doc 2016-11-21 14:58:21 +01:00
Simon Cruanes
31659c5d73 minor typos 2016-11-21 14:48:07 +01:00
Guillaume Bury
38972d7fc6 Typos in doc 2016-11-21 14:40:51 +01:00
Guillaume Bury
0ec4288d7c Added some documentation on solver_types 2016-11-21 14:37:19 +01:00
Guillaume Bury
03dd2f9e38 Removed some commented code 2016-11-17 16:12:34 +01:00
Guillaume Bury
6c0148016d Merge branch 'wip-analyze' 2016-11-17 16:11:18 +01:00
Guillaume Bury
e7b22b9c3e Merge branch 'wip-basic-smt' 2016-11-17 15:22:28 +01:00
Guillaume Bury
7dd04204ed [travis] Only build the bin for tests 2016-11-17 00:19:40 +01:00
Guillaume Bury
c2887b2e29 [travis] Try and build on old ocaml versions 2016-11-17 00:11:26 +01:00
Guillaume Bury
66f250a57e [travis] Changed ocaml test versions 2016-11-16 19:52:26 +01:00
Guillaume Bury
b4d62d6f3b [breaking] Changed if_sat interface
In Plugin, and Theory, if_sat function now has the same type as assume
Additionally, some insertions into the heap have been moved to avoid
some unnecessary operations.
2016-11-16 17:33:10 +01:00
Guillaume Bury
3af700bbd0 [bugfix] Better fix for propagation at level 0
Previously a fix was introduced to mitigate the fact that some atoms
couldn't be propagated at level 0 because of local assumptions. However
that fix didn't take into account propagation that implicated the
already propagated atom: for instance consider an atom [a] propagted at
level 1 because of some local hyp, and then atoms [b] propagated at
level 1 because [a] is true in a clause [C = not a \/ b]. If we propagte
0 and modify its level in-place as done in the previous fix, then we
should also propagate [b] at level 0, which is hard. Instead of
modifying levels in place, we simply store unit clauses at level 0 in a
stack, which we transfer to the clauses to add when we pop local hyps.
2016-11-09 14:27:50 +01:00
Guillaume Bury
443a3b0731 [bugfix] Attempt at fixing enqueue bug
When we enqueue an atom at level 0, we expect it to stay unconditionally
true whatever happens. However, if it happens that the atom is alrady
true at a level strictly greater than 0 (but lower than base_level),
then enqueue_bool would simply do nothing. To fix this, there is a new
function enqueue_root which modifies in place the level and reason of
the propagated atom if it is already true.
Additionally, enqueue_bool now requires that the atom be undecided,
since if it not (i.e if it is propagated while already decided) it is
most likely a bug.
2016-11-09 00:24:41 +01:00
Guillaume Bury
d681e247ed Added some debug logging 2016-11-04 12:19:43 +01:00
Guillaume Bury
d5d7234afc [bugfix] Avoid forgetting 1 atom clauses
When a new clause with only 1 atom is added with (usually
from simplifying a theory lemma), the usual strategy is to backtrack to
the base level, then propagate the atom. However, when the atom is
already false at base level, Unsat is raised, in which case the
information that the atom must be true is lost. To avoid that, the
single atom clause is simply pushed back in the stack of clauses to add,
so that it will be re-examined later.
2016-11-03 16:04:51 +01:00
Guillaume Bury
b8d4ee198a Better dimacs printing 2016-11-03 10:38:03 +01:00
Simon Cruanes
42b4c00861 wip 2016-11-02 16:17:58 +01:00
Simon Cruanes
33ea26c4f5 small fix 2016-11-02 16:17:58 +01:00
Simon Cruanes
bf5e6cf67c better dimacs printing 2016-11-02 16:15:20 +01:00
Guillaume Bury
3321f556d6 Better way of keeping track of local hyps 2016-10-19 17:09:13 +02:00
Guillaume Bury
e6f3e79acc [bugfix] Grow heap when adding local hyps
Previously, the heap was not grown when adding local assumptions. This
lead to a bug whne backtracking: indeed when a local assumption was
backtracked, it was added to the (too small) heap, which then raised a
Sparse_vec exception.
2016-10-19 17:07:19 +02:00
Guillaume Bury
64af636341 [doc] Updated inference rules 2016-10-18 19:10:31 +02:00
Guillaume Bury
f237851e89 Added Model definitions in msat doc 2016-10-18 17:39:10 +02:00
Guillaume Bury
ee2a80bc4f [wip] Documentation update 2016-10-14 14:12:29 +02:00
Guillaume Bury
ff6e9cb8f0 [wip] adding documentation about msat 2016-10-12 19:11:08 +02:00
Guillaume Bury
f35d3a9f23 Fixed uninterpreted predicates for mcsat solver 2016-09-23 15:57:38 +02:00
Guillaume Bury
1656995097 Added uninterpreted functions to mcsat solver 2016-09-23 15:39:23 +02:00
Guillaume Bury
4fae86c81d Fixed typo in smt typechecker 2016-09-23 14:02:12 +02:00
Guillaume Bury
88b8c9f895 Optimisation for mcsat solver 2016-09-23 13:30:51 +02:00
Guillaume Bury
41f1ec0e82 For travis, dolmen is now pinned to github/dev version 2016-09-23 13:30:19 +02:00
Guillaume Bury
9cf13bd7a2 Mcsat now works (for pure equality problems) 2016-09-22 18:31:22 +02:00
Guillaume Bury
4f5bb640ca [WIP] All is setup, remains to have real theories
Architecture is now all setup, but theories for the smt and mcsat
solvers are currently dummy ones that are not doing anything.
2016-09-16 15:49:33 +02:00
Guillaume Bury
2a33534312 Added (dummy) mcsat module for test binary 2016-09-14 19:55:57 +02:00
Guillaume Bury
4522aa3ddc Removed Expr module from msat lib 2016-09-12 17:54:10 +02:00
Guillaume Bury
a0d8bd5457 Added dolmen dependency 2016-09-12 17:11:05 +02:00
Guillaume Bury
0631135bd5 Smt solver with dummy theory now builds 2016-09-12 15:43:57 +02:00
Guillaume Bury
fa8957784a Restored simple expressions for pure SAT 2016-09-12 15:37:06 +02:00
Guillaume Bury
dfff903f8c Removed additional libs. 2016-09-12 15:32:22 +02:00
Simon Cruanes
9baa3f0716 fix bug in add_clause 2016-09-12 10:38:37 +02:00
Guillaume Bury
9d509241ad [WIP] Some drastic cleanup of code
Some of these changes are to be reverted, among other the structure of
terms used for the instantiation of the pure SAT solver
2016-09-09 18:09:04 +02:00
Guillaume Bury
954892ac4a [WIP] Strange compiler bug 2016-09-09 12:07:13 +02:00
Guillaume Bury
742f8c469d Added Expr and typing module from ArchSat 2016-09-07 17:58:07 +02:00
Guillaume Bury
18a3478926 Give access to the trail 2016-09-06 14:34:22 +02:00
Simon Cruanes
bb2c931d68 wip 2016-08-24 18:23:01 +02:00
Guillaume Bury
9eee458c2a External.assume no longer needs to catch Unsat
Following changes to the assume function in internal, it does not raise
Unsat anymore, so there is no reason to try and catch it in external.
2016-08-19 01:06:22 +02:00
Guillaume Bury
119f3a8566 New function to export a problem to dimacs format 2016-08-18 18:19:14 +02:00
Guillaume Bury
56f98d9a82 Explicit status for local assumption clauses
Proofs require local assumptions to be recognisable.
Keeping the reason of local assumptions as Bcp simplfies
the code, since a proof is a clause, and allows to not have
to recreate the local unit clause that effectively propagates
the local assumptions.

With this fix, simplification of clauses is not required aymore for
levels between 0 (excluded) and base_level, so the partition function
can be simplified accordingly.
2016-08-17 19:20:05 +02:00
Simon Cruanes
41557a1509 wip: make SMT great again 2016-08-16 17:20:48 +02:00
Guillaume Bury
ec6ced9809 Unify analyze code for sat and mcsat 2016-08-04 22:16:52 +02:00