<< Prev | - Up - | Next >> |
We now show how to unify attribute value matrices (AVM's) in Oz. The idea is to treat AVM's exactly as we treated terms in the previous section. Here are three examples of AVM's encoded as predicates.
proc{AVM1 X}
Y in X=a(f:a(f:X g:Y h:Y))
end
proc{AVM2 X}
Y in X=a(f:a(f:X g:a(f:Y) h:Y))
end
proc{AVM3 X}
X=a(f:a(f:X g:nono h:_))
end
In fact, we can use the same procedure Unify
for unification as before.
declare
<AVM's as Predicates>
<Unify Terms>
proc{BrowseAVM AVMs}
{ForAll AVMs Browse}
{Browse done}
end
/*
{BrowseAVM {Unify AVM1 AVM2}}
{BrowseAVM {Unify AVM2 AVM3}}
{BrowseAVM {Unify AVM1 AVM3}}
*/
<< Prev | - Up - | Next >> |