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 language | English |
---|---|
Journal | Theoretical Computer Science |
Volume | 56 |
Issue number | 1 |
Pages (from-to) | 59-133 |
ISSN | 0304-3975 |
Publication status | Published - 1988 |