Results 11 - 20
of
36
The VLISP Verified PreScheme Compiler
- Lisp and Symbolic Computation
, 1995
"... . This paper describes a verified compiler for PreScheme, the implementation language for the vlisp run-time system. The compiler and proof were divided into three parts: A transformational front end that translates source text into a core language, a syntax-directed compiler that translates the cor ..."
Abstract
-
Cited by 14 (5 self)
- Add to MetaCart
. This paper describes a verified compiler for PreScheme, the implementation language for the vlisp run-time system. The compiler and proof were divided into three parts: A transformational front end that translates source text into a core language, a syntax-directed compiler that translates the core language into a combinator-based tree-manipulation language, and a linearizer that translates combinator code into code for an abstract stored-program machine with linear memory for both data and code. This factorization enabled different proof techniques to be used for the different phases of the compiler, and also allowed the generation of good code. Finally, the whole process was made possible by carefully defining the semantics of vlisp PreScheme rather than just adopting Scheme's. We believe that the architecture of the compiler and its correctness proof can easily be applied to compilers for languages other than PreScheme. Table of Contents 1 Introduction : : : : : : : : : : : : : :...
A Taxonomy of Functional Language Implementations Part II: Call-by-Name, Call-by-Need and Graph Reduction
, 1996
"... In Part I [5], we proposed an approach to formally describe and compare functional languages implementations. We focused on call-by-value and described well-known compilers for strict languages. Here, we complete our exploration of the design space of implementations by studying call-by-name, cal ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
In Part I [5], we proposed an approach to formally describe and compare functional languages implementations. We focused on call-by-value and described well-known compilers for strict languages. Here, we complete our exploration of the design space of implementations by studying call-by-name, call-by-need and graph reduction. We express the whole compilation process as a succession of program transformations in a common framework. At each step, different transformations model fundamental choices or optimizations. We describe and compare the diverse alternatives for the compilation of the call-byname strategy in both environment and graph-based models. The different options for the compilation of b-reduction described in [5] can be applied here as well. Instead, we describe other possibilities specific to graph reduction. Call-by-need is nothing but call-by-name with redex sharing and update. We present how sharing can be expressed in our framework and we describe different...
Three Steps for the CPS Transformation
, 1991
"... Transforming a #-term into continuation-passing style (CPS) might seem mystical at first, but in fact it can be characterized by three separate aspects: . The values of all intermediate applications are given a name. . The evaluation of these applications is sequentialized based on a traversal o ..."
Abstract
-
Cited by 9 (4 self)
- Add to MetaCart
Transforming a #-term into continuation-passing style (CPS) might seem mystical at first, but in fact it can be characterized by three separate aspects: . The values of all intermediate applications are given a name. . The evaluation of these applications is sequentialized based on a traversal of their syntax tree. This traversal mimics the reduction strategy. . The resulting term is equipped with a continuation --- a #-abstraction whose application to intermediate values yields the final result of the whole evaluation. The first point is fulfilled using the uniform naming mechanism of #-abstraction (Church encoding), which explains why continuations are represented as functions. The second point justifies why CPS terms are evaluation-order independent --- their evaluation order is determined by the syntax tree traversal of the CPS transformation. The third point captures the essence of the CPS transformation. We have staged Fischer and Plotkin's original CPS transformer accordin...
Semantics-Directed Code Generation
, 1985
"... The intermediate representations (IR) used by most compilers have an operational semantics. The nodes in the graph (or tree, or quad-code sequence) have an interpretation as the operation codes of some abstract machine. A denotational semantics, in which each node in the IR graph has a static meanin ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
The intermediate representations (IR) used by most compilers have an operational semantics. The nodes in the graph (or tree, or quad-code sequence) have an interpretation as the operation codes of some abstract machine. A denotational semantics, in which each node in the IR graph has a static meaning, can lead to a clean interface between the front and back ends of the compiler. Furthermore, it is possible to concisely specify a code generator to translate the denotational representation into machine code. Combined with recent work allowing the denotational specification of front ends to translate the input language into the IR, a complete compiler with a well-defined semantics may be generated. Using this technique, compilers have been written for (most of) Pascal and C which, although they compile slowly, produce fairly good machine code. July 25, - 1 - 1 1. Introduction The intermediate representations (IR) used by most compilers have an operational semantics. The nodes in the gra...
A Systematic Study of Functional Language Implementations
- ACM Transactions on Programming Languages and Systems
, 1998
"... : We introduce a unified framework to describe, relate, compare and classify functional language implementations. The compilation process is expressed as a succession of program transformations in the common framework. At each step, different transformations model fundamental choices. A benefit of t ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
: We introduce a unified framework to describe, relate, compare and classify functional language implementations. The compilation process is expressed as a succession of program transformations in the common framework. At each step, different transformations model fundamental choices. A benefit of this approach is to structure and decompose the implementation process. The correctness proofs can be tackled independently for each step and amount to proving program transformations in the functional world. This approach also paves the way to formal comparisons by making it possible to estimate the complexity of individual transformations or compositions of them. Our study aims at covering the whole known design space of sequential functional languages implementations. In particular, we consider call-by-value, call-by-name and call-by-need reduction strategies as well as environment and graph-based implementations. We describe for each compilation step the diverse alternatives as program tr...
Metacomputation-based compiler architecture
- IN 5TH INTERNATIONAL CONFERENCE ON THE MATHEMATICS OF PROGRAM CONSTRUCTION
, 2000
"... This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong binding-time separation. Because metacomputations are ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong binding-time separation. Because metacomputations are defined interms of monads, they can be constructed modularly and extensibly using monad transformers. A number of language constructs are specified: expressions, control flow, imperative features, and block structure. Metacomputation-style specification lends itself to semantics-directed compilation, which we demonstrate by creating a modular compiler for a block-structured, imperative while language.
Proving the Correctness of Compiler Optimisations Based on Strictness Analysis
- in Proceedings 5th int. Symp. on Programming Language Implementation and Logic Programming, LNCS 714
, 1993
"... . We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisatio ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
. We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on non-trivial global analyses. Proving the correctness of such optimising compilers can be done in three steps: 1. proving the correctness of the original (unoptimised) compiler; 2. proving the correctness of the analysis; and 3. proving the correctness of the modifications of the simple-minded compiler to exploit the results of the analysis. A substantial amount of work has been devoted to steps (1) and (2) but there have been surprisingly few attempts at tackling step (3). In this paper we show how to carry out this third step in the...
Towards Machine-checked Compiler Correctness for Higher-order Pure Functional Languages
- CSL '94, European Association for Computer Science Logic, Springer LNCS
, 1994
"... . In this paper we show that the critical part of a correctness proof for implementations of higher--order functional languages is amenable to machine--assisted proof. An extended version of the lambdacalculus is considered, and the congruence between its direct and continuation semantics is proved. ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
. In this paper we show that the critical part of a correctness proof for implementations of higher--order functional languages is amenable to machine--assisted proof. An extended version of the lambdacalculus is considered, and the congruence between its direct and continuation semantics is proved. The proof has been constructed with the help of a generic theorem prover --- Isabelle. The major part of the problem lies in establishing the existence of predicates which describe the congruence. This has been solved using Milne's inclusive predicate strategy [5]. The most important intermediate results and the main theorem as derived by Isabelle are quoted in the paper. Keywords: Compiler Correctness, Theorem Prover, Congruence Proof, Denotational Semantics, Lambda Calculus 1 Introduction Much of the work done previously in compiler correctness concerns restricted subsets of imperative languages. Some studies involve machine--checked correctness---e.g. Cohn [1], [2]. A lot of research h...
Compilation as Metacomputation: Binding Time Separation in Modular Compilers (Extended Abstract)
- In 5th Mathematics of Program Construction Conference, MPC2000, Ponte de
, 1998
"... This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong binding-time separation. Because metacomputations are ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong binding-time separation. Because metacomputations are defined in terms of monads, they can be constructed modularly and extensibly using monad transformers. A number of language constructs are specified: expressions, control-flow, imperative features, block structure, and higher-order functions and recursive bindings. Metacomputation-style specification lends itself to semantics-directed compilation, which we demonstrate by creating a modular compiler for a higher-order, imperative, Algol-like language.
Compiler Correctness for Concurrent Languages
- in proc. Coordination'96
, 1994
"... . This paper extends previous work in compiler derivation and verification to languages with true-concurrency semantics. We extend the -calculus to model process-centered concurrent computation, and give the semantics of a small language in terms of this calculus. We then define a target abstract m ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
. This paper extends previous work in compiler derivation and verification to languages with true-concurrency semantics. We extend the -calculus to model process-centered concurrent computation, and give the semantics of a small language in terms of this calculus. We then define a target abstract machine whose states have denotations in the same calculus. We prove the correctness of a compiler for our language: the denotation of the compiled code is shown to be strongly bisimilar to the denotation of the source program, and the abstract machine running the compiled code is shown to be branching-bisimilar to the source program's denotation. 1 Introduction Our original goal was to verify a compiler for Linda [8], using that language as a representative of modern concurrent language design. Upon searching the literature, we found a vast amount of work on models of concurrency, but little that was obviously applicable to compiler derivation and verification. Accordingly we decided to tac...

