1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/MillerShanahan2002/Bowl.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%; \fullciteA[p. 461]{MillerShanahan:2002}
15%;
16%; @incollection{MillerShanahan:2002,
17%; author = "Rob Miller and Murray Shanahan",
18%; year = "2002",
19%; title = "Some alternative formulations of the event calculus",
20%; editor = "Antonis C. Kakas and Fariba Sadri",
21%; booktitle = "Computational Logic: Logic Programming and Beyond: Essays in Honour of \uppercase{R}obert \uppercase{A}. \uppercase{K}owalski, Part \uppercase{II}",
22%; series = "Lecture Notes in Computer Science",
23%; volume = "2408",
24%; pages = "452--490",
25%; address = "Berlin",
26%; publisher = "Springer",
27%; }
28%;
29
30% load foundations/Root.e
31
32% load foundations/EC.e
33
34% event LiftLeft()
35 % event(liftLeft()).
36==> mpred_prop(liftLeft(),event).
37==> meta_argtypes(liftLeft()).
38
39% event LiftRight()
40 % event(liftRight()).
41==> mpred_prop(liftRight(),event).
42==> meta_argtypes(liftRight()).
43
44% fluent Spilt()
45 % fluent(spilt()).
46==> mpred_prop(spilt(),fluent).
47==> meta_argtypes(spilt()).
48
49% fluent Raised()
50 % fluent(raised()).
51==> mpred_prop(raised(),fluent).
52==> meta_argtypes(raised()).
53
54
60axiom(initiates(liftLeft(), spilt(), Time),
61 [not(happens(liftRight(), Time))]).
62
63
69axiom(initiates(liftRight(), spilt(), Time),
70 [not(happens(liftLeft(), Time))]).
71
72
78axiom(requires(liftLeft(), Time),
79 [initiates(liftRight(), raised(), Time)]).
80
81
84 85axiom(not(initially(spilt())),
86 []).
87
88
91 92axiom(not(initially(raised())),
93 []).
94
95
98axiom(happens(liftLeft(), t2),
99 [is_time(2), b(t, t2), ignore(t+2=t2)]).
100
101
104axiom(happens(liftRight(), t2),
105 [is_time(2), b(t, t2), ignore(t+2=t2)]).
106
107% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/MillerShanahan2002/Bowl.e:51
108% completion Happens
109% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/MillerShanahan2002/Bowl.e:52
110==> completion(happens).
111
112% range time 0 3
113% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/MillerShanahan2002/Bowl.e:54
114==> range(time,0,3).
115
116% range offset 1 1
117% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/MillerShanahan2002/Bowl.e:55
118==> range(offset,1,1).