Control Flow Aspects of Semantics-Directed Compiling

Ravi Sethi

Research output: Contribution to journalArticlepeer-review

24 Scopus citations


This paper is a demonstration of a semantics-directed compiler generator. We focus on the part of a compiler between syntax analysis and code generation. A language is specified by adding semantic rules in a functional notation to the syntax of the language. Starting with a small sublanguage of while statements, statement constructs of the C programming language are added in stages. Using a small ad hoc code generator, a compiler is automatically constructed from the semantics. The semantic description is analogous to a syntax-directed construction of a flow diagram for a program. By analogy with grammars and parser generators, minimal knowledge of the underlying theory is required. For the control flow aspects of languages, efficient compilers can quickly be generated.

Original languageEnglish (US)
Pages (from-to)554-595
Number of pages42
JournalACM Transactions on Programming Languages and Systems (TOPLAS)
Issue number4
StatePublished - Oct 1 1983


  • Compiler generation
  • continuations
  • flow diagrams
  • mathematical semantics

ASJC Scopus subject areas

  • Software


Dive into the research topics of 'Control Flow Aspects of Semantics-Directed Compiling'. Together they form a unique fingerprint.

Cite this