## Total Correctness by Local Improvement in the Transformation of Functional Programs (1996)

Venue: | ACM Transactions on Programming Languages and Systems |

Citations: | 61 - 6 self |

### BibTeX

@ARTICLE{Sands96totalcorrectness,

author = {David Sands},

title = {Total Correctness by Local Improvement in the Transformation of Functional Programs},

journal = {ACM Transactions on Programming Languages and Systems},

year = {1996},

volume = {18},

pages = {175--234}

}

### OpenURL

### Abstract

ion. A common form of transformation, which is easily justified by appealing to reversibility, is abstraction. The abstraction transformation lifts some instances of subexpressions from the right-hand sides of a set of definitions and replaces them with function calls for some new functions. The abstraction process can be used in conjunction with a call-by-need implementation to avoid repeated evaluation of subexpressions. A well-known example is Hughes' supercombinator abstraction [Hughes 1982]. Another form of abstraction which is common in program transformation is syntactic generalization in which an expression e is replaced by a function call g e 1 : : : e n , where g is a new function defined by g x 1 : : : xn \Delta = e 0 , such that e j e 0 f e 1 : : : e n= x 1 : : : xn g. General statements about abstractions and their correctness are notationally rather complex. In practice we have found it is easier to appeal to a reversibility argument on a case-by-case basis than...

### Citations

570 | A Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1976
(Show Context)
Citation Context ...text of this study is transformations on functional programs. Source-tosource transformation methods for recursive programs, such as unfold-fold transformation,spartial evaluation, and deforestation [=-=Burstall and Darlington 1977-=-; Jones et al. 1993; Wadler 1990], proceed by performing a sequence of equivalenceA preliminary (unpublished) version of this article was circulated in May 1994, under the same title. A short version ... |

440 | Can programming be liberated from the von neumann style? A functional style and its algebra of programs - Backus - 1978 |

239 | The lazy lambda calculus
- Abramsky
- 1990
(Show Context)
Citation Context ...dard Morris-style contextual ordering, or observational approximation [Plotkin 1975; Milner 1977]. The notion of "observation" we take is just the fact of convergence, as in the lazy lambda =-=calculus [Abramsky 1990-=-]. Observational equivalence equates two expressions if and only if in all closing Total Correctness by Local Improvement in Transformation \Delta 11 contexts they give rise to the same observation --... |

186 | The call-by-need lambda calculus
- Ariola, Felleisen
- 1997
(Show Context)
Citation Context ... the time of writing we do not know the answer to this question. A first step is to find a characterization of the call-by-need improvement theory. A recently proposed term-based call-by-need theory [=-=Ariola et al. 1995-=-] might prove an interesting basis for this investigation. Interestingly, many of the call-by-need reduction rules are anticipated by the above call-by-value theory of improvement. As it stands, the c... |

116 | A syntactic theory of sequential control - Felleisen, Friedman, et al. - 1987 |

79 | Using circular programs to eliminate multiple traversals of data - Bird - 1984 |

50 | A System for Assisting Program Transformation - Feather - 1982 |

39 | Unfold/fold transformations in logic programs - Gardner, Shepherdson - 1991 |

34 |
A self-applicable partial evaluator for the lambda calculus: correctness and pragmatics
- Gomard
- 1992
(Show Context)
Citation Context ...ain optimization concerns (a fairly natural condition for program transformation), then correctness of the transformation follows. 1 A number of rigorous studies of correctness in partial evaluation [=-=Gomard 1992-=-; Palsberg 1993; Wand 1993] ignore the memoization aspects and deal with the orthogonal issue of the correctness of binding-time analysis, which controls where transformation occurs in a program. Cons... |

21 | Infinite trees in normal form and recursive equations having a unique solution - Courcelle - 1979 |

18 |
Transforming Normal Programs by Replacement
- Bossi, Cocco, et al.
- 1992
(Show Context)
Citation Context ...n to be used "recursively" within the sub-unfold-fold proofs. Bossi, Cocco, and Etalle: Replacement Using Semantic Delay. Starting with the more general form of replacement, Bossi, Cocco, an=-=d Etalle [Bossi et al. 1992-=-b] study conditions guaranteeing total correctness with respect to both Fitting's and Kunen's semantics. The main condition relates two quantities: the dependency degree and the semantic delay. Suppos... |

15 | Sharing of Computations - Amtoft - 1993 |

14 |
On Safe Folding
- Bossi, Cocco, et al.
- 1992
(Show Context)
Citation Context ...n to be used "recursively" within the sub-unfold-fold proofs. Bossi, Cocco, and Etalle: Replacement Using Semantic Delay. Starting with the more general form of replacement, Bossi, Cocco, an=-=d Etalle [Bossi et al. 1992-=-b] study conditions guaranteeing total correctness with respect to both Fitting's and Kunen's semantics. The main condition relates two quantities: the dependency degree and the semantic delay. Suppos... |

10 | Unfold/fold Transformations Preserving Termination Properties - Amtoft - 1992 |

9 | On-line and off-line partial evaluation: Semantics specifications and correctness proofs - Consel, Khoo - 1995 |

4 | Recursion induction principle revisited - Boudol, Kott - 1983 |

4 |
Equivalence and transformations of regular systemsâ€”applications to recursive program schemes and grammars
- Courcelle
- 1986
(Show Context)
Citation Context ...m Corollary 5.2.2. (In fact it is not too difficult to show that any transformation without folding is correct, provided that the laws are not dependent on the definitions of the recursive functions [=-=Courcelle 1986-=-; Zhu 1994]. The problem is that no fold step, viewed in isolation, is an improvement. 9 The key to guaranteeing correctness is to ensure that we pay for each fold step at some point, thus maintaining... |

3 |
Can LCF be topped? Flat lattice models of typed lambda calculus
- Bloom
- 1988
(Show Context)
Citation Context ...ing about approximation and equivalence. Other than by defining a denotational semantics, the principal technique for functional languages is to establish some form of context lemma 3 [Abramsky 1990; =-=Bloom 1988; Gordon 1-=-995; Howe 1989; Milner 1977]. We have made use of a characterization in terms of an "applicative (bi)simulation" relation [Abramsky 1990]. This provides a useful proof technique for observat... |