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,310 +1,4 @@
1
1
  hitRate(api_cache, 0.85999999999999999).
2
- why(
3
- hitRate(api_cache, 0.85999999999999999),
4
- proof(
5
- goal(hitRate(api_cache, 0.85999999999999999)),
6
- by(rule("cache-performance.pl", clause(12))),
7
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999)]),
8
- uses([
9
- proof(
10
- goal(hit_rate(api_cache, 0.85999999999999999)),
11
- by(rule("cache-performance.pl", clause(9))),
12
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999), binding("Hits", 8600.0), binding("_Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0), binding("Total", 10000.0)]),
13
- uses([
14
- proof(
15
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
16
- by(fact("cache-performance.pl", clause(5)))
17
- ),
18
- proof(
19
- goal(total_requests(api_cache, 10000.0)),
20
- by(rule("cache-performance.pl", clause(8))),
21
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
22
- uses([
23
- proof(
24
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
25
- by(fact("cache-performance.pl", clause(5)))
26
- ),
27
- proof(
28
- goal(add(8600.0, 1400.0, 10000.0)),
29
- by(builtin(add, 3))
30
- )
31
- ])
32
- ),
33
- proof(
34
- goal(div(8600.0, 10000.0, 0.85999999999999999)),
35
- by(builtin(div, 3))
36
- )
37
- ])
38
- )
39
- ])
40
- )
41
- ).
42
-
43
2
  averageLatency_ms(api_cache, 15.5).
44
- why(
45
- averageLatency_ms(api_cache, 15.5),
46
- proof(
47
- goal(averageLatency_ms(api_cache, 15.5)),
48
- by(rule("cache-performance.pl", clause(13))),
49
- bindings([binding("Cache", api_cache), binding("Average", 15.5)]),
50
- uses([
51
- proof(
52
- goal(average_latency(api_cache, 15.5)),
53
- by(rule("cache-performance.pl", clause(10))),
54
- bindings([binding("Cache", api_cache), binding("Average", 15.5), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("HitLatency", 5.0), binding("MissLatency", 80.0), binding("HitCost", 43000.0), binding("MissCost", 112000.0), binding("TotalCost", 155000.0), binding("Total", 10000.0)]),
55
- uses([
56
- proof(
57
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
58
- by(fact("cache-performance.pl", clause(5)))
59
- ),
60
- proof(
61
- goal(mul(8600.0, 5.0, 43000.0)),
62
- by(builtin(mul, 3))
63
- ),
64
- proof(
65
- goal(mul(1400.0, 80.0, 112000.0)),
66
- by(builtin(mul, 3))
67
- ),
68
- proof(
69
- goal(add(43000.0, 112000.0, 155000.0)),
70
- by(builtin(add, 3))
71
- ),
72
- proof(
73
- goal(total_requests(api_cache, 10000.0)),
74
- by(rule("cache-performance.pl", clause(8))),
75
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
76
- uses([
77
- proof(
78
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
79
- by(fact("cache-performance.pl", clause(5)))
80
- ),
81
- proof(
82
- goal(add(8600.0, 1400.0, 10000.0)),
83
- by(builtin(add, 3))
84
- )
85
- ])
86
- ),
87
- proof(
88
- goal(div(155000.0, 10000.0, 15.5)),
89
- by(builtin(div, 3))
90
- )
91
- ])
92
- )
93
- ])
94
- )
95
- ).
96
-
97
3
  status(api_cache, cache_effective).
98
- why(
99
- status(api_cache, cache_effective),
100
- proof(
101
- goal(status(api_cache, cache_effective)),
102
- by(rule("cache-performance.pl", clause(14))),
103
- bindings([binding("Cache", api_cache)]),
104
- uses([
105
- proof(
106
- goal(cache_effective(api_cache)),
107
- by(rule("cache-performance.pl", clause(11))),
108
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999), binding("MinimumRate", 0.80), binding("Average", 15.5), binding("MaximumLatency", 20.0)]),
109
- uses([
110
- proof(
111
- goal(hit_rate(api_cache, 0.85999999999999999)),
112
- by(rule("cache-performance.pl", clause(9))),
113
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999), binding("Hits", 8600.0), binding("_Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0), binding("Total", 10000.0)]),
114
- uses([
115
- proof(
116
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
117
- by(fact("cache-performance.pl", clause(5)))
118
- ),
119
- proof(
120
- goal(total_requests(api_cache, 10000.0)),
121
- by(rule("cache-performance.pl", clause(8))),
122
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
123
- uses([
124
- proof(
125
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
126
- by(fact("cache-performance.pl", clause(5)))
127
- ),
128
- proof(
129
- goal(add(8600.0, 1400.0, 10000.0)),
130
- by(builtin(add, 3))
131
- )
132
- ])
133
- ),
134
- proof(
135
- goal(div(8600.0, 10000.0, 0.85999999999999999)),
136
- by(builtin(div, 3))
137
- )
138
- ])
139
- ),
140
- proof(
141
- goal(threshold(api_cache, minimum_hit_rate, 0.80)),
142
- by(fact("cache-performance.pl", clause(6)))
143
- ),
144
- proof(
145
- goal(gt(0.85999999999999999, 0.80)),
146
- by(builtin(gt, 2))
147
- ),
148
- proof(
149
- goal(average_latency(api_cache, 15.5)),
150
- by(rule("cache-performance.pl", clause(10))),
151
- bindings([binding("Cache", api_cache), binding("Average", 15.5), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("HitLatency", 5.0), binding("MissLatency", 80.0), binding("HitCost", 43000.0), binding("MissCost", 112000.0), binding("TotalCost", 155000.0), binding("Total", 10000.0)]),
152
- uses([
153
- proof(
154
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
155
- by(fact("cache-performance.pl", clause(5)))
156
- ),
157
- proof(
158
- goal(mul(8600.0, 5.0, 43000.0)),
159
- by(builtin(mul, 3))
160
- ),
161
- proof(
162
- goal(mul(1400.0, 80.0, 112000.0)),
163
- by(builtin(mul, 3))
164
- ),
165
- proof(
166
- goal(add(43000.0, 112000.0, 155000.0)),
167
- by(builtin(add, 3))
168
- ),
169
- proof(
170
- goal(total_requests(api_cache, 10000.0)),
171
- by(rule("cache-performance.pl", clause(8))),
172
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
173
- uses([
174
- proof(
175
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
176
- by(fact("cache-performance.pl", clause(5)))
177
- ),
178
- proof(
179
- goal(add(8600.0, 1400.0, 10000.0)),
180
- by(builtin(add, 3))
181
- )
182
- ])
183
- ),
184
- proof(
185
- goal(div(155000.0, 10000.0, 15.5)),
186
- by(builtin(div, 3))
187
- )
188
- ])
189
- ),
190
- proof(
191
- goal(threshold(api_cache, maximum_average_latency_ms, 20.0)),
192
- by(fact("cache-performance.pl", clause(7)))
193
- ),
194
- proof(
195
- goal(lt(15.5, 20.0)),
196
- by(builtin(lt, 2))
197
- )
198
- ])
199
- )
200
- ])
201
- )
202
- ).
203
-
204
4
  reason(api_cache, "hit rate is above target and average latency is below limit").
205
- why(
206
- reason(api_cache, "hit rate is above target and average latency is below limit"),
207
- proof(
208
- goal(reason(api_cache, "hit rate is above target and average latency is below limit")),
209
- by(rule("cache-performance.pl", clause(15))),
210
- bindings([binding("Cache", api_cache)]),
211
- uses([
212
- proof(
213
- goal(cache_effective(api_cache)),
214
- by(rule("cache-performance.pl", clause(11))),
215
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999), binding("MinimumRate", 0.80), binding("Average", 15.5), binding("MaximumLatency", 20.0)]),
216
- uses([
217
- proof(
218
- goal(hit_rate(api_cache, 0.85999999999999999)),
219
- by(rule("cache-performance.pl", clause(9))),
220
- bindings([binding("Cache", api_cache), binding("Rate", 0.85999999999999999), binding("Hits", 8600.0), binding("_Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0), binding("Total", 10000.0)]),
221
- uses([
222
- proof(
223
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
224
- by(fact("cache-performance.pl", clause(5)))
225
- ),
226
- proof(
227
- goal(total_requests(api_cache, 10000.0)),
228
- by(rule("cache-performance.pl", clause(8))),
229
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
230
- uses([
231
- proof(
232
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
233
- by(fact("cache-performance.pl", clause(5)))
234
- ),
235
- proof(
236
- goal(add(8600.0, 1400.0, 10000.0)),
237
- by(builtin(add, 3))
238
- )
239
- ])
240
- ),
241
- proof(
242
- goal(div(8600.0, 10000.0, 0.85999999999999999)),
243
- by(builtin(div, 3))
244
- )
245
- ])
246
- ),
247
- proof(
248
- goal(threshold(api_cache, minimum_hit_rate, 0.80)),
249
- by(fact("cache-performance.pl", clause(6)))
250
- ),
251
- proof(
252
- goal(gt(0.85999999999999999, 0.80)),
253
- by(builtin(gt, 2))
254
- ),
255
- proof(
256
- goal(average_latency(api_cache, 15.5)),
257
- by(rule("cache-performance.pl", clause(10))),
258
- bindings([binding("Cache", api_cache), binding("Average", 15.5), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("HitLatency", 5.0), binding("MissLatency", 80.0), binding("HitCost", 43000.0), binding("MissCost", 112000.0), binding("TotalCost", 155000.0), binding("Total", 10000.0)]),
259
- uses([
260
- proof(
261
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
262
- by(fact("cache-performance.pl", clause(5)))
263
- ),
264
- proof(
265
- goal(mul(8600.0, 5.0, 43000.0)),
266
- by(builtin(mul, 3))
267
- ),
268
- proof(
269
- goal(mul(1400.0, 80.0, 112000.0)),
270
- by(builtin(mul, 3))
271
- ),
272
- proof(
273
- goal(add(43000.0, 112000.0, 155000.0)),
274
- by(builtin(add, 3))
275
- ),
276
- proof(
277
- goal(total_requests(api_cache, 10000.0)),
278
- by(rule("cache-performance.pl", clause(8))),
279
- bindings([binding("Cache", api_cache), binding("Total", 10000.0), binding("Hits", 8600.0), binding("Misses", 1400.0), binding("_HitLatency", 5.0), binding("_MissLatency", 80.0)]),
280
- uses([
281
- proof(
282
- goal(cache_sample(api_cache, 8600.0, 1400.0, 5.0, 80.0)),
283
- by(fact("cache-performance.pl", clause(5)))
284
- ),
285
- proof(
286
- goal(add(8600.0, 1400.0, 10000.0)),
287
- by(builtin(add, 3))
288
- )
289
- ])
290
- ),
291
- proof(
292
- goal(div(155000.0, 10000.0, 15.5)),
293
- by(builtin(div, 3))
294
- )
295
- ])
296
- ),
297
- proof(
298
- goal(threshold(api_cache, maximum_average_latency_ms, 20.0)),
299
- by(fact("cache-performance.pl", clause(7)))
300
- ),
301
- proof(
302
- goal(lt(15.5, 20.0)),
303
- by(builtin(lt, 2))
304
- )
305
- ])
306
- )
307
- ])
308
- )
309
- ).
310
-
@@ -1,172 +1,5 @@
1
1
  errorRate(canary42, 0.014999999999999999).
2
- why(
3
- errorRate(canary42, 0.014999999999999999),
4
- proof(
5
- goal(errorRate(canary42, 0.014999999999999999)),
6
- by(rule("canary-release.pl", clause(13))),
7
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999)]),
8
- uses([
9
- proof(
10
- goal(error_rate(canary42, 0.014999999999999999)),
11
- by(rule("canary-release.pl", clause(9))),
12
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999), binding("Requests", 5000.0), binding("Errors", 75.0), binding("_P95Latency", 180.0)]),
13
- uses([
14
- proof(
15
- goal(canary(canary42, 5000.0, 75.0, 180.0)),
16
- by(fact("canary-release.pl", clause(6)))
17
- ),
18
- proof(
19
- goal(div(75.0, 5000.0, 0.014999999999999999)),
20
- by(builtin(div, 3))
21
- )
22
- ])
23
- )
24
- ])
25
- )
26
- ).
27
-
28
2
  p95Latency_ms(canary42, 180.0).
29
- why(
30
- p95Latency_ms(canary42, 180.0),
31
- proof(
32
- goal(p95Latency_ms(canary42, 180.0)),
33
- by(rule("canary-release.pl", clause(14))),
34
- bindings([binding("Release", canary42), binding("P95Latency", 180.0), binding("_Requests", 5000.0), binding("_Errors", 75.0)]),
35
- uses([
36
- proof(
37
- goal(canary(canary42, 5000.0, 75.0, 180.0)),
38
- by(fact("canary-release.pl", clause(6)))
39
- )
40
- ])
41
- )
42
- ).
43
-
44
3
  latencyCheck(canary42, ok).
45
- why(
46
- latencyCheck(canary42, ok),
47
- proof(
48
- goal(latencyCheck(canary42, ok)),
49
- by(rule("canary-release.pl", clause(15))),
50
- bindings([binding("Release", canary42)]),
51
- uses([
52
- proof(
53
- goal(latency_ok(canary42)),
54
- by(rule("canary-release.pl", clause(10))),
55
- bindings([binding("Release", canary42), binding("_Requests", 5000.0), binding("_Errors", 75.0), binding("P95Latency", 180.0), binding("Maximum", 200.0)]),
56
- uses([
57
- proof(
58
- goal(canary(canary42, 5000.0, 75.0, 180.0)),
59
- by(fact("canary-release.pl", clause(6)))
60
- ),
61
- proof(
62
- goal(threshold(canary42, maximum_p95_latency_ms, 200.0)),
63
- by(fact("canary-release.pl", clause(8)))
64
- ),
65
- proof(
66
- goal(lt(180.0, 200.0)),
67
- by(builtin(lt, 2))
68
- )
69
- ])
70
- )
71
- ])
72
- )
73
- ).
74
-
75
4
  status(canary42, rollback_recommended).
76
- why(
77
- status(canary42, rollback_recommended),
78
- proof(
79
- goal(status(canary42, rollback_recommended)),
80
- by(rule("canary-release.pl", clause(16))),
81
- bindings([binding("Release", canary42)]),
82
- uses([
83
- proof(
84
- goal(rollback_recommended(canary42)),
85
- by(rule("canary-release.pl", clause(12))),
86
- bindings([binding("Release", canary42)]),
87
- uses([
88
- proof(
89
- goal(error_budget_exceeded(canary42)),
90
- by(rule("canary-release.pl", clause(11))),
91
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999), binding("Maximum", 0.01)]),
92
- uses([
93
- proof(
94
- goal(error_rate(canary42, 0.014999999999999999)),
95
- by(rule("canary-release.pl", clause(9))),
96
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999), binding("Requests", 5000.0), binding("Errors", 75.0), binding("_P95Latency", 180.0)]),
97
- uses([
98
- proof(
99
- goal(canary(canary42, 5000.0, 75.0, 180.0)),
100
- by(fact("canary-release.pl", clause(6)))
101
- ),
102
- proof(
103
- goal(div(75.0, 5000.0, 0.014999999999999999)),
104
- by(builtin(div, 3))
105
- )
106
- ])
107
- ),
108
- proof(
109
- goal(threshold(canary42, maximum_error_rate, 0.01)),
110
- by(fact("canary-release.pl", clause(7)))
111
- ),
112
- proof(
113
- goal(gt(0.014999999999999999, 0.01)),
114
- by(builtin(gt, 2))
115
- )
116
- ])
117
- )
118
- ])
119
- )
120
- ])
121
- )
122
- ).
123
-
124
5
  reason(canary42, "canary error rate exceeds the allowed budget").
125
- why(
126
- reason(canary42, "canary error rate exceeds the allowed budget"),
127
- proof(
128
- goal(reason(canary42, "canary error rate exceeds the allowed budget")),
129
- by(rule("canary-release.pl", clause(17))),
130
- bindings([binding("Release", canary42)]),
131
- uses([
132
- proof(
133
- goal(rollback_recommended(canary42)),
134
- by(rule("canary-release.pl", clause(12))),
135
- bindings([binding("Release", canary42)]),
136
- uses([
137
- proof(
138
- goal(error_budget_exceeded(canary42)),
139
- by(rule("canary-release.pl", clause(11))),
140
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999), binding("Maximum", 0.01)]),
141
- uses([
142
- proof(
143
- goal(error_rate(canary42, 0.014999999999999999)),
144
- by(rule("canary-release.pl", clause(9))),
145
- bindings([binding("Release", canary42), binding("Rate", 0.014999999999999999), binding("Requests", 5000.0), binding("Errors", 75.0), binding("_P95Latency", 180.0)]),
146
- uses([
147
- proof(
148
- goal(canary(canary42, 5000.0, 75.0, 180.0)),
149
- by(fact("canary-release.pl", clause(6)))
150
- ),
151
- proof(
152
- goal(div(75.0, 5000.0, 0.014999999999999999)),
153
- by(builtin(div, 3))
154
- )
155
- ])
156
- ),
157
- proof(
158
- goal(threshold(canary42, maximum_error_rate, 0.01)),
159
- by(fact("canary-release.pl", clause(7)))
160
- ),
161
- proof(
162
- goal(gt(0.014999999999999999, 0.01)),
163
- by(builtin(gt, 2))
164
- )
165
- ])
166
- )
167
- ])
168
- )
169
- ])
170
- )
171
- ).
172
-
@@ -1,86 +1,3 @@
1
1
  type(sk_0, cat).
2
- why(
3
- type(sk_0, cat),
4
- proof(
5
- goal(type(sk_0, cat)),
6
- by(rule("cat-koko.pl", clause(6))),
7
- bindings([binding("X", sk_0)]),
8
- uses([
9
- proof(
10
- goal(animal(koko)),
11
- by(fact("cat-koko.pl", clause(3)))
12
- ),
13
- proof(
14
- goal(witness(cat, sk_0)),
15
- by(fact("cat-koko.pl", clause(4)))
16
- )
17
- ])
18
- )
19
- ).
20
-
21
2
  type(sk_1, british_short_hair).
22
- why(
23
- type(sk_1, british_short_hair),
24
- proof(
25
- goal(type(sk_1, british_short_hair)),
26
- by(rule("cat-koko.pl", clause(7))),
27
- bindings([binding("X", sk_1)]),
28
- uses([
29
- proof(
30
- goal(animal(koko)),
31
- by(fact("cat-koko.pl", clause(3)))
32
- ),
33
- proof(
34
- goal(witness(british_short_hair, sk_1)),
35
- by(fact("cat-koko.pl", clause(5)))
36
- )
37
- ])
38
- )
39
- ).
40
-
41
3
  is(test, true).
42
- why(
43
- is(test, true),
44
- proof(
45
- goal(is(test, true)),
46
- by(rule("cat-koko.pl", clause(8))),
47
- bindings([binding("X", sk_0), binding("Y", sk_1)]),
48
- uses([
49
- proof(
50
- goal(type(sk_0, cat)),
51
- by(rule("cat-koko.pl", clause(6))),
52
- bindings([binding("X", sk_0)]),
53
- uses([
54
- proof(
55
- goal(animal(koko)),
56
- by(fact("cat-koko.pl", clause(3)))
57
- ),
58
- proof(
59
- goal(witness(cat, sk_0)),
60
- by(fact("cat-koko.pl", clause(4)))
61
- )
62
- ])
63
- ),
64
- proof(
65
- goal(type(sk_1, british_short_hair)),
66
- by(rule("cat-koko.pl", clause(7))),
67
- bindings([binding("X", sk_1)]),
68
- uses([
69
- proof(
70
- goal(animal(koko)),
71
- by(fact("cat-koko.pl", clause(3)))
72
- ),
73
- proof(
74
- goal(witness(british_short_hair, sk_1)),
75
- by(fact("cat-koko.pl", clause(5)))
76
- )
77
- ])
78
- ),
79
- proof(
80
- goal(neq(sk_0, sk_1)),
81
- by(builtin(neq, 2))
82
- )
83
- ])
84
- )
85
- ).
86
-