1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Mueller2006/Chapter8/PatHeadRubStomach.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%; @book{Mueller:2006,
15%; author = "Erik T. Mueller",
16%; year = "2006",
17%; title = "Commonsense Reasoning",
18%; address = "San Francisco",
19%; publisher = "Morgan Kaufmann/Elsevier",
20%; }
21%;
22
23% load foundations/Root.e
24
25% load foundations/EC.e
26
27% sort agent
28==> sort(agent).
29
30% event PatHead(agent)
31 % event(patHead(agent)).
32==> mpred_prop(patHead(agent),event).
33==> meta_argtypes(patHead(agent)).
34
35% event RubStomach(agent)
36 % event(rubStomach(agent)).
37==> mpred_prop(rubStomach(agent),event).
38==> meta_argtypes(rubStomach(agent)).
39
40% agent Nathan
41==> t(agent,nathan).
46axiom(not(happens(rubStomach(Agent), Time)),
47 [happens(patHead(Agent), Time)]).
48
49
52
53 56axiom(happens(patHead(nathan), t),
57 [is_time(0)]).
58axiom(happens(rubStomach(nathan), t),
59 [is_time(0)]).
60
61% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter8/PatHeadRubStomach.e:37
62% range time 0 1
63% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter8/PatHeadRubStomach.e:38
64==> range(time,0,1).
65
66% range offset 1 1
67% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter8/PatHeadRubStomach.e:39
68==> range(offset,1,1).