PPT Slide
Dynamic Knowledge Assertion/Retraction
Prolog provides built in functions to work with Horn Clauses.
1) Construct a structure representing a clause
2) add a clause to the database
3) remove a clause from the database
* All Prolog structures have the form functor ( arguments )
Facts are already in this form. To convert a rule to this form
P(X1, …, Xn) :- Q1(X1, …, Xn), Qa( ··), ···Qx( ···)
' :- ' (P(X1, .., Xn), ' , ' (Q1( ··), Qa( ···), ···Qk( ··) ) )
example: ' :- '( cat(X) , ', '( animal(X), furry(X) ) )