Skip to content
No description, website, or topics provided.
Coq C OCaml Assembly Makefile C++ Other
Branch: v3.5_adapt
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
arm
backend
cfrontend
common
cparser
debug
demo
doc
driver
exportclight
extraction
flocq
lib
powerpc
riscV
runtime
test
tools
x86
x86_32
x86_64
.gitignore
COMPCERT_README.md
Changelog
LICENSE
Makefile
Makefile.extr
Makefile.menhir
README.md
VERSION
configure
coq
make_graph.sh
pg

README.md

CompCertR

This is the refactored version of CompCert 3.5 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.9.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.9.1           # Use Coq version 8.9.1
    opam install menhir=20181113     # Use Menhir version 20181113
  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]

You can’t perform that action at this time.