eyeprolog 1.6.12 → 1.6.13
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/abstract-interpretation.pl +146 -0
- package/examples/proof/ackermann.pl +296 -0
- package/examples/proof/alignment-demo.pl +196 -0
- package/examples/proof/allen-interval-calculus.pl +1271 -0
- package/examples/proof/auroracare.pl +954 -0
- package/examples/proof/basic-monadic.pl +37176 -0
- package/examples/proof/bayes-therapy.pl +1349 -0
- package/examples/proof/bench.pl +2802 -0
- package/examples/proof/binomial-vandermonde.pl +983 -0
- package/examples/proof/blocks-world-planning.pl +471 -0
- package/examples/proof/bmi.pl +386 -0
- package/examples/proof/braking-safety-worlds.pl +508 -0
- package/examples/proof/buck-converter-design.pl +179 -0
- package/examples/proof/bulk-stream-write.pl +3 -0
- package/examples/proof/collatz-1000.pl +43784 -0
- package/examples/proof/competitive-enzyme-kinetics.pl +167 -0
- package/examples/proof/complex.pl +514 -0
- package/examples/proof/context-schema-audit.pl +374 -0
- package/examples/proof/continued-fraction-sqrt2.pl +476 -0
- package/examples/proof/control-system.pl +137 -0
- package/examples/proof/critical-path-schedule.pl +491 -0
- package/examples/proof/cross-organization-data-sharing.pl +732 -0
- package/examples/proof/cyclic-path.pl +44 -0
- package/examples/proof/dairy-energy-balance.pl +290 -0
- package/examples/proof/dcg-expression-language.pl +157 -0
- package/examples/proof/deep-taxonomy-10.pl +185 -0
- package/examples/proof/deep-taxonomy-100.pl +365 -0
- package/examples/proof/deep-taxonomy-1000.pl +163 -0
- package/examples/proof/deep-taxonomy-10000.pl +163 -0
- package/examples/proof/deep-taxonomy-100000.pl +163 -0
- package/examples/proof/delfour.pl +1615 -0
- package/examples/proof/dijkstra-findall-sort.pl +354 -0
- package/examples/proof/dijkstra-risk-path.pl +820 -0
- package/examples/proof/dijkstra.pl +753 -0
- package/examples/proof/dining-philosophers.pl +2663 -0
- package/examples/proof/donald-gerald-robert.pl +311 -0
- package/examples/proof/dpv-odrl-purpose-mapping.pl +1189 -0
- package/examples/proof/drone-corridor-planner.pl +2365 -0
- package/examples/proof/easter-computus.pl +1406 -0
- package/examples/proof/eulerian-path.pl +457 -0
- package/examples/proof/ev-range-worlds.pl +508 -0
- package/examples/proof/exoplanet-validation-worlds.pl +397 -0
- package/examples/proof/explainable-ev-depot-configuration.pl +313 -0
- package/examples/proof/family-cousins.pl +920 -0
- package/examples/proof/fast-fourier-transform.pl +5045 -0
- package/examples/proof/fastpow.pl +769 -0
- package/examples/proof/fft8-numeric.pl +685 -0
- package/examples/proof/fibonacci.pl +1425 -0
- package/examples/proof/field-nitrogen-balance.pl +320 -0
- package/examples/proof/flandor.pl +533 -0
- package/examples/proof/fundamental-theorem-arithmetic.pl +245 -0
- package/examples/proof/gd-step-certified.pl +1717 -0
- package/examples/proof/goldbach.pl +1135 -0
- package/examples/proof/gps.pl +627 -0
- package/examples/proof/graph.pl +105 -0
- package/examples/proof/gray-code-counter.pl +355 -0
- package/examples/proof/hamiltonian-path.pl +3373 -0
- package/examples/proof/hamming-code.pl +232 -0
- package/examples/proof/heron-theorem.pl +79 -0
- package/examples/proof/http-client.pl +0 -0
- package/examples/proof/illegitimate-reasoning.pl +220 -0
- package/examples/proof/integer-partitions.pl +1642 -0
- package/examples/proof/iso-atomic-conversion.pl +73 -0
- package/examples/proof/knowledge-engineering-alignment-flow.pl +200 -0
- package/examples/proof/knuth-bendix-completion.pl +290 -0
- package/examples/proof/law-of-cosines.pl +71 -0
- package/examples/proof/least-squares-regression.pl +342 -0
- package/examples/proof/lee.pl +637 -0
- package/examples/proof/lldm.pl +581 -0
- package/examples/proof/manufacturing-quality-control.pl +181 -0
- package/examples/proof/map-four-color-search.pl +796 -0
- package/examples/proof/markov-logic-network.pl +405 -0
- package/examples/proof/matrix-chain-order.pl +164 -0
- package/examples/proof/matrix-noncommutativity.pl +183 -0
- package/examples/proof/microgrid-dispatch.pl +164 -0
- package/examples/proof/missionaries-cannibals.pl +428 -0
- package/examples/proof/modular-exponentiation.pl +838 -0
- package/examples/proof/monkey-bananas.pl +278 -0
- package/examples/proof/network-sla.pl +100 -0
- package/examples/proof/newton-raphson.pl +520 -0
- package/examples/proof/observability-log-correlation.pl +1061 -0
- package/examples/proof/odrl-dpv-fpv-trust-flow.pl +1366 -0
- package/examples/proof/odrl-dpv-healthcare-risk-ranked.pl +488 -0
- package/examples/proof/odrl-dpv-risk-ranked.pl +637 -0
- package/examples/proof/odrl-policy-advanced.pl +705 -0
- package/examples/proof/odrl-policy-reasoning.pl +1423 -0
- package/examples/proof/odrl-policy.pl +103 -0
- package/examples/proof/operational-incident-response.pl +435 -0
- package/examples/proof/orbital-transfer-design.pl +288 -0
- package/examples/proof/path-discovery.pl +502 -0
- package/examples/proof/peano-arithmetic.pl +910 -0
- package/examples/proof/peano-calculus.pl +294 -0
- package/examples/proof/pell-equation.pl +295 -0
- package/examples/proof/pendulum-period.pl +97 -0
- package/examples/proof/pi.pl +3 -0
- package/examples/proof/pointer-analysis.pl +94 -0
- package/examples/proof/polynomial.pl +2487 -0
- package/examples/proof/portable-library-overlap.pl +6 -0
- package/examples/proof/quadratic-formula.pl +159 -0
- package/examples/proof/quine-mccluskey.pl +914 -0
- package/examples/proof/radioactive-decay.pl +104 -0
- package/examples/proof/rdf12-annotated-claims.pl +263 -0
- package/examples/proof/register-allocation.pl +120 -0
- package/examples/proof/relational-cube-lookup.pl +15867 -0
- package/examples/proof/riemann-hypothesis.pl +148 -0
- package/examples/proof/sat-solver-dpll.pl +226 -0
- package/examples/proof/scientific-evidence-graph.pl +681 -0
- package/examples/proof/send-more-money.pl +252 -0
- package/examples/proof/service-impact.pl +151 -0
- package/examples/proof/shoelace-polygon-area.pl +161 -0
- package/examples/proof/skolem-functions.pl +128 -0
- package/examples/proof/statistics-summary.pl +250 -0
- package/examples/proof/stirling-bell-numbers.pl +125 -0
- package/examples/proof/superdense-coding.pl +118 -0
- package/examples/proof/symbiotic-knowledge-graph.pl +1569 -0
- package/examples/proof/truth-maintenance-system.pl +466 -0
- package/examples/proof/turing.pl +1183 -0
- package/examples/proof/type-inference.pl +267 -0
- package/examples/proof/vector-similarity.pl +163 -0
- package/examples/proof/vulnerability-impact.pl +180 -0
- package/examples/proof/wolf-goat-cabbage.pl +339 -0
- package/examples/proof/zebra.pl +176 -0
- package/package.json +1 -1
- package/src/check-proof.js +159 -11
- package/test/conformance/NEUMERKEL-LATEST.md +3 -3
- package/test/regression/cases-white-box.mjs +38 -0
- package/test/run-examples.mjs +7 -111
- package/test/run-proof-checking.mjs +28 -5
- package/the-art-of-eyeprolog.md +4 -2
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
absState(input, x, sign(neg)).
|
|
2
|
+
absState(input, x, sign(zero)).
|
|
3
|
+
absState(input, x, sign(pos)).
|
|
4
|
+
absState(negative_branch, x, sign(neg)).
|
|
5
|
+
absState(nonnegative_branch, x, sign(zero)).
|
|
6
|
+
absState(nonnegative_branch, x, sign(pos)).
|
|
7
|
+
absState(negative_branch, y, sign(pos)).
|
|
8
|
+
absState(nonnegative_branch, y, sign(zero)).
|
|
9
|
+
absState(nonnegative_branch, y, sign(pos)).
|
|
10
|
+
absState(join, x, sign(neg)).
|
|
11
|
+
absState(join, y, sign(pos)).
|
|
12
|
+
absState(join, x, sign(zero)).
|
|
13
|
+
absState(join, x, sign(pos)).
|
|
14
|
+
absState(join, y, sign(zero)).
|
|
15
|
+
absWarning(division_by_zero, join).
|
|
16
|
+
absConclusion(case, "abstract interpretation keeps all feasible signs and warns because y may be zero").
|
|
17
|
+
|
|
18
|
+
clause(1, input_sign(neg), true).
|
|
19
|
+
clause(2, input_sign(zero), true).
|
|
20
|
+
clause(3, input_sign(pos), true).
|
|
21
|
+
clause(4, abs_state(input, x, var('Sign')), input_sign(var('Sign'))).
|
|
22
|
+
clause(5, abs_state(negative_branch, x, neg), abs_state(input, x, neg)).
|
|
23
|
+
clause(6, abs_state(nonnegative_branch, x, zero), abs_state(input, x, zero)).
|
|
24
|
+
clause(7, abs_state(nonnegative_branch, x, pos), abs_state(input, x, pos)).
|
|
25
|
+
clause(8, abs_state(negative_branch, y, pos), abs_state(negative_branch, x, neg)).
|
|
26
|
+
clause(9,
|
|
27
|
+
abs_state(nonnegative_branch, y, var('Sign')),
|
|
28
|
+
abs_state(nonnegative_branch, x, var('Sign'))).
|
|
29
|
+
clause(10,
|
|
30
|
+
abs_state(join, var('Var'), var('Sign')),
|
|
31
|
+
abs_state(negative_branch, var('Var'), var('Sign'))).
|
|
32
|
+
clause(11,
|
|
33
|
+
abs_state(join, var('Var'), var('Sign')),
|
|
34
|
+
abs_state(nonnegative_branch, var('Var'), var('Sign'))).
|
|
35
|
+
clause(12, possible_division_by_zero(join), abs_state(join, y, zero)).
|
|
36
|
+
clause(13,
|
|
37
|
+
absState(var('Point'), var('Var'), sign(var('Sign'))),
|
|
38
|
+
abs_state(var('Point'), var('Var'), var('Sign'))).
|
|
39
|
+
clause(14, absWarning(division_by_zero, var('Point')), possible_division_by_zero(var('Point'))).
|
|
40
|
+
clause(15,
|
|
41
|
+
absConclusion(case, "abstract interpretation keeps all feasible signs and warns because y may be zero"),
|
|
42
|
+
possible_division_by_zero(join)).
|
|
43
|
+
|
|
44
|
+
step(absState(input, x, sign(neg)),
|
|
45
|
+
rule(13),
|
|
46
|
+
['Point' = input, 'Var' = x, 'Sign' = neg],
|
|
47
|
+
[abs_state(input, x, neg)]).
|
|
48
|
+
step(abs_state(input, x, neg), rule(4), ['Sign' = neg], [input_sign(neg)]).
|
|
49
|
+
step(input_sign(neg), fact(1), [], []).
|
|
50
|
+
step(absState(input, x, sign(zero)),
|
|
51
|
+
rule(13),
|
|
52
|
+
['Point' = input, 'Var' = x, 'Sign' = zero],
|
|
53
|
+
[abs_state(input, x, zero)]).
|
|
54
|
+
step(abs_state(input, x, zero), rule(4), ['Sign' = zero], [input_sign(zero)]).
|
|
55
|
+
step(input_sign(zero), fact(2), [], []).
|
|
56
|
+
step(absState(input, x, sign(pos)),
|
|
57
|
+
rule(13),
|
|
58
|
+
['Point' = input, 'Var' = x, 'Sign' = pos],
|
|
59
|
+
[abs_state(input, x, pos)]).
|
|
60
|
+
step(abs_state(input, x, pos), rule(4), ['Sign' = pos], [input_sign(pos)]).
|
|
61
|
+
step(input_sign(pos), fact(3), [], []).
|
|
62
|
+
step(absState(negative_branch, x, sign(neg)),
|
|
63
|
+
rule(13),
|
|
64
|
+
['Point' = negative_branch, 'Var' = x, 'Sign' = neg],
|
|
65
|
+
[abs_state(negative_branch, x, neg)]).
|
|
66
|
+
step(abs_state(negative_branch, x, neg), rule(5), [], [abs_state(input, x, neg)]).
|
|
67
|
+
step(absState(nonnegative_branch, x, sign(zero)),
|
|
68
|
+
rule(13),
|
|
69
|
+
['Point' = nonnegative_branch, 'Var' = x, 'Sign' = zero],
|
|
70
|
+
[abs_state(nonnegative_branch, x, zero)]).
|
|
71
|
+
step(abs_state(nonnegative_branch, x, zero), rule(6), [], [abs_state(input, x, zero)]).
|
|
72
|
+
step(absState(nonnegative_branch, x, sign(pos)),
|
|
73
|
+
rule(13),
|
|
74
|
+
['Point' = nonnegative_branch, 'Var' = x, 'Sign' = pos],
|
|
75
|
+
[abs_state(nonnegative_branch, x, pos)]).
|
|
76
|
+
step(abs_state(nonnegative_branch, x, pos), rule(7), [], [abs_state(input, x, pos)]).
|
|
77
|
+
step(absState(negative_branch, y, sign(pos)),
|
|
78
|
+
rule(13),
|
|
79
|
+
['Point' = negative_branch, 'Var' = y, 'Sign' = pos],
|
|
80
|
+
[abs_state(negative_branch, y, pos)]).
|
|
81
|
+
step(abs_state(negative_branch, y, pos), rule(8), [], [abs_state(negative_branch, x, neg)]).
|
|
82
|
+
step(absState(nonnegative_branch, y, sign(zero)),
|
|
83
|
+
rule(13),
|
|
84
|
+
['Point' = nonnegative_branch, 'Var' = y, 'Sign' = zero],
|
|
85
|
+
[abs_state(nonnegative_branch, y, zero)]).
|
|
86
|
+
step(abs_state(nonnegative_branch, y, zero),
|
|
87
|
+
rule(9),
|
|
88
|
+
['Sign' = zero],
|
|
89
|
+
[abs_state(nonnegative_branch, x, zero)]).
|
|
90
|
+
step(absState(nonnegative_branch, y, sign(pos)),
|
|
91
|
+
rule(13),
|
|
92
|
+
['Point' = nonnegative_branch, 'Var' = y, 'Sign' = pos],
|
|
93
|
+
[abs_state(nonnegative_branch, y, pos)]).
|
|
94
|
+
step(abs_state(nonnegative_branch, y, pos),
|
|
95
|
+
rule(9),
|
|
96
|
+
['Sign' = pos],
|
|
97
|
+
[abs_state(nonnegative_branch, x, pos)]).
|
|
98
|
+
step(absState(join, x, sign(neg)),
|
|
99
|
+
rule(13),
|
|
100
|
+
['Point' = join, 'Var' = x, 'Sign' = neg],
|
|
101
|
+
[abs_state(join, x, neg)]).
|
|
102
|
+
step(abs_state(join, x, neg),
|
|
103
|
+
rule(10),
|
|
104
|
+
['Var' = x, 'Sign' = neg],
|
|
105
|
+
[abs_state(negative_branch, x, neg)]).
|
|
106
|
+
step(absState(join, y, sign(pos)),
|
|
107
|
+
rule(13),
|
|
108
|
+
['Point' = join, 'Var' = y, 'Sign' = pos],
|
|
109
|
+
[abs_state(join, y, pos)]).
|
|
110
|
+
step(abs_state(join, y, pos),
|
|
111
|
+
rule(10),
|
|
112
|
+
['Var' = y, 'Sign' = pos],
|
|
113
|
+
[abs_state(negative_branch, y, pos)]).
|
|
114
|
+
step(absState(join, x, sign(zero)),
|
|
115
|
+
rule(13),
|
|
116
|
+
['Point' = join, 'Var' = x, 'Sign' = zero],
|
|
117
|
+
[abs_state(join, x, zero)]).
|
|
118
|
+
step(abs_state(join, x, zero),
|
|
119
|
+
rule(11),
|
|
120
|
+
['Var' = x, 'Sign' = zero],
|
|
121
|
+
[abs_state(nonnegative_branch, x, zero)]).
|
|
122
|
+
step(absState(join, x, sign(pos)),
|
|
123
|
+
rule(13),
|
|
124
|
+
['Point' = join, 'Var' = x, 'Sign' = pos],
|
|
125
|
+
[abs_state(join, x, pos)]).
|
|
126
|
+
step(abs_state(join, x, pos),
|
|
127
|
+
rule(11),
|
|
128
|
+
['Var' = x, 'Sign' = pos],
|
|
129
|
+
[abs_state(nonnegative_branch, x, pos)]).
|
|
130
|
+
step(absState(join, y, sign(zero)),
|
|
131
|
+
rule(13),
|
|
132
|
+
['Point' = join, 'Var' = y, 'Sign' = zero],
|
|
133
|
+
[abs_state(join, y, zero)]).
|
|
134
|
+
step(abs_state(join, y, zero),
|
|
135
|
+
rule(11),
|
|
136
|
+
['Var' = y, 'Sign' = zero],
|
|
137
|
+
[abs_state(nonnegative_branch, y, zero)]).
|
|
138
|
+
step(absWarning(division_by_zero, join),
|
|
139
|
+
rule(14),
|
|
140
|
+
['Point' = join],
|
|
141
|
+
[possible_division_by_zero(join)]).
|
|
142
|
+
step(possible_division_by_zero(join), rule(12), [], [abs_state(join, y, zero)]).
|
|
143
|
+
step(absConclusion(case, "abstract interpretation keeps all feasible signs and warns because y may be zero"),
|
|
144
|
+
rule(15),
|
|
145
|
+
[],
|
|
146
|
+
[possible_division_by_zero(join)]).
|