eyeprolog 1.6.0 → 1.6.2
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/book/chapter-11/01-why.pl +7 -10
- package/examples/proof/access-control-policy.pl +80 -138
- package/examples/proof/age.pl +28 -58
- package/examples/proof/aliases-and-namespaces.pl +35 -48
- package/examples/proof/ancestor.pl +70 -100
- package/examples/proof/animal.pl +34 -43
- package/examples/proof/annotation.pl +92 -116
- package/examples/proof/attributed-variables.pl +30 -48
- package/examples/proof/backward.pl +13 -15
- package/examples/proof/bayes-diagnosis.pl +119 -170
- package/examples/proof/beam-deflection.pl +93 -192
- package/examples/proof/cache-performance.pl +159 -282
- package/examples/proof/canary-release.pl +92 -134
- package/examples/proof/cat-koko.pl +39 -66
- package/examples/proof/catalan-convolution.pl +68 -110
- package/examples/proof/cdcl-sat-solver.pl +83 -111
- package/examples/proof/chart-parser.pl +242 -428
- package/examples/proof/clinical-trial-screening.pl +205 -316
- package/examples/proof/clpb-boolean-circuit.pl +56 -80
- package/examples/proof/clpb-feature-model.pl +56 -80
- package/examples/proof/combinatorics-findall-sort.pl +29 -44
- package/examples/proof/composition-of-injective-functions-is-injective.pl +113 -218
- package/examples/proof/context-association.pl +75 -99
- package/examples/proof/d3-group.pl +29 -44
- package/examples/proof/data-negotiation.pl +39 -66
- package/examples/proof/dcg-command-parser.pl +28 -39
- package/examples/proof/declarative-fault-localization.pl +45 -76
- package/examples/proof/defeasible-reasoning.pl +49 -69
- package/examples/proof/deontic-logic.pl +52 -82
- package/examples/proof/derived-backward-rule.pl +41 -53
- package/examples/proof/derived-rule.pl +21 -30
- package/examples/proof/diamond-property.pl +208 -255
- package/examples/proof/dif-constraints.pl +18 -36
- package/examples/proof/dog.pl +15 -24
- package/examples/proof/electrical-rc-filter.pl +48 -84
- package/examples/proof/enigma1225.pl +7 -10
- package/examples/proof/epidemic-policy.pl +358 -670
- package/examples/proof/equality-saturation.pl +53 -68
- package/examples/proof/equivalence-classes-overlap-implies-same-class.pl +612 -990
- package/examples/proof/existential-rule.pl +14 -20
- package/examples/proof/expression-eval.pl +59 -92
- package/examples/proof/floating-point.pl +67 -106
- package/examples/proof/four-color-map.pl +97 -167
- package/examples/proof/gdpr-compliance.pl +106 -154
- package/examples/proof/good-cobbler.pl +7 -10
- package/examples/proof/graph-reachability.pl +81 -125
- package/examples/proof/greatest-lower-bound-uniqueness.pl +86 -128
- package/examples/proof/group-inverse-uniqueness.pl +44 -68
- package/examples/proof/hanoi.pl +77 -172
- package/examples/proof/heat-loss.pl +106 -190
- package/examples/proof/herbrand-semantics.pl +14 -18
- package/examples/proof/herbrand-witnesses.pl +49 -68
- package/examples/proof/ideal-gas-law.pl +68 -128
- package/examples/proof/integrity-check.pl +22 -34
- package/examples/proof/intuitionistic-logic-kripke.pl +75 -97
- package/examples/proof/iso-control-and-errors.pl +72 -89
- package/examples/proof/iso-dynamic-database.pl +34 -43
- package/examples/proof/iso-extension-pipeline-audit.pl +13 -34
- package/examples/proof/iso-extensions.pl +42 -57
- package/examples/proof/iso-grouped-solutions.pl +77 -109
- package/examples/proof/iso-integer-arithmetic.pl +37 -58
- package/examples/proof/iso-operators.pl +29 -44
- package/examples/proof/job-shop-scheduling.pl +33 -42
- package/examples/proof/json.pl +20 -25
- package/examples/proof/knapsack-optimization.pl +46 -58
- package/examples/proof/knights-tour-warnsdorff.pl +240 -474
- package/examples/proof/language.pl +70 -100
- package/examples/proof/linear-logic-resources.pl +103 -182
- package/examples/proof/list-collection.pl +54 -90
- package/examples/proof/modal-logic-kripke.pl +74 -94
- package/examples/proof/nixon-diamond.pl +107 -140
- package/examples/proof/partial-evaluator.pl +265 -370
- package/examples/proof/peasant.pl +80 -140
- package/examples/proof/prime-range.pl +27 -36
- package/examples/proof/proof-contrapositive.pl +42 -57
- package/examples/proof/propositional-dynamic-logic.pl +58 -107
- package/examples/proof/rdf12-annotation.pl +64 -112
- package/examples/proof/rdf12-directional-language.pl +14 -20
- package/examples/proof/rdf12-nested-triple-term.pl +7 -10
- package/examples/proof/rdf12-trig-graph-join.pl +8 -14
- package/examples/proof/rdf12-trig-named-graph.pl +22 -34
- package/examples/proof/rdf12-trig-triple-term.pl +7 -10
- package/examples/proof/rdf12-triple-term.pl +7 -10
- package/examples/proof/reified-conditionals.pl +10 -22
- package/examples/proof/reusable-builtins.pl +46 -94
- package/examples/proof/route-planning.pl +94 -124
- package/examples/proof/security-incident-correlation.pl +153 -234
- package/examples/proof/sieve.pl +8 -14
- package/examples/proof/snaf.pl +8 -14
- package/examples/proof/socrates.pl +20 -25
- package/examples/proof/spacecraft-battery-diagnosis.pl +138 -264
- package/examples/proof/stable-marriage.pl +61 -81
- package/examples/proof/symbolic-derivative.pl +107 -169
- package/examples/proof/term-tools.pl +42 -59
- package/examples/proof/totient-summatory.pl +55 -76
- package/examples/proof/trust-flow-provenance-threshold.pl +124 -268
- package/examples/proof/universal-vs-existential-termination.pl +23 -36
- package/examples/proof/uuid.pl +16 -46
- package/examples/proof/vanilla-meta-interpreter.pl +8 -14
- package/examples/proof/web-names.pl +29 -44
- package/examples/proof/weighted-interval-scheduling.pl +3864 -8379
- package/examples/proof/witch.pl +122 -163
- package/examples/proof/workplace-compliance.pl +35 -68
- package/package.json +1 -1
- package/src/explain.js +49 -43
- package/src/parser.js +12 -3
- package/src/write.js +8 -4
- package/test/conformance/expected-proofs/proofs/bindings_nested_term.pl +7 -10
- package/test/conformance/expected-proofs/proofs/builtin_numeric.pl +7 -10
- package/test/conformance/expected-proofs/proofs/conjunction_order.pl +8 -13
- package/test/conformance/expected-proofs/proofs/explicit_recursive.pl +28 -40
- package/test/conformance/expected-proofs/proofs/extra_aggregate_min.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_compound_name_arguments.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_context_parts.pl +30 -48
- package/test/conformance/expected-proofs/proofs/extra_eq_builtin.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_explicit_path_bound.pl +33 -42
- package/test/conformance/expected-proofs/proofs/extra_findall_builtin.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_forall_builtin.pl +7 -9
- package/test/conformance/expected-proofs/proofs/extra_iri_join.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_negation_success.pl +7 -9
- package/test/conformance/expected-proofs/proofs/extra_nested_list_binding.pl +7 -10
- package/test/conformance/expected-proofs/proofs/extra_once_member.pl +13 -15
- package/test/conformance/expected-proofs/proofs/extra_recursive_path.pl +28 -40
- package/test/conformance/expected-proofs/proofs/herbrand_witness.pl +7 -10
- package/test/conformance/expected-proofs/proofs/iri_atom.pl +7 -10
- package/test/conformance/expected-proofs/proofs/list_builtin.pl +8 -14
- package/test/conformance/expected-proofs/proofs/once_child.pl +13 -15
- package/test/conformance/expected-proofs/proofs/rule_fact.pl +7 -10
- package/test/regression/cases-regression.mjs +28 -37
- package/test/regression/cases-white-box.mjs +54 -0
- package/test/regression/support.mjs +2 -2
- package/the-art-of-eyeprolog.md +26 -14
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
why(
|
|
5
5
|
type(socrates, mortal),
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
by(fact("socrates.pl", clause(3)))
|
|
14
|
-
)
|
|
15
|
-
])
|
|
6
|
+
step(
|
|
7
|
+
type(socrates, mortal),
|
|
8
|
+
rule("socrates.pl", clause(4)),
|
|
9
|
+
['X' = socrates],
|
|
10
|
+
[
|
|
11
|
+
step(type(socrates, man), fact("socrates.pl", clause(3)), [], [])
|
|
12
|
+
]
|
|
16
13
|
)
|
|
17
14
|
).
|
|
@@ -1,158 +1,100 @@
|
|
|
1
1
|
status(test1, policy_passed).
|
|
2
2
|
why(
|
|
3
3
|
status(test1, policy_passed),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
goal(policy(policy_x)),
|
|
24
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
25
|
-
),
|
|
26
|
-
proof(
|
|
27
|
-
goal('\\+'((allOf(policy_x, Claim), '\\+'(has(test1, Claim))))),
|
|
28
|
-
by(builtin('\\+', 1))
|
|
29
|
-
)
|
|
30
|
-
])
|
|
4
|
+
step(
|
|
5
|
+
status(test1, policy_passed),
|
|
6
|
+
rule("access-control-policy.pl", clause(15)),
|
|
7
|
+
[],
|
|
8
|
+
[
|
|
9
|
+
step(
|
|
10
|
+
passes_policy(test1, policy_x),
|
|
11
|
+
rule("access-control-policy.pl", clause(13)),
|
|
12
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
13
|
+
[
|
|
14
|
+
step(
|
|
15
|
+
passes_all_of(test1, policy_x),
|
|
16
|
+
rule("access-control-policy.pl", clause(10)),
|
|
17
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
18
|
+
[
|
|
19
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
20
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
21
|
+
step('\\+'((allOf(policy_x, Claim), '\\+'(has(test1, Claim)))), builtin('\\+', 1), [], [])
|
|
22
|
+
]
|
|
31
23
|
),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
),
|
|
41
|
-
|
|
42
|
-
goal(policy(policy_x)),
|
|
43
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
44
|
-
),
|
|
45
|
-
proof(
|
|
46
|
-
goal(anyOf(policy_x, claim_c)),
|
|
47
|
-
by(fact("access-control-policy.pl", clause(8)))
|
|
48
|
-
),
|
|
49
|
-
proof(
|
|
50
|
-
goal(has(test1, claim_c)),
|
|
51
|
-
by(fact("access-control-policy.pl", clause(4)))
|
|
52
|
-
)
|
|
53
|
-
])
|
|
24
|
+
step(
|
|
25
|
+
passes_any_of(test1, policy_x),
|
|
26
|
+
rule("access-control-policy.pl", clause(11)),
|
|
27
|
+
['Request' = test1, 'Policy' = policy_x, 'Claim' = claim_c],
|
|
28
|
+
[
|
|
29
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
30
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
31
|
+
step(anyOf(policy_x, claim_c), fact("access-control-policy.pl", clause(8)), [], []),
|
|
32
|
+
step(has(test1, claim_c), fact("access-control-policy.pl", clause(4)), [], [])
|
|
33
|
+
]
|
|
54
34
|
),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
proof(
|
|
65
|
-
goal(policy(policy_x)),
|
|
66
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
67
|
-
),
|
|
68
|
-
proof(
|
|
69
|
-
goal('\\+'((noneOf(policy_x, Claim), has(test1, Claim)))),
|
|
70
|
-
by(builtin('\\+', 1))
|
|
71
|
-
)
|
|
72
|
-
])
|
|
35
|
+
step(
|
|
36
|
+
passes_none_of(test1, policy_x),
|
|
37
|
+
rule("access-control-policy.pl", clause(12)),
|
|
38
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
39
|
+
[
|
|
40
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
41
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
42
|
+
step('\\+'((noneOf(policy_x, Claim), has(test1, Claim))), builtin('\\+', 1), [], [])
|
|
43
|
+
]
|
|
73
44
|
)
|
|
74
|
-
]
|
|
45
|
+
]
|
|
75
46
|
)
|
|
76
|
-
]
|
|
47
|
+
]
|
|
77
48
|
)
|
|
78
49
|
).
|
|
79
50
|
|
|
80
51
|
reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present").
|
|
81
52
|
why(
|
|
82
53
|
reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present"),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
),
|
|
101
|
-
|
|
102
|
-
goal(policy(policy_x)),
|
|
103
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
104
|
-
),
|
|
105
|
-
proof(
|
|
106
|
-
goal('\\+'((allOf(policy_x, Claim), '\\+'(has(test1, Claim))))),
|
|
107
|
-
by(builtin('\\+', 1))
|
|
108
|
-
)
|
|
109
|
-
])
|
|
54
|
+
step(
|
|
55
|
+
reason(test1, "all required claims are present, one allowed claim is present, and no forbidden claim is present"),
|
|
56
|
+
rule("access-control-policy.pl", clause(16)),
|
|
57
|
+
[],
|
|
58
|
+
[
|
|
59
|
+
step(
|
|
60
|
+
passes_policy(test1, policy_x),
|
|
61
|
+
rule("access-control-policy.pl", clause(13)),
|
|
62
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
63
|
+
[
|
|
64
|
+
step(
|
|
65
|
+
passes_all_of(test1, policy_x),
|
|
66
|
+
rule("access-control-policy.pl", clause(10)),
|
|
67
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
68
|
+
[
|
|
69
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
70
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
71
|
+
step('\\+'((allOf(policy_x, Claim), '\\+'(has(test1, Claim)))), builtin('\\+', 1), [], [])
|
|
72
|
+
]
|
|
110
73
|
),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
),
|
|
120
|
-
|
|
121
|
-
goal(policy(policy_x)),
|
|
122
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
123
|
-
),
|
|
124
|
-
proof(
|
|
125
|
-
goal(anyOf(policy_x, claim_c)),
|
|
126
|
-
by(fact("access-control-policy.pl", clause(8)))
|
|
127
|
-
),
|
|
128
|
-
proof(
|
|
129
|
-
goal(has(test1, claim_c)),
|
|
130
|
-
by(fact("access-control-policy.pl", clause(4)))
|
|
131
|
-
)
|
|
132
|
-
])
|
|
74
|
+
step(
|
|
75
|
+
passes_any_of(test1, policy_x),
|
|
76
|
+
rule("access-control-policy.pl", clause(11)),
|
|
77
|
+
['Request' = test1, 'Policy' = policy_x, 'Claim' = claim_c],
|
|
78
|
+
[
|
|
79
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
80
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
81
|
+
step(anyOf(policy_x, claim_c), fact("access-control-policy.pl", clause(8)), [], []),
|
|
82
|
+
step(has(test1, claim_c), fact("access-control-policy.pl", clause(4)), [], [])
|
|
83
|
+
]
|
|
133
84
|
),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
proof(
|
|
144
|
-
goal(policy(policy_x)),
|
|
145
|
-
by(fact("access-control-policy.pl", clause(5)))
|
|
146
|
-
),
|
|
147
|
-
proof(
|
|
148
|
-
goal('\\+'((noneOf(policy_x, Claim), has(test1, Claim)))),
|
|
149
|
-
by(builtin('\\+', 1))
|
|
150
|
-
)
|
|
151
|
-
])
|
|
85
|
+
step(
|
|
86
|
+
passes_none_of(test1, policy_x),
|
|
87
|
+
rule("access-control-policy.pl", clause(12)),
|
|
88
|
+
['Request' = test1, 'Policy' = policy_x],
|
|
89
|
+
[
|
|
90
|
+
step(policy_request(test1, policy_x), fact("access-control-policy.pl", clause(1)), [], []),
|
|
91
|
+
step(policy(policy_x), fact("access-control-policy.pl", clause(5)), [], []),
|
|
92
|
+
step('\\+'((noneOf(policy_x, Claim), has(test1, Claim))), builtin('\\+', 1), [], [])
|
|
93
|
+
]
|
|
152
94
|
)
|
|
153
|
-
]
|
|
95
|
+
]
|
|
154
96
|
)
|
|
155
|
-
]
|
|
97
|
+
]
|
|
156
98
|
)
|
|
157
99
|
).
|
|
158
100
|
|
package/examples/proof/age.pl
CHANGED
|
@@ -1,71 +1,41 @@
|
|
|
1
1
|
ageAbove(patH, 'P80Y').
|
|
2
2
|
why(
|
|
3
3
|
ageAbove(patH, 'P80Y'),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
by(fact("age.pl", clause(2)))
|
|
16
|
-
),
|
|
17
|
-
proof(
|
|
18
|
-
goal(local_time('2026-05-30')),
|
|
19
|
-
by(fact("age.pl", clause(3)))
|
|
20
|
-
),
|
|
21
|
-
proof(
|
|
22
|
-
goal(difference('2026-05-30', '1944-08-21', 'P81Y9M9D')),
|
|
23
|
-
by(library(difference, 3))
|
|
24
|
-
),
|
|
25
|
-
proof(
|
|
26
|
-
goal(@>('P81Y9M9D', 'P80Y')),
|
|
27
|
-
by(builtin(@>, 2))
|
|
28
|
-
)
|
|
29
|
-
])
|
|
4
|
+
step(
|
|
5
|
+
ageAbove(patH, 'P80Y'),
|
|
6
|
+
rule("age.pl", clause(4)),
|
|
7
|
+
['S' = patH, 'A' = 'P80Y', 'B' = '1944-08-21', 'D' = '2026-05-30', 'F' = 'P81Y9M9D'],
|
|
8
|
+
[
|
|
9
|
+
step(birthDay(patH, '1944-08-21'), fact("age.pl", clause(1)), [], []),
|
|
10
|
+
step(duration(check, 'P80Y'), fact("age.pl", clause(2)), [], []),
|
|
11
|
+
step(local_time('2026-05-30'), fact("age.pl", clause(3)), [], []),
|
|
12
|
+
step(difference('2026-05-30', '1944-08-21', 'P81Y9M9D'), library(difference, 3), [], []),
|
|
13
|
+
step(@>('P81Y9M9D', 'P80Y'), builtin(@>, 2), [], [])
|
|
14
|
+
]
|
|
30
15
|
)
|
|
31
16
|
).
|
|
32
17
|
|
|
33
18
|
holds_result(test, true).
|
|
34
19
|
why(
|
|
35
20
|
holds_result(test, true),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
by(fact("age.pl", clause(2)))
|
|
53
|
-
),
|
|
54
|
-
proof(
|
|
55
|
-
goal(local_time('2026-05-30')),
|
|
56
|
-
by(fact("age.pl", clause(3)))
|
|
57
|
-
),
|
|
58
|
-
proof(
|
|
59
|
-
goal(difference('2026-05-30', '1944-08-21', 'P81Y9M9D')),
|
|
60
|
-
by(library(difference, 3))
|
|
61
|
-
),
|
|
62
|
-
proof(
|
|
63
|
-
goal(@>('P81Y9M9D', 'P80Y')),
|
|
64
|
-
by(builtin(@>, 2))
|
|
65
|
-
)
|
|
66
|
-
])
|
|
21
|
+
step(
|
|
22
|
+
holds_result(test, true),
|
|
23
|
+
rule("age.pl", clause(5)),
|
|
24
|
+
['__anon0' = patH],
|
|
25
|
+
[
|
|
26
|
+
step(
|
|
27
|
+
ageAbove(patH, 'P80Y'),
|
|
28
|
+
rule("age.pl", clause(4)),
|
|
29
|
+
['S' = patH, 'A' = 'P80Y', 'B' = '1944-08-21', 'D' = '2026-05-30', 'F' = 'P81Y9M9D'],
|
|
30
|
+
[
|
|
31
|
+
step(birthDay(patH, '1944-08-21'), fact("age.pl", clause(1)), [], []),
|
|
32
|
+
step(duration(check, 'P80Y'), fact("age.pl", clause(2)), [], []),
|
|
33
|
+
step(local_time('2026-05-30'), fact("age.pl", clause(3)), [], []),
|
|
34
|
+
step(difference('2026-05-30', '1944-08-21', 'P81Y9M9D'), library(difference, 3), [], []),
|
|
35
|
+
step(@>('P81Y9M9D', 'P80Y'), builtin(@>, 2), [], [])
|
|
36
|
+
]
|
|
67
37
|
)
|
|
68
|
-
]
|
|
38
|
+
]
|
|
69
39
|
)
|
|
70
40
|
).
|
|
71
41
|
|
|
@@ -1,78 +1,65 @@
|
|
|
1
1
|
value(nativeMath, 1.0).
|
|
2
2
|
why(
|
|
3
3
|
value(nativeMath, 1.0),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
by(builtin(is, 2))
|
|
12
|
-
)
|
|
13
|
-
])
|
|
4
|
+
step(
|
|
5
|
+
value(nativeMath, 1.0),
|
|
6
|
+
rule("aliases-and-namespaces.pl", clause(1)),
|
|
7
|
+
['X' = 1.0],
|
|
8
|
+
[
|
|
9
|
+
step(is(1.0, '+'(0.125, 0.875)), builtin(is, 2), [], [])
|
|
10
|
+
]
|
|
14
11
|
)
|
|
15
12
|
).
|
|
16
13
|
|
|
17
14
|
ok(nativeCompare, true).
|
|
18
15
|
why(
|
|
19
16
|
ok(nativeCompare, true),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
])
|
|
17
|
+
step(
|
|
18
|
+
ok(nativeCompare, true),
|
|
19
|
+
rule("aliases-and-namespaces.pl", clause(2)),
|
|
20
|
+
[],
|
|
21
|
+
[
|
|
22
|
+
step(<(2, 3), builtin(<, 2), [], [])
|
|
23
|
+
]
|
|
29
24
|
)
|
|
30
25
|
).
|
|
31
26
|
|
|
32
27
|
ok(nativeString, true).
|
|
33
28
|
why(
|
|
34
29
|
ok(nativeString, true),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
])
|
|
30
|
+
step(
|
|
31
|
+
ok(nativeString, true),
|
|
32
|
+
rule("aliases-and-namespaces.pl", clause(3)),
|
|
33
|
+
[],
|
|
34
|
+
[
|
|
35
|
+
step(matches('scoped retail insight', 'retail|medical'), library(matches, 2), [], [])
|
|
36
|
+
]
|
|
44
37
|
)
|
|
45
38
|
).
|
|
46
39
|
|
|
47
40
|
tail(nativeList, "bc").
|
|
48
41
|
why(
|
|
49
42
|
tail(nativeList, "bc"),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
by(builtin(=, 2))
|
|
58
|
-
)
|
|
59
|
-
])
|
|
43
|
+
step(
|
|
44
|
+
tail(nativeList, "bc"),
|
|
45
|
+
rule("aliases-and-namespaces.pl", clause(4)),
|
|
46
|
+
['Tail' = "bc", '_head' = a],
|
|
47
|
+
[
|
|
48
|
+
step(=("abc", "abc"), builtin(=, 2), [], [])
|
|
49
|
+
]
|
|
60
50
|
)
|
|
61
51
|
).
|
|
62
52
|
|
|
63
53
|
label(vocabularyExample, "vocabulary names are ordinary predicate names").
|
|
64
54
|
why(
|
|
65
55
|
label(vocabularyExample, "vocabulary names are ordinary predicate names"),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
by(fact("aliases-and-namespaces.pl", clause(5)))
|
|
74
|
-
)
|
|
75
|
-
])
|
|
56
|
+
step(
|
|
57
|
+
label(vocabularyExample, "vocabulary names are ordinary predicate names"),
|
|
58
|
+
rule("aliases-and-namespaces.pl", clause(6)),
|
|
59
|
+
['Text' = "vocabulary names are ordinary predicate names"],
|
|
60
|
+
[
|
|
61
|
+
step(example_label(vocabularyExample, "vocabulary names are ordinary predicate names"), fact("aliases-and-namespaces.pl", clause(5)), [], [])
|
|
62
|
+
]
|
|
76
63
|
)
|
|
77
64
|
).
|
|
78
65
|
|