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)
|
LIB=$(addprefix $(NAME), .cma .cmxa .cmxs)
|
||||||
|
|
||||||
all: build test
|
all: build-dev test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
jbuilder build $(OPTS) @install
|
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 echo "reindenting: "
|
||||||
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 ocp-indent -i
|
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 ocp-indent -i
|
||||||
|
|
||||||
WATCH=build-dev
|
WATCH=all
|
||||||
watch:
|
watch:
|
||||||
while find src/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
|
while find src/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
|
||||||
echo "============ at `date` ==========" ; \
|
echo "============ at `date` ==========" ; \
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ module Make(St : Solver_types.S) = struct
|
||||||
let duplicates, res = analyze (list c) in
|
let duplicates, res = analyze (list c) in
|
||||||
assert (cmp_cl res (list conclusion) = 0);
|
assert (cmp_cl res (list conclusion) = 0);
|
||||||
{ conclusion; step = Duplicate (c, List.concat duplicates) }
|
{ 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
|
let (l, c', d', a) = chain_res (c, to_list c) r in
|
||||||
assert (cmp_cl l (to_list conclusion) = 0);
|
assert (cmp_cl l (to_list conclusion) = 0);
|
||||||
{ conclusion; step = Resolution (c', d', a); }
|
{ 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).
|
simply an SMT solver with an empty theory).
|
||||||
|
|
||||||
{!modules:
|
{!modules:
|
||||||
Solver
|
Msat_solver
|
||||||
Solver_intf
|
|
||||||
Formula_intf
|
|
||||||
Theory_intf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
The following modules allow the creation of a McSat solver (Model Constructing solver):
|
The following modules allow the creation of a McSat solver (Model Constructing solver):
|
||||||
|
|
||||||
{!modules:
|
{!modules:
|
||||||
Mcsolver
|
Msat_mcsolver
|
||||||
Solver_intf
|
|
||||||
Expr_intf
|
|
||||||
Plugin_intf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{4 Useful tools}
|
{4 Useful tools}
|
||||||
|
|
@ -41,14 +35,13 @@ Plugin_intf
|
||||||
An instanciation of a pure sat solver is also provided:
|
An instanciation of a pure sat solver is also provided:
|
||||||
|
|
||||||
{!modules:
|
{!modules:
|
||||||
Sat
|
Msat_sat
|
||||||
}
|
}
|
||||||
|
|
||||||
Lastly, mSAT also provides an implementation of Tseitin's CNF conversion:
|
Lastly, mSAT also provides an implementation of Tseitin's CNF conversion:
|
||||||
|
|
||||||
{!modules:
|
{!modules:
|
||||||
Tseitin
|
Msat_tseitin
|
||||||
Tseitin_intf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{4 Proof Management}
|
{4 Proof Management}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
(library
|
(library
|
||||||
((name msat_sat)
|
((name msat_sat)
|
||||||
(public_name msat.sat)
|
(public_name msat.sat)
|
||||||
(libraries (msat msat.solver))
|
(libraries (msat msat.tseitin msat.solver))
|
||||||
(synopsis "sat interface")
|
(synopsis "sat interface")
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -color always -safe-string -open Msat))
|
(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
|
(ocamlopt_flags (:standard -O3 -bin-annot
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Copyright 2014 Simon Cruanes
|
||||||
module Id = Dolmen.Id
|
module Id = Dolmen.Id
|
||||||
module Ast = Dolmen.Term
|
module Ast = Dolmen.Term
|
||||||
module H = Hashtbl.Make(Id)
|
module H = Hashtbl.Make(Id)
|
||||||
module Formula = Msat_solver.Tseitin.Make(Sat.Expr)
|
module Formula = Msat_tseitin.Make(Sat.Expr)
|
||||||
|
|
||||||
(* Exceptions *)
|
(* Exceptions *)
|
||||||
(* ************************************************************************ *)
|
(* ************************************************************************ *)
|
||||||
|
|
|
||||||
|
|
@ -521,5 +521,5 @@ module Atom = struct
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module Formula = Msat_solver.Tseitin.Make(Atom)
|
module Formula = Msat_tseitin.Make(Atom)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -322,5 +322,5 @@ module Atom : sig
|
||||||
|
|
||||||
end
|
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
|
(library
|
||||||
((name msat_smt)
|
((name msat_smt)
|
||||||
(public_name msat.smt)
|
(public_name msat.smt)
|
||||||
(libraries (msat msat.solver dolmen))
|
(libraries (msat msat.solver msat.tseitin dolmen))
|
||||||
(synopsis "smt interface")
|
(synopsis "smt interface")
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -color always -safe-string -open Msat))
|
(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
|
(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
|
open Msat_sat
|
||||||
|
|
||||||
module F = Sat.Expr
|
module F = Sat.Expr
|
||||||
module T = Msat_solver.Tseitin.Make(F)
|
module T = Msat_tseitin.Make(F)
|
||||||
|
|
||||||
let (|>) x f = f x
|
let (|>) x f = f x
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue