module Plugin_intf:sig..end
McSat Theory
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. | *) |
The type of evaluation results for a given formula.
For instance, let's suppose we want to evaluate the formula 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 0Valued (true, [y]) if y is assigned to 0Valued (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 returned by the theory. Formulas in the unsat clause must come from the current set of assumptions, i.e must have been encountered in a slice.
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 | *) |
Asusmptions made by the core SAT solver.
type ('term, 'formula, 'proof) reason =
| |
Eval of |
(* | The formula can be evalutaed using the terms in the list | *) |
| |
Consequence of |
(* |
| *) |
The type of reasons for propagations of a formula 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 | *) |
|
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 | *) |
The type for a slice of assertions to assume/propagate in the theory.
module type S =sig..end