Results 1 - 10
of
16
Rules and Strategies for Transforming Functional and Logic Programs
- ACM Computing Surveys
, 1996
"... We present an overview of the program transformation methodology, focusing our attention on the so-called `rules + strategies' approach in the case of functional and logic programs. The paper is intended to offer an introduction to the subject. The various techniques we present are illustrated via s ..."
Abstract
-
Cited by 68 (3 self)
- Add to MetaCart
We present an overview of the program transformation methodology, focusing our attention on the so-called `rules + strategies' approach in the case of functional and logic programs. The paper is intended to offer an introduction to the subject. The various techniques we present are illustrated via simple examples. A preliminary version of this report has been published in: Moller, B., Partsch, H., and Schuman, S. (eds.): Formal Program Development. Lecture Notes in Computer Science 755, Springer Verlag (1993) 263--304. Also published in: ACM Computing Surveys, Vol 28, No. 2, June 1996. 3 1 Introduction The program transformation approach to the development of programs has first been advocated by [Burstall-Darlington 77], although the basic ideas were already presented in previous papers by the same authors [Darlington 72, Burstall-Darlington 75]. In that approach the task of writing a correct and efficient program is realized in two phases: the first phase consists in writing an in...
Transformation of Logic Programs
- Handbook of Logic in Artificial Intelligence and Logic Programming
, 1998
"... Program transformation is a methodology for deriving correct and efficient programs from specifications. In this chapter, we will look at the so called 'rules + strategies' approach, and we will report on the main techniques which have been introduced in the literature for that approach, in the case ..."
Abstract
-
Cited by 33 (3 self)
- Add to MetaCart
Program transformation is a methodology for deriving correct and efficient programs from specifications. In this chapter, we will look at the so called 'rules + strategies' approach, and we will report on the main techniques which have been introduced in the literature for that approach, in the case of logic programs. We will also present some examples of program transformation, and we hope that through those examples the reader may acquire some familiarity with the techniques we will describe.
Unfold/Fold Transformations and Loop Optimization of Logic Programs
- In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation
, 1988
"... Abstract: Programs typically spend much of their execution time in loops. This makes the generation of efficient code for loops essential for good performance. Loop optimization of logic programming languages is complicated by the fact that such languages lack the iterative constructs of traditional ..."
Abstract
-
Cited by 23 (1 self)
- Add to MetaCart
Abstract: Programs typically spend much of their execution time in loops. This makes the generation of efficient code for loops essential for good performance. Loop optimization of logic programming languages is complicated by the fact that such languages lack the iterative constructs of traditional languages, and instead use recursion to express loops. In this paper, we examine the application of unfold/fold transformations to three kinds of loop optimization for logic programming languages: recur-sion removal, loop fusion and code motion out of loops. We describe simple unfold/fold transformation sequences for these optimizations that can be automated relatively easily. In the process, we show that the properties of unification and logical variables can sometimes be used to generalize, from traditional languages, the conditions under which these optimizations may be carried out. Our experience suggests that such source-level transformations may be used as an effective tool for the optimization of logic pro-grams. 1.
Inductive synthesis of equational programs
- In Eighth National Conf. on Arti cial Intelligence
, 1990
"... An equational approach to the synthesis of functional and logic program is taken. In this context, the synthesis task involves nding executable equations such that the given speci cation holds in their standard model. Hence, to synthesize such programs, induction is necessary.We formulate procedures ..."
Abstract
-
Cited by 23 (2 self)
- Add to MetaCart
An equational approach to the synthesis of functional and logic program is taken. In this context, the synthesis task involves nding executable equations such that the given speci cation holds in their standard model. Hence, to synthesize such programs, induction is necessary.We formulate procedures for inductiveproof,aswell as for program synthesis, using the framework of \ordered rewriting". We also propose heuristics for generalizing from a sequence of equational consequences. These heuristics handle cases where the deductive process alone is inadequate for coming up with a program. 1.
A Comparative Revisitation of Some Program Transformation Techniques
- Partial Evaluation, Int'l Seminar, Dagstuhl
, 1996
"... . We revisit the main techniques of program transformation which are used in partial evaluation, mixed computation, supercompilation, generalized partial computation, rule-based program derivation, program specialization, compiling control, and the like. We present a methodology which underlines the ..."
Abstract
-
Cited by 21 (0 self)
- Add to MetaCart
. We revisit the main techniques of program transformation which are used in partial evaluation, mixed computation, supercompilation, generalized partial computation, rule-based program derivation, program specialization, compiling control, and the like. We present a methodology which underlines these techniques as a `common pattern of reasoning' and explains the various correspondences which can be established among them. This methodology consists of three steps: i) symbolic computation, ii) search for regularities, and iii) program extraction. We also discuss some control issues which occur when performing these steps. 1 Introduction During the past years researchers working in various areas of program transformation, such as partial evaluation, mixed computation, supercompilation, generalized partial computation, rule-based program derivation, program specialization, and compiling control, have been using very similar techniques for the development and derivation of programs. Unfor...
A Simple Program Transformation for Parallelism
- Proceedings of the 1994 International Logic Programming Symposium
, 1994
"... Most of the research, to date, on optimizing program transformations for declarative languages has focused on sequential execution strategies. In this paper, we consider a class of commonly encountered computations whose "natural" specification is essentially sequential, and show how algebraic prope ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
Most of the research, to date, on optimizing program transformations for declarative languages has focused on sequential execution strategies. In this paper, we consider a class of commonly encountered computations whose "natural" specification is essentially sequential, and show how algebraic properties of the operators involved can be used to transform them into divide-and-conquer programs that are considerably more efficient, both in theory and in practice, on parallel machines. 1 Introduction Among the advantages claimed for declarative programming languages are that (i) programs written in such languages are relatively easy to reason about, which makes it possible to automatically transform simple declarative specifications into efficiently executable code; and (ii) it is easy to exploit parallelism in programs written in such languages. Nevertheless, most of the research on transformation of programs in high level languages has focused, to date, on execution strategies that are...
The Many Disguises of Accumulation
, 1991
"... Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuation ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuations, lambda abstraction, generalisation, tail recursion, implementation of lists. This research has been sponsored by the Netherlands Organisation for Scientific Research (NWO), under grant NF 63/62-518 (the STOP --- Specification and Transformation Of Programs --- project). 1 Introduction One of the first program transformations that appeared in the literature was the accumulation transformation. The transformation is now classic, although not everyone may know it under exactly this name. In this note, I try to relate several descriptions of this program transformation technique. In a purely algebraic view, it is the exploitation of the properties of a monoid. In literature, it can be fou...
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...
Context-Moving Transformations for Function Verification
, 1999
"... Several induction theorem provers have been developed which support mechanized verification of functional programs. Unfortunately, a major problem is that they often fail in verifying tail recursive functions (which correspond to imperative programs). However, in practice imperative programs are ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
Several induction theorem provers have been developed which support mechanized verification of functional programs. Unfortunately, a major problem is that they often fail in verifying tail recursive functions (which correspond to imperative programs). However, in practice imperative programs are used almost exclusively. We present an automatic transformation to tackle this problem. It transforms functions which are hard to verify into functions whose correctness can be shown by the existing provers. In contrast to classical program transformations, the aim of our technique is not to increase efficiency, but to increase veriability. Therefore, this paper introduces a novel application area for program transformations and it shows that such techniques can in fact solve some of the most urgent current challenge problems in automated verification and induction theorem proving.

