| OCR Text |
Show 73 Definition 4-20: Let P = H(A,B) be the term to be narrowed. N.m ner (P) is defined as follows: Ninner(P) = { u I :=lv < u & P(V)EF d & :=lw w- v & P(w) E F c} 0 Notice that the condition that v be a defined function is technical, because when v and w are both constructors, the situation becomes trivial. For example, unifying c(f{a)) and c(g(x)) would resu It in unifying f(a) and g(x). For the term P = H{f(g(a, f(a))), f(c(x))), Ninner(P) = {1.1.2}, i.e., the address representing f(a). Let P = H(A,B}, we conjecture that the narrowing at an address u of Ninner(P) is redundant if the following conditions hold. 1. Vv v < u and V ak - > (3k such that P/v and ak are unifiable. The most general unifier ~ , when restricted to the set of variables that occur in P, ~IV(P) = {x, <- t,, ... , xk <- tk} is such that P/u is a subterm in some t .. I 2. The corresponding variable xi appears in P only once. 0 Let us first explain the conditions and then see the evidence for the con-jecture. The first condition says that the subterm P/u must be bound to a variable as a result of unification. There is an important class of term rewriting systems that satisfy the first condition: the programs written in constructor-based equational programming languages, in which the defined function symbols do not appear in the inner part of the lefthand side of any rewrite rule. The examples of constructor-based equational programming language include HOPE [11], SASL [117], and a later version of FEL [65, 85]. The argument that the first condition is satisfied in constructor-based equational languages goes as follows. Let P = f( ... ,h(g( ... )), ... ) where Q = g( ... ). The fact that Q is narrowable implies that the function symbol g is defined. P |