Algernon Tutorial 3.d
Backward chaining rules


previous   next

These exercises and examples use the newspaper project included in the examples folder of your Protege installation.

Backward chaining rules

Remember that backward chaining rules infer results needed to answer queries.
((:add-rule Articles
   ((overdue ?article true)
    <-
    (date-due ?article ?duedate)
    (:DATE ?date ?time)
    (:test (:LISP (after-date ?duedate ?date)))
    )))

((:add-rule Nodes
   ((readyToLaunch ?spacecraft true)
    <-
    (fuelLevel ?spacecraft Full)
    (contains  ?spacecraft ScienceStation)
    (:count ?n ?astronaut (astronaut ?spacecraft ?astronaut))
    (:fail (:neq ?n 7))    ;; or (:test (:LISP (= ?n 7)))
    )))

previous   next
Author: Micheal S. Hewett
Email: hewett@cs.stanford.edu
Last Updated: Saturday, February 8, 2003