2:- include('../ec_test_incl'). 3
8
10
11do_test(num_cakes(0)).
12do_test(num_cakes(1)).
13
14do_test(G) :- G= neg(num_cakes(0)), abdemo_solve(G,R).
15do_test(G) :- G= neg(num_cakes(1)), abdemo_solve(G,R).
16
17do_test(G) :- G= eat_cakes(0), abdemo_solve(G,R).
18do_test(G) :- G= eat_cakes(1), abdemo_solve(G,R).
19
22
23do_test(G) :- G= {eat_cakes(1),num_cakes(0)}, abdemo_solve(G,R).
24
25do_test(G) :- G= {happens(eat_cakes(1),now),holds_at(num_cakes(1),start)}, abdemo_solve(G,R).
26
27do_test(G) :- G= {happens(eat_cakes(1),now),holds_at(num_cakes(1),now-1)}, abdemo_solve(G,R).
28
29do_test(G) :- G= {happens(eat_cakes(1),now),holds_at(num_cakes(0),aft)}, abdemo_solve(G,R).
30
33fluent(num_cakes(integer)).
34
35
36axiom(initially(hypothesizing(num_cakes(1))),[]).
37axiom(initially(hypothesizing(num_cakes(0))),[]).
38
39axiom(initially(num_cakes(1))).
40
41axiom(initiates(eat_cakes(1),num_cakes(0),T), [holds_at(num_cakes(1),T)]).
42axiom(terminates(eat_cakes(1),num_cakes(N),T), [holds_at(num_cakes(N),T)]).
43
46
49
50axiom(initiates(imagine_initiates(Propostion),Propostion,T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
51axiom(initiates(imagine_terminates(Propostion),neg(Propostion),T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
52axiom(initiates(imagine_initiates(neg(Propostion)),neg(Propostion),T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
53axiom(initiates(imagine_terminates(neg(Propostion)),Propostion,T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
54
55axiom(terminates(imagine_initiates(Propostion),neg(Propostion),T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
56axiom(terminates(imagine_terminates(Propostion),Propostion,T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
57axiom(terminates(imagine_initiates(neg(Propostion)),Propostion,T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
58axiom(terminates(imagine_terminates(neg(Propostion)),neg(Propostion),T), [holds_at(hypothesizingAboutTruth(Propostion),T)]).
59
65
66axiom(holds_at(num_cakes(0),T),
67 [holds_at(neg(num_cakes(1)),T)]).
68
69axiom(holds_at(neg(num_cakes(0)),T),
70 [holds_at(num_cakes(1),T)]).
80
81abducible(dummy).
82
83executable(imagine_terminates(_)).
84executable(imagine_initiates(_)).
86executable(eat_cakes(_)).