;MSACS graduation program checklist program ; July 11, 2004 ;gradchk0.clp (deffacts initial-facts "These are defaults needed prior to execution" (minimum-hours-to-graduate 36) (phase atstart) ) (defrule example-rule "This is the core set of graduation requirements" (student-hours ?stuhours) (minimum-hours-to-graduate ?min-hours) (test (>= ?stuhours ?min-hours)) => (assert (OK to graduate)) (fprintout t "OK to graduate" crlf) ) (defrule askfordata (phase atstart) => (fprintout t "Enter the number of hours that " crlf) (fprintout t "will be completed by the semester of graduation:") (assert (student-hours = (read))) )