Results 1  10
of
13
Closure Analysis in Constraint Form
 ACM Transactions on Programming Languages and Systems
, 1995
"... Interpretation Bondorf's definition can be simplified considerably. To see why, consider the second component of CMap(E) \Theta CEnv(E). This component is updated only in Closure Analysis in Constraint Form \Delta 9 b(E 1 @ i E 2 )¯ae and read only in b(x l )¯ae. The key observation is that both ..."
Abstract

Cited by 57 (5 self)
 Add to MetaCart
Interpretation Bondorf's definition can be simplified considerably. To see why, consider the second component of CMap(E) \Theta CEnv(E). This component is updated only in Closure Analysis in Constraint Form \Delta 9 b(E 1 @ i E 2 )¯ae and read only in b(x l )¯ae. The key observation is that both these operations can be done on the first component instead. Thus, we can omit the use of CEnv(E). By rewriting Bondorf's definition according to this observation, we arrive at the following definition. As with Bondorf's definition, we assume that all labels are distinct. Definition 2.3.1. We define m : (E : ) ! CMap(E) ! CMap(E) m(x l )¯ = ¯ m( l x:E)¯ = (m(E)¯) t h[[ l ]] 7! flgi m(E 1 @ i E 2 )¯ = (m(E 1 )¯) t (m(E 2 )¯) t F l2¯(var(E1 )) (h[[ l ]] 7! ¯(var(E 2 ))i t h[[@ i ]] 7! ¯(var(body(l)))i) . We can now do closure analysis of E by computing fix(m(E)). A key question is: is the simpler abstract interpretation equivalent to Bondorf's? We might attempt to prove this u...
The essence of etaexpansion in partial evaluation
 LISP AND SYMBOLIC COMPUTATION
, 1995
"... Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. ..."
Abstract

Cited by 32 (11 self)
 Add to MetaCart
Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. In this paper, we describe the problem and the effect of etaredexes in terms of monovariant bindingtime propagation: etaredexes preserve the static data ow of a source program by interfacing static higherorder values in dynamic contexts and dynamic higherorder values in static contexts. They contribute to two distinct bindingtime improvements. We present two extensions of Gomard's monovariant bindingtime analysis for the purecalculus. Our extensions annotate and etaexpandterms. The rst one etaexpands static higherorder values in dynamic contexts. The second also etaexpands dynamic higherorder values in static contexts. As a significant application, we show that our first bindingtime analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern onepass CPS transformer. This bindingtime improvement is known, but it is still left unexplained in contemporary literature, e.g., about "cpsbased" partial evaluation. We also outline the counterpart of etaexpansion for partially static data structures.
Syntactic Accidents in Program Analysis: On the Impact of the CPS Transformation
 Journal of Functional Programming
, 2000
"... Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuati ..."
Abstract

Cited by 25 (9 self)
 Add to MetaCart
Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.
EtaExpansion does the Trick
 ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Partialevaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "bindingtime improvements": nonstandard use of continuationpassing style, etaexpansion, and a popul ..."
Abstract

Cited by 21 (6 self)
 Add to MetaCart
Partialevaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "bindingtime improvements": nonstandard use of continuationpassing style, etaexpansion, and a popular transformation called "The Trick". We provide a unified view of these bindingtime improvements, from a typing perspective. Just as a
Mechanically Verifying the Correctness of an Offline Partial Evaluator
, 1995
"... We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. For a mixstyle partial evaluator, we specify bindingtime constraints using a naturaldeduction logic, and the associated program specializer using natural (aka "deducti ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. 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 evaluation correctness proofs (e.g., the correctness of bindingtime analysis) can be coded in Elf and mechanically verified. This work illustrates the utility of declarative programming and of using deductive systems for defining program specialization systems: by exploiting the logical character of definit...
Bindingtime Analysis: Abstract Interpretation versus Type Inference
 IN PROC. ICCL'94, FIFTH IEEE INTERNATIONAL CONFERENCE ON COMPUTER LANGUAGES
, 1994
"... Bindingtime analysis is important in partial evaluators. Its task is to determine which parts of a program can be evaluated if some of the expected input is known. Two approaches to do this are abstract interpretation and type inference. We compare two specific such analyses to see which one deter ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
Bindingtime analysis is important in partial evaluators. Its task is to determine which parts of a program can be evaluated if some of the expected input is known. Two approaches to do this are abstract interpretation and type inference. We compare two specific such analyses to see which one determines most program parts to be eliminable. The first is a an abstract interpretation approach based on closure analysis and the second is the type inference approach of Gomard and Jones. Both apply to the pure calculus. We prove that the abstract interpretation approach is more powerful than that of Gomard and Jones: the former determines the same and possibly more program parts to be eliminable as the latter.
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
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...
HigherOrder Rewriting and Partial Evaluation
 REWRITING TECHNIQUES AND APPLICATIONS, LECTURE NOTES IN COMPUTER SCIENCE
, 1998
"... We demonstrate the usefulness of higherorder rewriting techniques for specializing programs, i.e., for partial evaluation. More precisely, we demonstrate how casting program specializers as combinatory reduction systems (CRSs) makes it possible to formalize the corresponding program transformat ..."
Abstract

Cited by 6 (4 self)
 Add to MetaCart
We demonstrate the usefulness of higherorder rewriting techniques for specializing programs, i.e., for partial evaluation. More precisely, we demonstrate how casting program specializers as combinatory reduction systems (CRSs) makes it possible to formalize the corresponding program transformations as metareductions, i.e., reductions in the internal "substitution calculus." For partialevaluation problems, this means that instead of having to prove on a casebycase basis that one's "twolevel functions" operate properly, one can concisely formalize them as a combinatory reduction system and obtain as a corollary that static reduction does not go wrong and yields a wellformed residual program.
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 "controlba ..."
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,
Interpreting Specialization in Type Theory
"... We define the static semantics of offline partial evaluation for the simplytyped lambda calculus using a translation into a MartinLöfstyle type theory with suitable extensions. Our approach clarifies that the distinction between specializationtime and runtime computation in partial evaluation c ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We define the static semantics of offline partial evaluation for the simplytyped lambda calculus using a translation into a MartinLöfstyle type theory with suitable extensions. Our approach clarifies that the distinction between specializationtime and runtime computation in partial evaluation can model the phase distinction between compiletime and runtime computation in a module language. Working backwards from that connection, we define partial evaluation for a core language with modules.