Updated README + some more doc

This commit is contained in:
Guillaume Bury 2015-03-03 16:54:28 +01:00
parent e20876ad02
commit 68edd9916e
4 changed files with 32 additions and 10 deletions

View file

@ -6,11 +6,6 @@ extensions (including SMT). This is *work in progress*.
It derives from [Alt-Ergo Zero](http://cubicle.lri.fr/alt-ergo-zero). It derives from [Alt-Ergo Zero](http://cubicle.lri.fr/alt-ergo-zero).
The following theories should be supported:
- Equality and uninterpreted functions
- Arithmetic (linear, non-linear, integer, real)
- Enumerated data-types
## COPYRIGHT ## COPYRIGHT
@ -18,6 +13,32 @@ This program is distributed under the Apache Software License version
2.0. See the enclosed file `LICENSE`. 2.0. See the enclosed file `LICENSE`.
## USAGE
A ready-to-use SAT solver is available in the Sat module. It can be used
as shown in the following code :
(* Module initialization *)
module F = Msat.Sat.Tseitin
module Sat = Msat.Sat.Make(Msat.Log)
(* We create here two distinct atoms *)
let a = Sat.new_atom () (* A 'new_atom' is always distinct from any other atom *)
let b = Sat.make 1 (* Atoms can be creted from integers *)
(* Let's create some formulas *)
let p = F.make_and [a; b]
let q = F.make_or [F.make_not a; F.make_not b]
(* We can try and check the satisfiability of the given formulas *)
Sat.assume (F.make_cnf p)
let _ = Sat.solve () (* Should return Sat.Sat *)
(* The Sat solver has an incremental mutable state, so we still have
* the formula 'p' in our assumptions *)
Sat.assume (F.make_cnf q)
let _ = Sat.solve () (* Should return Sat.Unsat *)
## INSTALLATION ## INSTALLATION
### Via opam ### Via opam

View file

@ -18,6 +18,7 @@ solver/Mcsolver_types_intf
solver/Theory_intf solver/Theory_intf
solver/Plugin_intf solver/Plugin_intf
#sat/Sat solver/Tseitin
#smt/Smt solver/Tseitin_intf
#smt/Mcsat
sat/Sat

View file

@ -5,7 +5,7 @@ Copyright 2014 Simon Cruanes
*) *)
module Make(Dummy: sig end) : sig module Make(Dummy: sig end) : sig
(** Fonctor to make a pure SAT Solver module with built-in literals. *) (** Fonctor to make a SMT Solver module with built-in literals. *)
type atom = Expr.Formula.t type atom = Expr.Formula.t
(** Type for atoms, i.e boolean literals. *) (** Type for atoms, i.e boolean literals. *)

View file

@ -5,7 +5,7 @@ Copyright 2014 Simon Cruanes
*) *)
module type S = sig module type S = sig
(** Signature of formulas that parametrises the SMT Solver Module. *) (** Signature of formulas that parametrises the SAT/SMT Solver Module. *)
type t type t
(** The type of atomic formulas. *) (** The type of atomic formulas. *)