Planning for Biductive Computing

This assignment uses Prolog and the biductive computing paradigm to allow a user to generate a schedule of courses for completing a computer science degree. For the sake of simplicity, only computer science and mathematics courses are included, though a more useful planner would include all university courses. Courses may be offered in spring, fall, or both. And some courses have one or more prerequisites that must be completed in prior semesters.

Course planning rules

There are only eight semesters available for scheduling courses (Fall first year through Spring fourth year). At most, only four courses may be scheduled each semester. A course cannot be scheduled more than once. A course with prerequisites can only be scheduled in a semester after all of its prerequisites have been scheduled. All courses required for the major must be scheduled.

The included file contains facts about course offerings (Fall or Spring or both), prerequisites, and courses required for the major. Refer to the test cases in for the list of required rules.

Biductive features

A typical course planner simply tells the student which courses are still needed before they can complete their degree. But students often have more complex questions during advising sessions that cannot be easily answered. These questions include, “when should I take a particular course?”; “do I have to take this course in that semester?”; “when can I study abroad (and thereby possibly miss a semester of courses)?”; “can I still graduate if I only take at most two computer science courses per semester?” These questions require biductive computing because they mix partial initial conditions with partial goal conditions.

Your course planner must support the following biductive features:

Test cases

A series of test cases are given in Run the test cases with this command:

swipl -q -s -t run_tests

If the tests pass, you should see only some dots (1 dot per test) and no error or warning messages.


Submit your file. Include the files and as well, even though you do not need to modify them.

Note: You must not write any new facts. Only write rules. The file has all the facts that are needed.

You'll probably want to start your file like so:

:- [courses]. % import

Grading rubric


As a simple extension to this assignment, more courses may be added to to cover general education requirements. Our computer science major also requires several elective courses from a list of options. Courses may be distinguished as elective or non-elective and corresponding rules may be added to the file and test cases.

Further enhancements may involve course load restrictions (e.g., no more than two computer science courses per semester, and no fewer than three courses overall per semester) and course time-of-day details.

Naturally, more majors may be added with appropriate additions to and updates to rules in to allow the user to indicate their desired major. Adding minors would also be a useful enhancement.

More biductive features may be added such as the ability to answer a question like, “which major requires the fewest additional courses beyond those I have already taken?” or, “if I study abroad for one semester, which semester should I choose so that I can keep an easy schedule in my senior year?”