This is the refactored version of CompCert 3.5 in the style of open simulations.
Main differences include:
Proving "guarantee" conditions of each translations.
In the context of open simulations, CompCert only "rely" on it (by external call axioms) but does not "guarantee" it.
To address this gap, we needed to prove "guarantee" conditions for each per-pass proofs.
We needed to prove additional properties for injection passes only.
Changing "Callstate" of each language to carry function pointer, instead of function definition.
External module's function definition may not be visible in the local module, but it should be able to call it with function pointer.
Relaxing each translation's simulation relation so that first stack (
main, in CompCert) may have called with arguments.
This change affects only three passes, and except for the Stackingproof the change is very small.
Generalizing "step" relation to respect "symbol environment".
Note that, in spite of these technical modifications, mathematical meaning of the semantics is unchanged.
- For source languages, see
/cfrontend/Cstrategy.vwhich proves the small-step variant and big-step variant of the semantics are equivalent. We modified small-step variant but it is still equivalent to (unmodified) big-step semantics.
- For target language (
/x86/Asm.v), we didn't modify the semantics at all.
Our development is tested with Coq 8.9.1. CompCertR only supports x86_64 architecture.
- Follow 2-2 Prerequisites in standard CompCert build process to install prerequisites.
- Install opam >= 2.0.0.
- Install required dependencies.
opam switch 4.07.1 # Use OCaml version 4.07.1 eval `opam env` opam install coq=8.9.1 # Use Coq version 8.9.1 opam install menhir=20181113 # Use Menhir version 20181113
Install Paco coq library via opam.
opam repo add coq-released https://coq.inria.fr/opam/released; opam install coq-paco
Configure and Build.
./configurewith proper architecture.