Control Flow Aspects of Semantics-Directed Compiling

Research output: Contribution to journalArticle

23 Citations (Scopus)

Abstract

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)
Volume5
Issue number4
DOIs
StatePublished - Oct 1 1983
Externally publishedYes

Fingerprint

Flow control
Semantics
Computer programming languages
Demonstrations

Keywords

  • Compiler generation
  • continuations
  • flow diagrams
  • mathematical semantics

ASJC Scopus subject areas

  • Software

Cite this

Control Flow Aspects of Semantics-Directed Compiling. / Sethi, Ravi.

In: ACM Transactions on Programming Languages and Systems (TOPLAS), Vol. 5, No. 4, 01.10.1983, p. 554-595.

Research output: Contribution to journalArticle

@article{ca85ede04685470e9741910e549e6aa4,
title = "Control Flow Aspects of Semantics-Directed Compiling",
abstract = "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.",
keywords = "Compiler generation, continuations, flow diagrams, mathematical semantics",
author = "Ravi Sethi",
year = "1983",
month = "10",
day = "1",
doi = "10.1145/69575.357227",
language = "English (US)",
volume = "5",
pages = "554--595",
journal = "ACM Transactions on Programming Languages and Systems",
issn = "0164-0925",
publisher = "Association for Computing Machinery (ACM)",
number = "4",

}

TY - JOUR

T1 - Control Flow Aspects of Semantics-Directed Compiling

AU - Sethi, Ravi

PY - 1983/10/1

Y1 - 1983/10/1

N2 - 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.

AB - 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.

KW - Compiler generation

KW - continuations

KW - flow diagrams

KW - mathematical semantics

UR - http://www.scopus.com/inward/record.url?scp=84976752178&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84976752178&partnerID=8YFLogxK

U2 - 10.1145/69575.357227

DO - 10.1145/69575.357227

M3 - Article

AN - SCOPUS:84976752178

VL - 5

SP - 554

EP - 595

JO - ACM Transactions on Programming Languages and Systems

JF - ACM Transactions on Programming Languages and Systems

SN - 0164-0925

IS - 4

ER -