| OCR Text |
Show 71 4.4.1 Outer Narrowing Intuitively, suppose B is a proper subterm of P and both P and B are nar-rowable. Then in some situations we can completely ignore narrowing se-quences starting from the narrowing at B. That is, let u be t he address representing the subterm B, a narrowing sequence p ---.. >[u] Q --.. > .. . ' is redundant if some conditions are satisfied. Furthermore, evidence shows that outer narrowing is most likely to generate unifiers quickly, thus suggesting a strategy for sequential implementation of narrowing based on backtracking, in which one can first carry out narrowings at the outer addresses, and then come back, if necessary, to determine whether narrowings on the inner subterms are redundant, and if not, performs narrowings on these subterms. To see the intuitions behind this optimization, let us consider an example. tern: Example 5. Suppose we have the following term rewriting sys- R={ } f(a, y) - > e f(s(n), c(v, u}) - > c(v, f(n, u)) g(x, b) - > c(x, g(s(x), b)) where x, y, n, v and u are variables and others function symbols. Notice that the term rewriting system is constructor-based and nonterminating, because of the last rule. Figure 7 shows the outer nar-rowing process in finding unifiers for the two terms f(s(s(z)), g(x1, e)) and c(a, e)). Note that we use subscripts to name the new variables (variable renaming). Notice also that each pi contains substitutions restricted to the variables in the input terms and their renaming. Furthermore, we use vertical -- > > to denote narrowing - > . Note that the address 1.2.2 in A2 is also narrowable. This again makes 1.2 narrowable by using the second rewrite rule. However, the outermost functor of the righthand side of that rewrite rule is a constructor c which is different from the constructor e. Notice also that |