| OCR Text |
Show 46 infinite number of subterms (within the reduction sequence) that are reduced by this rule: f(t 1,1, ... ,t1.n), f(t2, ... ,t2,n), ... , f(tk.1, ... ,tk,n), .... This yields an infinite set of subterms Qf, elements of whi ch are redu ced by the same rewrite rule defining the function f. Some of the se terms may be equiv-alent, i.e., f(t. 1, ... ,t. n) =E f(t. 1 , ... ,t. n) I, I, J, J, for some i and j. These terms are thus partitioned into equivalence classes. The nonrepetition property requires that all such equivalence classes be finite. Ac-cordingly, the allowable nonterminating sequences are those that have an in-finite number of such equivalence classes, each class being finite. We argue that "normal" functional programs, where constructors are heavily used, possess the nonrepetition property. As an example, rewrite rules of the form f(x) - > x " f(c(x)) are often used to generate infinite data structures in programming languages with a lazy evaluation mechanism, where both c is constructor. If we do not have a rewrite rule of the form, say, a - > c(a),* then f(x) and f(c(x)) will not be equivalent no matter how the variable x is instantiated, and the program hence possesses the nonrepetition property. On the other hand, functional programs without the nonrepetition property often cause undesirable loops. For the class of closed linear term rewriting system with the nonrepetition property, we show that any reduction sequence can be "transformed" to another reduction sequence with some desirable properties; these properties are "desirable" because they enable a completeness proof of the unification algo-rithm using narrowing. We will first define the class of closed linear term rewriting systems and * We will show in Section 4.2.2 that these kind of rules are responsible for the failure of narrow-ing to be a complete mechanism for unification. |