Results 1 
3 of
3
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 207 (39 self)
 Add to MetaCart
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
Encoding types in MLlike languages
, 1998
"... A HindleyMilner type system such as ML's seems to prohibit typeindexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate h ..."
Abstract

Cited by 43 (0 self)
 Add to MetaCart
A HindleyMilner type system such as ML's seems to prohibit typeindexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate how to program with typeindexed values within a HindleyMilner type system. Our first approach is to interpret an input type as its corresponding value, recursively. This solution is typesafe, in the sense that the ML type system statically prevents any mismatch between the input type and function arguments that depend on this type. Such specific type interpretations, however, prevent us from combining different typeindexed values that share the same type. To meet this objection, we focus on finding a valueindependent type encoding that can be shared by different functions. We propose and compare two solutions. One requires firstclass and higherorder polymorphism, and, thus, is not implementable in the core language of ML, but it can be programmed using higherorder functors in Standard ML of New Jersey. Its usage, however, is clumsy. The other approach uses embedding/projection functions. It appears to be more practical. We demonstrate the usefulness of typeindexed values through examples including typedirected partial evaluation, C printflike formatting, and subtype coercions. Finally, we discuss the tradeoffs between our approach and some other solutions based on more expressive typing disciplines.
Compiling Actions by Partial Evaluation, Revisited
 Department of Computer Science, University of Aarhus
, 1998
"... We revisit Bondorf and Palsberg's compilation of actions using the oine syntaxdirected partial evaluator Similix (FPCA'93, JFP'96), and we compare it in detail with using an online typedirected partial evaluator. In contrast to Similix, our typedirected partial evaluator is idempotent and requires ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
We revisit Bondorf and Palsberg's compilation of actions using the oine syntaxdirected partial evaluator Similix (FPCA'93, JFP'96), and we compare it in detail with using an online typedirected partial evaluator. In contrast to Similix, our typedirected partial evaluator is idempotent and requires no \bindingtime improvements." It also appears to consume about 7 times less space and to be about 28 times faster than Similix, and to yield residual programs that are perceptibly more eĆcient than those generated by Similix. Basic Research in Computer Science, Centre of the Danish National Research Foundation. Home page: http://www.brics.dk y Building 540, Ny Munkegade, DK8000 Aarhus C, Denmark. Email: fdanvy,mrhigerg@brics.dk Contents 1 Introduction 4 2 SyntaxDirected vs. TypeDirected Partial Evaluation 6 2.1 Syntaxdirected partial evaluation (sdpe) . . . . . . . . . . . 6 2.2 Typedirected partial evaluation (tdpe) . . . . . . . . . . . . 7 2.3 Comparing the input to synta...