| OCR Text |
Show 96 <U, T, p, w, u >, in which there exists a multiequation that has common part, and returns an environment. procedure Transform( <U, T, p, w, u > ) begin end. Let N = M be the selected multiequation in U C be the common part, and F be the corresponding frontier; U' := compact(U - {N= M} u F); T' := T u {N = C}; p' := p; w' := w; I· - • u .- u, return <U', T', p', w', u'> Figure 11: The procedure Transform The procedure Deduce, defined in Figure 12, takes an environment <U, T, p, w, u > , and returns an environment. We assume that a function Or-der is available that takes U and w, computes the w', the next narrowable ad-dress. 5.3.4 A Sequential Algorithm Based on Backtracking An algorithm based on the method of embedding of narrowing into unification is shown in Figure 13. It can be easily argued that this algorithm is correct in that every unifier generated is an E-unifier for the given terms. This algorithm, however, can loop in some branch of the search tree, thus losing some of the unifiers that should be generated, This is in exact the same situation as that occurs in Prolog or any other backtracking-based sequential implementations for theorem provers and logic programming systems. In the algorithm (case c), a constructor conf I ict implies that no matter how many narrowings are performed, no E-unifier will possibly be generated, and the computation needs to backtrack to the previous point. This contrasts with the |