module type S =sig
..end
val mcsat : bool
type
term
type
formula
type
proof
type
lit = {
|
lid : |
(* |
Unique identifier
| *) |
|
term : |
(* |
Wrapped term
| *) |
|
mutable l_level : |
(* |
Decision level of the assignment
| *) |
|
mutable l_weight : |
(* |
Weight (for the heap)
| *) |
|
mutable assigned : |
(* |
Assignment
| *) |
type
var = {
|
vid : |
(* |
Unique identifier
| *) |
|
pa : |
(* |
Link for the positive atom
| *) |
|
na : |
(* |
Link for the negative atom
| *) |
|
mutable used : |
(* |
Number of attached clause that contain the var
| *) |
|
mutable seen : |
(* |
Boolean used during propagation
| *) |
|
mutable v_level : |
(* |
Level of decision/propagation
| *) |
|
mutable v_weight : |
(* |
Variable weight (for the heap)
| *) |
|
mutable v_assignable : |
(* |
In mcsat, the list of lits that wraps subterms of the formula wrapped.
| *) |
|
mutable reason : |
(* |
The reason for propagation/decision of the literal
| *) |
type
atom = {
|
aid : |
(* |
Unique identifier
| *) |
|
var : |
(* |
Link for the parent variable
| *) |
|
neg : |
(* |
Link for the negation of the atom
| *) |
|
lit : |
(* |
Wrapped formula
| *) |
|
mutable is_true : |
(* |
Is the atom true ? Conversely, the atom
is false iff a.neg.is_true
| *) |
|
mutable watched : |
(* |
The vector of clauses that watch this atom
| *) |
f
in normal form,
the variable v points to the positive atom a
which wraps f
, while
a.neg
wraps the theory negation of f
.type
clause = {
|
name : |
(* |
Clause name, mainly for printing, unique.
| *) |
|
tag : |
(* |
User-provided tag for clauses.
| *) |
|
atoms : |
(* |
The atoms that constitute the clause.
| *) |
|
mutable cpremise : |
(* |
The premise of the clause, i.e. the justification
of why the clause must be satisfied.
| *) |
|
mutable activity : |
(* |
Clause activity, used for the heap heuristics.
| *) |
|
mutable attached : |
(* |
Is the clause attached, i.e. does it watch literals.
| *) |
|
mutable visited : |
(* |
Boolean used during propagation and proof generation.
| *) |
type
reason =
| |
Decision |
(* |
The atom has been decided by the sat solver
| *) |
| |
Bcp of |
(* |
The atom has been propagated by the given clause
| *) |
| |
Semantic |
(* |
The atom has been propagated by the theory at the given level.
| *) |
type
premise =
| |
Hyp |
(* |
The clause is a hypothesis, provided by the user.
| *) |
| |
Local |
(* |
The clause is a 1-atom clause,
where the atom is a local assumption
| *) |
| |
Lemma of |
(* |
The clause is a theory-provided tautology, with
the given proof.
| *) |
| |
History of |
(* |
The clause can be obtained by resolution of the clauses
in the list. For a premise
History [a_1 :: ... :: a_n]
the clause is obtained by performing resolution of
a_1 with a_2 , and then performing a resolution step between
the result and a_3 , etc...
Of course, each of the clause a_i also has its own premise. | *) |
type
t =
| |
Lit of |
|||
| |
Atom of |
(* |
Either a lit of an atom
| *) |
val of_lit : lit -> t
val of_atom : atom -> t
type
elt =
| |
E_lit of |
|||
| |
E_var of |
(* |
Either a lit of a var
| *) |
val nb_elt : unit -> int
val get_elt : int -> elt
val iter_elt : (elt -> unit) -> unit
val elt_of_lit : lit -> elt
val elt_of_var : var -> elt
val get_elt_id : elt -> int
val get_elt_level : elt -> int
val get_elt_weight : elt -> float
val set_elt_level : elt -> int -> unit
val set_elt_weight : elt -> float -> unit
val dummy_var : var
val dummy_atom : atom
val dummy_clause : clause
val add_term : term -> lit
val add_atom : formula -> atom
val make_boolean_var : formula -> var * Formula_intf.negated
var.pa
or var.na
val empty_clause : clause
val make_clause : ?tag:int ->
string ->
atom list ->
premise -> clause
make_clause name atoms size premise
creates a clause with the given attributes.val fresh_name : unit -> string
val fresh_lname : unit -> string
val fresh_tname : unit -> string
val fresh_hname : unit -> string
val print_lit : Format.formatter -> lit -> unit
val print_atom : Format.formatter -> atom -> unit
val print_clause : Format.formatter -> clause -> unit
val pp : Format.formatter -> t -> unit
val pp_lit : Format.formatter -> lit -> unit
val pp_atom : Format.formatter -> atom -> unit
val pp_clause : Format.formatter -> clause -> unit
val pp_dimacs : Format.formatter -> clause -> unit
val pp_reason : Format.formatter -> int * reason option -> unit