eyelang 1.3.8 → 1.4.0

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.
Files changed (219) hide show
  1. package/README.md +19 -14
  2. package/SPEC.md +4 -4
  3. package/conformance/expected/core/001_fact_query.out +0 -8
  4. package/conformance/expected/core/002_rule_recursion.out +0 -41
  5. package/conformance/expected/core/003_terms_and_readback.out +0 -104
  6. package/conformance/expected/core/004_conjunction_and_parentheses.out +0 -25
  7. package/conformance/expected/core/005_list_deconstruction.out +0 -32
  8. package/conformance/expected/core/006_comma_formula_data.out +0 -15
  9. package/conformance/expected/core/007_anonymous_variables.out +0 -19
  10. package/conformance/expected/core/008_graphic_atoms.out +0 -24
  11. package/conformance/expected/core/009_comments_and_whitespace.out +0 -30
  12. package/conformance/expected/core/010_variable_scope_and_reuse.out +0 -52
  13. package/conformance/expected/core/011_predicate_arity.out +0 -30
  14. package/conformance/expected/core/012_nested_compound_unification.out +0 -30
  15. package/conformance/expected/core/013_multiple_clauses_order.out +0 -44
  16. package/conformance/expected/core/014_failure_filters_answers.out +0 -19
  17. package/conformance/expected/core/015_improper_list_unification.out +0 -45
  18. package/conformance/expected/core/016_zero_arity_compound.out +0 -15
  19. package/conformance/expected/core/017_three_step_recursion.out +0 -99
  20. package/conformance/expected/core/018_quoted_atom_readback.out +0 -45
  21. package/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -36
  22. package/conformance/expected/core/020_nested_list_terms.out +0 -30
  23. package/conformance/expected/extension/001_default_derived_output.out +0 -56
  24. package/conformance/expected/extension/002_materialize_focus.out +0 -22
  25. package/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -148
  26. package/conformance/expected/extension/004_strings_and_atoms.out +0 -58
  27. package/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -135
  28. package/conformance/expected/extension/006_formula_terms.out +0 -76
  29. package/conformance/expected/extension/007_negation_once_generators.out +0 -40
  30. package/conformance/expected/extension/008_equality_and_inequality.out +0 -58
  31. package/conformance/expected/extension/009_list_relations.out +0 -73
  32. package/conformance/expected/extension/010_append_splits.out +0 -45
  33. package/conformance/expected/extension/011_matching_and_comparison.out +0 -70
  34. package/conformance/expected/extension/012_memoize_declaration.out +0 -41
  35. package/conformance/expected/extension/013_numeric_functions.out +0 -105
  36. package/conformance/expected/extension/014_between_enumeration.out +0 -45
  37. package/conformance/expected/extension/015_smallest_divisor.out +0 -15
  38. package/conformance/expected/extension/016_negation_filter.out +0 -38
  39. package/conformance/expected/extension/017_once_user_predicate.out +0 -21
  40. package/conformance/expected/extension/018_findall_user_goal.out +0 -15
  41. package/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -15
  42. package/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -30
  43. package/conformance/expected/extension/021_nth0_index_generation.out +0 -15
  44. package/conformance/expected/extension/022_set_nth0_edges.out +0 -30
  45. package/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -30
  46. package/conformance/expected/extension/024_not_member_filter.out +0 -19
  47. package/conformance/expected/extension/025_is_list_filter.out +0 -19
  48. package/conformance/expected/extension/026_nested_formula_terms.out +0 -114
  49. package/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -14
  50. package/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -42
  51. package/conformance/expected/extension/029_string_matching_filters.out +0 -38
  52. package/conformance/expected/extension/030_string_and_atom_concat.out +0 -30
  53. package/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -18
  54. package/conformance/expected/extension/032_sumall_numeric_template.out +0 -8
  55. package/conformance/expected/extension/033_aggregate_min_template.out +0 -8
  56. package/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -8
  57. package/examples/output/access-control-policy.pl +0 -156
  58. package/examples/output/ackermann.pl +0 -1240
  59. package/examples/output/age.pl +0 -69
  60. package/examples/output/aliases-and-namespaces.pl +0 -73
  61. package/examples/output/alignment-demo.pl +0 -862
  62. package/examples/output/allen-interval-calculus.pl +0 -9169
  63. package/examples/output/ancestor.pl +0 -134
  64. package/examples/output/animal.pl +0 -64
  65. package/examples/output/annotation.pl +0 -76
  66. package/examples/output/backward.pl +0 -21
  67. package/examples/output/basic-monadic.pl +0 -22770
  68. package/examples/output/bayes-diagnosis.pl +0 -195
  69. package/examples/output/bayes-therapy.pl +0 -34873
  70. package/examples/output/beam-deflection.pl +0 -222
  71. package/examples/output/blocks-world-planning.pl +0 -1339
  72. package/examples/output/bmi.pl +0 -1903
  73. package/examples/output/braking-safety-worlds.pl +0 -2452
  74. package/examples/output/buck-converter-design.pl +0 -663
  75. package/examples/output/cache-performance.pl +0 -306
  76. package/examples/output/canary-release.pl +0 -167
  77. package/examples/output/cat-koko.pl +0 -83
  78. package/examples/output/clinical-trial-screening.pl +0 -380
  79. package/examples/output/collatz-1000.pl +0 -19000
  80. package/examples/output/combinatorics-findall-sort.pl +0 -56
  81. package/examples/output/competitive-enzyme-kinetics.pl +0 -563
  82. package/examples/output/complex-matrix-stability.pl +0 -250
  83. package/examples/output/complex.pl +0 -653
  84. package/examples/output/composition-of-injective-functions-is-injective.pl +0 -256
  85. package/examples/output/context-association.pl +0 -75
  86. package/examples/output/control-system.pl +0 -328
  87. package/examples/output/cryptarithmetic-send-more-money.pl +0 -168
  88. package/examples/output/cyclic-path.pl +0 -504
  89. package/examples/output/d3-group.pl +0 -56
  90. package/examples/output/dairy-energy-balance.pl +0 -1034
  91. package/examples/output/data-negotiation.pl +0 -75
  92. package/examples/output/deep-taxonomy-10.pl +0 -1235
  93. package/examples/output/deep-taxonomy-100.pl +0 -1235
  94. package/examples/output/deep-taxonomy-1000.pl +0 -1235
  95. package/examples/output/deep-taxonomy-10000.pl +0 -2915
  96. package/examples/output/deep-taxonomy-100000.pl +0 -20240
  97. package/examples/output/delfour.pl +0 -2829
  98. package/examples/output/dense-hamiltonian-cycle.pl +0 -207
  99. package/examples/output/deontic-logic.pl +0 -105
  100. package/examples/output/derived-rule.pl +0 -41
  101. package/examples/output/diamond-property.pl +0 -303
  102. package/examples/output/dijkstra-findall-sort.pl +0 -484
  103. package/examples/output/dijkstra-risk-path.pl +0 -4841
  104. package/examples/output/dijkstra.pl +0 -1336
  105. package/examples/output/dining-philosophers.pl +0 -21646
  106. package/examples/output/dog.pl +0 -30
  107. package/examples/output/drone-corridor-planner.pl +0 -2466
  108. package/examples/output/easter-computus.pl +0 -5690
  109. package/examples/output/electrical-rc-filter.pl +0 -102
  110. package/examples/output/epidemic-policy.pl +0 -760
  111. package/examples/output/equivalence-classes-overlap-implies-same-class.pl +0 -1080
  112. package/examples/output/eulerian-path.pl +0 -383
  113. package/examples/output/ev-range-worlds.pl +0 -2294
  114. package/examples/output/exact-cover-sudoku.pl +0 -396
  115. package/examples/output/existential-rule.pl +0 -38
  116. package/examples/output/exoplanet-validation-worlds.pl +0 -1904
  117. package/examples/output/expression-eval.pl +0 -104
  118. package/examples/output/family-cousins.pl +0 -3852
  119. package/examples/output/fastpow.pl +0 -1064
  120. package/examples/output/fft8-numeric.pl +0 -2556
  121. package/examples/output/fibonacci.pl +0 -2060
  122. package/examples/output/field-nitrogen-balance.pl +0 -1452
  123. package/examples/output/floating-point.pl +0 -151
  124. package/examples/output/four-color-map.pl +0 -191
  125. package/examples/output/fundamental-theorem-arithmetic.pl +0 -1610
  126. package/examples/output/gcd-bezout-identity.pl +0 -1842
  127. package/examples/output/gd-step-certified.pl +0 -32354
  128. package/examples/output/gdpr-compliance.pl +0 -193
  129. package/examples/output/goldbach-1000.pl +0 -17490
  130. package/examples/output/good-cobbler.pl +0 -15
  131. package/examples/output/gps.pl +0 -4166
  132. package/examples/output/graph-reachability.pl +0 -148
  133. package/examples/output/gray-code-counter.pl +0 -835
  134. package/examples/output/greatest-lower-bound-uniqueness.pl +0 -148
  135. package/examples/output/group-inverse-uniqueness.pl +0 -82
  136. package/examples/output/hamiltonian-cycle.pl +0 -102
  137. package/examples/output/hamiltonian-path.pl +0 -14157
  138. package/examples/output/hamming-code.pl +0 -2665
  139. package/examples/output/hanoi.pl +0 -184
  140. package/examples/output/heat-loss.pl +0 -223
  141. package/examples/output/heron-theorem.pl +0 -253
  142. package/examples/output/ideal-gas-law.pl +0 -148
  143. package/examples/output/illegitimate-reasoning.pl +0 -530
  144. package/examples/output/kaprekar.pl +0 -208
  145. package/examples/output/law-of-cosines.pl +0 -165
  146. package/examples/output/least-squares-regression.pl +0 -1447
  147. package/examples/output/list-collection.pl +0 -49
  148. package/examples/output/lldm.pl +0 -17298
  149. package/examples/output/manufacturing-quality-control.pl +0 -562
  150. package/examples/output/matrix.pl +0 -206
  151. package/examples/output/microgrid-dispatch.pl +0 -787
  152. package/examples/output/monkey-bananas.pl +0 -575
  153. package/examples/output/n-queens.pl +0 -2046
  154. package/examples/output/network-sla.pl +0 -282
  155. package/examples/output/newton-raphson.pl +0 -756
  156. package/examples/output/nixon-diamond.pl +0 -176
  157. package/examples/output/odrl-dpv-healthcare-risk-ranked.pl +0 -6148
  158. package/examples/output/odrl-dpv-risk-ranked.pl +0 -12961
  159. package/examples/output/orbital-transfer-design.pl +0 -961
  160. package/examples/output/path-discovery.pl +0 -333
  161. package/examples/output/peano-arithmetic.pl +0 -1432
  162. package/examples/output/peasant.pl +0 -190
  163. package/examples/output/pendulum-period.pl +0 -271
  164. package/examples/output/polynomial.pl +0 -7952
  165. package/examples/output/project-portfolio-optimization.pl +0 -93
  166. package/examples/output/proof-contrapositive.pl +0 -75
  167. package/examples/output/quadratic-formula.pl +0 -454
  168. package/examples/output/quine-mccluskey.pl +0 -188
  169. package/examples/output/radioactive-decay.pl +0 -299
  170. package/examples/output/sat-dpll.pl +0 -121
  171. package/examples/output/security-incident-correlation.pl +0 -267
  172. package/examples/output/service-impact.pl +0 -457
  173. package/examples/output/sieve.pl +0 -19
  174. package/examples/output/skolem-functions.pl +0 -264
  175. package/examples/output/socket-age.pl +0 -31
  176. package/examples/output/socket-family.pl +0 -56
  177. package/examples/output/socrates.pl +0 -36
  178. package/examples/output/statistics-summary.pl +0 -741
  179. package/examples/output/sudoku.pl +0 -38
  180. package/examples/output/superdense-coding.pl +0 -476
  181. package/examples/output/traveling-salesman.pl +0 -284
  182. package/examples/output/turing.pl +0 -2144
  183. package/examples/output/vector-similarity.pl +0 -421
  184. package/examples/output/witch.pl +0 -209
  185. package/examples/output/wolf-goat-cabbage.pl +0 -900
  186. package/examples/output/zebra.pl +0 -401
  187. package/examples/proof/age.pl +71 -0
  188. package/examples/proof/aliases-and-namespaces.pl +78 -0
  189. package/examples/proof/ancestor.pl +140 -0
  190. package/examples/proof/animal.pl +68 -0
  191. package/examples/proof/annotation.pl +80 -0
  192. package/examples/proof/backward.pl +22 -0
  193. package/examples/proof/cat-koko.pl +86 -0
  194. package/examples/proof/data-negotiation.pl +76 -0
  195. package/examples/proof/derived-rule.pl +43 -0
  196. package/examples/proof/dog.pl +31 -0
  197. package/examples/proof/electrical-rc-filter.pl +105 -0
  198. package/examples/proof/existential-rule.pl +40 -0
  199. package/examples/proof/floating-point.pl +160 -0
  200. package/examples/proof/good-cobbler.pl +16 -0
  201. package/examples/proof/group-inverse-uniqueness.pl +84 -0
  202. package/examples/proof/list-collection.pl +52 -0
  203. package/examples/proof/proof-contrapositive.pl +78 -0
  204. package/examples/proof/socket-age.pl +32 -0
  205. package/examples/proof/socket-family.pl +59 -0
  206. package/examples/proof/socrates.pl +38 -0
  207. package/examples/socket-age.pl +4 -4
  208. package/examples/socket-family.pl +4 -4
  209. package/package.json +1 -1
  210. package/playground-worker.mjs +4 -4
  211. package/playground.html +15 -15
  212. package/src/cli.js +10 -10
  213. package/src/index.js +3 -2
  214. package/src/parser.js +130 -1
  215. package/src/program.js +33 -27
  216. package/test/run-all.js +0 -0
  217. package/test/run-conformance.js +0 -0
  218. package/test/run-examples.js +38 -8
  219. package/test/run-regression.js +29 -28
@@ -1,211 +1,4 @@
1
1
  best(dense_hamiltonian_cycle, result(52, [a, b, c, d, e, f, g, h, a])).
2
- why(
3
- best(dense_hamiltonian_cycle, result(52, [a, b, c, d, e, f, g, h, a])),
4
- proof(
5
- goal(best(dense_hamiltonian_cycle, result(52, [a, b, c, d, e, f, g, h, a]))),
6
- by(rule("dense-hamiltonian-cycle.pl", clause(46))),
7
- bindings([binding("Cost", 52), binding("Cycle", [a, b, c, d, e, f, g, h, a]), binding("Cities", [a, b, c, d, e, f, g, h]), binding("_Key", [52, [a, b, c, d, e, f, g, h, a]])]),
8
- uses([
9
- proof(
10
- goal(cities([a, b, c, d, e, f, g, h])),
11
- by(fact("dense-hamiltonian-cycle.pl", clause(5)))
12
- ),
13
- proof(
14
- goal(aggregate_min([52, [a, b, c, d, e, f, g, h, a]], result(52, [a, b, c, d, e, f, g, h, a]), candidate_cycle([a, b, c, d, e, f, g, h], [a, b, c, d, e, f, g, h, a], 52), [52, [a, b, c, d, e, f, g, h, a]], result(52, [a, b, c, d, e, f, g, h, a]))),
15
- by(builtin(aggregate_min, 5))
16
- )
17
- ])
18
- )
19
- ).
20
-
21
2
  candidateCount(dense_hamiltonian_cycle, 2520).
22
- why(
23
- candidateCount(dense_hamiltonian_cycle, 2520),
24
- proof(
25
- goal(candidateCount(dense_hamiltonian_cycle, 2520)),
26
- by(rule("dense-hamiltonian-cycle.pl", clause(47))),
27
- bindings([binding("Count", 2520), binding("_Start", a), binding("Rest", [b, c, d, e, f, g, h]), binding("N", 7), binding("Permutations", 5040)]),
28
- uses([
29
- proof(
30
- goal(cities([a, b, c, d, e, f, g, h])),
31
- by(fact("dense-hamiltonian-cycle.pl", clause(5)))
32
- ),
33
- proof(
34
- goal(length([b, c, d, e, f, g, h], 7)),
35
- by(builtin(length, 2))
36
- ),
37
- proof(
38
- goal(factorial(7, 5040)),
39
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
40
- bindings([binding("N", 7), binding("F", 5040), binding("N0", 6), binding("F0", 720)]),
41
- uses([
42
- proof(
43
- goal(gt(7, 0)),
44
- by(builtin(gt, 2))
45
- ),
46
- proof(
47
- goal(sub(7, 1, 6)),
48
- by(builtin(sub, 3))
49
- ),
50
- proof(
51
- goal(factorial(6, 720)),
52
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
53
- bindings([binding("N", 6), binding("F", 720), binding("N0", 5), binding("F0", 120)]),
54
- uses([
55
- proof(
56
- goal(gt(6, 0)),
57
- by(builtin(gt, 2))
58
- ),
59
- proof(
60
- goal(sub(6, 1, 5)),
61
- by(builtin(sub, 3))
62
- ),
63
- proof(
64
- goal(factorial(5, 120)),
65
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
66
- bindings([binding("N", 5), binding("F", 120), binding("N0", 4), binding("F0", 24)]),
67
- uses([
68
- proof(
69
- goal(gt(5, 0)),
70
- by(builtin(gt, 2))
71
- ),
72
- proof(
73
- goal(sub(5, 1, 4)),
74
- by(builtin(sub, 3))
75
- ),
76
- proof(
77
- goal(factorial(4, 24)),
78
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
79
- bindings([binding("N", 4), binding("F", 24), binding("N0", 3), binding("F0", 6)]),
80
- uses([
81
- proof(
82
- goal(gt(4, 0)),
83
- by(builtin(gt, 2))
84
- ),
85
- proof(
86
- goal(sub(4, 1, 3)),
87
- by(builtin(sub, 3))
88
- ),
89
- proof(
90
- goal(factorial(3, 6)),
91
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
92
- bindings([binding("N", 3), binding("F", 6), binding("N0", 2), binding("F0", 2)]),
93
- uses([
94
- proof(
95
- goal(gt(3, 0)),
96
- by(builtin(gt, 2))
97
- ),
98
- proof(
99
- goal(sub(3, 1, 2)),
100
- by(builtin(sub, 3))
101
- ),
102
- proof(
103
- goal(factorial(2, 2)),
104
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
105
- bindings([binding("N", 2), binding("F", 2), binding("N0", 1), binding("F0", 1)]),
106
- uses([
107
- proof(
108
- goal(gt(2, 0)),
109
- by(builtin(gt, 2))
110
- ),
111
- proof(
112
- goal(sub(2, 1, 1)),
113
- by(builtin(sub, 3))
114
- ),
115
- proof(
116
- goal(factorial(1, 1)),
117
- by(rule("dense-hamiltonian-cycle.pl", clause(45))),
118
- bindings([binding("N", 1), binding("F", 1), binding("N0", 0), binding("F0", 1)]),
119
- uses([
120
- proof(
121
- goal(gt(1, 0)),
122
- by(builtin(gt, 2))
123
- ),
124
- proof(
125
- goal(sub(1, 1, 0)),
126
- by(builtin(sub, 3))
127
- ),
128
- proof(
129
- goal(factorial(0, 1)),
130
- by(fact("dense-hamiltonian-cycle.pl", clause(44)))
131
- ),
132
- proof(
133
- goal(mul(1, 1, 1)),
134
- by(builtin(mul, 3))
135
- )
136
- ])
137
- ),
138
- proof(
139
- goal(mul(2, 1, 2)),
140
- by(builtin(mul, 3))
141
- )
142
- ])
143
- ),
144
- proof(
145
- goal(mul(3, 2, 6)),
146
- by(builtin(mul, 3))
147
- )
148
- ])
149
- ),
150
- proof(
151
- goal(mul(4, 6, 24)),
152
- by(builtin(mul, 3))
153
- )
154
- ])
155
- ),
156
- proof(
157
- goal(mul(5, 24, 120)),
158
- by(builtin(mul, 3))
159
- )
160
- ])
161
- ),
162
- proof(
163
- goal(mul(6, 120, 720)),
164
- by(builtin(mul, 3))
165
- )
166
- ])
167
- ),
168
- proof(
169
- goal(mul(7, 720, 5040)),
170
- by(builtin(mul, 3))
171
- )
172
- ])
173
- ),
174
- proof(
175
- goal(div(5040, 2, 2520)),
176
- by(builtin(div, 3))
177
- )
178
- ])
179
- )
180
- ).
181
-
182
3
  status(dense_hamiltonian_cycle, symmetry_broken_complete_graph_searched).
183
- why(
184
- status(dense_hamiltonian_cycle, symmetry_broken_complete_graph_searched),
185
- proof(
186
- goal(status(dense_hamiltonian_cycle, symmetry_broken_complete_graph_searched)),
187
- by(rule("dense-hamiltonian-cycle.pl", clause(48))),
188
- uses([
189
- proof(
190
- goal(eq(ok, ok)),
191
- by(builtin(eq, 2))
192
- )
193
- ])
194
- )
195
- ).
196
-
197
4
  reason(dense_hamiltonian_cycle, "symmetry-broken permutation search scores Hamiltonian cycles and aggregate_min selects the cheapest candidate").
198
- why(
199
- reason(dense_hamiltonian_cycle, "symmetry-broken permutation search scores Hamiltonian cycles and aggregate_min selects the cheapest candidate"),
200
- proof(
201
- goal(reason(dense_hamiltonian_cycle, "symmetry-broken permutation search scores Hamiltonian cycles and aggregate_min selects the cheapest candidate")),
202
- by(rule("dense-hamiltonian-cycle.pl", clause(49))),
203
- uses([
204
- proof(
205
- goal(eq(ok, ok)),
206
- by(builtin(eq, 2))
207
- )
208
- ])
209
- )
210
- ).
211
-
@@ -1,109 +1,4 @@
1
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
2
  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
3
  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
4
  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
-
@@ -1,43 +1,2 @@
1
1
  log_implies(type(var(y), dog), is(test, true)).
2
- why(
3
- log_implies(type(var(y), dog), is(test, true)),
4
- proof(
5
- goal(log_implies(type(var(y), dog), is(test, true))),
6
- by(rule("derived-rule.pl", clause(6))),
7
- bindings([binding("_X", minka)]),
8
- uses([
9
- proof(
10
- goal(type(minka, cat)),
11
- by(fact("derived-rule.pl", clause(4)))
12
- )
13
- ])
14
- )
15
- ).
16
-
17
2
  is(test, true).
18
- why(
19
- is(test, true),
20
- proof(
21
- goal(is(test, true)),
22
- by(rule("derived-rule.pl", clause(7))),
23
- bindings([binding("_Y", charly)]),
24
- uses([
25
- proof(
26
- goal(log_implies(type(var(y), dog), is(test, true))),
27
- by(rule("derived-rule.pl", clause(6))),
28
- bindings([binding("_X", minka)]),
29
- uses([
30
- proof(
31
- goal(type(minka, cat)),
32
- by(fact("derived-rule.pl", clause(4)))
33
- )
34
- ])
35
- ),
36
- proof(
37
- goal(type(charly, dog)),
38
- by(fact("derived-rule.pl", clause(5)))
39
- )
40
- ])
41
- )
42
- ).
43
-
@@ -1,307 +1,4 @@
1
1
  holdsFor(diamondProperty, r).
2
- why(
3
- holdsFor(diamondProperty, r),
4
- proof(
5
- goal(holdsFor(diamondProperty, r)),
6
- by(rule("diamond-property.pl", clause(17))),
7
- bindings([binding("Rel", r)]),
8
- uses([
9
- proof(
10
- goal(diamond(r, a, b, c, d)),
11
- by(rule("diamond-property.pl", clause(14))),
12
- bindings([binding("Rel", r), binding("A", a), binding("B", b), binding("C", c), binding("D", d)]),
13
- uses([
14
- proof(
15
- goal(step(r, a, b)),
16
- by(rule("diamond-property.pl", clause(15))),
17
- bindings([binding("X", a), binding("Y", b)]),
18
- uses([
19
- proof(
20
- goal(r(a, b)),
21
- by(fact("diamond-property.pl", clause(8)))
22
- )
23
- ])
24
- ),
25
- proof(
26
- goal(step(r, a, c)),
27
- by(rule("diamond-property.pl", clause(15))),
28
- bindings([binding("X", a), binding("Y", c)]),
29
- uses([
30
- proof(
31
- goal(r(a, c)),
32
- by(fact("diamond-property.pl", clause(9)))
33
- )
34
- ])
35
- ),
36
- proof(
37
- goal(step(r, b, d)),
38
- by(rule("diamond-property.pl", clause(15))),
39
- bindings([binding("X", b), binding("Y", d)]),
40
- uses([
41
- proof(
42
- goal(r(b, d)),
43
- by(fact("diamond-property.pl", clause(10)))
44
- )
45
- ])
46
- ),
47
- proof(
48
- goal(step(r, c, d)),
49
- by(rule("diamond-property.pl", clause(15))),
50
- bindings([binding("X", c), binding("Y", d)]),
51
- uses([
52
- proof(
53
- goal(r(c, d)),
54
- by(fact("diamond-property.pl", clause(11)))
55
- )
56
- ])
57
- )
58
- ])
59
- )
60
- ])
61
- )
62
- ).
63
-
64
2
  holdsFor(diamondProperty, re).
65
- why(
66
- holdsFor(diamondProperty, re),
67
- proof(
68
- goal(holdsFor(diamondProperty, re)),
69
- by(rule("diamond-property.pl", clause(17))),
70
- bindings([binding("Rel", re)]),
71
- uses([
72
- proof(
73
- goal(diamond(re, a, b, c, d)),
74
- by(rule("diamond-property.pl", clause(14))),
75
- bindings([binding("Rel", re), binding("A", a), binding("B", b), binding("C", c), binding("D", d)]),
76
- uses([
77
- proof(
78
- goal(step(re, a, b)),
79
- by(rule("diamond-property.pl", clause(16))),
80
- bindings([binding("X", a), binding("Y", b)]),
81
- uses([
82
- proof(
83
- goal(re(a, b)),
84
- by(rule("diamond-property.pl", clause(13))),
85
- bindings([binding("X", a), binding("Y", b)]),
86
- uses([
87
- proof(
88
- goal(r(a, b)),
89
- by(fact("diamond-property.pl", clause(8)))
90
- )
91
- ])
92
- )
93
- ])
94
- ),
95
- proof(
96
- goal(step(re, a, c)),
97
- by(rule("diamond-property.pl", clause(16))),
98
- bindings([binding("X", a), binding("Y", c)]),
99
- uses([
100
- proof(
101
- goal(re(a, c)),
102
- by(rule("diamond-property.pl", clause(13))),
103
- bindings([binding("X", a), binding("Y", c)]),
104
- uses([
105
- proof(
106
- goal(r(a, c)),
107
- by(fact("diamond-property.pl", clause(9)))
108
- )
109
- ])
110
- )
111
- ])
112
- ),
113
- proof(
114
- goal(step(re, b, d)),
115
- by(rule("diamond-property.pl", clause(16))),
116
- bindings([binding("X", b), binding("Y", d)]),
117
- uses([
118
- proof(
119
- goal(re(b, d)),
120
- by(rule("diamond-property.pl", clause(13))),
121
- bindings([binding("X", b), binding("Y", d)]),
122
- uses([
123
- proof(
124
- goal(r(b, d)),
125
- by(fact("diamond-property.pl", clause(10)))
126
- )
127
- ])
128
- )
129
- ])
130
- ),
131
- proof(
132
- goal(step(re, c, d)),
133
- by(rule("diamond-property.pl", clause(16))),
134
- bindings([binding("X", c), binding("Y", d)]),
135
- uses([
136
- proof(
137
- goal(re(c, d)),
138
- by(rule("diamond-property.pl", clause(13))),
139
- bindings([binding("X", c), binding("Y", d)]),
140
- uses([
141
- proof(
142
- goal(r(c, d)),
143
- by(fact("diamond-property.pl", clause(11)))
144
- )
145
- ])
146
- )
147
- ])
148
- )
149
- ])
150
- )
151
- ])
152
- )
153
- ).
154
-
155
3
  commonSuccessor(diamondProperty, d).
156
- why(
157
- commonSuccessor(diamondProperty, d),
158
- proof(
159
- goal(commonSuccessor(diamondProperty, d)),
160
- by(rule("diamond-property.pl", clause(18))),
161
- bindings([binding("D", d)]),
162
- uses([
163
- proof(
164
- goal(diamond(r, a, b, c, d)),
165
- by(rule("diamond-property.pl", clause(14))),
166
- bindings([binding("Rel", r), binding("A", a), binding("B", b), binding("C", c), binding("D", d)]),
167
- uses([
168
- proof(
169
- goal(step(r, a, b)),
170
- by(rule("diamond-property.pl", clause(15))),
171
- bindings([binding("X", a), binding("Y", b)]),
172
- uses([
173
- proof(
174
- goal(r(a, b)),
175
- by(fact("diamond-property.pl", clause(8)))
176
- )
177
- ])
178
- ),
179
- proof(
180
- goal(step(r, a, c)),
181
- by(rule("diamond-property.pl", clause(15))),
182
- bindings([binding("X", a), binding("Y", c)]),
183
- uses([
184
- proof(
185
- goal(r(a, c)),
186
- by(fact("diamond-property.pl", clause(9)))
187
- )
188
- ])
189
- ),
190
- proof(
191
- goal(step(r, b, d)),
192
- by(rule("diamond-property.pl", clause(15))),
193
- bindings([binding("X", b), binding("Y", d)]),
194
- uses([
195
- proof(
196
- goal(r(b, d)),
197
- by(fact("diamond-property.pl", clause(10)))
198
- )
199
- ])
200
- ),
201
- proof(
202
- goal(step(r, c, d)),
203
- by(rule("diamond-property.pl", clause(15))),
204
- bindings([binding("X", c), binding("Y", d)]),
205
- uses([
206
- proof(
207
- goal(r(c, d)),
208
- by(fact("diamond-property.pl", clause(11)))
209
- )
210
- ])
211
- )
212
- ])
213
- )
214
- ])
215
- )
216
- ).
217
-
218
4
  preservedUnderReflexiveClosure(diamondProperty, true).
219
- why(
220
- preservedUnderReflexiveClosure(diamondProperty, true),
221
- proof(
222
- goal(preservedUnderReflexiveClosure(diamondProperty, true)),
223
- by(rule("diamond-property.pl", clause(19))),
224
- uses([
225
- proof(
226
- goal(diamond(re, a, b, c, d)),
227
- by(rule("diamond-property.pl", clause(14))),
228
- bindings([binding("Rel", re), binding("A", a), binding("B", b), binding("C", c), binding("D", d)]),
229
- uses([
230
- proof(
231
- goal(step(re, a, b)),
232
- by(rule("diamond-property.pl", clause(16))),
233
- bindings([binding("X", a), binding("Y", b)]),
234
- uses([
235
- proof(
236
- goal(re(a, b)),
237
- by(rule("diamond-property.pl", clause(13))),
238
- bindings([binding("X", a), binding("Y", b)]),
239
- uses([
240
- proof(
241
- goal(r(a, b)),
242
- by(fact("diamond-property.pl", clause(8)))
243
- )
244
- ])
245
- )
246
- ])
247
- ),
248
- proof(
249
- goal(step(re, a, c)),
250
- by(rule("diamond-property.pl", clause(16))),
251
- bindings([binding("X", a), binding("Y", c)]),
252
- uses([
253
- proof(
254
- goal(re(a, c)),
255
- by(rule("diamond-property.pl", clause(13))),
256
- bindings([binding("X", a), binding("Y", c)]),
257
- uses([
258
- proof(
259
- goal(r(a, c)),
260
- by(fact("diamond-property.pl", clause(9)))
261
- )
262
- ])
263
- )
264
- ])
265
- ),
266
- proof(
267
- goal(step(re, b, d)),
268
- by(rule("diamond-property.pl", clause(16))),
269
- bindings([binding("X", b), binding("Y", d)]),
270
- uses([
271
- proof(
272
- goal(re(b, d)),
273
- by(rule("diamond-property.pl", clause(13))),
274
- bindings([binding("X", b), binding("Y", d)]),
275
- uses([
276
- proof(
277
- goal(r(b, d)),
278
- by(fact("diamond-property.pl", clause(10)))
279
- )
280
- ])
281
- )
282
- ])
283
- ),
284
- proof(
285
- goal(step(re, c, d)),
286
- by(rule("diamond-property.pl", clause(16))),
287
- bindings([binding("X", c), binding("Y", d)]),
288
- uses([
289
- proof(
290
- goal(re(c, d)),
291
- by(rule("diamond-property.pl", clause(13))),
292
- bindings([binding("X", c), binding("Y", d)]),
293
- uses([
294
- proof(
295
- goal(r(c, d)),
296
- by(fact("diamond-property.pl", clause(11)))
297
- )
298
- ])
299
- )
300
- ])
301
- )
302
- ])
303
- )
304
- ])
305
- )
306
- ).
307
-