
Control Flow Treatment in a Simple: Semantics-Directed Compiler Generator
Author(s) -
Neil D. Jones,
Henning Christiansen
Publication year - 1981
Publication title -
daimi pb
Language(s) - English
Resource type - Journals
eISSN - 2245-9316
pISSN - 0105-8517
DOI - 10.7146/dpb.v10i137.7411
Subject(s) - computer science , programming language , compiler , correctness , generator (circuit theory) , semantics (computer science) , control flow , state (computer science) , simple (philosophy) , set (abstract data type) , compiler construction , theoretical computer science , power (physics) , philosophy , physics , epistemology , quantum mechanics
A simple algebra-based algorithm for compiler generation is described. Its input is a semantic definition of a programming language, and its output is a ''compiling semantics'' which maps each source program into a sequence of compile-time actions whose net effect on execution is the production of a semantically equivalent target program. The method does not require individual compiler correctness proofs or the construction of specialized target algebras. Source program execution is assumed to proceed by performing a series of elementary actions on a runtime state. A semantic algebra is introduced to represent and manipulate possible execution sequences. A source semantic definition has two parts: A set of semantic equations mapping source programs into terms of the algebra, and an interpretation which gives concrete definitions of the state and the elementary actions on it.