Results 1 - 10
of
22
Tutorial Notes on Partial Evaluation
- Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing program ..."
Abstract
-
Cited by 230 (60 self)
- Add to MetaCart
The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing programs with respect to parts of their input. In essence, partial evaluation removes layers of interpretation. In the most general sense, an interpreter can be defined as a program whose control flow is determined by its input data. As Abelson points out, [43, Foreword], even programs that are not themselves interpreters have important interpreter-like pieces. These pieces contain both compile-time and run-time constructs. Partial evaluation identifies and eliminates the compile-time constructs. 1.1 A complete example We consider a function producing formatted text. Such functions exist in most programming languages (e.g., format in Lisp and printf in C). Figure 1 displays a formatting functio...
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.
Multi-Stage Programming: Its Theory and Applications
, 1999
"... MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construct ..."
Abstract
-
Cited by 79 (18 self)
- Add to MetaCart
MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construction, combination, and execution of object-programs. Our thesis is that MetaML's three staging annotations provide a useful, theoretically sound basis for building program generators. This dissertation reports on our study of MetaML's staging constructs, their use, their implementation, and their formal semantics. Our results include an extended example of where MetaML allows us to produce efficient programs, an explanation of why implementing these constructs in traditional ways can be challenging, two formulations of MetaML's semantics, a type system for MetaML, and a proposal for extending ...
Occam's Razor in Metacomputation: the Notion of a Perfect Process Tree
, 1993
"... We introduce the notion of a perfect process tree as a model for the
full propagation of in forma tion in metacomputation. Starting with constant
propagation we construct step-by-step the driving mechanism used in supercompilation
which ensures the perfect propagation of information. The concept
of ..."
Abstract
-
Cited by 63 (14 self)
- Add to MetaCart
We introduce the notion of a perfect process tree as a model for the
full propagation of in forma tion in metacomputation. Starting with constant
propagation we construct step-by-step the driving mechanism used in supercompilation
which ensures the perfect propagation of information. The concept
of a simple supercompiler based on perfect driving coupled with a simple
folding strategy is explained. As an example we demonstrate that specializing a
naive pattern matcher with respect to a fixed pattern obtains the efficiency of a
matcher generated by the Knuth, Morris & Pratt al gorithm.
Logic program specialisation through partial deduction: Control issues
- THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2002
"... Program specialisation aims at improving the overall performance of programs by performing source to source transformations. A common approach within functional and logic programming, known respectively as partial evaluation and partial deduction, is to exploit partial knowledge about the input. It ..."
Abstract
-
Cited by 46 (12 self)
- Add to MetaCart
Program specialisation aims at improving the overall performance of programs by performing source to source transformations. A common approach within functional and logic programming, known respectively as partial evaluation and partial deduction, is to exploit partial knowledge about the input. It is achieved through a well-automated application of parts of the Burstall-Darlington unfold/fold transformation framework. The main challenge in developing systems is to design automatic control that ensures correctness, efficiency, and termination. This survey and tutorial presents the main developments in controlling partial deduction over the past 10 years and analyses their respective merits and shortcomings. It ends with an assessment of current achievements and sketches some remaining research challenges.
Axiomatizing Reflective Logics and Languages
- Proceedings of Reflection'96
, 1996
"... The very success and breadth of reflective techniques underscores the need for a general theory of reflection. At present what we have is a wide-ranging variety of reflective systems, each explained in its own idiosyncratic terms. Metalogical foundations can allow us to capture the essential aspects ..."
Abstract
-
Cited by 33 (19 self)
- Add to MetaCart
The very success and breadth of reflective techniques underscores the need for a general theory of reflection. At present what we have is a wide-ranging variety of reflective systems, each explained in its own idiosyncratic terms. Metalogical foundations can allow us to capture the essential aspects of reflective systems in a formalismindependent way. This paper proposes metalogical axioms for reflective logics and declarative languages based on the theory of general logics [34]. In this way, several strands of work in reflection, including functional, equational, Horn logic, and rewriting logic reflective languages, as well as a variety of reflective theorem proving systems are placed within a common theoretical framework. General axioms for computational strategies, and for the internalization of those strategies in a reflective logic are also given. 1 Introduction Reflection is a fundamental idea. In logic it has been vigorously pursued by many researchers since the fundamental wor...
The Narrowing-Driven Approach to Functional Logic Program Specialization
- New Generation Computing
, 2002
"... Partial evaluation is a semantics-based program optimization technique which has been investigated within di#erent programming paradigms and applied to a wide variety of languages. Recently, a partial evaluation framework for functional logic programs has been proposed. ..."
Abstract
-
Cited by 32 (18 self)
- Add to MetaCart
Partial evaluation is a semantics-based program optimization technique which has been investigated within di#erent programming paradigms and applied to a wide variety of languages. Recently, a partial evaluation framework for functional logic programs has been proposed.
A Practical Partial Evaluation Scheme for Multi-Paradigm Declarative Languages
- Journal of Functional and Logic Programming
, 2002
"... \Lambda y ..."
Specialization of Inductively Sequential Functional Logic Programs
, 1999
"... Functional logic languages combine the operational principles of the most important declarative programming paradigms, namely functional and logic programming. Inductively sequential programs admit the definition of optimal computation strategies and are the basis of several recent (lazy) functional ..."
Abstract
-
Cited by 21 (11 self)
- Add to MetaCart
Functional logic languages combine the operational principles of the most important declarative programming paradigms, namely functional and logic programming. Inductively sequential programs admit the definition of optimal computation strategies and are the basis of several recent (lazy) functional logic languages. In this paper, we define a partial evaluator for inductively sequential functional logic programs. We prove strong correctness of this partial evaluator and show that the nice properties of inductively sequential programs carry over to the specialization process and the specialized programs. In particular, the structure of the programs is preserved by the specialization process. This is in contrast to other partial evaluation methods for functional logic programs which can destroy the original program structure. Finally, we present some experiments which highlight the practical advantages of our approach. 1 Introduction Functional logic languages combine the operational p...

