eyelang 0.1.8 → 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.
- package/examples/proof/access-control-policy.pl +158 -0
- package/examples/proof/bayes-diagnosis.pl +208 -0
- package/examples/proof/context-association.pl +78 -0
- package/examples/proof/deontic-logic.pl +109 -0
- package/examples/proof/derived-backward-rule.pl +74 -0
- package/examples/proof/graph-reachability.pl +151 -0
- package/examples/proof/greatest-lower-bound-uniqueness.pl +150 -0
- package/examples/proof/reusable-builtins.pl +124 -0
- package/examples/proof/term-tools.pl +95 -0
- package/examples/proof/witch.pl +216 -0
- package/package.json +1 -1
- package/test/run-examples.mjs +10 -0
|
@@ -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
|
+
|