eyelang 1.5.4 → 1.5.5
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/conformance/README.md +3 -3
- package/conformance/cases/core/021_repeated_variable_head.pl +7 -0
- package/conformance/cases/core/022_rule_head_structure.pl +5 -0
- package/conformance/cases/core/023_quoted_escapes_readback.pl +5 -0
- package/conformance/cases/core/024_numeric_literal_readback.pl +6 -0
- package/conformance/cases/core/025_body_parentheses_with_formula_data.pl +5 -0
- package/conformance/cases/core/026_underscore_named_variable_reuse.pl +5 -0
- package/conformance/cases/extension/035_date_difference.pl +4 -0
- package/conformance/cases/extension/036_extended_gcd.pl +3 -0
- package/conformance/cases/extension/037_collatz_trajectory.pl +3 -0
- package/conformance/cases/extension/038_kaprekar_steps.pl +3 -0
- package/conformance/cases/extension/039_goldbach_pair.pl +3 -0
- package/conformance/cases/extension/040_matrix_operations.pl +5 -0
- package/conformance/cases/extension/041_atom_range_generators.pl +5 -0
- package/conformance/cases/extension/042_n_queens_small.pl +3 -0
- package/conformance/cases/extension/043_cnf_model.pl +3 -0
- package/conformance/cases/extension/044_cover9_filter.pl +6 -0
- package/conformance/cases/extension/045_alphametic_sum_small.pl +3 -0
- package/conformance/cases/extension/046_bounded_subset.pl +4 -0
- package/conformance/expected/core/021_repeated_variable_head.out +2 -0
- package/conformance/expected/core/022_rule_head_structure.out +2 -0
- package/conformance/expected/core/023_quoted_escapes_readback.out +2 -0
- package/conformance/expected/core/024_numeric_literal_readback.out +3 -0
- package/conformance/expected/core/025_body_parentheses_with_formula_data.out +1 -0
- package/conformance/expected/core/026_underscore_named_variable_reuse.out +1 -0
- package/conformance/expected/extension/035_date_difference.out +2 -0
- package/conformance/expected/extension/036_extended_gcd.out +1 -0
- package/conformance/expected/extension/037_collatz_trajectory.out +1 -0
- package/conformance/expected/extension/038_kaprekar_steps.out +1 -0
- package/conformance/expected/extension/039_goldbach_pair.out +2 -0
- package/conformance/expected/extension/040_matrix_operations.out +3 -0
- package/conformance/expected/extension/041_atom_range_generators.out +8 -0
- package/conformance/expected/extension/042_n_queens_small.out +2 -0
- package/conformance/expected/extension/043_cnf_model.out +1 -0
- package/conformance/expected/extension/044_cover9_filter.out +2 -0
- package/conformance/expected/extension/045_alphametic_sum_small.out +4 -0
- package/conformance/expected/extension/046_bounded_subset.out +5 -0
- package/package.json +1 -1
package/conformance/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The suite is intentionally file-based so another implementation can run the same
|
|
|
7
7
|
- `conformance/cases/<profile>/<name>.pl` — input program;
|
|
8
8
|
- `conformance/expected/<profile>/<name>.out` — exact expected standard output.
|
|
9
9
|
|
|
10
|
-
The current runner compares standard output
|
|
10
|
+
The current runner compares standard output from normal execution. Proof explanations are opt-in in the CLI and are not part of these conformance goldens. Standard error, performance, and resource limits are outside this suite.
|
|
11
11
|
|
|
12
12
|
## Running the suite
|
|
13
13
|
|
|
@@ -34,9 +34,9 @@ The runner executes materialized programs in-process through the public JavaScri
|
|
|
34
34
|
|
|
35
35
|
## Profiles
|
|
36
36
|
|
|
37
|
-
`core` covers the portable core language profile from `../SPEC.md`: lexical syntax, facts, definite clauses, first-order terms, lists, conjunction, unification through user predicates, left-to-right goal-directed proof search, and
|
|
37
|
+
`core` covers the portable core language profile from `../SPEC.md`: lexical syntax, facts, definite clauses, first-order terms, lists, conjunction, structured unification through user predicates, left-to-right goal-directed proof search, materialized output, and read-back printing.
|
|
38
38
|
|
|
39
|
-
`extension` covers the standard built-in and host behavior exercised by the current reference implementation: arithmetic, comparison, strings, list relations, aggregation, formula-term helpers, `memoize/2`, `materialize/2`, and default derived output.
|
|
39
|
+
`extension` covers the standard built-in and host behavior exercised by the current reference implementation: arithmetic, comparison, strings, list relations, aggregation, formula-term helpers, number-theory helpers, finite-search helpers, matrix helpers, `memoize/2`, `materialize/2`, and default derived output.
|
|
40
40
|
|
|
41
41
|
The profile name `extension` is a test-suite grouping name. It does not mean that these cases are outside the eyelang specification; most of them correspond to the standard built-in profile and standard host profile in `../SPEC.md`.
|
|
42
42
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
% SPEC 9.2: matrix helpers handle small ground numeric matrices.
|
|
2
|
+
answer(sum, M) :- matrix_sum([[[1, 2], [3, 4]], [[5, 6], [7, 8]]], M).
|
|
3
|
+
answer(product, M) :- matrix_multiply([[[1, 2], [3, 4]], [[2, 0], [1, 2]]], M).
|
|
4
|
+
answer(determinant, D) :- determinant([[4, 2], [2, 3]], D).
|
|
5
|
+
materialize(answer, 2).
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
% SPEC 9.5: bounded_subset/7 enumerates subsets within budget and risk caps.
|
|
2
|
+
projects([p(a, 5, 3, 1), p(b, 4, 2, 2), p(c, 7, 5, 3)]).
|
|
3
|
+
answer(selection, result(Names, Value, Cost, Risk)) :- projects(Ps), bounded_subset(Ps, 5, 3, Names, Value, Cost, Risk).
|
|
4
|
+
materialize(answer, 2).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok, (left(a), right(b))).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(shared, a).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(gcd, result(2, -9, 47)).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(path, [6, 3, 10, 5, 16, 8, 4, 2, 1]).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(steps, 3).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(model, [value(a, false), value(b, true)]).
|