| OCR Text |
Show 33 only the root node, and the corresponding set of generated terms IS an empty set. Using the restricted term construction, given any unifier ~ , we can con - struct a substitution ~', where corresponding to each constant function symbol in ~ we have a variable in ~' . For example, corresponding to the term f(a ,x), the restricted term construction constructs a term f(y,z). If we use reduction to determine whether a constructed substitution is a unifier for the given terms, then completeness of the resulting algorithm is not guaranteed. This is because the terms that involve constant function symbols are not among the generated terms, and thus there may be unifiers that cannot be constructed by taking all the combinations of generated terms. Narrowing helps circumvent such problems. / Algorithm 2. Let R be a confluent term rewriting system. Given any terms A and B to be unified, let V = {x1, ... ,xn} be the set of variables occurring in A and B, and W be a set of variables containing V. Let {xi, ... ,xi} denote any subset of V, for i ~ j ~ n. Use the restricted term construction process to build up a t-tree of depth 1, and then expand it to a t-tree of depth 2, and so on. Let the corresponding sets of generated terms be denoted by where T . C T . if i ~ J·. I - J For each set of terms T k progressively obtained above, enumerate every substitution ~ = {x. <- t ., ... , x. <- t .} I I J J for any combination of the terms in T k" As a special case, ~ may be an "empty" substitution, i.e., ~ = {} (a special case of the identity substitution). Let H .. be a function symbol not in F. From the term H .. (t ., ... ,t.), IJ IJ I J enumerate, using the variables in V(H .. (t., ... ,t .)), all nonlinear terms that IJ I J have the same structure as Hii(ti, ... ,ti). For each enumerated term H .. (t'., ... ,t'.), construct a substitution IJ I J ~, = {x. <- t '., ... , x. <- t '.} . I I J J |