1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Antoniou1997/Student.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%; conflicting defaults: method (D)
15%; \fullciteA[p. 157]{Antoniou:1997}
16%;
17%; @book{Antoniou:1997,
18%; author = "Grigoris Antoniou",
19%; year = "1997",
20%; title = "Nonmonotonic Reasoning",
21%; address = "Cambridge, MA",
22%; publisher = "MIT Press",
23%; }
24%;
25
26% load foundations/Root.e
27
28% load foundations/EC.e
29
30% sort x
31==> sort(x).
32
33% predicate Adult(x)
34 % predicate(adult(x)).
35==> mpred_prop(adult(x),predicate).
36==> meta_argtypes(adult(x)).
37
38% predicate Student(x)
39 % predicate(student(x)).
40==> mpred_prop(student(x),predicate).
41==> meta_argtypes(student(x)).
42
43% predicate Employed(x)
44 % predicate(employed(x)).
45==> mpred_prop(employed(x),predicate).
46==> meta_argtypes(employed(x)).
47
48% predicate Ab1(x)
49 % predicate(ab1(x)).
50==> mpred_prop(ab1(x),predicate).
51==> meta_argtypes(ab1(x)).
52
53% predicate Ab2(x)
54 % predicate(ab2(x)).
55==> mpred_prop(ab2(x),predicate).
56==> meta_argtypes(ab2(x)).
57
58% x Mary
59==> t(x,mary).
60
61
64student(mary).
65
66
69 70axiom(employed(X),
71 [adult(X), not(ab1(X))]).
72
73
76 77axiom(not(employed(X)),
78 [student(X), not(ab2(X))]).
79
80
83 84axiom(adult(X),
85 [student(X)]).
86
89next_axiom_uses(theta).
90
91
92
95 96axiom(ab1(X),
97 [student(X)]).
98
99% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Student.e:42
100% range time 0 0
101% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Student.e:43
102==> range(time,0,0).
103
104% range offset 1 1
105% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Student.e:44
106==> range(offset,1,1).
107
108% completion Theta Ab1
109% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Student.e:46
110==> completion(theta).
111==> completion(ab1).
112
113% completion Theta Ab2
114% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Student.e:47
115==> completion(theta).
116==> completion(ab2).