Correctness of Static Flow Analysis in Continuation Semantics

Abstract We show how restructuring a denotational definition leads to a more efficient compiling algorithm. Two semantics-preserving transformations (static replacement and factoring) are used to convert a continuation semantics into a formal description of a semantic analyzer and translator. The translation algorithm derived below performs type checking before code generation so that type-checking instructions may be omitted from the target code. The translation is proved correct with respect to the original definition of the source language. The proof consists of showing that both transformations preserve the semantics of the source language.

[1]  Flemming Nielson,et al.  Program transformations in a denotational setting , 1981, ACM Trans. Program. Lang. Syst..

[2]  Uwe Frederik Pleban,et al.  Preexecution analysis based on denotational semantics , 1981 .

[3]  Robert D. Tennent,et al.  The denotational semantics of programming languages , 1976, CACM.

[4]  Neil D. Jones,et al.  A fixed-program machine for combinator expression evaluation , 1982, LFP '82.

[5]  Mitchell Wand Semantics-directed machine architecture , 1982, POPL '82.

[6]  Mitchell Wand Loops in Combinator-Based Compilers , 1983, Inf. Control..

[7]  Mitchell Wand,et al.  Incorporating Static Analysis in a Combinator-Based Compiler , 1989, Inf. Comput..

[8]  D. A. Turner,et al.  A new implementation technique for applicative languages , 1979, Softw. Pract. Exp..

[9]  William L. Scherlis,et al.  Compilers and staging transformations , 1986, POPL '86.

[10]  Joe Stoy,et al.  Denotational Semantics , 1977 .

[11]  Paul Hudak,et al.  A combinator-based compiler for a functional language , 1984, POPL '84.

[12]  Michael J. C. Gordon,et al.  The denotational description of programming languages - an introduction , 1979 .

[13]  Mitchell Wand,et al.  Deriving Target Code as a Representation of Continuation Semantics , 1982, TOPL.

[14]  Christopher Strachey,et al.  A theory of programming language semantics , 1976 .

[15]  Roberto Barbuti,et al.  A Structured Approach to Static Semantics Correctness , 1983, Sci. Comput. Program..

[16]  F. Lockwood Morris,et al.  Advice on structuring compilers and proving them correct , 1973, POPL.

[17]  M M Montenyohl Static analysis based on denotational transformations , 1986 .

[18]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[19]  F. Nielson A Denotational Framework for Data Flow Analysis , 1981 .

[20]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .