%UG | ?- listing. become_effective(offer(A,B,C), D) :- reach(offer(A,B,C), B, D), \+become_effective(withdrawl(A,B,offer(A,B,C)),B,_), \+become_effective(revocation(A,B,offer(A,B,C)),B,_). become_effective(acceptance(A,B,C), D) :- become_effective(offer(B,A,_), _), dispatch(acceptance(A,B,C), B, _), reach(acceptance(A,B,C), B, D). become_effective(withdrawl(A,B,offer(A,B,C)), B, D) :- irrevocable(offer(A,B,C)), reach(withdrawl(A,B,offer(A,B,C)), B, D), \+ (reach(offer(A,B,C),B,E),before(E,D)). become_effective(revocation(A,B,offer(A,B,C)), B, D) :- \+irrevocable(offer(A,B,C)), reach(revocation(A,B,offer(A,B,C)), B, D), ( \+dispatch(acceptance(B,A,E),A,F) ; dispatch(acceptance(B,A,E), A, F), before(D, F) ). before(A, B) :- A@