mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
Updated README + some more doc
This commit is contained in:
parent
e20876ad02
commit
68edd9916e
4 changed files with 32 additions and 10 deletions
31
README.md
31
README.md
|
|
@ -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).
|
||||
|
||||
The following theories should be supported:
|
||||
|
||||
- Equality and uninterpreted functions
|
||||
- Arithmetic (linear, non-linear, integer, real)
|
||||
- Enumerated data-types
|
||||
|
||||
## COPYRIGHT
|
||||
|
||||
|
|
@ -18,6 +13,32 @@ This program is distributed under the Apache Software License version
|
|||
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
|
||||
|
||||
### Via opam
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ solver/Mcsolver_types_intf
|
|||
solver/Theory_intf
|
||||
solver/Plugin_intf
|
||||
|
||||
#sat/Sat
|
||||
#smt/Smt
|
||||
#smt/Mcsat
|
||||
solver/Tseitin
|
||||
solver/Tseitin_intf
|
||||
|
||||
sat/Sat
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Copyright 2014 Simon Cruanes
|
|||
*)
|
||||
|
||||
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 for atoms, i.e boolean literals. *)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Copyright 2014 Simon Cruanes
|
|||
*)
|
||||
|
||||
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
|
||||
(** The type of atomic formulas. *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue