Visible to the public Axiomatic Semantics for Compiler Verification

TitleAxiomatic Semantics for Compiler Verification
Publication TypeConference Paper
Year of Publication2016
AuthorsSchäfer, Steven, Schneider, Sigurd, Smolka, Gert
Conference NameProceedings of the 5th ACM SIGPLAN Conference on Certified Programs and Proofs
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-4127-1
Keywordscompiler correctness, composability, compositionality, Computing Theory, formal verification, pubcrawl, Weakest preconditions
Abstract

Based on constructive type theory, we study two idealized imperative languages GC and IC and verify the correctness of a compiler from GC to IC. GC is a guarded command language with underspecified execution order defined with an axiomatic semantics. IC is a deterministic low-level language with linear sequential composition and lexically scoped gotos defined with a small-step semantics. We characterize IC with an axiomatic semantics and prove that the compiler from GC to IC preserves specifications. The axiomatic semantics we consider model total correctness and map programs to continuous predicate transformers. We define the axiomatic semantics of GC and IC with elementary inductive predicates and show that the predicate transformer described by a program can be obtained compositionally by recursion on the syntax of the program using a fixed point operator for loops and continuations. We also show that two IC programs are contextually equivalent if and only if their predicate transformers are equivalent.

URLhttp://doi.acm.org/10.1145/2854065.2854083
DOI10.1145/2854065.2854083
Citation Keyschafer_axiomatic_2016