-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
84 lines (62 loc) · 3.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
********************************************************************************
********************************* FILES DESCR. *********************************
********************************************************************************
smt.ml :
Contains the definition of a smt instance : a cnf.
Also contains the functions to solve those cnf, depending on a Sat Solver
(The actual solver is still TODO, see the TODO list)
________________________________________________________________________________
sat.ml
Contains an instance of a Sat Solver, using dpll tactics. The main
function is solgen : DPLL.t -> assignment list.
A DPLL.t is a formula and an assignment list called mode(which doesn't
have tocover all the variables, and can even be empty).
When you call solgen on a DPLL.t with an empty model, it only generates
a satisfying assignment of all variables.
When you call solgen on any other DPLL.t, it will backtrack and generate
the next valuation (according to inversed lexicological order). This way
you never have to modify the formula to get a new satisfying valuation.
If there is no more satisfying model, raise an exception.
________________________________________________________________________________
unionfind.ml :
Contains the implementation of Union-Find defined in the article
given in the subject webpage. It is persistent and optimal.
________________________________________________________________________________
parser.ml :
file_parser is the "main" function : string -> cnf (see smt.ml).
the string is a path to a file, the cnf returned is the one encoded by
the said file.
________________________________________________________________________________
types.ml :
Just a file to ease compilation, containing all the types used in
smt.ml and sat.ml
********************************************************************************
************************************* TODO *************************************
********************************************************************************
*************************
** To get it working : **
*************************
********************************************************************************
Join all the pieces together in smt.ml, with a function
resol : cnf -> litteral list
who would give a solution if there is any, fail otherwise.
I am currently working on this.
*************************
** To make it faster : **
*************************
Find a good implementation of Union-Find with incompatibilities. It has to be
persistent, regarding to the need of backtrack in smt.ml : resol.
Question : can we keep the O(1) amortized complexity for Union, Find (and also
to add an incompatibility) ?
********************************************************************************
A less naive implementation of ufd with disjoin.
**************************
** To make it clearer : **
**************************
Create a main.ml which would contain a script to parse the calling parameters
and arguments.
* It would be pretty easy to add a SAT Solver mode (using DPLL.from_file).
* There should be a mode to get one solution, or all of them (both for
the SMT Solver, and for the SAT Solver).
* Handle all errors.
Create a Makefile.