1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Mueller2006/Chapter13/Postdiction.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% fluent Awake(agent)
31 % fluent(awake(agent)).
32==> mpred_prop(awake(agent),fluent).
33==> meta_argtypes(awake(agent)).
34
35% event WakeUp(agent)
36 % event(wakeUp(agent)).
37==> mpred_prop(wakeUp(agent),event).
38==> meta_argtypes(wakeUp(agent)).
39
40
43 44axiom(initiates(wakeUp(Agent), awake(Agent), Time),
45 []).
46
47
50 51axiom(requires(wakeUp(Agent), Time),
52 [not(holds_at(awake(Agent), Time))]).
53
54% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:30
55% agent James
56% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:31
57==> t(agent,james).
58
60next_axiom_uses(delta).
61
62
63
66axiom(happens(wakeUp(james), t),
67 [is_time(0)]).
68
69
72holds_at(awake(james),1).
73
74% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:34
75% completion Delta Happens
76% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:35
77==> completion(delta).
78==> completion(happens).
79
80% range time 0 1
81% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:37
82==> range(time,0,1).
83
84% range offset 1 1
85% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter13/Postdiction.e:38
86==>