module type S =sig..end
The external interface implemented by safe solvers, such as the one
created by the Solver.Make and Mcsolver.Make functors.
These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.
module St:Solver_types.S
WARNING: Very dangerous module that expose the internal representation used by the solver.
module Proof:Res.Swith module St = St
A module to manipulate proofs.
typeatom =St.formula
The type of atoms given by the module argument for formulas
type res =
| |
Sat of |
(* | Returned when the solver reaches SAT | *) |
| |
Unsat of |
(* | Returned when the solver reaches UNSAT | *) |
Result type for the solver
exception UndecidedLit
Exception raised by the evaluating functions when a literal has not yet been assigned a value.
val assume : ?tag:int -> atom list list -> unitAdd the list of clauses to the current set of assumptions. Modifies the sat solver state in place.
val solve : ?assumptions:atom list -> unit -> resTry and solves the current set of assumptions.
val new_lit : St.term -> unitAdd a new litteral (i.e term) to the solver. This term will be decided on at some point during solving, wether it appears in clauses or not.
val new_atom : atom -> unitAdd a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.
val unsat_core : Proof.proof -> St.clause listReturns the unsat core of a given proof.
val true_at_level0 : atom -> booltrue_at_level0 a returns true if a was proved at level0, i.e.
it must hold in all models
val get_tag : St.clause -> int optionRecover tag from a clause, if any
val export_dimacs : Format.formatter -> unit -> unitPrints the entire set of clauses in the input problem (including hypothesis, lemmas and local assumptions), in the dimacs format.
val export_icnf : Format.formatter -> unit -> unitExport the current problem contents to iCNF format. This function is meant to be used icnrementally, i.e. called for each return value of the solve function.