This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CISC 404/604 Unification and Resolution Let L be a set of literals that we wish to unify. Let sub [ ]. While  L sub 6 = 1 Scan left to right till a disagreement is found If neither term (at place of disagreement) is a variable then return(not unifiable) else Let x be the variable term and let the other term be t If x occurs in t then return(not unifiable) else sub sub [ x  t ] return sub We will now apply this algorithm from the example from Uwe Schoenings book that was discussed in class. L = { P ( f ( z,g ( a,y )) ,h ( z )) ,P ( f ( f ( u,v ) ,w ) ,h ( f ( a,b ))) } sub [ z  f ( u,v )] L sub = { P ( f ( f ( u,v ) ,g ( a,y )) ,h ( f ( u,v ))) ,P ( f ( f ( u,v ) ,w ) ,h ( f ( a,b ))) } sub [ z  f ( u,v )] [ w  g ( a,y )] L sub = { P ( f ( f ( u,v ) ,g ( a,y )) ,h ( f ( u,v ))) ,P ( f ( f ( u,v ) ,g ( a,y )) ,h ( f ( a,b ))) } sub [ z  f ( u,v )] [ w  g ( a,y )] [ u  a ] L sub = { P ( f ( f ( a,v ) ,g ( a,y )) ,h ( f ( a,v )))...
View Full
Document
 Spring '09

Click to edit the document details