Reference. The Denotational Semantics of SSA
Static single assignment form, or SSA, has been the dominant compiler intermediate representation for decades. In this paper, we give a type theory for a variant of SSA, including its equational theory, which are strong enough to validate a variety of control and data flow transformations. We also give a categorical semantics for SSA, and show that the type theory is sound and complete with respect to the categorical axiomatization. We demonstrate the utility of our model by exhibiting a variety of concrete models satisfying our axioms, including in particular a model of TSO weak memory. The correctness of the syntactic metatheory, as well as the completeness proof has been mechanized in the Lean proof assistant.
Cite
Cites 54 works (2 here)
With notes (2)
A Denotational Approach to Release/Acquire Concurrency dvir-2024-a
We present a compositional denotational semantics for a functional language with first-class parallel composition and shared-memory operations whose operational semantics follows the Release/Acquire weak memory model (RA). The semantics is formulated in Moggi’s monadic approach, and is based on Brookes-style traces. To do so we adapt Brookes’s traces to Kang et al.’s view-based machine for RA, and supplement Brookes’s mumble and stutter closure operations with additional operations, specific to RA. The latter provides a more nuanced understanding of traces that uncouples them from operational interrupted executions. We show that our denotational semantics is adequate and use it to validate various program transformations of interest. This is the first work to put weak memory models on the same footing as many other programming effects in Moggi’s standard monadic approach.
Formal verification of a realistic compiler leroy_formal_2009
This paper reports on the development and formal verification (proof of semantic preservation) of CompCert, a compiler from Clight (a large subset of the C programming language) to PowerPC assembly code, using the Coq proof assistant both for programming the compiler and for proving its correctness. Such a verified compiler is useful in the context of critical software and its formal verification: the verification of the compiler guarantees that the safety properties proved on the source code hold for the executable compiled code as well.
External (52)
- Verifying Peephole Rewriting in SSA Compiler IRs (2024)
- Mechanised Semantics for Gated Static Single Assignment (2023)
- Promonads and String Diagrams for Effectful Categories (2023)
- Cranelift: A Simple, Fast WebAssembly Code Generator (2023)
- The leaky semicolon: compositional semantic dependencies for relaxed-memory concurrency (2022)
- A metalanguage for guarded iteration (2021)
- MLIR: Scaling Compiler Infrastructure for Domain Specific Computation (2021)
- Pomsets with preconditions: a simple model of relaxed memory (2020)
- Modular Relaxed Dependencies in Weak Memory Concurrency (2020)
- Inferring types and effects via static single assignment (2020)
- Coinductive Resumption Monads: Guarded Iterative and Guarded Elgot (2019)
- Structural Operational Semantics for Control Flow Graph Machines (2018)
- Guarded Traced Categories (2018)
- A Denotational Semantics for SPARC TSO (2018)
- Compositional relaxed concurrency (2017)
- Weak memory models using event structures (2016)
- Iteration and Labelled Iteration (2016)
- Verifying Fast and Sparse SSA-Based Optimizations in Coq (2015)
- A graph-based higher-order intermediate representation (2015)
- Formal Verification of an SSA-Based Middle-End for CompCert (2014)
- The laws of programming unify process calculi (2014)
- A Formally Verified SSA-Based Middle-End - Static Single Assignment Meets CompCert (2012)
- Brookes Is Relaxed, Almost! (2012)
- Formalizing the LLVM intermediate representation for verified program transformations (2012)
- Elgot theories: a new perspective on the equational properties of iteration (2011)
- Explicitly typed static single-assignment form (2010)
- In and Out of SSA : a Denotational Specification (2009)
- Angelic semantics of fine-grained concurrency (2008)
- Typed Normal Form Bisimulation (2007)
- A type system equivalent to static single assignment (2006)
- A verifiable SSA program representation for aggressive compiler optimization (2006)
- LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation (2004)
- Call-By-Push-Value: A Functional/Imperative Synthesis (2004)
- A Functional Perspective on SSA Optimisation Algorithms (2003)
- The Uniformity Principle on Traced Monoidal Categories (2002)
- On Full Abstraction for PCF: I, II, and III (2000)
- Monads, Effects and Transformations (1999)
- Direct Models for the Computational Lambda Calculus (1999)
- SSA is Functional Programming (1998)
- Linearity, Sharing and State: a fully abstract game semantics for Idealized Algol with active expressions (1996)
- Full Abstraction for a Shared-Variable Parallel Language (1996)
- A Correspondence between Continuation Passing Style and Static Single Assignment Form (1995)
- Axiomatic domain theory in categories of partial maps (1994)
- The Essence of Compiling with Continuations (1993)
- Efficiently computing static single assignment form and the control dependence graph (1991)
- Notions of Computation and Monads (1991)
- Constant Propagation with Conditional Branches (1991)
- Detecting Equality of Variables in Programs (1988)
- Global Value Numbers and Redundant Computations (1988)
- Monadic Computation And Iterative Algebraic Theories (1975)
- Control flow analysis (1970)
- Flow diagrams, turing machines and languages with only two formation rules (1966)