Skip to content

alxest/CompCertR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompCertR

This is the refactored version of CompCert 3.6 in the style of open simulations.

Main differences include:

  1. 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.

  2. 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.

  3. 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.

  4. 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/ClightBigstep.v and /cfrontend/Cstrategy.v which 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.

Installation Instructions

Our development is tested with Coq 8.10.1. CompCertR only supports x86_64 architecture.

  1. 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.10.1           # Use Coq version 8.10.1
    opam install menhir=20190626     # Use Menhir version 20190626
  1. Install Paco coq library via opam.
    opam repo add coq-released https://coq.inria.fr/opam/released; opam install coq-paco

  2. Configure and Build.
    ./configure with proper architecture.
    make -j[N]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Coq 80.3%
  • OCaml 16.1%
  • Assembly 2.3%
  • C 0.9%
  • Makefile 0.2%
  • Standard ML 0.2%