Unformatted text preview: that pattern in subgoals
with which the pattern can be uni ed.
Then, invent a new predicate for each pattern
of arguments in each IDB predicate.
3 The new predicate represents where the
function symbols are found.
3 But the predicate itself has only variables
as arguments, no function symbols. Example
Continue with the manc rules.
Initially, r4 and r5 have heads with function
r4: f :; g:; : is the pattern for rule r4. Use
it in r2 to get:
r7: mancX,Y :- fX,gA,B &
mancgA,B,Y r5: The head of r5 has pattern mg:; :; :,
which uni es with the m subgoals in r1
r8: mancgC,D,Y :- mgC,D,Y
r9: mancgC,D,Y :- mgC,D,Z &
mancZ,Y Now, r8 and r9 have new heads with function
symbols; the patterns are both mancg:; :; :.
3 Thus we must use mancg:; :; : in r2, r3 , r7 ,
3 Rules r2 and r7 yield nothing new.
3 r3 and r9 yield, respectively:
r10: mancX,Y :- mX,gE,F
& mancgE,F,Y r11: mancgC,D,Y :- mgC,D,gE,F
& mancgE,F,Y Cleaning Up the Rules To get a program that computes the maximum
answer from the views, we can:
1. Replace ato...
View Full Document
- Spring '09