paraVerifier is an automatic framework for proving parameterized cache coherence protocols.
Parameterized verification of cache coherence protocols is an important but challenging research problem. We have developed an automatic framework paraVerifier to handle this research problem:
- It first discovers auxiliary invariants and the corresponding causal relations between invariants and protocol rules from a small reference instance of the verified protocol;
- The discovered invariants and causal relations can then be generalized into their parameterized form to automatically construct a formal proof to establish the correctness of the protocol.
paraVerifier has been successfully applied to a number of benchmarks.
- NuSMV
- Z3
- CMurphi 5.4.9
- Isabelle
- OCaml and necessary libs, including ocaml-nox ocaml-native-compilers ocaml-doc ocaml-findlib oasis libpcre-ocaml-dev
- opam
- Necessary libs installed by opam, including utop core async yojson core_extended core_bench cohttp async_graphics cryptokit menhir
- Python2.7.6
- Python lib: pexpect
Modify config file for OCaml, usually at ~/.ocamlinit, add the lines
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
#require “async”;;
-
Browse the directory where paraVerifier is put
-
Configure and run server
Modify the file
server/settings.py
, set the variablesSMV_PATH
,MU_PATH
,MU_INCLUDE
, which mean path of NuSMV, path of CMurphi and path of include dir of CMurphi respectively.cd server python server.py -v
-
Compile a small example from .m to .ml
cd ../murphi2ocaml python gen.py -m murphi/mutualEx.m > ../examples/mutualEx.ml cp murphi/mutualEx.m ../examples/n_mutualEx.m
remove the invariant definitions in file
../examples/n_mutualEx.m
.In fact, you can skip this step if you just want to test an example.
-
Compile .ml
cd ../examples corebuild mutualEx.byte -pkg re2 -I src
This should generate an executive file
mutualEx.byte
-
Run the executive file
mutualEx.byte
to generate proof scripts in dirn_mutualEx
automatically -
Run the scripts with Isabelle, you should config the
isabelle
in your~/.bashrc
file, then run./run.sh
We have applied ParaVerifier to a number of benchmarks:
protocol | #rule | #inv | time/s | memory/MB | thy |
---|---|---|---|---|---|
MESI | 3 | 3 | 3.33 | 148 | MESI thy |
MOESI | 5 | 3 | 3.34 | 147 | MOESI thy |
Germanish | 6 | 3 | 3.47 | 147 | Germanish thy |
German 2000 | 13 | 52 | 48.20 | 158 | German 2000 thy |
Flash* | 60 | 152 | 325.60 | 178 | Flash* thy |
Flash | 62 | 162 | 589.23 | 178 | Flash thy |
* the version of flash without data property.