Skip to Main content Skip to Navigation
Theses

Semantic foundations of intermediate program representations

Delphine Demange 1
1 CELTIQUE - Software certification with semantic analysis
IRISA-D4 - LANGAGE ET GÉNIE LOGICIEL, Inria Rennes – Bretagne Atlantique
Abstract : An end-to-end guarantee of software correctness by formal verification must consider two sources of bugs. First, the verification tool must be correct. Second, programs are often verified at the source level, before being compiled. Hence, compilers should also be trustworthy. Verifiers and compilers' complexity is increasing. To simplify code analysis and manipulation, these tools rely on intermediate representations (IR) of programs, that provide structural and semantic properties. This thesis gives a formal, semantic account on IRs, so that they can also be leveraged in the formal proof of such tools. We first study a register-based IR of Java bytecode used in compilers and verifiers. We specify the IR generation by a semantic theorem stating what the transformation preserves, e.g. object initialization or exceptions, but also what it modifies and how, e.g. object allocation. We implement this IR in Sawja, a Java static analysis toolbench. Then, we study the Static Single Assignment (SSA) form, an IR widely used in modern compilers and verifiers. We implement and prove in Coq an SSA middle-end for the CompCert C compiler. For the proof of SSA optimizations, we identify a key semantic property of SSA, allowing for equational reasoning. Finally, we study the semantics of concurrent Java IRs. Due to instruction reorderings performed by the compiler and the hardware, the current definition of the Java Memory Model (JMM) is complex, and unfortunately formally flawed. Targetting x86 architectures, we identify a subset of the JMM that is intuitive and tractable in formal proofs. We characterize the reorderings it allows, and factor out a proof common to the IRs of a compiler.
Document type :
Theses
Complete list of metadata

Cited literature [182 references]  Display  Hide  Download

https://tel.archives-ouvertes.fr/tel-00905442
Contributor : Abes Star :  Contact
Submitted on : Monday, November 18, 2013 - 11:57:25 AM
Last modification on : Tuesday, November 17, 2020 - 8:30:05 AM
Long-term archiving on: : Saturday, April 8, 2017 - 12:23:22 AM

File

Demange2012.pdf
Version validated by the jury (STAR)

Identifiers

  • HAL Id : tel-00905442, version 1

Citation

Delphine Demange. Semantic foundations of intermediate program representations. Other [cs.OH]. École normale supérieure de Cachan - ENS Cachan, 2012. English. ⟨NNT : 2012DENS0053⟩. ⟨tel-00905442⟩

Share

Metrics

Record views

874

Files downloads

844