?attends(W,T).Specify which clause was chosen at each stage.
Here is the derivation, always selecting the leftmost atom in the body:
You solution should be the same, up to renaming of variables.yes(W,T) <- attends(W,T). choose clause 1, (with variables renamed) substitution: W/P1,T/D1 yes(P1,D1) <- proctors_exam(P1,C1) & exam(C1,D1). choose clause 2, substitution P1/P2,C1/C2 yes(P2,D1) <- instructor(P2,C2) & exam(C2,D1). choose clause 6, substitution P2/david, C2/cs322 yes(david,D1) <- exam(cs322,D1) *** choose clause 4, substitution D1/oct22 yes(david,oct22) <-
at *** choose clause 5, substitution D1/dec24 yes(david,dec24) <-