/* APPENDIX B Section B.3 Motivating Examples */ proc(visit1, goto(office(mary),1) : pi(t1, ?(now(t1)) : ( (goto(cm,t1) : pi(t2, ?(now(t2)) : goto(office(sue),t2))) # (goto(cm,t1) : pi(t2, ?(now(t2)) : goto(office(bill),t2))) ) ) : pi(t, ?(now(t)) : ?(t $< 40)) ). /* Initial Situation (visit1) */ robotLocation(cm,s0). start(s0, 0). wantsCoffee(sue,140,160). wantsCoffee(joe,90,100). wantsCoffee(bill,100,110). wantsCoffee(mary,130,170). travelTime0(cm,office(sue),15). travelTime0(cm,office(mary),10). travelTime0(cm,office(bill),8). travelTime0(cm,office(joe),10). travelTime0(office(bill),office(sue),18). travelTime0(office(bill),office(mary),15). travelTime0(office(sue),office(mary),5). drive( StartPos, EndPos ) :- nl, write("drive, drive, drive from "), write(StartPos), write(" to "), write(EndPos), nl.