Results 1 - 10
of
14
Type-directed partial evaluation
- Proceedings of the Twenty-Third Annual ACM Symposium on Principles of Programming Languages
, 1996
"... Abstract. Type-directed partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in the-calculus. T ..."
Abstract
-
Cited by 195 (38 self)
- Add to MetaCart
Abstract. Type-directed partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in the-calculus. Type-directed partial evaluation is thus used to specialize compiled, closed programs, given their type. Since Similix, let-insertion is a cornerstone of partial evaluators for callby-value procedural programs with computational e ects. It prevents the duplication of residual computations, and more generally maintains the order of dynamic side e ects in residual programs. This article describes the extension of type-directed partial evaluation to insert residual let expressions. This extension requires the userto annotate arrowtypes with e ect information. It is achieved by delimiting and abstracting control, comparably to continuation-based specialization in direct style. It enables type-directed partial evaluation of e ectful programs (e.g.,ade nitional lambda-interpreter for an imperative language) that are in direct style. The residual programs are in A-normal form. 1
Normalization by evaluation for typed lambda calculus with coproducts
- In LICS
, 2001
"... We solve the decision problem for simply typed lambda calculus with strong binary sums, equivalently the word problem for free cartesian closed categories with binary coproducts. Our method is based on the semantical technique known as “normalization by evaluation ” and involves inverting the interp ..."
Abstract
-
Cited by 32 (5 self)
- Add to MetaCart
We solve the decision problem for simply typed lambda calculus with strong binary sums, equivalently the word problem for free cartesian closed categories with binary coproducts. Our method is based on the semantical technique known as “normalization by evaluation ” and involves inverting the interpretation of the syntax into a suitable sheaf model and from this extracting appropriate unique normal forms. There is no rewriting theory involved, and the proof is completely constructive, allowing program extraction from the proof. 1
Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation
- Eighth International Symposium on Programming Language Implementation and Logic Programming
"... . We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the sty ..."
Abstract
-
Cited by 21 (8 self)
- Add to MetaCart
. We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the style of denotational semantics; -- the output of the generated compiler is e#ectively three-address code, in the fashion and e#ciency of the Dragon Book; -- the generated compiler processes several hundred lines of source code per second. The source language considered in this case study is imperative, blockstructured, higher-order, call-by-value, allows subtyping, and obeys stack discipline. It is bigger than what is usually reported in the literature on semantics-based compiling and partial evaluation. Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to the program. Specialization is carri...
An operational foundation for delimited continuations in the CPS hierarchy
- Department of Computer Science, University of Aarhus
, 2005
"... Vol. 1 (2:5) 2005, pp. 1–39 ..."
Memoization in type-directed partial evaluation
- Proceedings of the 2002 ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering, number 2487 in Lecture Notes in Computer Science
, 2002
"... Abstract. We use a code generator—type-directed partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express th ..."
Abstract
-
Cited by 14 (6 self)
- Add to MetaCart
Abstract. We use a code generator—type-directed partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the functions and type-directed partial evaluation provides a convenient setting to obtain the normal form of their composition. However, off-the-shelf type-directed partial evaluation turns out to yield gigantic normal forms. We identify that this gigantism is due to redundancies, and that these redundancies originate in the handling of sums, which uses delimited continuations. We successfully eliminate these redundancies by extending type-directed partial evaluation with memoization capabilities. The result only works for pure functional programs, but it provides an unexpected use of code generation and it yields orders-of-magnitude improvements both in time and in space for type isomorphisms. 1
From Reduction-Based to Reduction-Free Normalization
, 2004
"... We present a systematic construction of a reduction-free normalization function. Starting from ..."
Abstract
-
Cited by 10 (7 self)
- Add to MetaCart
We present a systematic construction of a reduction-free normalization function. Starting from
From Proof Normalization to Compiler Generation and Type-Directed Change-of-Representation
, 1997
"... The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of o ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of our technique we have what has been described as "An Inverse of the Evaluation Functional for Typed -calculus" [7]. It is essentially type-directed j-expansion followed by fi-reduction on certain terms. Quite independently of [7], j-expansion has been studied for its use in Partial Evaluation, where among other things it has been used to obtain a one-pass CPS-transformer [20]. It is some of the consequences of this coincidence [19] that are described in the following. Our approach will be purely syntactical and it is hoped that it marks a simplification on earlier treatments of the materiel. We have tried presenting the materiel based purely on the standard reduction properties for the simpl...
Reduction-free normalisation for system F
, 1996
"... We present a semantical proof of existence of normal forms for system F including j-equality. A reduction-free normalisation function can be obtained from this. The proof uses the method of glueing (a variant of) the term model along the global sections functor, carried out in the internal language ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
We present a semantical proof of existence of normal forms for system F including j-equality. A reduction-free normalisation function can be obtained from this. The proof uses the method of glueing (a variant of) the term model along the global sections functor, carried out in the internal language of a category of presheaves. As a by-product we obtain an semantical explanation of higherorder abstract syntax. The paper extends a previous one (Altenkirch, Hofmann, and Streicher 1996) in which a combinatory version of system F has been treated. 1 Introduction In this paper we give a semantical proof of reduction-free normalisation for F fij , a version of Girard's system F with full fij-equality for both kinds of abstraction. This generalises the semantical normalisation algorithms for simply-typed systems (Berger and Schwichtenberg 1991; Coquand and Dybjer 1996; Altenkirch, Hofmann, and Streicher 1995) to polymorphism. As in those approaches we do not prove strong normalisation but co...
Type-Directed Partial Evaluation in Haskell
, 1998
"... We implement type-directed partial evaluation in the pure functional programming language Haskell, using type classes. 1 ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We implement type-directed partial evaluation in the pure functional programming language Haskell, using type classes. 1

