Results 1 -
9 of
9
From operational semantics to abstract machines
- Mathematical Structures in Computer Science
, 1992
"... We consider the problem of mechanically constructing abstract machines from operational semantics, producing intermediate-level specifications of evaluators guaranteed to be correct with respect to the operational semantics. We construct these machines by repeatedly applying correctness-preserving t ..."
Abstract
-
Cited by 53 (4 self)
- Add to MetaCart
We consider the problem of mechanically constructing abstract machines from operational semantics, producing intermediate-level specifications of evaluators guaranteed to be correct with respect to the operational semantics. We construct these machines by repeatedly applying correctness-preserving transformations to operational semantics until the resulting specifications have the form of abstract machines. Though not automatable in general, this approach to constructing machine implementations can be mechanized, providing machine-verified correctness proofs. As examples we present the transformation of specifications for both call-by-name and call-by-value evaluation of the untyped λ-calculus into abstract machines that implement such evaluation strategies. We also present extensions to the call-by-value machine for a language containing constructs for recursion, conditionals, concrete data types, and built-in functions. In all cases, the correctness of the derived abstract machines follows from the (generally transparent) correctness of the initial operational semantic specification and the correctness of the transformations applied. 1.
Lightweight Run-Time Code Generation
- Department of Computer Science, University of Melbourne
, 1994
"... Run-time code generation is an alternative and complement to compile-time program analysis and optimization. Static analyses are inherently imprecise because most interesting aspects of run-time behavior are uncomputable. By deferring aspects of compilation to run time, more precise information abou ..."
Abstract
-
Cited by 52 (5 self)
- Add to MetaCart
Run-time code generation is an alternative and complement to compile-time program analysis and optimization. Static analyses are inherently imprecise because most interesting aspects of run-time behavior are uncomputable. By deferring aspects of compilation to run time, more precise information about program behavior can be exploited, leading to greater opportunities for code improvement. The cost of performing optimization at run time is of paramount importance, since it must be repaid by improved performance in order to obtain an overall speedup. This paper describes a lightweight approach to run-time code generation, called deferred compilation, in which compile-time specialization is employed to reduce the cost of optimizing and generating code at run time. Implementation strategies developed for a prototype compiler are discussed, and the results of preliminary experiments demonstrating significant overall speedup are presented. 1 Introduction Many compiler optimizations depend ...
A Provably Correct Compiler Generator
, 1992
"... We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. The generated compilers emit absolute code for an abstract RISC machine language that currently is assembled into code for the SPARC and th ..."
Abstract
-
Cited by 26 (2 self)
- Add to MetaCart
We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. The generated compilers emit absolute code for an abstract RISC machine language that currently is assembled into code for the SPARC and the HP Precision Architecture. Our machine language needs no run-time type-checking and is thus more realistic than those considered in previous compiler proofs. We use solely algebraic specifications; proofs are given in the initial model. 1 Introduction The previous approaches to proving correctness of compilers for non-trivial languages all use target code with run-time type-checking. The following semantic rule is typical for these target languages: (FIRST : C; hv 1 ; v 2 i : S) ! (C; v 1 : S) The rule describes the semantics of an instruction that extracts the first component of the top-element of the stack, provided that the top-element is a pair. If not, then it is implicit that the...
A rational deconstruction of Landin’s SECD machine
- Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science
, 2004
"... Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corre ..."
Abstract
-
Cited by 23 (16 self)
- Add to MetaCart
Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformation into continuation-passing style (CPS) and defunctionalization, chiefly) and their left inverses (transformation into direct style and refunctionalization). To this end, we modernize the SECD machine into a bisimilar one that operates in lockstep with the original one but that (1) does not use a data stack and (2) uses the caller-save rather than the callee-save convention for environments. We also identify that the dump component of the SECD machine is managed in a callee-save way. The caller-save counterpart of the modernized SECD machine precisely corresponds to Thielecke’s doublebarrelled continuations and to Felleisen’s encoding of J in terms of call/cc. We then variously characterize the J operator in terms of CPS and in terms of delimited-control operators in the CPS hierarchy. As a byproduct, we also present several reduction semantics for applicative expressions
Transformations of Evolving Algebras
- In Proceedings of VIII International Conference on Logic and Computer Science LIRA'97
, 1995
"... . We give a precise definition of evolving algebras as nondeterministic, mathematical machines. All proofs in the paper are based on this definition. First we define constant propagation. We extend evolving algebras by macros and define folding and unfolding transformations. Next we introduce a simp ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
. We give a precise definition of evolving algebras as nondeterministic, mathematical machines. All proofs in the paper are based on this definition. First we define constant propagation. We extend evolving algebras by macros and define folding and unfolding transformations. Next we introduce a simple transformation to flatten transition rules. Finally a pass separation transformation for evolving algebras is presented. It can be used to derive a compiler and abstract machine from an interpreter. All transformations are proven correct. Finally a comparison to other work is given. 1 Introduction Evolving algebras (EvAs) have been proposed by Gurevich in [Gur91] and used by Gurevich and others to give the operational semantics of languages like C, Modula2, Prolog and Occam. Borger and Rosenzweig's proof of the correctness of the Warren Abstract Machine is based on a slight variation of evolving algebras ([BR92]). An evolving algebra may be tailored to the abstraction level necessary for...
A generator of efficient abstract machine implementations and its application to emulator minimization
- In ICLP, LNCS 3668
, 2005
"... Abstract. The implementation of abstract machines involves complex decisions regarding, e.g., data representation, opcodes, or instruction specialization levels, all of which affect the final performance of the emulator and the size of the bytecode programs in ways that are often difficult to forese ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. The implementation of abstract machines involves complex decisions regarding, e.g., data representation, opcodes, or instruction specialization levels, all of which affect the final performance of the emulator and the size of the bytecode programs in ways that are often difficult to foresee. Besides, studying alternatives by implementing abstract machine variants is a time-consuming and error-prone task because of the level of complexity and optimization of competitive implementations, which makes them generally difficult to understand, maintain, and modify. This also makes it hard to generate specific implementations for particular purposes. To ameliorate those problems, we propose a systematic approach to the automatic generation of implementations of abstract machines. Different parts of their definition (e.g., the instruction set or the internal data and bytecode representation) are kept separate and automatically assembled in the generation process. Alternative versions of the abstract machine are therefore easier to produce, and variants of their implementation can be created mechanically, with specific characteristics for a particular application if necessary. We illustrate the practicality of the approach by reporting on an implementation of a generator of production-quality WAMs which are specialized for executing a particular fixed (set of) program(s). The experimental results show that the approach is effective in reducing emulator size. 1
Design, Analysis and Reasoning about Tools: Abstracts from the Third Workshop
, 1993
"... s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and ..."
Abstract
- Add to MetaCart
s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and Torben Amtoft and Susanne Brønberg helped producing this report. The first day comprised survey presentations whereas the second contained more research oriented talks. The primary aim of the workshop was to increase the awareness of DART participants for each other's work, to stimulate collaboration between the di#erent groups, and to inform Danish industry about the skills possessed by the groups. The DART project started in March 1991 (prematurely terminating a smaller project on Formal Implementation, Transformation and Analysis of Programs) and is funded by the Danish Research Councils as part of the Danish Research Programme on Informatics. To date it has received about 8 million Danis...

