ldlsat is a SAT solver for LDLf, an extension of LTL.
For each input LDLf formula, ldlsat first translates it to MSO, and then passes the generated (equivalent) MSO formula to the mona tool for solving its satisfiability.
$ echo 'a & (a -> b) -> b' | ldlsat
valid
$ echo 'a & !a' | ldlsat
unsatisfiable
$ echo '[{true}*]a -> a' | ldlsat
valid
$ echo '[{true}](a -> b) -> [{true}]a -> [{true}]b' | ldlsat ## distribution (K)
valid
$ echo '[{true}]a -> a' | ldlsat ## reflexitivity (T)
satisfiable
$ echo 'a -> [{true}]<{true}>a' | ldlsat ## symmetry (B)
satisfiable
Note
- [] and <> in LTL are equivalent with [{true}*] and <{true}*> in LDL, respectively.
- [] and <> in standard propositional modal logics correspond with [{true}] and <{true}> in LDL, respectively.
$ echo '<{a}*>a -> a' | ldlsat
valid
$ echo '<{a & !b}; {!a & b}>(a & last) -> [{a}*; {b}]last' | ldlsat
valid
$ echo '<{a}; {!b}>last & [{a}]b' | ldlsat
unsatisfiable
Note that formulas should conform to this grammar.
- run
docker build -t ldltools/ldlsat .
in the top directory
- ocaml (v4.05 or higher. tested with 4.07.0)
run:apt-get install ocaml
Alternatively, you can install a particular version of the compiler using opam
run:opam switch 4.07.0
for example - opam (ocaml package manager)
run:apt-get install opam
- ocaml packages: ocamlfind, yojson, ppx_deriving, ppx_deriving_yojson
for each of these packages,
run:opam install package
- mona (v1.4)
run:wget http://www.brics.dk/mona/download/mona-1.4-17.tar.gz
expand the archive, and build/install the tool as is instructed. - graphviz (optional)
run:apt-get install graphviz
- run
make && make install
in the top directory
Tools includingldlsat
will be built and installed into/usr/local/bin
.
To change the installation directory, runmake PREFIX=<prefix> install
instead (default:PREFIX=/usr/local
).
In addition to the tools listed above, you also need the following:
- GNU common utilities
run:brew install coreutils debianutils
- GNU sed/awk
run:brew install gnu-sed gawk
- GNU make (v4.1 or higher)
run:brew install remake
and build withMAKE=remake remake
instead ofmake
- run:
make -C tests test
run unit tests - run:
make -C tests dfa
generate DFA files from various LDLf formulas intotests/out