Results 1 - 10
of
62
An Introduction to Partial Evaluation
- ACM Computing Surveys
, 1996
"... Partial evaluation provides a unifying paradigm for a broad spectrum of work in ..."
Abstract
-
Cited by 120 (0 self)
- Add to MetaCart
Partial evaluation provides a unifying paradigm for a broad spectrum of work in
Automatic Autoprojection of Recursive Equations with Global Variables and Abstract Data Types
- Science of Computer Programming
, 1990
"... Self-applicable partial evaluation has been implemented for half a decade now, but many problems remain open. This paper addresses and solves the problems of automating call unfolding, having an open-ended set of operators, and processing global variables updated by side effects. The problems of com ..."
Abstract
-
Cited by 114 (28 self)
- Add to MetaCart
Self-applicable partial evaluation has been implemented for half a decade now, but many problems remain open. This paper addresses and solves the problems of automating call unfolding, having an open-ended set of operators, and processing global variables updated by side effects. The problems of computation duplication and termination of residual programs are addressed and solved: residual programs never duplicate computations of the source program; residual programs do not terminate more often than source programs. This paper describes the automatic autoprojector (self-applicable partial evaluator) Similix; it handles programs with user defined primitive abstract data type operators which may process global variables. Abstract data types make it possible to hide actual representations of data and prevent specializing operators over these representations. The formally sound treatment of global variables makes Similix fit well in an applicative order programming environment. We present a new method for automatic call unfolding which is simpler, faster, and sometimes more effective than existing methods: it requires neither recursion analysis of the source program, nor call graph analysis of the residual program. To avoid duplicating computations and preserve termination properties, we introduce an abstract interpretation of the source program, abstract occurrence counting analysis, which is performed during preprocessing. We express it formally and simplify it. Similix has been implemented and self-applied. It has been used for a number of experiments such as compiler generation from interpretive specifications and generation of efficient pattern matchers from naive pattern matching programs.
Opportunities for Online Partial Evaluation
, 1992
"... Partial evaluators can be separated into two classes: offline specializers, which make all of their reduce/residualize decisions before specialization, and online specializers, which make such decisions during specialization. The choice of which method to use is driven by a tradeoff between the effi ..."
Abstract
-
Cited by 87 (4 self)
- Add to MetaCart
Partial evaluators can be separated into two classes: offline specializers, which make all of their reduce/residualize decisions before specialization, and online specializers, which make such decisions during specialization. The choice of which method to use is driven by a tradeoff between the efficiency of the specializer and the quality of the residual programs that it produces. Existing research describes some of the inefficiencies of online specializers, and how these are avoided using offline methods, but fails to address the price paid in specialization quality. This paper motivates research in online specialization by describing two fundamental limitations of the offline approach, and explains why the online approach does not encounter the same difficulties.
Efficient Type Inference for Higher-Order Binding-Time Analysis
- In Functional Programming and Computer Architecture
, 1991
"... Binding-time analysis determines when variables and expressions in a program can be bound to their values, distinguishing between early (compile-time) and late (run-time) binding. Binding-time information can be used by compilers to produce more efficient target programs by partially evaluating prog ..."
Abstract
-
Cited by 86 (1 self)
- Add to MetaCart
Binding-time analysis determines when variables and expressions in a program can be bound to their values, distinguishing between early (compile-time) and late (run-time) binding. Binding-time information can be used by compilers to produce more efficient target programs by partially evaluating programs at compile-time. Binding-time analysis has been formulated in abstract interpretation contexts and more recently in a type-theoretic setting. In a type-theoretic setting binding-time analysis is a type inference problem: the problem of inferring a completion of a λ-term e with binding-time annotations such that e satisfies the typing rules. Nielson and Nielson and Schmidt have shown that every simply typed λ-term has a unique completion ê that minimizes late binding in TML, a monomorphic type system with explicit binding-time annotations, and they present exponential time algorithms for computing such minimal completions. 1 Gomard proves the same results for a variant of his two-level λ-calculus without a so-called “lifting ” rule. He presents another algorithm for inferring completions in this somewhat restricted type system and states that it can be implemented in time O(n 3). He conjectures that the completions computed are minimal.
A Type System Equivalent to Flow Analysis
- ACM Transactions on Programming Languages and Systems
, 1995
"... Flow-based safety analysis of higher-order languages has been studied by Shivers, and Palsberg and Schwartzbach. Open until now is the problem of finding a type system that accepts exactly the same programs as safety analysis. In this paper we prove that Amadio and Cardelli's type system with subtyp ..."
Abstract
-
Cited by 84 (16 self)
- Add to MetaCart
Flow-based safety analysis of higher-order languages has been studied by Shivers, and Palsberg and Schwartzbach. Open until now is the problem of finding a type system that accepts exactly the same programs as safety analysis. In this paper we prove that Amadio and Cardelli's type system with subtyping and recursive types accepts the same programs as a certain safety analysis. The proof involves mappings from types to flow information and back. As a result, we obtain an inference algorithm for the type system, thereby solving an open problem. 1 Introduction 1.1 Background Many program analyses for higher-order languages are based on flow analysis, also known as closure analysis. Examples include various analyses in the Standard ML of New Jersey compiler [3], and the binding-time analyses for Scheme in the partial evaluators Schism [5] and Similix [4]. Such analyses have the advantage that they can be applied to untyped languages. This is in contrast to more traditional abstract inter...
From ML to Ada: Strongly-typed Language Interoperability via Source Translation
, 1993
"... We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code com ..."
Abstract
-
Cited by 59 (3 self)
- Add to MetaCart
We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code components and "legacy" third-generationlanguage components. Our translator represents a novel synthesis of techniques including user-parameterized specification of primitive types and operators; removal of polymorphism by code specialization; removal of higher-order functions using closure datatypes and interpretation; and aggressive optimization of the resulting first-order code, which can be viewed as encoding the result of a closure analysis. Programs remain fully typed at every stage of the translation process, using only simple, standard type systems. Target code runs at speeds comparable to the output of current optimizing ML compilers, even though handicapped by a conservative garbage collector.
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 55 (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...
Efficient Multi-level Generating Extensions for Program Specialization
, 1995
"... . Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional off-line partial evaluation and integrating the "cogen approach" with a multi-level binding-time analy ..."
Abstract
-
Cited by 54 (5 self)
- Add to MetaCart
. Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional off-line partial evaluation and integrating the "cogen approach" with a multi-level binding-time analysis. This novel "multi-cogen approach" solves two fundamental problems of self-applicable partial evaluation: the generation-time problem and the generator-size problem. The multilevel program generator has been implemented for a higher-order subset of Scheme. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multiple self-application. 1 Introduction Stages of computation arise naturally in many programs, depending on the availability of data or the frequency with which the input changes. Code for later stages can be optimized based on values available in earlier stages. Partial evaluation has received much attention beca...
The semantics of Scheme control-flow analysis
- School of Computer Science, Pittsburgh
, 1991
"... This is a follow-on to my 1988 PLDI paper, “Control-Flow Analysis in Scheme”[9]. I usethe methodof abstractsemantic interpretations to explicate the control-flow analysis technique presented in that paper. I begin with a denotational semantics for CPS Scheme. I then present an alternate semantics th ..."
Abstract
-
Cited by 53 (3 self)
- Add to MetaCart
This is a follow-on to my 1988 PLDI paper, “Control-Flow Analysis in Scheme”[9]. I usethe methodof abstractsemantic interpretations to explicate the control-flow analysis technique presented in that paper. I begin with a denotational semantics for CPS Scheme. I then present an alternate semantics that precisely expresses the controlflow analysis problem. I abstract this semantics in a natural way, arriving at two different semantic interpretations giving approximate solutions to the flow analysis problem, each computable at compile time. The development of the final abstract semantics provides a clear, formal description of the analysis technique presented in “Control-Flow Analysis in Scheme.” 1
Global Tagging Optimization by Type Inference
- In Proceedings of the 1992 ACM Conference on LISP and Functional Programming
, 1992
"... Tag handling accounts for a substantial amount of execution cost in latently typed languages such as Common LISP and Scheme, especially on architectures that provide no special hardware support. We present a tagging optimization algorithm based on type inference that is global: it traces tag inform ..."
Abstract
-
Cited by 51 (1 self)
- Add to MetaCart
Tag handling accounts for a substantial amount of execution cost in latently typed languages such as Common LISP and Scheme, especially on architectures that provide no special hardware support. We present a tagging optimization algorithm based on type inference that is global: it traces tag information across procedure boundaries, not only within procedures; efficient: it runs asymptotically in almost-linear time with excellent practical run-time behavior (e.g. 5,000 line Scheme programs are processed in a matter of seconds) ; useful: it eliminates at compile-time between 60 and 95% of tag handling operations in nonnumerical Scheme code (based on preliminary data); structural: it traces tag information in higher order (procedure) values and especially in structured (e.g. list) values, where reportedly 80% of tag handling operations take place; well-founded: it is based on a formal static typing discpline with a special type Dynamic that has a robust and semantically sound "minima...

