Results 11  20
of
35
Generating Action Compilers by Partial Evaluation
 Journal of Functional Programming
, 1996
"... Compiler generation based on Mosses' action semantics has been studied by Brown, Moura, and Watt, and also by the second author. The core of each of their systems is a handwritten action compiler, producing either C or machine code. We have obtained an action compiler in a much simpler way: by ..."
Abstract

Cited by 14 (1 self)
 Add to MetaCart
(Show Context)
Compiler generation based on Mosses' action semantics has been studied by Brown, Moura, and Watt, and also by the second author. The core of each of their systems is a handwritten action compiler, producing either C or machine code. We have obtained an action compiler in a much simpler way: by partial evaluation of an action interpreter. Even though our compiler produces Scheme code, the code runs as fast as that produced by the previous action compilers. 1 Introduction Action semantics is a framework for formal semantics of programming languages, developed by Mosses [16, 17, 18] and Watt [19, 26]. It differs from denotational semantics in using semantic entities called actions, rather than higherorder functions. Compiler generation based on action semantics has been studied by Brown, Moura, and Watt [6], and also by the second author [22, 20, 21]. Journal of Functional Programming, 6(2):269298, 1996. Also in Proc. FPCA'93, pages 308317. The core of each of their two action se...
Program Synthesis By Sketching
, 2008
"... personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires pri ..."
Abstract

Cited by 13 (0 self)
 Add to MetaCart
(Show Context)
personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific
Mechanically verifying the correctness of an offline partial evaluator (extended version
, 1995
"... Abstract. We show that using deductive systems to specify an offline partial evaluator allows one to specify, prototype, and mechanically verify correctness via metaprogramming — all within a single framework. For a λmixstyle partial evaluator, we specify bindingtime constraints using a natural ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
Abstract. We show that using deductive systems to specify an offline partial evaluator allows one to specify, prototype, and mechanically verify correctness via metaprogramming — all within a single framework. For a λmixstyle partial evaluator, we specify bindingtime constraints using a naturaldeduction logic, and the associated program specializer using natural (aka “deductive”) semantics. These deductive systems can be directly encoded in the Elf programming language — a logic programming language based on the LF logical framework. The specifications are then executable as logic programs. This provides a prototype implementation of the partial evaluator. Moreover, since deductive system proofs are accessible as objects in Elf, many aspects of the partial evaluator correctness proofs (e.g., the correctness of bindingtime analysis) can be coded in Elf and mechanically checked. 1
Online Offline Partial Evaluation: Semantic Specifications and Correctness Proofs
 Yale University
, 1993
"... This paper presents semantic specifications and correctness proofs for both online and offline partial evaluation of strict firstorder functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three nonstandard evaluations: instrumented ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
(Show Context)
This paper presents semantic specifications and correctness proofs for both online and offline partial evaluation of strict firstorder functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three nonstandard evaluations: instrumented evaluation, online and offline partial evaluation. We then use the technique of logical relations to prove the correctness of both online and offline partial evaluation semantics. The contributions of this work are as follows. 1. We provide a uniform framework to defining and proving correct both online and offline partial evaluation. 2. This work required a formal specification of online partial evaluation with polyvariant specialization. We define criteria for its correctness with respect to an instrumented standard semantics. As a byproduct, online partial evaluation appears to be based on a fixpoint iteration process, just like bindingtime analysis. 3. We show that bindingtime...
Program Comprehension Assisted by Slicing and Transformation
"... Program slicing is a technique for program simplification based upon the deletion of statements which cannot affect the values of a chosen set of variables. Because slicing extracts a subcomponent of the program concerned with some specific computation on a set of variables, it can be used to assist ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
(Show Context)
Program slicing is a technique for program simplification based upon the deletion of statements which cannot affect the values of a chosen set of variables. Because slicing extracts a subcomponent of the program concerned with some specific computation on a set of variables, it can be used to assist program comprehension, allowing a programmer to remodularise a program according to arbitrarily selected slicing criteria. In this paper it is shown that the simplification power of slicing can be improved if the syntactic restriction to statement deletion is removed, allowing slices to be constructed using any simplifying transformation which preserves the effect of the original program upon the set of variables of interest. It is also shown that quasi static slicing, first proposed by Venkatesh (and defined here in a slightly more general form), is the most suitable slicing paradigm for program comprehension. The various forms of slice are formally defined, an algorithm, based upon transformation, symbolic execution and conventional slicing is introduced for computing syntactically unrestricted, quasi static slices. A worked example is used to show howthis approach supports program comprehension by case analysis and simplification.
Correctness of a RegionBased BindingTime Analysis
 Carnegie Mellon University, Elsevier Science BV
, 1997
"... A bindingtime analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Regionbased bindingtime analysis applies to higherorder programming languages with firstclass references. The consideration of effects in the d ..."
Abstract

Cited by 6 (5 self)
 Add to MetaCart
(Show Context)
A bindingtime analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Regionbased bindingtime analysis applies to higherorder programming languages with firstclass references. The consideration of effects in the determination of binding time properties makes it possible to have a partial evaluator perform assignments at specialization time. We present such a regionbased bindingtime analysis and prove its correctness with respect to a continuationstyle semantics for an annotated callbyvalue lambda calculus with MLstyle references. We provide a relative correctness proof that relies on the correctness of region inference and on the correctness of a bindingtime analysis for an applied lambda calculus. The main tool in the proof is a translation from terms with explicit region annotations to an extended continuationpassing storepassing style. The analysis is monovariant/monomorphic, however, ess...
A program specialization relation based on supercompilation and its properties
 FIRST INTERNATIONAL WORKSHOP ON METACOMPUTATION IN RUSSIA (META 2008)
, 2008
"... An inputoutput relation for a wide class of program specializers for a simple functional language in the form of Natural Semantics inference rules is presented. It covers polygenetic specialization, which includes deforestation and supercompilation, and generalizes the author’s previous paper on sp ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
(Show Context)
An inputoutput relation for a wide class of program specializers for a simple functional language in the form of Natural Semantics inference rules is presented. It covers polygenetic specialization, which includes deforestation and supercompilation, and generalizes the author’s previous paper on specification of monogenetic specialization like partial evaluation and restricted supercompilation. The specialization relation expresses the idea of what is to be a specialized program, avoiding as much as possible the details of how a specializer builds it. The relation specification follows the principles of Turchin’s supercompilation and captures its main notions: configuration, driving, generalization of a configuration, splitting a configuration, as well as collapsedjungle driving. It is virtually a formal definition of supercompilation abstracting away the most sophisticated parts of supercompilers— strategies of configuration analysis. Main properties of the program specialization relation—idempotency, transitivity, soundness, completeness, correctness—are formulated and discussed.
The Correctness of Type Specialisation
 In European Symposium on Programming (ESOP
, 1999
"... this paper, we present our proof of correctness. We shall begin by reviewing type specialisation, and explaining the problems which foiled our earlier attempts to find a proof. Then we explain what we actually prove, which is an analogue of subject reduction. Finally, we will present some of the cas ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
(Show Context)
this paper, we present our proof of correctness. We shall begin by reviewing type specialisation, and explaining the problems which foiled our earlier attempts to find a proof. Then we explain what we actually prove, which is an analogue of subject reduction. Finally, we will present some of the cases of the proof in detail. 2 What is Type Specialisation?
A Computational Formalization for Partial Evaluation (Extended Version)
, 1996
"... We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of " ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlbased bindingtime improvements" for let expressions. Specifically,
Projectionbased Program Analysis
, 1994
"... Projectionbased program analysis techniques are remarkable for their ability togive highly detailed and useful information not obtainable by other methods. The rst proposed projectionbased analysis techniques were those of Wadler and Hughes for strictness analysis, and Launchbury for bindingtime ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Projectionbased program analysis techniques are remarkable for their ability togive highly detailed and useful information not obtainable by other methods. The rst proposed projectionbased analysis techniques were those of Wadler and Hughes for strictness analysis, and Launchbury for bindingtime analysis � both techniques are restricted to analysis of rstorder monomorphic languages. Hughes and Launchbury generalised the strictness analysis technique, and Launchbury the bindingtime analysis technique, to handle polymorphic languages, again restricted to rst order. Other than a general approach to higherorder analysis suggested by Hughes, and an ad hoc implementation of higherorder bindingtime analysis by Mogensen, neither of which had any formal notion of correctness, there has been no successful generalisation to higherorder analysis. We present a complete redevelopment of monomorphic projectionbased program analysis from rst principles, starting by considering the analysis of functions (rather than programs) to establish bounds on the intrinsic power of projectionbased analysis, showing also that projectionbased analysis can capture interesting termination