1:- include('../ec_test_incl'). 10
11do_test(mail1) :- abdemo_special(loops,[holds_at(inRoom(p1,r2),t)],R).
12do_test(mail2) :- abdemo_special(loops,[holds_at(inRoom(p1,r3),t)],R).
13
15
16
17fluent(atRoom(agent,room)).
18fluent(inRoom(package,room)).
19
20axiom(happens(shift_pack(Agnt,P,R1,R2,R3),T1,T6),
21 [happens(go_to_room(Agnt,R1,R2),T1,T2),
22 b(T2,T3), not(clipped(T2,atRoom(Agnt,R2),T3)), not(clipped(T1,inRoom(P,R2),T3)),
23 happens(pick_up(Agnt,P),T3), b(T3,T4), happens(go_to_room(Agnt,R2,R3),T4,T5),
24 b(T5,T6), not(clipped(T3,got(Agnt,P),T6)), not(clipped(T5,atRoom(Agnt,R3),T6)),
25 happens(put_down(Agnt,P),T6)]).
26
27<-(initiates(shift_pack(Agnt,P,R1,R2,R3),inRoom(P,R3)),
28 &(atRoom(Agnt,R1),inRoom(P,R2))).
29
30
31axiom(happens(go_to_room(Agnt,R,R),T,T),[]).
32
33axiom(happens(go_to_room(Agnt,R1,R3),T1,T3),
34 [connects(D,R1,R2), towards(R2,R3,R1),
35 happens(go_to_room(Agnt,R2,R3),T2,T3), b(T1,T2), happens(go_through(Agnt,D),T1),
36 not(clipped(T1,atRoom(Agnt,R2),T2))]).
37
38axiom(happens(go_to_room(Agnt,R1,R3),T1,T3),
39 [connects(D,R1,R2), happens(go_through(Agnt,D),T1),
40 happens(go_to_room(Agnt,R2,R3),T2,T3), b(T1,T2),
41 not(clipped(T1,atRoom(Agnt,R2),T2))]).
42
43axiom(initiates(go_to_room(Agnt,R1,R2),atRoom(Agnt,R2),T),[holds_at(atRoom(Agnt,R1),T)]).
44
45
46
48
49
50axiom(initiates(pick_up(Agnt,P),got(Agnt,P),T),
51 [diff(P,robot), holds_at(inRoom(P,R),T), holds_at(atRoom(Agnt,R),T)]).
52
53axiom(releases(pick_up(Agnt,P),inRoom(P,R),T),
54 [diff(P,robot), holds_at(inRoom(P,R),T), holds_at(atRoom(Agnt,R),T)]).
55
56
57axiom(initiates(put_down(Agnt,P),inRoom(P,R),T),
58 [diff(P,robot), holds_at(got(Agnt,P),T), holds_at(atRoom(Agnt,R),T)]).
59
60axiom(terminates(put_down(Agnt,P),got(Agnt,P),T),[]).
61
62
63axiom(initiates(go_through(Agnt,D),atRoom(Agnt,R1),T),
64 [connects(D,R2,R1), holds_at(atRoom(Agnt,R2),T)]).
65
66axiom(terminates(go_through(Agnt,D),atRoom(Agnt,R),T),[holds_at(atRoom(Agnt,R),T)]).
67
68
69
70
72
73
74axiom(initially(atRoom(a1,r3)),[]).
75
76axiom(initially(neg(atRoom(a1,r1))),[]).
77
78axiom(initially(neg(atRoom(a1,r2))),[]).
79
80axiom(initially(inRoom(p1,r1)),[]).
81
82axiom(initially(neg(inRoom(p1,r2))),[]).
83
84axiom(initially(neg(inRoom(p1,r3))),[]).
85
86
87
89
90
91axiom(connects(d1,r1,r2),[]).
92
93axiom(connects(d1,r2,r1),[]).
94
95axiom(connects(d2,r2,r3),[]).
96
97axiom(connects(d2,r3,r2),[]).
98
99
101
102axiom(towards(R1,R1,R2),[]).
103
104axiom(towards(r2,r1,r3),[]).
105
106axiom(towards(r2,r3,r1),[]).
107
108
109
111
112
113abducible(dummy).
114
115
116executable(pick_up(Agnt,P)).
117
118executable(put_down(Agnt,P)).
119
120executable(go_through(Agnt,D))