Software Open Access
Herklotz, Yann;
Demange, Delphine;
Blazy, Sandrine
CompCert GSA
This repository contains the implementation of Gated-SSA in CompCertSSA.
Files
GSA semantics
./midend/GSA.v
: Syntax and semantics for GSA.Generation of GSA
./midend/GSAvalid.v
: Translation from SSA to GSA../midend/GSAvalidspec.v
: Specification of translation../midend/GSAvalidproof.v
: Proof of semantics preservation for translation../midend/GSApredicate.v
: The implementation of three-valued logic predicates../midend/GSApaths.v
: Implementation of Tarjan’s path algorithm../midend/RTLloopgen.v
, ./midend/RTLloopgenproof.v
: Loop normalisation using noops../midend/GSAcommon.v
: Common shared proofs and definitions../midend/GSASat.v
: A fallback implementation of a SAT solver.SMTCoq integration
./midend/GSAhashtree.v
: Hashing used to implement sharing of formulas and atoms for SMTCoq../midend/GSAsmtpredicate.v
: Solving three-valued logic predicates using an SMT solver through SMTCoq.Building GSA
Dependencies
./configure
script and check that it succeeds - launch make
. Some versions of clang
might fail, in which case you need to add the -Wno-implicit-function-declaration
option to it. This can be done by editing Makefile.config
- add the veriT
executable to your path.Building
First build SMTCoq:
cd smtcoq/src
make -j7
cd extraction
make # Important: not parallel
Then build CompCertGSA, as you would build CompCert
cd ../../.. # or back to root directory
./configure [your-architecture] # we only support the x86 backend (e.g. x86_64-linux)
make -j7
Compiling with GSA
The GSA intermediate representation can be enabled with -ssa gsa
. Then, the GSA representation can be printed out using -dgsa
, or the GSA will be translated back to SSA and finally compiled to an executable.
If there are linktime errors, the CompCert library might have to be included with -L./runtime
for example.
The following command is expected to finish in around 20s.
./ccomp -ssa gsa -dgsa ./test/c/qsort.c
The GSA representation will then be available as qsort.gsa.0
.
Name | Size | |
---|---|---|
compcertgsa-cpp23.tar.gz
md5:9c6997eec463aa5a030a0769c534736e |
4.0 MB | Download |
All versions | This version | |
---|---|---|
Views | 104 | 39 |
Downloads | 8 | 5 |
Data volume | 31.4 MB | 19.8 MB |
Unique views | 68 | 30 |
Unique downloads | 8 | 5 |