Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int,...
-
Upload
preston-hill -
Category
Documents
-
view
214 -
download
1
Transcript of Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int,...
![Page 1: Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int, C’={Y = X X} = [ X int ] ; unify({ Y = int](https://reader035.fdocuments.us/reader035/viewer/2022071806/56649f3f5503460f94c5feed/html5/thumbnails/1.jpg)
Examples of the Unification Algorithm
{ X = int, Y = XX }
unify({ X = int, Y = XX }) S=X, T=int, C’={Y = XX}= [ X int ] ; unify({ Y = intint }) S=Y, T=intint, C’={ }= [ X int ] ; [ Y intint ] ; unify({ })= [ X int ] ; [ Y intint ] ; [ ]= [ X int, Y intint ]
{ intint = XY }
unify({ intint = XY }) S=intint, T=XY, C’={ }= unify({ int = X, int = Y }) S=int, T=X, C’={ int = Y }= [ X int ] ; unify({ int = Y }) S=int, T=Y, C’={ }= [ X int ] ; [ Y int ] ; unify({ })= [ X int, Y int ]
![Page 2: Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int, C’={Y = X X} = [ X int ] ; unify({ Y = int](https://reader035.fdocuments.us/reader035/viewer/2022071806/56649f3f5503460f94c5feed/html5/thumbnails/2.jpg)
Examples of the Unification Algorithm
{ XY = YZ, Z = UW }
unify({ XY = YZ, Z = UW }) S=XY, T= YZ, C’={Z = UW}= unify({ Z = UW, X = Y, Y = Z }) S=Z, T=UW, C’={ X = Y, Y = Z }= [ Z UW ] ; unify({ X = Y, Y = UW })= [ Z UW ] ; [ X Y ] ; unify({ Y = UW })= [ Z UW ] ; [ X Y ] ; [ Y UW ]= [ Z UW, X Y ] ; [ Y UW ]= [ Z UW, X UW, Y UW ]
![Page 3: Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int, C’={Y = X X} = [ X int ] ; unify({ Y = int](https://reader035.fdocuments.us/reader035/viewer/2022071806/56649f3f5503460f94c5feed/html5/thumbnails/3.jpg)
Examples of the Unification Algorithm
{ int = intY }
unify({ int = intY }) S=int, T= intY, C’={ } fails
{ Y = intY }
unify({ Y = intY }) S=Y, T= intY, C’={ } fails
{ }
unify({ }) = [ ]
![Page 4: Examples of the Unification Algorithm { X = int, Y = X X } unify({ X = int, Y = X X }) S=X, T=int, C’={Y = X X} = [ X int ] ; unify({ Y = int](https://reader035.fdocuments.us/reader035/viewer/2022071806/56649f3f5503460f94c5feed/html5/thumbnails/4.jpg)
Reference
http://www.dcs.gla.ac.uk/~simon/teaching/tpl/