| OCR Text |
Show 117 there is a unifier 9 in ~ w hich is either more general than <T or at least as general as <T . If the set cont ains all of t he "unre lated" most general unifiers and no others then t he corresponding alg orithm is said to be mt nt tnal and com-plete. A minimal and complete set of unifiers may not be finite for some equa - tional t heories. The rea son it is important to have all of the most general unifiers in a theorem prover is that unless all of them have been tried, the theorem prover cannot declare a statement to be false. This is analogous to the situat ion in Prolog wherein a failure cannot be re ported un less one has tried every possible search path {by means of ba cktracking). It is not difficult to prove that under the conditions ( 1) t hat the function terms involved in the two given unifiable terms are ground terms, and (2) that the equations in EQN are confluent, the most general unifier is unique (up to the equivalence =E), and that the semantic unification algorithm indeed produces this unifier if the termination of the algorithm is guaranteed. Although the pro-gramming paradigm combining functions and logic as advocated here is sup-ported by this computational model, semantic unification does not provide a general capability for reasoning about equations. Consider, for example, the function append defined by equations: append([], L) = L append(A"'L1, L2) = A"'append(L1, L2). The question "what is X such that the equation append (a"'X, c "'d"' []) = append(a"'b"'c"'[], d"'[]) holds" cannot be solved by the semantic unification algorithm. To solve this equation, a complete unification algorithm for the theory generated by the above two equations is needed. In [35], a complete unification algorithm based on narrowing [30, 51] is used under the condition that the underlying theory can be described by a canonical term rewriting system. In Chapter 4, we have shown that the narrowing method also yields a complete unification algorithm for some subclasses of confluent, but not neces-sarily terminating term rewriting systems. When the semantic unificat ion algo-rithm described in this chapter is replaced by the algorithm described in Chap- |