| OCR Text |
Show By virtue of the nonrepetition property, no equivalence class can be infinite. This implies that the transformation will eventually terminate. It is easy to see from the definition of the transformation that if M is I the set chosen in Step 1, then the set M'. does not contain any I residues of an address in U(cr'). Therefore, when the transformation terminates, we have a reduction sequence Sk: cr kH(P,Q) = A'0 - > u'o A'1 - > , A'2 - > ... - > , A' n' = H(R',R'), u1 un'-1 where none of the addresses u.'s along the reduction sequence is a J residue of any address in U(crk). 0 65 Narrowing fails to yield a complete unification algorithm for the rewrite rules like a - > c(a). These type of rewrite rules also violate the non repetition property; they make the transformation fail to terminate. As an illustration, let us consider the following transformation process. Example 4. Consider the rewrite rule a - > c(a). Suppose that we want to unify the terms g(x1,x1) and g(x2,c(x2)). There exists an Eunifier cr = {x1 <- c(a), x2 <- a} for these two terms. After applying the E-unifier cr to the terms, we get crH(g(x1, x 1), g(x2, c(x2))) = H(g(c(a), c(a}), g(a, c(a))), and we then have the following reduction sequence: H(g(c(a}, c(a}}, g(a, c(a))) ->2_1 H(g(c(a}, c(a)), g(c(a), c(a})) = H(R,R), as illustrated in Figure 6. c I g I \ c a a H I \ a g I \ c a c g I \ c a a H I Figure 6: An illustration of Example 4 \ c g I \ c a a |