Exercise 4.59

Read Exercise 4.59 ~ Solution


part a

(run-query '(meeting ?where (Friday ?time)))
(meeting administration (Friday 1pm))

part b

(run-query '(assert!
             (rule (meeting-time ?person ?day-and-time)
                   (or (and (job ?person (?division . ?title))
                            (meeting ?division ?day-and-time))
                       (meeting whole-company ?day-and-time)))))

part c

(run-query '(meeting-time (Hacker Alyssa P) (Wednesday ?time)))
(meeting-time (Hacker Alyssa P) (Wednesday 3pm))
(meeting-time (Hacker Alyssa P) (Wednesday 4pm))

Leave a comment