| OCR Text |
Show 61 4.2.2 The Transformation Given a unifier and a reduction sequence, denoted by a pair <~ . S >, we can obtain a new unifier and a new reduction sequence <~', S'> by performing the transformation detailed below. The transformation will be applied repeatedly, and we will henceforth refer to each application of the transfer-mation "a major" transformation step; each major transformation step consists of four substeps. Figure 5 illustrates a major transformation step. The reader should refer to the notations used in the figure when reading the text. Note that initially all of the M. are singleton sets. I Step 1. Let Mi be the first set of addresses on the reduction sequence such that it contains copies of some subterm in the unifier ~ in the following sense: there exists an address u in M. and an indexed address wi in Index(~), I such that for some address v in ~(wi) u is a residue of v. If no such Mi exists, the transformation terminates. Step ~· Let ~ Q. Index(~) be the set of all the indexed addresses wi such that v is in ~(wi), and there exists an address u in M., where u is a residue of I v. In other words, ~ contains all the indexed addresses in the unifier whose copies have been made through the reduction sequence to Mi. S: ~H(P,Q) = A0 - > M I o I IM"o I Az -> I I IM"z I v v v ... ->M n-1 S': ~ ' H(P,Q) = A'0 ->M. A'1 ->M. A'2-> ... ->M. 0 1 n-1 An = H(R,R) I I IM"n I v A'n I IM'n v A' n+l = H(R', R') Figure 5: An illustration of a major transformation step |