module Plugin_intf:sig
..end
This module defines what a theory must implement in order to
be sued in a McSat solver.
type 'term
eval_res =
| |
Unknown |
(* |
The given formula does not have an evaluation
| *) |
| |
Valued of |
(* |
The given formula can be evaluated to the given bool.
The list of terms to give is the list of terms that
were effectively used for the evaluation.
| *) |
x * y = 0
, the
following result are correct:Unknown
if neither x
nor y
are assigned to a valueValued (true, [x])
if x
is assigned to 0
Valued (true, [y])
if y
is assigned to 0
Valued (false, [x; y])
if x
and y
are assigned to 1 (or any non-zero number)type ('formula, 'proof)
res =
| |
Sat |
(* |
The current set of assumptions is satisfiable.
| *) |
| |
Unsat of |
(* |
The current set of assumptions is *NOT* satisfiable, and here is a
theory tautology (with its proof), for which every litteral is false
under the current assumptions.
| *) |
type ('term, 'formula)
assumption =
| |
Lit of |
(* |
The given formula is asserted true by the solver
| *) |
| |
Assign of |
(* |
The first term is assigned to the second
| *) |
type ('term, 'formula, 'proof)
reason =
| |
Eval of |
(* |
The formula can be evalutaed using the terms in the list
| *) |
| |
Consequence of |
(* | Consequence (l, p) means that the formulas in l imply
the propagated formula f . The proof should be a proof of
the clause "l implies f ". | *) |
f
.type ('term, 'formula, 'proof)
slice = {
|
start : |
(* |
Start of the slice
| *) |
|
length : |
(* |
Length of the slice
| *) |
|
get : |
(* |
Accessor for the assertions in the slice.
Should only be called on integers
i s.t.
start <= i < start + length | *) |
|
push : |
(* |
Add a clause to the solver.
| *) |
|
propagate : |
(* |
Propagate a formula, i.e. the theory can
evaluate the formula to be true (see the
definition of
Plugin_intf.eval_res | *) |
module type S =sig
..end