Results 1  10
of
11
Partial Evaluation for HigherOrder Languages with State
, 1996
"... We have designed and implemented an offline partial evaluator for a higherorder language with firstclass references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higherorder language. The ..."
Abstract

Cited by 26 (7 self)
 Add to MetaCart
We have designed and implemented an offline partial evaluator for a higherorder language with firstclass references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higherorder language. The partial evaluator consists of a regionbased monovariant bindingtime analysis and a specializer in essentially continuationpassing storepassing style, thus generalizing typebased bindingtime analysis and continuationbased partial evaluation. The partial evaluator yields good results for realistic problems such as objectoriented programming, unification, and specializer generation. Keywords: higherorder programming, program transformation, partial evaluation, state Categories: D.1.1 Applicative (Functional) Programming, D.1.2 Automatic Programming, D.3.1 Formal Definitions and Theory, Semantics, D.3.2 Language Classifications, Applicative languages, D.3.4 Processors, I.2.2 Automatic...
A Hybrid Approach to Online and Offline Partial Evaluation
 HigherOrder and Symbolic Computation
, 2002
"... This article presents a hybrid method of partial evaluation (PE), which is exactly as precise as naive online PE and nearly as efficient as stateoftheart offline PE, for a statically typed callbyvalue functional language. ..."
Abstract

Cited by 16 (0 self)
 Add to MetaCart
This article presents a hybrid method of partial evaluation (PE), which is exactly as precise as naive online PE and nearly as efficient as stateoftheart offline PE, for a statically typed callbyvalue functional language.
A Monadic Multistage Metalanguage
, 2003
"... We describe a metalanguage MMML, which makes explicit the order of evaluation (in the spirit of monadic metalanguages) and the staging of computations (as in languages for multilevel bindingtime analysis). The main contribution of the paper is an operational semantics which is sufficiently detaile ..."
Abstract

Cited by 15 (7 self)
 Add to MetaCart
We describe a metalanguage MMML, which makes explicit the order of evaluation (in the spirit of monadic metalanguages) and the staging of computations (as in languages for multilevel bindingtime analysis). The main contribution of the paper is an operational semantics which is sufficiently detailed for analyzing subtle aspects of multistage programming, but also intuitive enough to serve as a reference semantics. For instance, the separation of computational types from code types, makes clear the distinction between a computation for generating code and the generated code, and provides a basis for multilingual extensions, where a variety of programming languages (aka monads) coexist. The operational semantics consists of two parts: local (semantics preserving) simplification rules, and computation steps executed in a deterministic order (because they may have sideeffects). We focus on the computational aspects, thus we adopt a simple type system, that can detect usual type errors, but not the unresolved link errors. Because of its explicit annotations, MMML is suitable as an intermediate language.
Monadic Type Systems: Pure Type Systems for Impure Settings (Preliminary Report)
 In Proceedings of the Second HOOTS Workshop
, 1997
"... Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameteriz ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higherorder type structure of pure type systems and the monadic term and type structure used to capture computational effects in the theory of computational monads. We demonstrate that monadic type systems nicely characterize previous work and suggest how they can support several new theoretical and practical applications. A technical foundation for monadic type systems is laid by recasting and scaling up the main results from pure type systems (confluence, subject reduction, strong normalisation for particular classes of systems, etc.) and from operational presentations of computational monads (notions of operational equivalence based on applicative similarity, coinduction proof techni...
Online TypeDirected Partial Evaluation for DynamicallyTyped Languages
 Computer Software
, 1999
"... This article presents an alternative method of typedirected partial evaluation, which is simpler and more efficient than previous methods. Unlike previous methods, it is straightforwardly applicable to functional languages with various powerful type systems. As an extreme instance, this article mai ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
This article presents an alternative method of typedirected partial evaluation, which is simpler and more efficient than previous methods. Unlike previous methods, it is straightforwardly applicable to functional languages with various powerful type systems. As an extreme instance, this article mainly deals with a dynamicallytyped functional language like Scheme. The key idea is to extend primitive value destructors such as function application and pair destruction (car and cdr), so that they generate residual code when their operands are dynamic. It unnecessitates an operation in typedirected partial evaluation called reflection, which was the major cause of complication and inefficiency in previous methods. We formalize our method as an extension of twolevel calculus, and prove it correct. Furthermore, we show that our typedirected partial evaluator can be derived from a simple online syntaxdirected partial evaluator with higherorder abstract syntax, by the same transformatio...
Reflections on Reflections
, 1997
"... In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situati ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situation where there is a kernel of the source language that is isomorphic to the target language. However, we believe that the reflection criteria is so strong that it often excludes the usual situation in compiling where one is compiling from a higherlevel to a lowerlevel language. We give a detailed analysis of several translations commonly used in compiling that fail to be reflections. We conclude that, in addition to the notion of reflection, there are several relations weaker a reflection that are useful for characterizing translations. We show that several familiar translations (that are not naturally reflections) form what we call a reduction correspondence. We introduce the more genera...
Polymorphic Specialization for ML
 ACM Transactions on Programming Languages and Systems
, 2002
"... We present a novel technique for offine partial evaluation of functional languages with an MLstyle typing discipline. Our program specialization method comprises a polymorphic bindingtime analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a bindingti ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
We present a novel technique for offine partial evaluation of functional languages with an MLstyle typing discipline. Our program specialization method comprises a polymorphic bindingtime analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a bindingtime analysis as a constraint analysis on top of region inference. Our insight is to regard binding times as properties of regions.
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
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.
Foundations for Partial Evaluation of Functional Programs with Computational Effects
 ACM Computing Surveys
, 1998
"... ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, N ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, NY 10036 USA, fax +1 (212) 8690481, or permissions@acm.org. 2 \Delta J. Hatcliff e 2 Terms[ ml ] e ::= x j pnq j tick j x : e j @ e0 e1 j unit e j let x ( e1 in e2 2 Types[ ml ] ::= nat j 1 ! e 2 j e \Gamma 2 Assumptions[ ml ] \Gamma ::= \Delta j \Gamma; x : \Gamma ` ml x : \Gamma(x) \Gamma ` ml pnq : nat \Gamma ` ml tick : f nat \Gamma; x : 1 ` ml e : e 2 \Gamma ` ml x : e : 1 ! e 2 \Gamma ` ml e0 : 1 ! e 2 \Gamma ` ml e1 : 1 \Gamma ` ml @ e0 e1 : e 2 monadic constructs: \Gamma ` ml e : \Gamma ` ml unit e : e \Gamma ` ml e 1 : e 1 \Gamma; x : 1 ` ml e 2 : e 2 \Gamma ` ml let x ( e1 in e2 : e 2 Fig. 1. The computational metalanguage ml input/output, and robust...
Foundations for Partial Evaluation of Functional Languages with Computational Effects
"... Research on partial evaluation has flourished in the context of pure functional languages, yet modern functional languages include many notions of computation that partial evaluation technology has only recently been able to handle. We summarize how using Moggi's computational metalanguage as inter ..."
Abstract
 Add to MetaCart
Research on partial evaluation has flourished in the context of pure functional languages, yet modern functional languages include many notions of computation that partial evaluation technology has only recently been able to handle. We summarize how using Moggi's computational metalanguage as intermediate language provides a foundation for this recent advance in technology. 1 Partial Evaluation of Programs with Computational Effects Partial evaluation is a highly useful program specialization technique that can be applied to programs from any language paradigm. Yet, it is in the paradigm of pure functional languages that partial evaluation technology grew to maturity. The simple semantics of pure functional programs (which do not include computational effects such as state modification, input/output, and firstclass exceptions) makes it easier to perform the basic actions of partial evaluation such as static analysis, function unfolding (inlining), and symbolic execution. Clearly, t...