eyelang 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,158 @@
1
+ status(test1, policy_passed).
2
+ why(
3
+ status(test1, policy_passed),
4
+ proof(
5
+ goal(status(test1, policy_passed)),
6
+ by(rule("access-control-policy.pl", clause(18))),
7
+ uses([
8
+ proof(
9
+ goal(passes_policy(test1, policy_x)),
10
+ by(rule("access-control-policy.pl", clause(16))),
11
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
12
+ uses([
13
+ proof(
14
+ goal(passes_all_of(test1, policy_x)),
15
+ by(rule("access-control-policy.pl", clause(13))),
16
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
17
+ uses([
18
+ proof(
19
+ goal(policy_request(test1, policy_x)),
20
+ by(fact("access-control-policy.pl", clause(4)))
21
+ ),
22
+ proof(
23
+ goal(policy(policy_x)),
24
+ by(fact("access-control-policy.pl", clause(8)))
25
+ ),
26
+ proof(
27
+ goal(not((allOf(policy_x, Claim), not(has(test1, Claim))))),
28
+ by(builtin(not, 1))
29
+ )
30
+ ])
31
+ ),
32
+ proof(
33
+ goal(passes_any_of(test1, policy_x)),
34
+ by(rule("access-control-policy.pl", clause(14))),
35
+ bindings([binding("Request", test1), binding("Policy", policy_x), binding("Claim", claim_c)]),
36
+ uses([
37
+ proof(
38
+ goal(policy_request(test1, policy_x)),
39
+ by(fact("access-control-policy.pl", clause(4)))
40
+ ),
41
+ proof(
42
+ goal(policy(policy_x)),
43
+ by(fact("access-control-policy.pl", clause(8)))
44
+ ),
45
+ proof(
46
+ goal(anyOf(policy_x, claim_c)),
47
+ by(fact("access-control-policy.pl", clause(11)))
48
+ ),
49
+ proof(
50
+ goal(has(test1, claim_c)),
51
+ by(fact("access-control-policy.pl", clause(7)))
52
+ )
53
+ ])
54
+ ),
55
+ proof(
56
+ goal(passes_none_of(test1, policy_x)),
57
+ by(rule("access-control-policy.pl", clause(15))),
58
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
59
+ uses([
60
+ proof(
61
+ goal(policy_request(test1, policy_x)),
62
+ by(fact("access-control-policy.pl", clause(4)))
63
+ ),
64
+ proof(
65
+ goal(policy(policy_x)),
66
+ by(fact("access-control-policy.pl", clause(8)))
67
+ ),
68
+ proof(
69
+ goal(not((noneOf(policy_x, Claim), has(test1, Claim)))),
70
+ by(builtin(not, 1))
71
+ )
72
+ ])
73
+ )
74
+ ])
75
+ )
76
+ ])
77
+ )
78
+ ).
79
+
80
+ reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present").
81
+ why(
82
+ reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present"),
83
+ proof(
84
+ goal(reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present")),
85
+ by(rule("access-control-policy.pl", clause(19))),
86
+ uses([
87
+ proof(
88
+ goal(passes_policy(test1, policy_x)),
89
+ by(rule("access-control-policy.pl", clause(16))),
90
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
91
+ uses([
92
+ proof(
93
+ goal(passes_all_of(test1, policy_x)),
94
+ by(rule("access-control-policy.pl", clause(13))),
95
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
96
+ uses([
97
+ proof(
98
+ goal(policy_request(test1, policy_x)),
99
+ by(fact("access-control-policy.pl", clause(4)))
100
+ ),
101
+ proof(
102
+ goal(policy(policy_x)),
103
+ by(fact("access-control-policy.pl", clause(8)))
104
+ ),
105
+ proof(
106
+ goal(not((allOf(policy_x, Claim), not(has(test1, Claim))))),
107
+ by(builtin(not, 1))
108
+ )
109
+ ])
110
+ ),
111
+ proof(
112
+ goal(passes_any_of(test1, policy_x)),
113
+ by(rule("access-control-policy.pl", clause(14))),
114
+ bindings([binding("Request", test1), binding("Policy", policy_x), binding("Claim", claim_c)]),
115
+ uses([
116
+ proof(
117
+ goal(policy_request(test1, policy_x)),
118
+ by(fact("access-control-policy.pl", clause(4)))
119
+ ),
120
+ proof(
121
+ goal(policy(policy_x)),
122
+ by(fact("access-control-policy.pl", clause(8)))
123
+ ),
124
+ proof(
125
+ goal(anyOf(policy_x, claim_c)),
126
+ by(fact("access-control-policy.pl", clause(11)))
127
+ ),
128
+ proof(
129
+ goal(has(test1, claim_c)),
130
+ by(fact("access-control-policy.pl", clause(7)))
131
+ )
132
+ ])
133
+ ),
134
+ proof(
135
+ goal(passes_none_of(test1, policy_x)),
136
+ by(rule("access-control-policy.pl", clause(15))),
137
+ bindings([binding("Request", test1), binding("Policy", policy_x)]),
138
+ uses([
139
+ proof(
140
+ goal(policy_request(test1, policy_x)),
141
+ by(fact("access-control-policy.pl", clause(4)))
142
+ ),
143
+ proof(
144
+ goal(policy(policy_x)),
145
+ by(fact("access-control-policy.pl", clause(8)))
146
+ ),
147
+ proof(
148
+ goal(not((noneOf(policy_x, Claim), has(test1, Claim)))),
149
+ by(builtin(not, 1))
150
+ )
151
+ ])
152
+ )
153
+ ])
154
+ )
155
+ ])
156
+ )
157
+ ).
158
+
@@ -0,0 +1,208 @@
1
+ evidenceTotal(case, 0.0016436300000000003).
2
+ why(
3
+ evidenceTotal(case, 0.0016436300000000003),
4
+ proof(
5
+ goal(evidenceTotal(case, 0.0016436300000000003)),
6
+ by(rule("bayes-diagnosis.pl", clause(52))),
7
+ bindings([binding("Total", 0.0016436300000000003)]),
8
+ uses([
9
+ proof(
10
+ goal(total_score_decimal(0.0016436300000000003)),
11
+ by(fact("bayes-diagnosis.pl", clause(46)))
12
+ )
13
+ ])
14
+ )
15
+ ).
16
+
17
+ result(case, result(covid19)).
18
+ why(
19
+ result(case, result(covid19)),
20
+ proof(
21
+ goal(result(case, result(covid19))),
22
+ by(rule("bayes-diagnosis.pl", clause(53))),
23
+ bindings([binding("Disease", covid19)]),
24
+ uses([
25
+ proof(
26
+ goal(disease(covid19)),
27
+ by(fact("bayes-diagnosis.pl", clause(7)))
28
+ )
29
+ ])
30
+ )
31
+ ).
32
+
33
+ result(case, result(influenza)).
34
+ why(
35
+ result(case, result(influenza)),
36
+ proof(
37
+ goal(result(case, result(influenza))),
38
+ by(rule("bayes-diagnosis.pl", clause(53))),
39
+ bindings([binding("Disease", influenza)]),
40
+ uses([
41
+ proof(
42
+ goal(disease(influenza)),
43
+ by(fact("bayes-diagnosis.pl", clause(8)))
44
+ )
45
+ ])
46
+ )
47
+ ).
48
+
49
+ result(case, result(allergicRhinitis)).
50
+ why(
51
+ result(case, result(allergicRhinitis)),
52
+ proof(
53
+ goal(result(case, result(allergicRhinitis))),
54
+ by(rule("bayes-diagnosis.pl", clause(53))),
55
+ bindings([binding("Disease", allergicRhinitis)]),
56
+ uses([
57
+ proof(
58
+ goal(disease(allergicRhinitis)),
59
+ by(fact("bayes-diagnosis.pl", clause(9)))
60
+ )
61
+ ])
62
+ )
63
+ ).
64
+
65
+ result(case, result(bacterialPneumonia)).
66
+ why(
67
+ result(case, result(bacterialPneumonia)),
68
+ proof(
69
+ goal(result(case, result(bacterialPneumonia))),
70
+ by(rule("bayes-diagnosis.pl", clause(53))),
71
+ bindings([binding("Disease", bacterialPneumonia)]),
72
+ uses([
73
+ proof(
74
+ goal(disease(bacterialPneumonia)),
75
+ by(fact("bayes-diagnosis.pl", clause(10)))
76
+ )
77
+ ])
78
+ )
79
+ ).
80
+
81
+ disease(result(covid19), covid19).
82
+ why(
83
+ disease(result(covid19), covid19),
84
+ proof(
85
+ goal(disease(result(covid19), covid19)),
86
+ by(rule("bayes-diagnosis.pl", clause(54))),
87
+ bindings([binding("Disease", covid19)]),
88
+ uses([
89
+ proof(
90
+ goal(disease(covid19)),
91
+ by(fact("bayes-diagnosis.pl", clause(7)))
92
+ )
93
+ ])
94
+ )
95
+ ).
96
+
97
+ disease(result(influenza), influenza).
98
+ why(
99
+ disease(result(influenza), influenza),
100
+ proof(
101
+ goal(disease(result(influenza), influenza)),
102
+ by(rule("bayes-diagnosis.pl", clause(54))),
103
+ bindings([binding("Disease", influenza)]),
104
+ uses([
105
+ proof(
106
+ goal(disease(influenza)),
107
+ by(fact("bayes-diagnosis.pl", clause(8)))
108
+ )
109
+ ])
110
+ )
111
+ ).
112
+
113
+ disease(result(allergicRhinitis), allergicRhinitis).
114
+ why(
115
+ disease(result(allergicRhinitis), allergicRhinitis),
116
+ proof(
117
+ goal(disease(result(allergicRhinitis), allergicRhinitis)),
118
+ by(rule("bayes-diagnosis.pl", clause(54))),
119
+ bindings([binding("Disease", allergicRhinitis)]),
120
+ uses([
121
+ proof(
122
+ goal(disease(allergicRhinitis)),
123
+ by(fact("bayes-diagnosis.pl", clause(9)))
124
+ )
125
+ ])
126
+ )
127
+ ).
128
+
129
+ disease(result(bacterialPneumonia), bacterialPneumonia).
130
+ why(
131
+ disease(result(bacterialPneumonia), bacterialPneumonia),
132
+ proof(
133
+ goal(disease(result(bacterialPneumonia), bacterialPneumonia)),
134
+ by(rule("bayes-diagnosis.pl", clause(54))),
135
+ bindings([binding("Disease", bacterialPneumonia)]),
136
+ uses([
137
+ proof(
138
+ goal(disease(bacterialPneumonia)),
139
+ by(fact("bayes-diagnosis.pl", clause(10)))
140
+ )
141
+ ])
142
+ )
143
+ ).
144
+
145
+ unnormalized(result(covid19), 0.0015470000000000002).
146
+ why(
147
+ unnormalized(result(covid19), 0.0015470000000000002),
148
+ proof(
149
+ goal(unnormalized(result(covid19), 0.0015470000000000002)),
150
+ by(rule("bayes-diagnosis.pl", clause(55))),
151
+ bindings([binding("Disease", covid19), binding("Score", 0.0015470000000000002)]),
152
+ uses([
153
+ proof(
154
+ goal(score_decimal(covid19, 0.0015470000000000002)),
155
+ by(fact("bayes-diagnosis.pl", clause(42)))
156
+ )
157
+ ])
158
+ )
159
+ ).
160
+
161
+ unnormalized(result(influenza), 0.000048000000000000015).
162
+ why(
163
+ unnormalized(result(influenza), 0.000048000000000000015),
164
+ proof(
165
+ goal(unnormalized(result(influenza), 0.000048000000000000015)),
166
+ by(rule("bayes-diagnosis.pl", clause(55))),
167
+ bindings([binding("Disease", influenza), binding("Score", 0.000048000000000000015)]),
168
+ uses([
169
+ proof(
170
+ goal(score_decimal(influenza, 0.000048000000000000015)),
171
+ by(fact("bayes-diagnosis.pl", clause(43)))
172
+ )
173
+ ])
174
+ )
175
+ ).
176
+
177
+ unnormalized(result(allergicRhinitis), 7.499999999999999e-7).
178
+ why(
179
+ unnormalized(result(allergicRhinitis), 7.499999999999999e-7),
180
+ proof(
181
+ goal(unnormalized(result(allergicRhinitis), 7.499999999999999e-7)),
182
+ by(rule("bayes-diagnosis.pl", clause(55))),
183
+ bindings([binding("Disease", allergicRhinitis), binding("Score", 7.499999999999999e-7)]),
184
+ uses([
185
+ proof(
186
+ goal(score_decimal(allergicRhinitis, 7.499999999999999e-7)),
187
+ by(fact("bayes-diagnosis.pl", clause(44)))
188
+ )
189
+ ])
190
+ )
191
+ ).
192
+
193
+ unnormalized(result(bacterialPneumonia), 0.000047879999999999996).
194
+ why(
195
+ unnormalized(result(bacterialPneumonia), 0.000047879999999999996),
196
+ proof(
197
+ goal(unnormalized(result(bacterialPneumonia), 0.000047879999999999996)),
198
+ by(rule("bayes-diagnosis.pl", clause(55))),
199
+ bindings([binding("Disease", bacterialPneumonia), binding("Score", 0.000047879999999999996)]),
200
+ uses([
201
+ proof(
202
+ goal(score_decimal(bacterialPneumonia, 0.000047879999999999996)),
203
+ by(fact("bayes-diagnosis.pl", clause(45)))
204
+ )
205
+ ])
206
+ )
207
+ ).
208
+
@@ -0,0 +1,78 @@
1
+ dataGraph(association, skolem_g0).
2
+ why(
3
+ dataGraph(association, skolem_g0),
4
+ proof(
5
+ goal(dataGraph(association, skolem_g0)),
6
+ by(rule("context-association.pl", clause(9))),
7
+ uses([
8
+ proof(
9
+ goal(context_statement(skolem_g0, bob, foaf_name, "Bob")),
10
+ by(rule("context-association.pl", clause(8))),
11
+ bindings([binding("ContextName", skolem_g0), binding("Subject", bob), binding("Predicate", foaf_name), binding("Object", "Bob"), binding("Context", foaf_name(bob, "Bob"))]),
12
+ uses([
13
+ proof(
14
+ goal(log_nameOf(skolem_g0, foaf_name(bob, "Bob"))),
15
+ by(fact("context-association.pl", clause(5)))
16
+ ),
17
+ proof(
18
+ goal(holds(foaf_name(bob, "Bob"), foaf_name, [bob, "Bob"])),
19
+ by(builtin(holds, 3))
20
+ )
21
+ ])
22
+ )
23
+ ])
24
+ )
25
+ ).
26
+
27
+ signatureGraph(association, skolem_g1).
28
+ why(
29
+ signatureGraph(association, skolem_g1),
30
+ proof(
31
+ goal(signatureGraph(association, skolem_g1)),
32
+ by(rule("context-association.pl", clause(10))),
33
+ uses([
34
+ proof(
35
+ goal(context_statement(skolem_g1, skolem_g0, sec_proof, dataSignature)),
36
+ by(rule("context-association.pl", clause(8))),
37
+ bindings([binding("ContextName", skolem_g1), binding("Subject", skolem_g0), binding("Predicate", sec_proof), binding("Object", dataSignature), binding("Context", (sec_proof(skolem_g0, dataSignature), type(signature1, sec_DataIntegrityProof), sec_cryptosuite(signature1, "ecdsa-proof-2019"), sec_created(signature1, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature1, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature1, "assertionMethod"), sec_proofValue(signature1, "z58DAdFfa9SkqZMVPxAQp...jQCrfFPP2oumHKtz"), sec_issuer(signature1, university), sec_validFrom(signature1, "2024-04-03T00:00:00.000Z"), sec_validUntil(signature1, "2025-04-03T00:00:00.000Z")))]),
38
+ uses([
39
+ proof(
40
+ goal(log_nameOf(skolem_g1, (sec_proof(skolem_g0, dataSignature), type(signature1, sec_DataIntegrityProof), sec_cryptosuite(signature1, "ecdsa-proof-2019"), sec_created(signature1, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature1, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature1, "assertionMethod"), sec_proofValue(signature1, "z58DAdFfa9SkqZMVPxAQp...jQCrfFPP2oumHKtz"), sec_issuer(signature1, university), sec_validFrom(signature1, "2024-04-03T00:00:00.000Z"), sec_validUntil(signature1, "2025-04-03T00:00:00.000Z")))),
41
+ by(fact("context-association.pl", clause(6)))
42
+ ),
43
+ proof(
44
+ goal(holds((sec_proof(skolem_g0, dataSignature), type(signature1, sec_DataIntegrityProof), sec_cryptosuite(signature1, "ecdsa-proof-2019"), sec_created(signature1, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature1, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature1, "assertionMethod"), sec_proofValue(signature1, "z58DAdFfa9SkqZMVPxAQp...jQCrfFPP2oumHKtz"), sec_issuer(signature1, university), sec_validFrom(signature1, "2024-04-03T00:00:00.000Z"), sec_validUntil(signature1, "2025-04-03T00:00:00.000Z")), sec_proof, [skolem_g0, dataSignature])),
45
+ by(builtin(holds, 3))
46
+ )
47
+ ])
48
+ )
49
+ ])
50
+ )
51
+ ).
52
+
53
+ metadataGraph(association, g3).
54
+ why(
55
+ metadataGraph(association, g3),
56
+ proof(
57
+ goal(metadataGraph(association, g3)),
58
+ by(rule("context-association.pl", clause(11))),
59
+ uses([
60
+ proof(
61
+ goal(context_statement(g3, skolem_g1, sec_proof, signature2)),
62
+ by(rule("context-association.pl", clause(8))),
63
+ bindings([binding("ContextName", g3), binding("Subject", skolem_g1), binding("Predicate", sec_proof), binding("Object", signature2), binding("Context", (sec_proof(skolem_g1, signature2), type(signature2, sec_DataIntegrityProof), sec_cryptosuite(signature2, "ecdsa-proof-2019"), sec_created(signature2, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature2, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature2, "assertionMethod"), sec_proofValue(signature2, "adad123efv434r5200...dqed2t44v43das")))]),
64
+ uses([
65
+ proof(
66
+ goal(log_nameOf(g3, (sec_proof(skolem_g1, signature2), type(signature2, sec_DataIntegrityProof), sec_cryptosuite(signature2, "ecdsa-proof-2019"), sec_created(signature2, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature2, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature2, "assertionMethod"), sec_proofValue(signature2, "adad123efv434r5200...dqed2t44v43das")))),
67
+ by(fact("context-association.pl", clause(7)))
68
+ ),
69
+ proof(
70
+ goal(holds((sec_proof(skolem_g1, signature2), type(signature2, sec_DataIntegrityProof), sec_cryptosuite(signature2, "ecdsa-proof-2019"), sec_created(signature2, "2021-11-13T18:19:39Z"), sec_verificationMethod(signature2, "https://university.example/issuers/14#key-1"), sec_proofPurpose(signature2, "assertionMethod"), sec_proofValue(signature2, "adad123efv434r5200...dqed2t44v43das")), sec_proof, [skolem_g1, signature2])),
71
+ by(builtin(holds, 3))
72
+ )
73
+ ])
74
+ )
75
+ ])
76
+ )
77
+ ).
78
+
@@ -0,0 +1,109 @@
1
+ violation(alice, missed_obligation(obtain_consent)).
2
+ why(
3
+ violation(alice, missed_obligation(obtain_consent)),
4
+ proof(
5
+ goal(violation(alice, missed_obligation(obtain_consent))),
6
+ by(rule("deontic-logic.pl", clause(14))),
7
+ bindings([binding("Actor", alice), binding("Action", obtain_consent)]),
8
+ uses([
9
+ proof(
10
+ goal(obliged(alice, obtain_consent)),
11
+ by(fact("deontic-logic.pl", clause(7)))
12
+ ),
13
+ proof(
14
+ goal(not_performed(alice, obtain_consent)),
15
+ by(fact("deontic-logic.pl", clause(12)))
16
+ )
17
+ ])
18
+ )
19
+ ).
20
+
21
+ violation(alice, prohibited_action(share_record)).
22
+ why(
23
+ violation(alice, prohibited_action(share_record)),
24
+ proof(
25
+ goal(violation(alice, prohibited_action(share_record))),
26
+ by(rule("deontic-logic.pl", clause(15))),
27
+ bindings([binding("Actor", alice), binding("Action", share_record)]),
28
+ uses([
29
+ proof(
30
+ goal(prohibited(alice, share_record)),
31
+ by(fact("deontic-logic.pl", clause(8)))
32
+ ),
33
+ proof(
34
+ goal(performed(alice, share_record)),
35
+ by(fact("deontic-logic.pl", clause(10)))
36
+ )
37
+ ])
38
+ )
39
+ ).
40
+
41
+ compensation(alice, compensation(share_record, notify_dpo)).
42
+ why(
43
+ compensation(alice, compensation(share_record, notify_dpo)),
44
+ proof(
45
+ goal(compensation(alice, compensation(share_record, notify_dpo))),
46
+ by(rule("deontic-logic.pl", clause(19))),
47
+ bindings([binding("Actor", alice), binding("Action", share_record), binding("Compensation", notify_dpo)]),
48
+ uses([
49
+ proof(
50
+ goal(compensated_violation(alice, share_record, notify_dpo)),
51
+ by(rule("deontic-logic.pl", clause(16))),
52
+ bindings([binding("Actor", alice), binding("Action", share_record), binding("Compensation", notify_dpo)]),
53
+ uses([
54
+ proof(
55
+ goal(prohibited(alice, share_record)),
56
+ by(fact("deontic-logic.pl", clause(8)))
57
+ ),
58
+ proof(
59
+ goal(performed(alice, share_record)),
60
+ by(fact("deontic-logic.pl", clause(10)))
61
+ ),
62
+ proof(
63
+ goal(compensates(share_record, notify_dpo)),
64
+ by(fact("deontic-logic.pl", clause(9)))
65
+ ),
66
+ proof(
67
+ goal(performed(alice, notify_dpo)),
68
+ by(fact("deontic-logic.pl", clause(11)))
69
+ )
70
+ ])
71
+ )
72
+ ])
73
+ )
74
+ ).
75
+
76
+ status(alice, requires_review).
77
+ why(
78
+ status(alice, requires_review),
79
+ proof(
80
+ goal(status(alice, requires_review)),
81
+ by(rule("deontic-logic.pl", clause(20))),
82
+ bindings([binding("Actor", alice), binding("_Violation", missed_obligation(obtain_consent))]),
83
+ uses([
84
+ proof(
85
+ goal(uncompensated_violation(alice, missed_obligation(obtain_consent))),
86
+ by(rule("deontic-logic.pl", clause(17))),
87
+ bindings([binding("Actor", alice), binding("Action", obtain_consent)]),
88
+ uses([
89
+ proof(
90
+ goal(violation(alice, missed_obligation(obtain_consent))),
91
+ by(rule("deontic-logic.pl", clause(14))),
92
+ bindings([binding("Actor", alice), binding("Action", obtain_consent)]),
93
+ uses([
94
+ proof(
95
+ goal(obliged(alice, obtain_consent)),
96
+ by(fact("deontic-logic.pl", clause(7)))
97
+ ),
98
+ proof(
99
+ goal(not_performed(alice, obtain_consent)),
100
+ by(fact("deontic-logic.pl", clause(12)))
101
+ )
102
+ ])
103
+ )
104
+ ])
105
+ )
106
+ ])
107
+ )
108
+ ).
109
+
@@ -0,0 +1,74 @@
1
+ log_impliedBy(childOf(var(x), var(y)), parentOf(var(y), var(x))).
2
+ why(
3
+ log_impliedBy(childOf(var(x), var(y)), parentOf(var(y), var(x))),
4
+ proof(
5
+ goal(log_impliedBy(childOf(var(x), var(y)), parentOf(var(y), var(x)))),
6
+ by(rule("derived-backward-rule.pl", clause(6))),
7
+ uses([
8
+ proof(
9
+ goal(invOf(parentOf, childOf)),
10
+ by(fact("derived-backward-rule.pl", clause(4)))
11
+ )
12
+ ])
13
+ )
14
+ ).
15
+
16
+ childOf(bob, alice).
17
+ why(
18
+ childOf(bob, alice),
19
+ proof(
20
+ goal(childOf(bob, alice)),
21
+ by(rule("derived-backward-rule.pl", clause(7))),
22
+ bindings([binding("X", bob), binding("Y", alice)]),
23
+ uses([
24
+ proof(
25
+ goal(log_impliedBy(childOf(var(x), var(y)), parentOf(var(y), var(x)))),
26
+ by(rule("derived-backward-rule.pl", clause(6))),
27
+ uses([
28
+ proof(
29
+ goal(invOf(parentOf, childOf)),
30
+ by(fact("derived-backward-rule.pl", clause(4)))
31
+ )
32
+ ])
33
+ ),
34
+ proof(
35
+ goal(parentOf(alice, bob)),
36
+ by(fact("derived-backward-rule.pl", clause(5)))
37
+ )
38
+ ])
39
+ )
40
+ ).
41
+
42
+ hasParent(bob, alice).
43
+ why(
44
+ hasParent(bob, alice),
45
+ proof(
46
+ goal(hasParent(bob, alice)),
47
+ by(rule("derived-backward-rule.pl", clause(8))),
48
+ bindings([binding("X", bob), binding("Y", alice)]),
49
+ uses([
50
+ proof(
51
+ goal(childOf(bob, alice)),
52
+ by(rule("derived-backward-rule.pl", clause(7))),
53
+ bindings([binding("X", bob), binding("Y", alice)]),
54
+ uses([
55
+ proof(
56
+ goal(log_impliedBy(childOf(var(x), var(y)), parentOf(var(y), var(x)))),
57
+ by(rule("derived-backward-rule.pl", clause(6))),
58
+ uses([
59
+ proof(
60
+ goal(invOf(parentOf, childOf)),
61
+ by(fact("derived-backward-rule.pl", clause(4)))
62
+ )
63
+ ])
64
+ ),
65
+ proof(
66
+ goal(parentOf(alice, bob)),
67
+ by(fact("derived-backward-rule.pl", clause(5)))
68
+ )
69
+ ])
70
+ )
71
+ ])
72
+ )
73
+ ).
74
+
@@ -0,0 +1,151 @@
1
+ reachable(reachability_case, path(a, f)).
2
+ why(
3
+ reachable(reachability_case, path(a, f)),
4
+ proof(
5
+ goal(reachable(reachability_case, path(a, f))),
6
+ by(rule("graph-reachability.pl", clause(13))),
7
+ uses([
8
+ proof(
9
+ goal(is_reachable(a, f)),
10
+ by(rule("graph-reachability.pl", clause(12))),
11
+ bindings([binding("Start", a), binding("Goal", f)]),
12
+ uses([
13
+ proof(
14
+ goal(reachable(a, f, [a])),
15
+ by(rule("graph-reachability.pl", clause(11))),
16
+ bindings([binding("Start", a), binding("Goal", f), binding("Visited", [a]), binding("Next", b)]),
17
+ uses([
18
+ proof(
19
+ goal(edge(a, b)),
20
+ by(fact("graph-reachability.pl", clause(3)))
21
+ ),
22
+ proof(
23
+ goal(not(member(b, [a]))),
24
+ by(builtin(not, 1))
25
+ ),
26
+ proof(
27
+ goal(reachable(b, f, [b, a])),
28
+ by(rule("graph-reachability.pl", clause(11))),
29
+ bindings([binding("Start", b), binding("Goal", f), binding("Visited", [b, a]), binding("Next", d)]),
30
+ uses([
31
+ proof(
32
+ goal(edge(b, d)),
33
+ by(fact("graph-reachability.pl", clause(5)))
34
+ ),
35
+ proof(
36
+ goal(not(member(d, [b, a]))),
37
+ by(builtin(not, 1))
38
+ ),
39
+ proof(
40
+ goal(reachable(d, f, [d, b, a])),
41
+ by(rule("graph-reachability.pl", clause(11))),
42
+ bindings([binding("Start", d), binding("Goal", f), binding("Visited", [d, b, a]), binding("Next", f)]),
43
+ uses([
44
+ proof(
45
+ goal(edge(d, f)),
46
+ by(fact("graph-reachability.pl", clause(7)))
47
+ ),
48
+ proof(
49
+ goal(not(member(f, [d, b, a]))),
50
+ by(builtin(not, 1))
51
+ ),
52
+ proof(
53
+ goal(reachable(f, f, [f, d, b, a])),
54
+ by(fact("graph-reachability.pl", clause(10))),
55
+ bindings([binding("Node", f), binding("_Visited", [f, d, b, a])])
56
+ )
57
+ ])
58
+ )
59
+ ])
60
+ )
61
+ ])
62
+ )
63
+ ])
64
+ )
65
+ ])
66
+ )
67
+ ).
68
+
69
+ reachable(reachability_case, path(c, g)).
70
+ why(
71
+ reachable(reachability_case, path(c, g)),
72
+ proof(
73
+ goal(reachable(reachability_case, path(c, g))),
74
+ by(rule("graph-reachability.pl", clause(14))),
75
+ uses([
76
+ proof(
77
+ goal(is_reachable(c, g)),
78
+ by(rule("graph-reachability.pl", clause(12))),
79
+ bindings([binding("Start", c), binding("Goal", g)]),
80
+ uses([
81
+ proof(
82
+ goal(reachable(c, g, [c])),
83
+ by(rule("graph-reachability.pl", clause(11))),
84
+ bindings([binding("Start", c), binding("Goal", g), binding("Visited", [c]), binding("Next", e)]),
85
+ uses([
86
+ proof(
87
+ goal(edge(c, e)),
88
+ by(fact("graph-reachability.pl", clause(6)))
89
+ ),
90
+ proof(
91
+ goal(not(member(e, [c]))),
92
+ by(builtin(not, 1))
93
+ ),
94
+ proof(
95
+ goal(reachable(e, g, [e, c])),
96
+ by(rule("graph-reachability.pl", clause(11))),
97
+ bindings([binding("Start", e), binding("Goal", g), binding("Visited", [e, c]), binding("Next", f)]),
98
+ uses([
99
+ proof(
100
+ goal(edge(e, f)),
101
+ by(fact("graph-reachability.pl", clause(8)))
102
+ ),
103
+ proof(
104
+ goal(not(member(f, [e, c]))),
105
+ by(builtin(not, 1))
106
+ ),
107
+ proof(
108
+ goal(reachable(f, g, [f, e, c])),
109
+ by(rule("graph-reachability.pl", clause(11))),
110
+ bindings([binding("Start", f), binding("Goal", g), binding("Visited", [f, e, c]), binding("Next", g)]),
111
+ uses([
112
+ proof(
113
+ goal(edge(f, g)),
114
+ by(fact("graph-reachability.pl", clause(9)))
115
+ ),
116
+ proof(
117
+ goal(not(member(g, [f, e, c]))),
118
+ by(builtin(not, 1))
119
+ ),
120
+ proof(
121
+ goal(reachable(g, g, [g, f, e, c])),
122
+ by(fact("graph-reachability.pl", clause(10))),
123
+ bindings([binding("Node", g), binding("_Visited", [g, f, e, c])])
124
+ )
125
+ ])
126
+ )
127
+ ])
128
+ )
129
+ ])
130
+ )
131
+ ])
132
+ )
133
+ ])
134
+ )
135
+ ).
136
+
137
+ not_reachable(reachability_case, path(b, e)).
138
+ why(
139
+ not_reachable(reachability_case, path(b, e)),
140
+ proof(
141
+ goal(not_reachable(reachability_case, path(b, e))),
142
+ by(rule("graph-reachability.pl", clause(15))),
143
+ uses([
144
+ proof(
145
+ goal(not(is_reachable(b, e))),
146
+ by(builtin(not, 1))
147
+ )
148
+ ])
149
+ )
150
+ ).
151
+
@@ -0,0 +1,150 @@
1
+ sameGreatestLowerBound(a, b, g1, g2).
2
+ why(
3
+ sameGreatestLowerBound(a, b, g1, g2),
4
+ proof(
5
+ goal(sameGreatestLowerBound(a, b, g1, g2)),
6
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(7))),
7
+ bindings([binding("A", a), binding("B", b), binding("M", g1), binding("N", g2)]),
8
+ uses([
9
+ proof(
10
+ goal(glbOf(g1, a, b)),
11
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
12
+ ),
13
+ proof(
14
+ goal(glbOf(g2, a, b)),
15
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
16
+ ),
17
+ proof(
18
+ goal(sameTerm(g1, g2)),
19
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(6))),
20
+ bindings([binding("M", g1), binding("N", g2)]),
21
+ uses([
22
+ proof(
23
+ goal(leq(g1, g2)),
24
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(5))),
25
+ bindings([binding("L", g1), binding("M", g2), binding("A", a), binding("B", b)]),
26
+ uses([
27
+ proof(
28
+ goal(glbOf(g2, a, b)),
29
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
30
+ ),
31
+ proof(
32
+ goal(lowerBoundOf(g1, a, b)),
33
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(4))),
34
+ bindings([binding("M", g1), binding("A", a), binding("B", b)]),
35
+ uses([
36
+ proof(
37
+ goal(glbOf(g1, a, b)),
38
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
39
+ )
40
+ ])
41
+ )
42
+ ])
43
+ ),
44
+ proof(
45
+ goal(leq(g2, g1)),
46
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(5))),
47
+ bindings([binding("L", g2), binding("M", g1), binding("A", a), binding("B", b)]),
48
+ uses([
49
+ proof(
50
+ goal(glbOf(g1, a, b)),
51
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
52
+ ),
53
+ proof(
54
+ goal(lowerBoundOf(g2, a, b)),
55
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(4))),
56
+ bindings([binding("M", g2), binding("A", a), binding("B", b)]),
57
+ uses([
58
+ proof(
59
+ goal(glbOf(g2, a, b)),
60
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
61
+ )
62
+ ])
63
+ )
64
+ ])
65
+ )
66
+ ])
67
+ ),
68
+ proof(
69
+ goal(neq(g1, g2)),
70
+ by(builtin(neq, 2))
71
+ )
72
+ ])
73
+ )
74
+ ).
75
+
76
+ sameGreatestLowerBound(a, b, g2, g1).
77
+ why(
78
+ sameGreatestLowerBound(a, b, g2, g1),
79
+ proof(
80
+ goal(sameGreatestLowerBound(a, b, g2, g1)),
81
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(7))),
82
+ bindings([binding("A", a), binding("B", b), binding("M", g2), binding("N", g1)]),
83
+ uses([
84
+ proof(
85
+ goal(glbOf(g2, a, b)),
86
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
87
+ ),
88
+ proof(
89
+ goal(glbOf(g1, a, b)),
90
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
91
+ ),
92
+ proof(
93
+ goal(sameTerm(g2, g1)),
94
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(6))),
95
+ bindings([binding("M", g2), binding("N", g1)]),
96
+ uses([
97
+ proof(
98
+ goal(leq(g2, g1)),
99
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(5))),
100
+ bindings([binding("L", g2), binding("M", g1), binding("A", a), binding("B", b)]),
101
+ uses([
102
+ proof(
103
+ goal(glbOf(g1, a, b)),
104
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
105
+ ),
106
+ proof(
107
+ goal(lowerBoundOf(g2, a, b)),
108
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(4))),
109
+ bindings([binding("M", g2), binding("A", a), binding("B", b)]),
110
+ uses([
111
+ proof(
112
+ goal(glbOf(g2, a, b)),
113
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
114
+ )
115
+ ])
116
+ )
117
+ ])
118
+ ),
119
+ proof(
120
+ goal(leq(g1, g2)),
121
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(5))),
122
+ bindings([binding("L", g1), binding("M", g2), binding("A", a), binding("B", b)]),
123
+ uses([
124
+ proof(
125
+ goal(glbOf(g2, a, b)),
126
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(3)))
127
+ ),
128
+ proof(
129
+ goal(lowerBoundOf(g1, a, b)),
130
+ by(rule("greatest-lower-bound-uniqueness.pl", clause(4))),
131
+ bindings([binding("M", g1), binding("A", a), binding("B", b)]),
132
+ uses([
133
+ proof(
134
+ goal(glbOf(g1, a, b)),
135
+ by(fact("greatest-lower-bound-uniqueness.pl", clause(2)))
136
+ )
137
+ ])
138
+ )
139
+ ])
140
+ )
141
+ ])
142
+ ),
143
+ proof(
144
+ goal(neq(g2, g1)),
145
+ by(builtin(neq, 2))
146
+ )
147
+ ])
148
+ )
149
+ ).
150
+
@@ -0,0 +1,124 @@
1
+ report(normalized_name, "ada lovelace").
2
+ why(
3
+ report(normalized_name, "ada lovelace"),
4
+ proof(
5
+ goal(report(normalized_name, "ada lovelace")),
6
+ by(rule("reusable-builtins.pl", clause(5))),
7
+ bindings([binding("Name", "ada lovelace"), binding("Raw", " Ada Lovelace "), binding("Trimmed", "Ada Lovelace")]),
8
+ uses([
9
+ proof(
10
+ goal(name_raw(" Ada Lovelace ")),
11
+ by(fact("reusable-builtins.pl", clause(2)))
12
+ ),
13
+ proof(
14
+ goal(trim(" Ada Lovelace ", "Ada Lovelace")),
15
+ by(builtin(trim, 2))
16
+ ),
17
+ proof(
18
+ goal(lowercase("Ada Lovelace", "ada lovelace")),
19
+ by(builtin(lowercase, 2))
20
+ )
21
+ ])
22
+ )
23
+ ).
24
+
25
+ report(unique_tags, ["logic", "math", "programming"]).
26
+ why(
27
+ report(unique_tags, ["logic", "math", "programming"]),
28
+ proof(
29
+ goal(report(unique_tags, ["logic", "math", "programming"])),
30
+ by(rule("reusable-builtins.pl", clause(6))),
31
+ bindings([binding("Tags", ["logic", "math", "programming"]), binding("Csv", "logic,math,logic,programming"), binding("Parts", ["logic", "math", "logic", "programming"])]),
32
+ uses([
33
+ proof(
34
+ goal(tag_csv("logic,math,logic,programming")),
35
+ by(fact("reusable-builtins.pl", clause(3)))
36
+ ),
37
+ proof(
38
+ goal(split("logic,math,logic,programming", ",", ["logic", "math", "logic", "programming"])),
39
+ by(builtin(split, 3))
40
+ ),
41
+ proof(
42
+ goal(list_to_set(["logic", "math", "logic", "programming"], ["logic", "math", "programming"])),
43
+ by(builtin(list_to_set, 2))
44
+ )
45
+ ])
46
+ )
47
+ ).
48
+
49
+ report(tag_label, "logic / math / programming").
50
+ why(
51
+ report(tag_label, "logic / math / programming"),
52
+ proof(
53
+ goal(report(tag_label, "logic / math / programming")),
54
+ by(rule("reusable-builtins.pl", clause(7))),
55
+ bindings([binding("Label", "logic / math / programming"), binding("Csv", "logic,math,logic,programming"), binding("Parts", ["logic", "math", "logic", "programming"]), binding("Tags", ["logic", "math", "programming"])]),
56
+ uses([
57
+ proof(
58
+ goal(tag_csv("logic,math,logic,programming")),
59
+ by(fact("reusable-builtins.pl", clause(3)))
60
+ ),
61
+ proof(
62
+ goal(split("logic,math,logic,programming", ",", ["logic", "math", "logic", "programming"])),
63
+ by(builtin(split, 3))
64
+ ),
65
+ proof(
66
+ goal(list_to_set(["logic", "math", "logic", "programming"], ["logic", "math", "programming"])),
67
+ by(builtin(list_to_set, 2))
68
+ ),
69
+ proof(
70
+ goal(join(["logic", "math", "programming"], " / ", "logic / math / programming")),
71
+ by(builtin(join, 3))
72
+ )
73
+ ])
74
+ )
75
+ ).
76
+
77
+ report(score_summary, summary(42, 21, 6.4807406984078604)).
78
+ why(
79
+ report(score_summary, summary(42, 21, 6.4807406984078604)),
80
+ proof(
81
+ goal(report(score_summary, summary(42, 21, 6.4807406984078604))),
82
+ by(rule("reusable-builtins.pl", clause(8))),
83
+ bindings([binding("Total", 42), binding("Peak", 21), binding("RootTotal", 6.4807406984078604), binding("Scores", [8, 13, 21])]),
84
+ uses([
85
+ proof(
86
+ goal(scores([8, 13, 21])),
87
+ by(fact("reusable-builtins.pl", clause(4)))
88
+ ),
89
+ proof(
90
+ goal(sum_list([8, 13, 21], 42)),
91
+ by(builtin(sum_list, 2))
92
+ ),
93
+ proof(
94
+ goal(max_list([8, 13, 21], 21)),
95
+ by(builtin(max_list, 2))
96
+ ),
97
+ proof(
98
+ goal(sqrt(42, 6.4807406984078604)),
99
+ by(builtin(sqrt, 2))
100
+ )
101
+ ])
102
+ )
103
+ ).
104
+
105
+ report(window, [13, 21]).
106
+ why(
107
+ report(window, [13, 21]),
108
+ proof(
109
+ goal(report(window, [13, 21])),
110
+ by(rule("reusable-builtins.pl", clause(9))),
111
+ bindings([binding("Slice", [13, 21]), binding("Scores", [8, 13, 21])]),
112
+ uses([
113
+ proof(
114
+ goal(scores([8, 13, 21])),
115
+ by(fact("reusable-builtins.pl", clause(4)))
116
+ ),
117
+ proof(
118
+ goal(slice(1, 2, [8, 13, 21], [13, 21])),
119
+ by(builtin(slice, 4))
120
+ )
121
+ ])
122
+ )
123
+ ).
124
+
@@ -0,0 +1,95 @@
1
+ report(shape, shape(edge, 3)).
2
+ why(
3
+ report(shape, shape(edge, 3)),
4
+ proof(
5
+ goal(report(shape, shape(edge, 3))),
6
+ by(rule("term-tools.pl", clause(4))),
7
+ bindings([binding("Name", edge), binding("Arity", 3)]),
8
+ uses([
9
+ proof(
10
+ goal(functor(edge(a, b, 3), edge, 3)),
11
+ by(builtin(functor, 3))
12
+ )
13
+ ])
14
+ )
15
+ ).
16
+
17
+ report(second_argument, b).
18
+ why(
19
+ report(second_argument, b),
20
+ proof(
21
+ goal(report(second_argument, b)),
22
+ by(rule("term-tools.pl", clause(5))),
23
+ bindings([binding("Node", b)]),
24
+ uses([
25
+ proof(
26
+ goal(arg(2, edge(a, b, 3), b)),
27
+ by(builtin(arg, 3))
28
+ )
29
+ ])
30
+ )
31
+ ).
32
+
33
+ report(parts, parts(edge, [a, b, 3])).
34
+ why(
35
+ report(parts, parts(edge, [a, b, 3])),
36
+ proof(
37
+ goal(report(parts, parts(edge, [a, b, 3]))),
38
+ by(rule("term-tools.pl", clause(6))),
39
+ bindings([binding("Name", edge), binding("Args", [a, b, 3])]),
40
+ uses([
41
+ proof(
42
+ goal(compound_name_arguments(edge(a, b, 3), edge, [a, b, 3])),
43
+ by(builtin(compound_name_arguments, 3))
44
+ )
45
+ ])
46
+ )
47
+ ).
48
+
49
+ report(rebuilt, edge(c, d, 5)).
50
+ why(
51
+ report(rebuilt, edge(c, d, 5)),
52
+ proof(
53
+ goal(report(rebuilt, edge(c, d, 5))),
54
+ by(rule("term-tools.pl", clause(7))),
55
+ bindings([binding("Term", edge(c, d, 5))]),
56
+ uses([
57
+ proof(
58
+ goal(compound_name_arguments(edge(c, d, 5), edge, [c, d, 5])),
59
+ by(builtin(compound_name_arguments, 3))
60
+ )
61
+ ])
62
+ )
63
+ ).
64
+
65
+ report(rendered, "edge(a, [b, c])").
66
+ why(
67
+ report(rendered, "edge(a, [b, c])"),
68
+ proof(
69
+ goal(report(rendered, "edge(a, [b, c])")),
70
+ by(rule("term-tools.pl", clause(8))),
71
+ bindings([binding("Text", "edge(a, [b, c])")]),
72
+ uses([
73
+ proof(
74
+ goal(term_string(edge(a, [b, c]), "edge(a, [b, c])")),
75
+ by(builtin(term_string, 2))
76
+ )
77
+ ])
78
+ )
79
+ ).
80
+
81
+ report(all_weights_positive, yes).
82
+ why(
83
+ report(all_weights_positive, yes),
84
+ proof(
85
+ goal(report(all_weights_positive, yes)),
86
+ by(rule("term-tools.pl", clause(9))),
87
+ uses([
88
+ proof(
89
+ goal(forall(edge(_From, _To, Weight), gt(Weight, 0))),
90
+ by(builtin(forall, 2))
91
+ )
92
+ ])
93
+ )
94
+ ).
95
+
@@ -0,0 +1,216 @@
1
+ witch(girl).
2
+ why(
3
+ witch(girl),
4
+ proof(
5
+ goal(witch(girl)),
6
+ by(rule("witch.pl", clause(6))),
7
+ bindings([binding("X", girl)]),
8
+ uses([
9
+ proof(
10
+ goal(burns(girl)),
11
+ by(rule("witch.pl", clause(8))),
12
+ bindings([binding("X", girl)]),
13
+ uses([
14
+ proof(
15
+ goal(madeOfWood(girl)),
16
+ by(rule("witch.pl", clause(9))),
17
+ bindings([binding("X", girl)]),
18
+ uses([
19
+ proof(
20
+ goal(floats(girl)),
21
+ by(rule("witch.pl", clause(11))),
22
+ bindings([binding("Y", girl), binding("X", duck)]),
23
+ uses([
24
+ proof(
25
+ goal(sameWeight(duck, girl)),
26
+ by(fact("witch.pl", clause(12)))
27
+ ),
28
+ proof(
29
+ goal(floats(duck)),
30
+ by(fact("witch.pl", clause(10)))
31
+ )
32
+ ])
33
+ )
34
+ ])
35
+ )
36
+ ])
37
+ ),
38
+ proof(
39
+ goal(woman(girl)),
40
+ by(fact("witch.pl", clause(7)))
41
+ )
42
+ ])
43
+ )
44
+ ).
45
+
46
+ burns(duck).
47
+ why(
48
+ burns(duck),
49
+ proof(
50
+ goal(burns(duck)),
51
+ by(rule("witch.pl", clause(8))),
52
+ bindings([binding("X", duck)]),
53
+ uses([
54
+ proof(
55
+ goal(madeOfWood(duck)),
56
+ by(rule("witch.pl", clause(9))),
57
+ bindings([binding("X", duck)]),
58
+ uses([
59
+ proof(
60
+ goal(floats(duck)),
61
+ by(fact("witch.pl", clause(10)))
62
+ )
63
+ ])
64
+ )
65
+ ])
66
+ )
67
+ ).
68
+
69
+ burns(girl).
70
+ why(
71
+ burns(girl),
72
+ proof(
73
+ goal(burns(girl)),
74
+ by(rule("witch.pl", clause(8))),
75
+ bindings([binding("X", girl)]),
76
+ uses([
77
+ proof(
78
+ goal(madeOfWood(girl)),
79
+ by(rule("witch.pl", clause(9))),
80
+ bindings([binding("X", girl)]),
81
+ uses([
82
+ proof(
83
+ goal(floats(girl)),
84
+ by(rule("witch.pl", clause(11))),
85
+ bindings([binding("Y", girl), binding("X", duck)]),
86
+ uses([
87
+ proof(
88
+ goal(sameWeight(duck, girl)),
89
+ by(fact("witch.pl", clause(12)))
90
+ ),
91
+ proof(
92
+ goal(floats(duck)),
93
+ by(fact("witch.pl", clause(10)))
94
+ )
95
+ ])
96
+ )
97
+ ])
98
+ )
99
+ ])
100
+ )
101
+ ).
102
+
103
+ madeOfWood(duck).
104
+ why(
105
+ madeOfWood(duck),
106
+ proof(
107
+ goal(madeOfWood(duck)),
108
+ by(rule("witch.pl", clause(9))),
109
+ bindings([binding("X", duck)]),
110
+ uses([
111
+ proof(
112
+ goal(floats(duck)),
113
+ by(fact("witch.pl", clause(10)))
114
+ )
115
+ ])
116
+ )
117
+ ).
118
+
119
+ madeOfWood(girl).
120
+ why(
121
+ madeOfWood(girl),
122
+ proof(
123
+ goal(madeOfWood(girl)),
124
+ by(rule("witch.pl", clause(9))),
125
+ bindings([binding("X", girl)]),
126
+ uses([
127
+ proof(
128
+ goal(floats(girl)),
129
+ by(rule("witch.pl", clause(11))),
130
+ bindings([binding("Y", girl), binding("X", duck)]),
131
+ uses([
132
+ proof(
133
+ goal(sameWeight(duck, girl)),
134
+ by(fact("witch.pl", clause(12)))
135
+ ),
136
+ proof(
137
+ goal(floats(duck)),
138
+ by(fact("witch.pl", clause(10)))
139
+ )
140
+ ])
141
+ )
142
+ ])
143
+ )
144
+ ).
145
+
146
+ floats(girl).
147
+ why(
148
+ floats(girl),
149
+ proof(
150
+ goal(floats(girl)),
151
+ by(rule("witch.pl", clause(11))),
152
+ bindings([binding("Y", girl), binding("X", duck)]),
153
+ uses([
154
+ proof(
155
+ goal(sameWeight(duck, girl)),
156
+ by(fact("witch.pl", clause(12)))
157
+ ),
158
+ proof(
159
+ goal(floats(duck)),
160
+ by(fact("witch.pl", clause(10)))
161
+ )
162
+ ])
163
+ )
164
+ ).
165
+
166
+ is(witchExample, true).
167
+ why(
168
+ is(witchExample, true),
169
+ proof(
170
+ goal(is(witchExample, true)),
171
+ by(rule("witch.pl", clause(13))),
172
+ uses([
173
+ proof(
174
+ goal(witch(girl)),
175
+ by(rule("witch.pl", clause(6))),
176
+ bindings([binding("X", girl)]),
177
+ uses([
178
+ proof(
179
+ goal(burns(girl)),
180
+ by(rule("witch.pl", clause(8))),
181
+ bindings([binding("X", girl)]),
182
+ uses([
183
+ proof(
184
+ goal(madeOfWood(girl)),
185
+ by(rule("witch.pl", clause(9))),
186
+ bindings([binding("X", girl)]),
187
+ uses([
188
+ proof(
189
+ goal(floats(girl)),
190
+ by(rule("witch.pl", clause(11))),
191
+ bindings([binding("Y", girl), binding("X", duck)]),
192
+ uses([
193
+ proof(
194
+ goal(sameWeight(duck, girl)),
195
+ by(fact("witch.pl", clause(12)))
196
+ ),
197
+ proof(
198
+ goal(floats(duck)),
199
+ by(fact("witch.pl", clause(10)))
200
+ )
201
+ ])
202
+ )
203
+ ])
204
+ )
205
+ ])
206
+ ),
207
+ proof(
208
+ goal(woman(girl)),
209
+ by(fact("witch.pl", clause(7)))
210
+ )
211
+ ])
212
+ )
213
+ ])
214
+ )
215
+ ).
216
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyelang",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "A small Prolog-syntax-subset logic programming language for rules, goals, answers, and proofs.",
5
5
  "type": "module",
6
6
  "main": "./index.js",