/* Filename: course2.pro * * Programmer: Br. David Carlson * * Date: March 4, 1991 * * Description: This program creates a small database on course * offerings and has 2 rules to extract information on these. */ instructor(cs255, br_david). instructor(cs110, mr_morrison). instructor(cs111, br_david). offered(cs111, semester(spring, 1991)). offered(cs255, semester(spring, 1991)). offered(cs110, semester(fall, X)). /* true for any year X */ /* Report's on Br. David's Spring 1991 course(s). */ report(Course) :- instructor(Course, br_david), offered(Course, semester(spring, 1991)). course_list(Course, Teacher, Term, Year) :- instructor(Course, Teacher), offered(Course, semester(Term, Year)).