A Lustre model-checker using the H-Houdini invariant learning algorithm.
We need to install the following dependencies:
- dune
- z3
- (optional) ocaml-lsp-server when developing
- (optional) ocamlformat when developing
- (optional) typst to build the report
Create an opam switch using OCaml 5.3.0:
opam switch create loustrini 5.3.0Don't forget to activate the switch:
eval $(opam env --switch=loustrini)This project uses the dune build system:
opam install duneAnd the Z3 SMT solver OCaml bindings:
opam install z3Then you can build the project using:
dune buildand run it with:
dune exec ./src/loustrini.exe file.lus nodeThe report is written using Typst. Assuming Typst is installed on your system, it can be compiled using
typst compile report/report.typYou can also build the presentation slides. Note that, as of submitting the project, this is only a very drafty version of the slides that I will present.
typst compile report/slide/slide.typ --root=reportLoustrini supports two invariant learning backends:
- Houdini, used by default,
- H-Houdini, very experimental as of submitting the project, can be enabled using the
-hhflag.
You can run Loustrini with dune:
dune exec ./src/loustrini.exe ./examples/ic3/ic3.lus checkor using H-Houdini:
dune exec ./src/loustrini.exe ./examples/ic3/ic3.lus check -- -hhI strongly discourage to use H-Houdini for now, as the current abduct oracle is too messy to be used in practice. For more information on this issue, please refer to comments in the code.
All source files are in the src directory:
astcontains the AST provided by the project templatecompilecontains the translation from Lustre to SMT for both encodings, even though I deprecated thetrans(for transition system) because of updates incommon.mlenv_kind.mlis probably the most important file as it contains the SMT encoding and how it is used to emit equations
checkingcontains the pipeline to prove a property:- learn invariants using Houdini or H-Houdini (and add the desired property for Houdini),
- verify that these invariants are non-contradictory (should pass),
- verify that these invariants imply the desired property (should pass as we added the desired property when using Houdini),
- verify that initiation holds,
- verify that consecution holds.
invariantcontains the implementations for Houdini and H-Houdini.
The skeleton of the project (see the initial commit) was provided by Marc Pouzet and Timothy Bourke for the SYNC: Synchronous Programming of Reactive Systems class at MPRI.
See bibliography.bib.