Example Logic Program
(SETF DATABASE3 '(
; Rules:
((GRANDMOTHER X Z) (MOTHER X Y) (PARENT Y Z))
((PARENT X Y) (MOTHER X Y))
((PARENT X Y) (FATHER X Y))
; Facts:
((MOTHER MARY JOHN))
((FATHER JOHN BILL))
((FATHER PETER JAMES))
))
(QUERY '((GRANDMOTHER X BILL)))
Previous slide
Next slide
Back to first slide
View graphic version