COG366

Task 5

For simplicity, I am only including the prioritization process of two tasks, i.e. deciding
 which task to do before another. This can be used in a more general case as the tie 
 breaker of two tasks.
 
% in general, academic > work > extracurricular activities
academic(X) and work(Y) -> priority(X)
academic(X) and eca(Y) -> priority(X)
work(X) and eca(Y) -> priority(X)
sameType -> dueSooner?

% prioritize tasks with sooner due date
dueSooner(X) OR dueSooner(Y)
dueSooner(X) -> priority(X)
sameDate -> takeLonger?

% prioritize tasks that can take long
takeLonger(X) OR takeLonger(Y)
takeLonger(X) -> priority(X)

% maybe there are some “prefered” tasks that always get prioritized no matter what

% define academic stuff
homework(X) -> academic(X)
project(X) -> academic(X)

% define work stuff
teachingAssistant(X) -> work(X)
diningHall(X) -> work(X)

% define extracurricular activities stuff
clubMeeting(X) -> eca(X)

% input
A = parallel project due 11/2
B = math homework due 11/3

project(A).
homework(B).
academic(A).
academic(B).
sameType -> dueSooner?
dueSooner(A) -> priority(A)

Current prioritization: A, B

% update input
A = parallel project due 11/4     % due date change!

not(dueSooner(A)) -> dueSooner(B)
dueSooner(B) -> priority(B)

Current prioritization: B, A