Open Access
Static analysis based on denotational transformations
M M Montenyohl
- 30 Jun 1986
4
TL;DR: This dissertation shows how a provably correct implementation may be constructed from aDenotational definition of the source language, and gives support to the hypothesis that denotational semantics is an appropriate notation in which to develop a formal model of compilation.
read more
Abstract: Ideally, a language's implementation should be based on a formal definition of its semantics. Typically, a language is "defined" by its a compiler. We believe the reverse situation is possible and the work reported here suggests ways of managing the task of correct compiler design.
In this dissertation, we show how a provably correct implementation may be constructed from a denotational definition of the source language. Wand has developed a methodology for deriving target code by applying meaning-preserving transformations to a language's semantic definition Wand, 80,82a,82b,83 . The correctness proof is straightforward; it is based on the direct connection between the functions specifying the meaning of the constructs and the representations of the constructs. By extending Wand's methodology, we develop a specification of a compiler which performs data flow analysis in order to produce more efficient target code. Specifically, we derive a compiling algorithm which performs type-checking before code generation so that type-checking instructions may be omitted from the target code. The optimized code is proved correct with respect to the semantics of the original program. The proof consists of showing that each transformation applied to the original definition preserves its meaning. Also, we include constant folding and live variable analysis in our compiler specification.
Developing a comprehensive, theoretical model of compilation is important to language designers and implementers because by studying the issues of compilation in a formal model, they will be better prepared to design and write good compilers. By showing how static analysis and code optimization may be specified in a denotational framework, we give support to the hypothesis that denotational semantics is an appropriate notation in which to develop a formal model of compilation. Further, we construct an implementation from our model using a transformational approach. Since the notation has a theoretical basis, we give a proof of the correctness of our implementation. The transformations used to develop our implementation are structured in such a way that automation seems possible. Thus our results are significant to the study of semantics-directed compiler generation.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Correct flow analysis in continuation semantics
M. Montenyohl,Mitchell Wand +1 more
- 13 Jan 1988
TL;DR: Three semantics-preserving transformations are used to convert a continuation semantics into a formal description of a semantic analyzer and code generator, and a compilation algorithm which performs type checking before code generation so that type-checking instructions are not generated in the target code.
11
Incorporating static analysis in a combinator-based compiler
M. Montenyohl,Mitchell Wand +1 more
TL;DR: Three semantics-preserving transformations are used to convert a continuation semantics into a formal description of a semantic analyzer and code generator, showing how restructuring a denotational definition leads to a more efficient compiling algorithm.
4
Correctness of static flow analysis in continuation semantics
TL;DR: Two semantics-preserving transformations are used to convert a continuation semantics into a formal description of a semantic analyzer and translator and it is shown how restructuring a denotational definition leads to a more efficient compiling algorithm.
3
Combinator-based compilation of recursive functions with different parameter passing modes
TL;DR: Wand's technique of deriving compilers from denotational semantics is applied to a block structured language with recursive functions, eliminating λ-variables from semantic equations through the introduction of special-purpose combinators.