1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Shanahan1997/StuffyRoom.e').
4%;
5%; Copyright (c) 2005 IBM Corporation and others.
6%; All rights reserved. This program and the accompanying materials
7%; are made available under the terms of the Common Public License v1.0
8%; which accompanies this distribution, and is available at
9%; http://www.eclipse.org/legal/cpl-v10.html
10%;
11%; Contributors:
12%; IBM - Initial implementation
13%;
14%; @article{GinsbergSmith:1988a,
15%; author = "Matthew L. Ginsberg and David E. Smith",
16%; year = "1988",
17%; title = "Reasoning about action \uppercase{I}: \uppercase{A} possible worlds approach",
18%; journal = "Artificial Intelligence",
19%; volume = "35",
20%; number = "2",
21%; pages = "165--195",
22%; }
23%;
24%; \fullciteA[pp. 288--289]{Shanahan:1997}
25%;
26%; @book{Shanahan:1997,
27%; author = "Murray Shanahan",
28%; year = "1997",
29%; title = "Solving the Frame Problem",
30%; address = "Cambridge, MA",
31%; publisher = "MIT Press",
32%; }
33%;
34%; deduction
35%;
36%; modifications from Shanahan's formulation:
37%; timestamps
38%; added:
39%; !HoldsAt(Blocked1(),0).
40%; !HoldsAt(Blocked2(),0).
41%;
42
43% load foundations/Root.e
44
45% load foundations/EC.e
46
47% event Close1()
48 % event(close1()).
49==> mpred_prop(close1(),event).
50==> meta_argtypes(close1()).
51
52% event Close2()
53 % event(close2()).
54==> mpred_prop(close2(),event).
55==> meta_argtypes(close2()).
56
57% event Start()
58 % event(start()).
59==> mpred_prop(start(),event).
60==> meta_argtypes(start()).
61
62% fluent Blocked1()
63 % fluent(blocked1()).
64==> mpred_prop(blocked1(),fluent).
65==> meta_argtypes(blocked1()).
66
67% fluent Blocked2()
68 % fluent(blocked2()).
69==> mpred_prop(blocked2(),fluent).
70==> meta_argtypes(blocked2()).
71
72% fluent Stuffy()
73 % fluent(stuffy()).
74==> mpred_prop(stuffy(),fluent).
75==> meta_argtypes(stuffy()).
76
77% noninertial Stuffy
78==> noninertial(stuffy).
79
80
83 84axiom(initiates(close1(), blocked1(), Time),
85 []).
86
87
90 91axiom(initiates(close2(), blocked2(), Time),
92 []).
93
94
99
100 105axiom(holds_at(stuffy(), Time),
106 [holds_at(blocked1(), Time), holds_at(blocked2(), Time)]).
107
108 111
112 117axiom(not(holds_at(stuffy(), Time1)),
118 [not(holds_at(blocked1(), Time1))]).
119axiom(not(holds_at(stuffy(), Time1)),
120 [not(holds_at(blocked2(), Time1))]).
121
122 125axiom(holds_at(blocked1(), Time2),
126 [holds_at(stuffy(), Time2)]).
127
128 131axiom(holds_at(blocked2(), Time3),
132 [holds_at(stuffy(), Time3)]).
133
134
137 138axiom(initiates(start(), blocked1(), Time),
139 []).
140
141
144 145axiom(terminates(start(), blocked2(), Time),
146 []).
147
148
151 152axiom(not(initially(blocked1())),
153 []).
154
155
158 159axiom(not(initially(blocked2())),
160 []).
161
162
165axiom(happens(start(), t),
166 [is_time(0)]).
167
168
171axiom(happens(close2(), start),
172 [is_time(1), b(t, start), ignore(t+1=start)]).
173
174% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/StuffyRoom.e:65
175% completion Happens
176% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/StuffyRoom.e:66
177==> completion(happens).
178
179% range time 0 2
180% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/StuffyRoom.e:68
181==> range(time,0,2).
182
183% range offset 1 1
184% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/StuffyRoom.e:69
185==> range(offset,1,1).