Two-level semantics and code generation (Q1095636)
From MaRDI portal
scientific article
Language | Label | Description | Also known as |
---|---|---|---|
English | Two-level semantics and code generation |
scientific article |
Statements
Two-level semantics and code generation (English)
0 references
1988
0 references
We present a two-level denotational metalanguage that is suitable for defining the semantics of PASCAL-like languages. 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 like data flow analysis and code generation are considered. For an example stack- machine we show how to generate code for the run-time computations and still perform the compile-time computations. Based on an example it is argued that compiler-tricks like 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.
0 references
two-level denotational metalanguage
0 references
semantics of PASCAL-like languages
0 references
compile-time
0 references
run-time
0 references
data flow analysis
0 references
correctness
0 references
Kripke-like relations
0 references
loop
0 references
recursion
0 references