Results 1  10
of
18
Typedirected partial evaluation
 Proceedings of the TwentyThird Annual ACM Symposium on Principles of Programming Languages
, 1996
"... Abstract. Typedirected 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 thecalculus. T ..."
Abstract

Cited by 221 (38 self)
 Add to MetaCart
(Show Context)
Abstract. Typedirected 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 thecalculus. Typedirected partial evaluation is thus used to specialize compiled, closed programs, given their type. Since Similix, letinsertion is a cornerstone of partial evaluators for callbyvalue 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 typedirected 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 continuationbased specialization in direct style. It enables typedirected partial evaluation of e ectful programs (e.g.,ade nitional lambdainterpreter for an imperative language) that are in direct style. The residual programs are in Anormal form. 1
Final Shift for Call/cc: Direct Implementation of Shift and Reset
, 2002
"... We present a direct implementation of the shift and reset control operators in the Scheme 48 system. The new implementation improves upon the traditional technique of simulating shift and reset via call/cc. Typical applications of these operators exhibit space savings and a significant overall perfo ..."
Abstract

Cited by 14 (0 self)
 Add to MetaCart
We present a direct implementation of the shift and reset control operators in the Scheme 48 system. The new implementation improves upon the traditional technique of simulating shift and reset via call/cc. Typical applications of these operators exhibit space savings and a significant overall performance gain. Our technique is based upon the popular incremental stack/heap strategy for representing continuations. We present implementation details as well as some benchmark measurements for typical applications.
Memoization in typedirected 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
"... We use a code generator—typedirected 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 function ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
(Show Context)
We use a code generator—typedirected 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 typedirected partial evaluation provides a convenient setting to obtain the normal form of their composition. However, offtheshelf typedirected 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 typedirected 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 ordersofmagnitude improvements both in time and in space for type isomorphisms.
Scrapping your Inefficient Engine: using Partial Evaluation to Improve DomainSpecific Language Implementation
"... Partial evaluation aims to improve the efficiency of a program by specialising it with respect to some known inputs. In theory, it is a natural match to language implementation, in that partially evaluating an interpreter with respect to a specific source program yields an efficient translation of t ..."
Abstract

Cited by 8 (3 self)
 Add to MetaCart
(Show Context)
Partial evaluation aims to improve the efficiency of a program by specialising it with respect to some known inputs. In theory, it is a natural match to language implementation, in that partially evaluating an interpreter with respect to a specific source program yields an efficient translation of that program. In practice, however, there can be difficulties — we must consider e.g. bindingtime improvements, function calls, recursion, code duplication, and how to deal with sideeffects. These difficulties limit the practical benefits of partial evaluation and have limited its widespread adoption. In this paper, we show that partial evaluation can be an effective and, unusually, straightforward technique for the efficient implementation of domainspecific languages. We achieve this by exploiting dependent types and by following some simple rules in the definition of the interpreter. We present experimental evidence that partial evaluation of programs in domainspecific languages yields efficient residual programs whose performance is competitive with their Java and C equivalents and which are also, through the use of dependent types, verifiably resourcesafe. Using our technique, it follows that a verifiably correct and resourcesafe program can also be an efficient program. 1.
Two Flavors of Offline Partial Evaluation
, 1998
"... Typedirected partial evaluation is a new approach to program specialization for functional programming languages. Its merits with respect to the traditional offline partial evaluation approach have not yet been fully explored. We present a comparison of typedirected partial evaluation with standa ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
Typedirected partial evaluation is a new approach to program specialization for functional programming languages. Its merits with respect to the traditional offline partial evaluation approach have not yet been fully explored. We present a comparison of typedirected partial evaluation with standard offline partial evaluation in both a qualitative and quantitative way. For the latter we use implementations of both approaches in Scheme. Both approaches yield equivalent results in comparable time.
HigherOrder Code Splicing
 Proceedings of the Eighth European Symposium on Programming, number 1576 in Lecture
, 1999
"... . Runtime code generation (RTCG) and justintime compilation (JIT) are features of modern programming systems to strike the balance between generality and efficiency. Since RTCG and JIT techniques are not portable and notoriously hard to implement, we propose code splicing as an alternative fo ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
. Runtime code generation (RTCG) and justintime compilation (JIT) are features of modern programming systems to strike the balance between generality and efficiency. Since RTCG and JIT techniques are not portable and notoriously hard to implement, we propose code splicing as an alternative for dynamicallytyped higherorder programming languages. Code splicing combines precompiled pieces of code using higherorder functions. While this approach cannot achieve the performance of compiled code, it can support some intriguing features:  very fast "compilation" times;  satisfactory run times, compared with interpretation;  simple interfacing with compiled code;  portability. Starting from implementation models for functional languages we develop and evaluate several approaches to code splicing. This leads to some new insights into compilation techniques for functional programming languages, among them a compositional compilation schema to SKIcombinators. The pro...
Keeping sums under control
, 2004
"... In a recent paper [31], I presented with Marcelo Fiore and Roberto Di Cosmo a new normalisation tool for the λcalculus with sum types, based on the technique of normalisation by evaluation, and more precisely on techniques developped by Olivier Danvy for partial evaluation, using control operators. ..."
Abstract
 Add to MetaCart
In a recent paper [31], I presented with Marcelo Fiore and Roberto Di Cosmo a new normalisation tool for the λcalculus with sum types, based on the technique of normalisation by evaluation, and more precisely on techniques developped by Olivier Danvy for partial evaluation, using control operators. The main characteristic of this tool is that it produces a result in a canonical form we introduced. That is to say: two fijequivalent terms will be normalised into (almost) identical terms. It was not the case with the traditional algorithm, which could even lead to an explosion of the size of code. This canonical form is an jlong finormal form with constraints, which capture the definition of jlong normal form for the *calculus withoutsums, and reduces drastically the jconversion possibilities for sums. The present paper recall the definition of these normal forms and the normalisation algorithm, and shows how it is possible to use these tools to solve a problem of characterization of type isomorphisms. Indeed, the canonical form allowed to find the complicated counterexamples we exhibited in another work [6], that proves that type isomorphisms in the *calculus with sums are not finitely axiomatisable. What's more, when proving that these terms are isomorphisms, the new partial evaluation algorithm avoids an explosion of the size of the termthat arises with the old one.
of Programs]: Semantics of Programming Languages—
"... We present a notion of long ¡normal term for the typed lambda calculus with sums and prove, using Grothendieck logical relations, that every term is equivalent to one in normal form. Based on this development we give the first typedirected partial evaluator that constructs normal forms of terms ..."
Abstract
 Add to MetaCart
(Show Context)
We present a notion of long ¡normal term for the typed lambda calculus with sums and prove, using Grothendieck logical relations, that every term is equivalent to one in normal form. Based on this development we give the first typedirected partial evaluator that constructs normal forms of terms in this calculus. Categories and Subject Descriptors: F.3.2 [Logics and Meanings