Results 1 -
3 of
3
Modular Denotational Semantics for Compiler Construction
- In European Symposium on Programming
, 1996
"... . We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a language with a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational ..."
Abstract
-
Cited by 52 (4 self)
- Add to MetaCart
. We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a language with a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational semantics, reasoning in monadic style offers the added benefits of highly modularized proofs and more widely applicable results. To demonstrate, we present an axiomatization of environments, and use it to prove the correctness of a well-known compilation technique. The monadic approach also facilitates generating code in various target languages with different sets of built-in features. 1 Introduction We propose a modular semantics which allows language designers to add (or remove) programming language features without causing global changes to the existing specification, derive a compilation scheme from semantic descriptions, prove the correctness of program transformation and compilation...
Call-by-need and Continuation-passing Style
- Lisp and Symbolic Computation
, 1993
"... . This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translat ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
. This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translation from terms into self-reducing program graphs, where the graphs are represented as CPS terms involving storage operations. Though informal, the derivation proceeds in simple steps, and the resulting translation is taken to be our canonical CPS transformation for call-by-need terms. In order to define the CPS transformation more formally, two alternative presentations are given. The first takes the form of a continuation semantics for the call-by-need language. The second presentation follows Danvy and Hatcliff 's two-stage decomposition of the call-by-name CPS transformation, resulting in a similar two-stage CPS transformation for call-by-need. Finally, a number of practical matters are...
Advice On Structuring Compiler Back Ends And Proving Them Correct
, 1993
"... In this dissertation we present a methodology for the verification of language implementations based on formal semantics. While this is not a new concept, the methodology presented is interesting for several reasons: ffl It is easy to use ffl It can be applied to languages specified by traditional d ..."
Abstract
- Add to MetaCart
In this dissertation we present a methodology for the verification of language implementations based on formal semantics. While this is not a new concept, the methodology presented is interesting for several reasons: ffl It is easy to use ffl It can be applied to languages specified by traditional denotational techniques ffl It mirrors traditional language implementation schemes ffl It is powerful enough to generate code for contemporary machine architectures Our approach advocates the use of denotational semantics to verify compiler front ends (machine independent transformations) and operational semantics to verify compiler back ends (machine dependent transformations). To illustrate the methodology, we present and verify an implementation of the language -LISP, a dialect of the Scheme programming language [13]. -LISP is restricted to obey stack discipline which introduces a number of issues we must deal with to ensure that the language is implemented properly (i.e. using only a st...

