Abstract
In this paper, we are interested in the application of program transformation for minimizing the number of intermediary sequences used in iterative programs. We shall use the FP language for presenting programs. The transformation rules are based on the algebra of functional programs. In contrast to the other systems of rules for program transformation, sets of rules presented here are convergent (i.e. finitely terminating and confluent) rewriting systems. These rewriting systems are the result of the Knuth-Bendix procedure applied to a set of equations. The equations are valided by the algebra of functional programs. We use the implementation of the Knuth-Bendix procedure in the system REVE. If REVE is applied to a set of equations and if it does not fail, then it returns a convergent rewriting set of rules. With such a rewriting system, the task of transforming a program is reduced to rewrite it until we get its normal form. Thus we propose a set of valid equations and we discuss how convergent rewriting systems can be generated using REVE.