mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
move tseitin transformation into its own lib
This commit is contained in:
parent
64d7314aab
commit
7722319b0a
13 changed files with 25 additions and 20 deletions
4
Makefile
4
Makefile
|
|
@ -12,7 +12,7 @@ OPTS= -j $(J)
|
|||
|
||||
LIB=$(addprefix $(NAME), .cma .cmxa .cmxs)
|
||||
|
||||
all: build test
|
||||
all: build-dev test
|
||||
|
||||
build:
|
||||
jbuilder build $(OPTS) @install
|
||||
|
|
@ -58,7 +58,7 @@ reindent: ocp-indent
|
|||
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 echo "reindenting: "
|
||||
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 ocp-indent -i
|
||||
|
||||
WATCH=build-dev
|
||||
WATCH=all
|
||||
watch:
|
||||
while find src/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
|
||||
echo "============ at `date` ==========" ; \
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ module Make(St : Solver_types.S) = struct
|
|||
let duplicates, res = analyze (list c) in
|
||||
assert (cmp_cl res (list conclusion) = 0);
|
||||
{ conclusion; step = Duplicate (c, List.concat duplicates) }
|
||||
| St.History ( c :: ([d] as r)) ->
|
||||
| St.History ( c :: ([_] as r)) ->
|
||||
let (l, c', d', a) = chain_res (c, to_list c) r in
|
||||
assert (cmp_cl l (to_list conclusion) = 0);
|
||||
{ conclusion; step = Resolution (c', d', a); }
|
||||
|
|
|
|||
|
|
@ -21,19 +21,13 @@ The following modules allow to easily create a SAT or SMT solver (remark: a SAT
|
|||
simply an SMT solver with an empty theory).
|
||||
|
||||
{!modules:
|
||||
Solver
|
||||
Solver_intf
|
||||
Formula_intf
|
||||
Theory_intf
|
||||
Msat_solver
|
||||
}
|
||||
|
||||
The following modules allow the creation of a McSat solver (Model Constructing solver):
|
||||
|
||||
{!modules:
|
||||
Mcsolver
|
||||
Solver_intf
|
||||
Expr_intf
|
||||
Plugin_intf
|
||||
Msat_mcsolver
|
||||
}
|
||||
|
||||
{4 Useful tools}
|
||||
|
|
@ -41,14 +35,13 @@ Plugin_intf
|
|||
An instanciation of a pure sat solver is also provided:
|
||||
|
||||
{!modules:
|
||||
Sat
|
||||
Msat_sat
|
||||
}
|
||||
|
||||
Lastly, mSAT also provides an implementation of Tseitin's CNF conversion:
|
||||
|
||||
{!modules:
|
||||
Tseitin
|
||||
Tseitin_intf
|
||||
Msat_tseitin
|
||||
}
|
||||
|
||||
{4 Proof Management}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
(library
|
||||
((name msat_sat)
|
||||
(public_name msat.sat)
|
||||
(libraries (msat msat.solver))
|
||||
(libraries (msat msat.tseitin msat.solver))
|
||||
(synopsis "sat interface")
|
||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -color always -safe-string -open Msat))
|
||||
(ocamlopt_flags (:standard -O3 -bin-annot
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Copyright 2014 Simon Cruanes
|
|||
module Id = Dolmen.Id
|
||||
module Ast = Dolmen.Term
|
||||
module H = Hashtbl.Make(Id)
|
||||
module Formula = Msat_solver.Tseitin.Make(Sat.Expr)
|
||||
module Formula = Msat_tseitin.Make(Sat.Expr)
|
||||
|
||||
(* Exceptions *)
|
||||
(* ************************************************************************ *)
|
||||
|
|
|
|||
|
|
@ -521,5 +521,5 @@ module Atom = struct
|
|||
|
||||
end
|
||||
|
||||
module Formula = Msat_solver.Tseitin.Make(Atom)
|
||||
module Formula = Msat_tseitin.Make(Atom)
|
||||
|
||||
|
|
|
|||
|
|
@ -322,5 +322,5 @@ module Atom : sig
|
|||
|
||||
end
|
||||
|
||||
module Formula : Msat_solver.Tseitin.S with type atom = atom
|
||||
module Formula : Msat_tseitin.S with type atom = atom
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
(library
|
||||
((name msat_smt)
|
||||
(public_name msat.smt)
|
||||
(libraries (msat msat.solver dolmen))
|
||||
(libraries (msat msat.solver msat.tseitin dolmen))
|
||||
(synopsis "smt interface")
|
||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -color always -safe-string -open Msat))
|
||||
(ocamlopt_flags (:standard -O3 -bin-annot
|
||||
|
|
|
|||
12
src/tseitin/jbuild
Normal file
12
src/tseitin/jbuild
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
; vim:ft=lisp:
|
||||
|
||||
(library
|
||||
((name msat_tseitin)
|
||||
(public_name msat.tseitin)
|
||||
(synopsis "Tseitin transformation for msat")
|
||||
(libraries ())
|
||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -color always -safe-string))
|
||||
(ocamlopt_flags (:standard -O3 -bin-annot
|
||||
-unbox-closures -unbox-closures-factor 20))
|
||||
))
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ open Msat
|
|||
open Msat_sat
|
||||
|
||||
module F = Sat.Expr
|
||||
module T = Msat_solver.Tseitin.Make(F)
|
||||
module T = Msat_tseitin.Make(F)
|
||||
|
||||
let (|>) x f = f x
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue