5
6event(go_to(_,_)).
7inputEntity(go_to(_,_)).
8index(go_to(Person,_), Person).
9
10event(lose_wallet(_)).
11inputEntity(lose_wallet(_)).
12index(lose_wallet(Person), Person).
13
14event(win_lottery(_)).
15inputEntity(win_lottery(_)).
16index(win_lottery(Person), Person).
17
18simpleFluent(location(_)=home).
19outputEntity(location(_)=home).
20index(location(Person)=home, Person).
21
22simpleFluent(location(_)=pub).
23outputEntity(location(_)=pub).
24index(location(Person)=pub, Person).
25
26simpleFluent(location(_)=work).
27outputEntity(location(_)=work).
28index(location(Person)=work, Person).
29
30simpleFluent(rich(_)=true).
31outputEntity(rich(_)=true).
32index(rich(Person)=true, Person).
33
34simpleFluent(rich(_)=false).
35outputEntity(rich(_)=false).
36index(rich(Person)=false, Person).
37
38sDFluent(happy(_)=true).
39outputEntity(happy(_)=true).
40index(happy(Person)=true, Person).
41
42sDFluent(happy(_)=false).
43outputEntity(happy(_)=false).
44index(happy(Person)=false, Person).
45
48
49grounding(location(Person)=Place) :- person(Person), place(Place).
50grounding(rich(Person)=true) :- person(Person).
51grounding(rich(Person)=false) :- person(Person).
52grounding(happy(Person)=true) :- person(Person).
53grounding(happy(Person)=false) :- person(Person).
54
56
57cachingOrder(location(_)=home).
58cachingOrder(location(_)=pub).
59cachingOrder(location(_)=work).
60cachingOrder(rich(_)=true).
61cachingOrder(rich(_)=false).
62cachingOrder(happy(_)=true).
63cachingOrder(happy(_)=false)