-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathTQG26.kif.tq
154 lines (142 loc) · 3.77 KB
/
TQG26.kif.tq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
(note TQG26) ;; boolean version
;; case elimination.
(time 300)
(instance Planet26-1 Class)
(subclass Planet26-1 AstronomicalBody)
(=>
(instance ?P Planet26-1)
(or
(attribute ?P Solid)
(attribute ?P Gaseous)))
(=>
(instance ?P Planet26-1)
(or
(attribute ?P Earthlike)
(attribute ?P HostileToEarthLife)))
(=>
(and
(instance ?X Planet26-1)
(attribute ?X Gaseous))
(not (attribute ?X Earthlike)))
(instance Object26-1 Planet26-1)
(not (attribute Object26-1 Solid))
(query (attribute Object26-1 HostileToEarthLife))
(answer yes)
;; Answer 1. [yes]
;; 1. (instance Object26-1 Planet26-1) [KB]
;; 2. (instance Object26-1 Planet26-1) 1
;; 3. (subclass Planet26-1 AstronomicalBody) [KB]
;; 4. (subclass Planet26-1 AstronomicalBody) 3
;; 5. (=>
;; (subclass ?X403 ?X404)
;; (and
;; (instance ?X403 SetOrClass)
;; (instance ?X404 SetOrClass))) [KB]
;; 6. (or
;; (instance ?X1 SetOrClass)
;; (not
;; (subclass ?X0 ?X1))) 5
;; 7. (or
;; (instance ?X0 SetOrClass)
;; (not
;; (subclass ?X0 ?X1))) 5
;; 8. (=>
;; (and
;; (instance ?X403 SetOrClass)
;; (instance ?X404 SetOrClass))
;; (=>
;; (and
;; (subclass ?X403 ?X404)
;; (instance ?X405 ?X403))
;; (instance ?X405 ?X404))) [KB]
;; 9. (or
;; (instance ?X2 ?X1)
;; (not
;; (instance ?X2 ?X0))
;; (not
;; (subclass ?X0 ?X1))
;; (not
;; (instance ?X1 SetOrClass))
;; (not
;; (instance ?X0 SetOrClass))) 8
;; 10. (or
;; (not
;; (subclass ?X0 ?X1))
;; (not
;; (instance ?X2 ?X0))
;; (instance ?X2 ?X1)) 6 7 9
;; 11. (or
;; (not
;; (instance ?X0 Planet26-1))
;; (instance ?X0 AstronomicalBody)) 4 10
;; 12. (instance Object26-1 AstronomicalBody) 2 11
;; 13. (not
;; (attribute Object26-1 Solid)) [KB]
;; 14. (not
;; (attribute Object26-1 Solid)) 13
;; 15. (=>
;; (instance ?X310 Object)
;; (=>
;; (instance ?X310 Planet26-1)
;; (or
;; (attribute ?X310 Solid)
;; (attribute ?X310 Gaseous)))) [KB]
;; 16. (or
;; (attribute ?X0 Gaseous)
;; (attribute ?X0 Solid)
;; (not
;; (instance ?X0 Planet26-1))
;; (not
;; (instance ?X0 Object))) 15
;; 17. (or
;; (attribute Object26-1 Gaseous)
;; (not
;; (instance Object26-1 Object))) 2 14 16
;; 18. (=>
;; (instance ?X403 Object)
;; (=>
;; (and
;; (instance ?X403 Planet26-1)
;; (attribute ?X403 Gaseous))
;; (not
;; (attribute ?X403 Earthlike)))) [KB]
;; 19. (or
;; (not
;; (attribute ?X0 Earthlike))
;; (not
;; (attribute ?X0 Gaseous))
;; (not
;; (instance ?X0 Planet26-1))
;; (not
;; (instance ?X0 Object))) 18
;; 20. (not
;; (attribute Object26-1 HostileToEarthLife)) [Negated Query]
;; 21. (not
;; (attribute Object26-1 HostileToEarthLife)) 20
;; 22. (=>
;; (instance ?X310 Object)
;; (=>
;; (instance ?X310 Planet26-1)
;; (or
;; (attribute ?X310 Earthlike)
;; (attribute ?X310 HostileToEarthLife)))) [KB]
;; 23. (or
;; (attribute ?X0 HostileToEarthLife)
;; (attribute ?X0 Earthlike)
;; (not
;; (instance ?X0 Planet26-1))
;; (not
;; (instance ?X0 Object))) 22
;; 24. (or
;; (attribute Object26-1 Earthlike)
;; (not
;; (instance Object26-1 Object))) 2 21 23
;; 25. (not
;; (instance Object26-1 Object)) 17 2 19 24
;; 26. (subclass AstronomicalBody Object) [KB]
;; 27. (subclass AstronomicalBody Object) 26
;; 28. (or
;; (instance ?X0 Object)
;; (not
;; (instance ?X0 AstronomicalBody))) 27 10
;; 29. True 12 25 28