Results 1 - 10
of
12
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...
A Survey and Classification of some Program Transformation Approaches and Techniques
- In TC2 IFIP Working Conference on Program Specification and Transformation
, 1987
"... Program transformation is a means to formally develop efficient programs from lucid specifications. A representative sample of the diverse range of program transformation research is classified into several different approaches based upon the motivations for and styles of constructing such formal de ..."
Abstract
-
Cited by 40 (0 self)
- Add to MetaCart
Program transformation is a means to formally develop efficient programs from lucid specifications. A representative sample of the diverse range of program transformation research is classified into several different approaches based upon the motivations for and styles of constructing such formal developments. Individual techniques for supporting construction of developments are also surveyed, and are related to the various approaches.
Total Correctness by Local Improvement in Program Transformation
- In Proceedings of the 22nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL
, 1995
"... The goal of program transformation is to improve efficiency while preserving meaning. One of the best known transformation techniques is Burstall and Darlington's unfold-fold method. Unfortunately the unfold-fold method itself guarantees neither improvement in efficiency nor total-correctness. The c ..."
Abstract
-
Cited by 20 (3 self)
- Add to MetaCart
The goal of program transformation is to improve efficiency while preserving meaning. One of the best known transformation techniques is Burstall and Darlington's unfold-fold method. Unfortunately the unfold-fold method itself guarantees neither improvement in efficiency nor total-correctness. The correctness problem for unfold-fold is an instance of a strictly more general problem: transformation by locally equivalence-preserving steps does not necessarily preserve (global) equivalence. This paper presents a condition for the total correctness of transformations on recursive programs, which, for the first time, deals with higher-order functional languages (both strict and non-strict) including lazy data structures. The main technical result is an improvement theorem which says that if the local transformation steps are guided by certain optimisation concerns (a fairly natural condition for a transformation), then correctness of the transformation follows. The improvement theorem make...
Deforestation for Higher-Order Functional Programs
, 1995
"... Functional programming languages are an ideal medium for program optimisations based on source-to-source transformation techniques. Referential transparency affords opportunities for a wide range of correctness-preserving transformations leading to potent optimisation strategies. This thesis builds ..."
Abstract
-
Cited by 17 (0 self)
- Add to MetaCart
Functional programming languages are an ideal medium for program optimisations based on source-to-source transformation techniques. Referential transparency affords opportunities for a wide range of correctness-preserving transformations leading to potent optimisation strategies. This thesis builds on deforestation, a program transformation technique due to Wadler that removes intermediate data structures from first-order functional programs. Our contribution is to reformulate deforestation for higher-order functional programming languages, and to show that the resulting algorithm terminates given certain syntactic and typing constraints on the input. These constraints are entirely reasonable, indeed it is possible to translate any typed program into the required syntactic form. We show how this translation can be performed automatically and optimally. The higher-order deforestation algorithm is transparent. That is, it is possible to determine by examination of the source program w...
Sharing of Computations
, 1993
"... This report is a revised version of my thesis of the same title, which was accepted for the Ph.D. degree in Computer Science at University of Aarhus, Denmark, in June 1993 ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
This report is a revised version of my thesis of the same title, which was accepted for the Ph.D. degree in Computer Science at University of Aarhus, Denmark, in June 1993
A Heuristic Approach to Program Inversion
, 1985
"... A notation is given for describing the inverse of multiple functions and of functions of multiple arguments. A technique based upon this notation is presented for taking a program written in pure LISP and automatically deriving a program which computes the inverse function of the given program. This ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
A notation is given for describing the inverse of multiple functions and of functions of multiple arguments. A technique based upon this notation is presented for taking a program written in pure LISP and automatically deriving a program which computes the inverse function of the given program. This technique di#ers from previous such methods in its use of heuristics to invert conditionals. # x) 2 = x rather than LISP append reverse as given in [2], unary add1 and sub1, and sev- 1. Introduction There are many applications in which it is useful to compute the inverse of some program, that is, to find another program such that feeding the output of the original program as input to the new program produces the original input. One such application is in programming by specification: one would like to define a program to compute the square root of a number by the equation ( supplying an actual iterative method of solving the equation. Another application of program inversion is in...
Properties of unfolding-based meta-level systems
- In Proceedings of Partial Evaluation and Semantics-Based Program Manipulation (PEPM ’91), Sigplan Notices 26(9
, 1991
"... It is well known that the performance of a program can often be improved by means of program transformation. Several program transformation techniques, eg. partial evaluation, work as follows: it is recognized that the original program often, when executed, enters states with common components. From ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
It is well known that the performance of a program can often be improved by means of program transformation. Several program transformation techniques, eg. partial evaluation, work as follows: it is recognized that the original program often, when executed, enters states with common components. From these components alone it may be possible to do a lot of computations once and for all, which otherwise would have to be done again and again. The evaluation of the common components mentioned above may itself benefit from identifying common components and evaluating them separately once and for all. Even this evaluation process may possess common components, etc... – an arbitrarily high level of “nesting”
Higher-Order Expression Procedures
- In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM
, 1995
"... We investigate the soundness of a specialisation technique due to Scherlis, expression procedures, in the context of a higher-order non-strict functional language. An expression procedure is a generalised procedure construct providing a contextually specialised definition. The addition of expression ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
We investigate the soundness of a specialisation technique due to Scherlis, expression procedures, in the context of a higher-order non-strict functional language. An expression procedure is a generalised procedure construct providing a contextually specialised definition. The addition of expression procedures thereby facilitates the manipulation and specialisation of programs. In the expression procedure approach, programs thus generalised are transformed by means of three key transformation rules: composition, application and abstraction. Arguably, the most notable, yet most overlooked feature of the expression procedure approach to transformation, is that the transformation rules always preserve the meaning of programs. This is in contrast to the unfold-fold transformation rules of Burstall and Darlington. In Scherlis' thesis, this distinguishing property was shown to hold for a strict first-order language. Rules for call-by-name evaluation order were stated but not proved correct....
An Intermediate Meta-Language for Program Transformation
, 1998
"... As part of an effort to bridge the gap between the theory and practice of program transformation, we have designed a meta-language for transforming functional programs. The metalanguage is sound in preserving both value and termination properties of programs (and is thus superior to the unfold/fo ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
As part of an effort to bridge the gap between the theory and practice of program transformation, we have designed a meta-language for transforming functional programs. The metalanguage is sound in preserving both value and termination properties of programs (and is thus superior to the unfold/fold methodology). Our key contribution is an equational specification of Scherlis's expression procedures, in which we express the essence of expression procedures as a single transformation rule. Our approach has the following advantages over both unfold/fold and expression procedures: (1) all program derivations are reversible; (2) many transformations can be done which unfold/fold and expression procedures cannot do; and (3) the proof of correctness is far simpler. 1 Introduction Program transformation has been an elusive goal of the programming language research community. We talk about it, write about it, preach about it, but in practice don't use it very much. In the functional p...
Deriving Efficient Graph Algorithms
- Carnegie Mellon University, Pittsburgh
, 1984
"... Two case studies are presented that demonstrate the systematic derivation of e#cient algorithms from simple combinatorial definitions. ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Two case studies are presented that demonstrate the systematic derivation of e#cient algorithms from simple combinatorial definitions.

