cd ~leake/jess/Jess31
java Jess
To exit Jess, type (exit)
In order to complete the homework, you will need to use the following basic Jess commands discussed in class. Each one is followed by examples of its use:
(defrule cancel-ticket ?t <- (parking-ticket ?x) => (retract ?t))
(defrule height-rule (person ?x) (not (short ?x)) => (assert (tall ?x)))
You need to decide how to represent information about the courses that are available, the courses the student has taken, and the prerequisites for each course. You also need to define rules for determining if prerequisites have been satisfied, and for proposing the next course the student should take. You system will be run by asserting facts about the courses the student has taken. It will finish by asserting a fact with a course that needs to be taken next. If you then enter an assertion that the student has taken that course and run it again, the system should update its facts and correctly assert the next course to be taken.
1 If a patient has a very high fever, the patient has a high fever. 2 If a patient has whooping cough, the patient has a cough. 3 If a patient has poison ivy, the patient has a rash. 4 If a patient has a high fever and congestion, the patient has the flu. 5 If a patient has a rash and no high fever, the patient has poison ivy. 6 If a patient has a cough and a very high fever, the patient has whooping cough. 7 If a patient has no fever, no cough, and no rash, the patient is healthy. 8 If one patient has a particular disease which is contagious and that patient contacts another patient, then the other patient has the disease. 9 If a doctor says that a patient has a particular disease or is healthy, then what the doctor says is true. 10 If a person says that a patient has a particular disease or is healthy and that is not true of the patient, then that person is not a doctor.Facts:
Ed has a very high fever. Ed has a cough. Alice doesn't have poison ivy. Max says Alice has poison ivy. Grace says Don is healthy. Grace is a doctor. Whooping cough is contagious. Ed contacts Alice.
Following good design principles makes a significant difference in the extensibility and maintainability of production systems. To illustrate these points, we will warn you about some possible pitfalls in class.