1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Antoniou1997/Dropout.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%; dealing with conflicting defaults by adding conditions
15%; to one of the conflicting rules
16%; \fullciteA[p. 56]{Antoniou:1997}
17%;
18%; @book{Antoniou:1997,
19%; author = "Grigoris Antoniou",
20%; year = "1997",
21%; title = "Nonmonotonic Reasoning",
22%; address = "Cambridge, MA",
23%; publisher = "MIT Press",
24%; }
25%;
26
27% load foundations/Root.e
28
29% load foundations/EC.e
30
31% sort x
32==> sort(x).
33
34% predicate Dropout(x)
35 % predicate(dropout(x)).
36==> mpred_prop(dropout(x),predicate).
37==> meta_argtypes(dropout(x)).
38
39% predicate Adult(x)
40 % predicate(adult(x)).
41==> mpred_prop(adult(x),predicate).
42==> meta_argtypes(adult(x)).
43
44% predicate Employed(x)
45 % predicate(employed(x)).
46==> mpred_prop(employed(x),predicate).
47==> meta_argtypes(employed(x)).
48
49% predicate Ab1(x)
50 % predicate(ab1(x)).
51==> mpred_prop(ab1(x),predicate).
52==> meta_argtypes(ab1(x)).
53
54% predicate Ab2(x)
55 % predicate(ab2(x)).
56==> mpred_prop(ab2(x),predicate).
57==> meta_argtypes(ab2(x)).
58
59% x Bill
60==> t(x,bill).
61
62
65dropout(bill).
66
67
70 71axiom(adult(X),
72 [dropout(X), not(ab1(X))]).
73
74
77 78axiom(employed(X),
79 [adult(X), not(dropout(X)), not(ab2(X))]).
80
81% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Dropout.e:41
82% range time 0 0
83% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Dropout.e:42
84==> range(time,0,0).
85
86% range offset 1 1
87% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Dropout.e:43
88==> range(offset,1,1).
89
90% completion Theta Ab1
91% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Dropout.e:45
92==> completion(theta).
93==> completion(ab1).
94
95% completion Theta Ab2
96% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Antoniou1997/Dropout.e:46
97==> completion(theta).
98==> completion(ab2).