; evaluate (load "load-rule-sys") before loading this file into Lisp ;;; These rules illustrate the use of the "Lisp escape" feature. (define-rules (if (temperature ?x ?y) (lisp-eval (>= '?y 99)) ; quote not necessary here then (has-fever ?x)) (if (parent ?x ?y) (parent ?x ?z) (lisp-eval (not (eql '?y '?z))) ; but it is necessary here then (sibling ?y ?z)) (if (parent ?x ?y) (has-fever ?y) then (worries-about ?x ?y)) ) (define-facts (temperature john 98.6) (temperature sally 101) (parent dorothy tom) (parent dorothy sally) )