unification-alg - CISC 404/604 Unification and Resolution...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 2

unification-alg - CISC 404/604 Unification and Resolution...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online