make
This requires a recent ocaml, ocamlfind, ounit and ocamlbuild, preferably installed via opam.
To execute the solver you just need to execute
./solver.native file.smt
# ./solver.native file.smt
sat
y = 2
x = 3
Available options are :
--path-solverSet the path to the solver-psAlias for -path-solver--op-solverSet options for the solver (can be called multiple times)-opAlias for -op-solver--verbosebe verbose-vbe verbose
make tests
make exttests
To execute it, you have two possibilities, each one will read lines having the following pattern : "path_to_file\filename.smt" "expected result" corresponding to the file on which the solver will be executed and to the expected result. The two possibilities are :
- give each test one by one on the standard input
# ./exttests.native
"examples/test1.smt" "sat y = 2 x = 3"
Testing : ./solver.native examples/test1.smt
Expected : sat y = 2 x = 3
Obtained : sat y = 2 x = 3
Test OK
-----------
"examples/test1.smt" "sat y = 2 x = 4"
Testing : ./solver.native examples/test1.smt
Expected : sat y = 2 x = 4
Obtained : sat y = 2 x = 3
Test Not OK
-----------
- Or fill a file filename.test where each line correspond to a file to read and to the expected result
# cat simpletests.test
"examples/test1.smt" "sat y = 2 x = 3"
"examples/test2.smt" "unsat"
# ./exttests.native simpletests.test
Testing : ./solver.native examples/test1.smt
Expected : sat y = 2 x = 3
Obtained : sat y = 2 x = 3
Test OK
-----------
Testing : ./solver.native examples/test2.smt
Expected : unsat
Obtained : unsat
Test OK
-----------
#
--path-solverThis option is sent to./solver.nativefor each test-psThis option is sent to./solver.nativefor each test--op-solverThis option is sent to./solver.nativefor each test-opThis option is sent to./solver.nativefor each test
Some of the tests are broken atm.