Results 1 
3 of
3
Total Correctness by Local Improvement in the Transformation of Functional Programs
 ACM Transactions on Programming Languages and Systems
, 1996
"... 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 righthand sides of a set of definitions and replaces them with function calls for some new functions. The ab ..."
Abstract

Cited by 61 (6 self)
 Add to MetaCart
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 righthand 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 callbyneed implementation to avoid repeated evaluation of subexpressions. A wellknown 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 casebycase basis than...
Total Correctness by Local Improvement in Program Transformation
 In Proceedings of the 22nd Annual ACM SIGPLANSIGACT 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 unfoldfold method. Unfortunately the unfoldfold method itself guarantees neither improvement in efficiency nor totalcorrectness. 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 unfoldfold method. Unfortunately the unfoldfold method itself guarantees neither improvement in efficiency nor totalcorrectness. The correctness problem for unfoldfold is an instance of a strictly more general problem: transformation by locally equivalencepreserving 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 higherorder functional languages (both strict and nonstrict) 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...
The Evaluation of FirstOrder Substitution is Monadic SecondOrder Compatible
"... We denote firstorder substitutions of finite and infinite terms by function symbols indexed by the sequences of firstorder variables to which substitutions are made. We consider the evaluation mapping from infinite terms to infinite terms that evaluates these substitution operations. This mapping ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
We denote firstorder substitutions of finite and infinite terms by function symbols indexed by the sequences of firstorder variables to which substitutions are made. We consider the evaluation mapping from infinite terms to infinite terms that evaluates these substitution operations. This mapping may perform infinitely many nested substitutions, so that a term which has the structure of an infinite string can be transformed into one isomorphic to an infinite binary tree. We prove that this mapping is Monadic Secondorder compatible which means that, for all finite sets of function symbols and variables, a monadic secondorder formula expressing a property of the output term produced by the evaluation mapping can be translated into a monadic secondorder formula expressing this property over the input term. This implies that, deciding the monadic secondorder theory of the output term reduces to deciding that of the input term. As an application, we obtain another proof that the monadic secondorder properties of the algebraic trees, which represent the behaviours of recursive applicative program schemes, are decidable. This proof extends to hyperalgebraic trees. These infinite trees correspond to certain recursive program schemes with functional parameters of arbitrary high type.