-
Notifications
You must be signed in to change notification settings - Fork 27
The CertiCoq pipeline
This page explains briefly the CertiCoq pipeline and its verification status.
-
Reification ( -> PCUIC)
We reify a Gallina program to its Gallina AST using MetaCoq's reification facility. -
Erasure (PCUIC -> λbox)
We erase types and proofs using MetaCoq's verified erasure. -
λbox -> L2
L2 is a slight variation of λbox.
Status: Proof pending -
Fully-applied constructors (L3 -> L3) Eta expands constructor applications so that constructors are fully applied and removes type parameters.
Status: Proof pending -
Eta-expand branches (L3 -> L3)
Ensures that expressions in the arms of pattern-matching construct are lambdas.
Status: Verified -
Let-bind environment (L3 -> L4)
Let-binds the environment of at the beginning of the program.
Status: Verified -
ANF translation (L4 -> λΑΝF)
Converts L4 to λANF, the core intermediate representation of CertiCoq. By default we use direct-style translation, but
Status: Proof underway for CPS translation. Proof pending for direct translation. -
ANF pipeline (λΑΝF -> λΑΝF^C)
The λΑΝF pipeline consists on 13 passes built from of 7 distinct transformations:
Inlining, Shrinking, Uncurrying, Lambda lifting, Closure conversion, Hoisting, Dead parameter elimination
Status: Verified
Each of the phases are verified. The λΑΝF comes with an end-to-end compositional compiler correctness theorem. (Top-level theorems).
The implementation and proof is documented in Zoe Paraskevopoulou's thesis. -
C-code generation (λΑΝF^C -> Clight)
Compiles λΑΝF^C to C-code. Currently there are two code-generation procedures:
- The old code generator, that can only handle CPS code. (Documented in Olivier Savary Bélanger's thesis)
Status: Proof underway - The new code generator, that handles the full fragment of λΑΝF^C.
Status: Proof pending