Two-Level Semantics and Code Generation

Flemming Nielson, Hanne Riis Nielson

    Research output: Contribution to journalJournal articleResearchpeer-review

    Abstract

    A two-level denotational metalanguage that is suitable for defining the semantics of Pascal-like languages is presented. The two levels allow for an explicit distinction between computations taking place at compile-time and computations taking place at run-time. While this distinction is perhaps not absolutely necessary for describing the input-output semantics of programming languages, it is necessary when issues such as data flow analysis and code generation are considered. For an example stack-machine, the authors show how to generate code for the run-time computations and still perform the compile-time computations. Using an example, it is argued that compiler-tricks such as the use of activation records suggest how to cope with certain syntactic restrictions in the metalanguage. The correctness of the code generation is proved using Kripke-like relations and using a modified machine that can be made to loop when a certain level of recursion is encountered
    Original languageEnglish
    JournalTheoretical Computer Science
    Volume56
    Issue number1
    Pages (from-to)59-133
    ISSN0304-3975
    Publication statusPublished - 1988

    Fingerprint

    Dive into the research topics of 'Two-Level Semantics and Code Generation'. Together they form a unique fingerprint.

    Cite this