You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new style of TRACEABLE PROPOSITIONS and comprehenssive updates to adapt the new Predicate, Proposition, & Signature styles. This new framework can track a proposition through the time.
definition :: "cloth-like are wearable. cloth-like can be either clean or dirty. cloth-like are usually clean. cloth-like can be either worn in or worn out. cloth-like are usually worn out.";
32
-
}
33
-
34
-
predicates {
35
-
worn(l) :: "The {l} is worn in";
36
-
takenoff(l) :: "The {l} is worn out";
37
-
clean(l) :: "The {l} is clean";
38
-
dirty(l) :: "The {l} is dirty";
39
-
}
40
-
41
-
commands {
42
-
wear/l :: "wear {l}" :: "_wearing the {l}";
43
-
takeoff/l :: "take off {l}" :: "taking off the {l}";
44
-
45
-
clean/l :: "clean {l}" :: "cleaning the {l}";
46
-
dirty/l :: "dirty {l}" :: "dirtying the {l}";
47
-
}
48
-
49
-
code :: """
50
-
Understand the command "wear" as something new.
51
-
Understand "wear [something]" as _wearing.
52
-
_wearing is an action applying to a thing.
53
-
54
-
Carry out _wearing:
55
-
if a cloth-like (called cl) is worn out:
56
-
Now the cl is worn in;
57
-
otherwise:
58
-
Say "You have this cloth on.".
59
-
""";
60
-
}
61
-
}
1
+
# # cloth
2
+
# type l : o {
3
+
# predicates {
4
+
# worn(l);
5
+
# takenoff(l);
6
+
# clean(l);
7
+
# dirty(l);
8
+
# }
9
+
10
+
# rules {
11
+
# wear/l :: in(l, I) & takenoff(l) -> worn(l);
12
+
# takeoff/l :: worn(l) -> in(l, I) & takenoff(l);
13
+
14
+
# wash/l :: $at(l,r) & dirty(l) -> clean(l);
15
+
# dirty/l :: $worn(l,P) & clean(l) -> dirty(l);
16
+
# }
17
+
18
+
# reverse_rules {
19
+
# wear/l :: takeoff/l;
20
+
# wash/l :: dirty/l;
21
+
# }
22
+
23
+
# constraints {
24
+
# l1 :: clean(l) & dirty(l) -> fail();
25
+
# l2 :: worn(l) & takenoff(l) -> fail();
26
+
# }
27
+
28
+
# inform7 {
29
+
# type {
30
+
# kind :: "cloth-like";
31
+
# definition :: "cloth-like are wearable. cloth-like can be either clean or dirty. cloth-like are usually clean. cloth-like can be either worn in or worn out. cloth-like are usually worn out.";
32
+
# }
33
+
34
+
# predicates {
35
+
# worn(l) :: "The {l} is worn in";
36
+
# takenoff(l) :: "The {l} is worn out";
37
+
# clean(l) :: "The {l} is clean";
38
+
# dirty(l) :: "The {l} is dirty";
39
+
# }
40
+
41
+
# commands {
42
+
# wear/l :: "wear {l}" :: "_wearing the {l}";
43
+
# takeoff/l :: "take off {l}" :: "taking off the {l}";
0 commit comments