eyelang 1.7.4 → 1.7.6
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/README.md +1 -0
- package/conformance-report.md +26 -0
- package/docs/guide.md +5 -2
- package/docs/language-reference.md +1 -1
- package/package.json +3 -2
- package/test/conformance/README.md +11 -5
- package/test/conformance/cases/aggregation/aggregate_max_no_answers_fails.eye +2 -0
- package/test/conformance/cases/aggregation/aggregate_min_structured_key.eye +5 -0
- package/test/conformance/cases/aggregation/countall_zero.eye +2 -0
- package/test/conformance/cases/aggregation/findall_empty_bag.eye +2 -0
- package/test/conformance/cases/aggregation/sumall_empty_zero.eye +2 -0
- package/test/conformance/cases/arithmetic/between_bound_value.eye +2 -0
- package/test/conformance/cases/arithmetic/between_singleton.eye +2 -0
- package/test/conformance/cases/arithmetic/duration_comparison.eye +2 -0
- package/test/conformance/cases/arithmetic/float_add_and_div.eye +3 -0
- package/test/conformance/cases/arithmetic/min_max_mixed.eye +3 -0
- package/test/conformance/cases/arithmetic/mod_negative_left.eye +2 -0
- package/test/conformance/cases/arithmetic/neg_abs_integer.eye +4 -0
- package/test/conformance/cases/arithmetic/pow_negative_exponent_fails.eye +2 -0
- package/test/conformance/cases/arithmetic/pow_zero_exponent.eye +2 -0
- package/test/conformance/cases/arithmetic/rounding_negative_float.eye +5 -0
- package/test/conformance/cases/arithmetic/smallest_divisor_prime.eye +2 -0
- package/test/conformance/cases/arithmetic/sqrt_negative_fails.eye +2 -0
- package/test/conformance/cases/atoms/angle_iri_percent_encoded.eye +2 -0
- package/test/conformance/cases/atoms/graphic_atom_predicate.eye +3 -0
- package/test/conformance/cases/atoms/iri_as_predicate_name_quoted.eye +3 -0
- package/test/conformance/cases/atoms/quoted_relative_iri_not_angle.eye +2 -0
- package/test/conformance/cases/context/holds_compound_formula.eye +2 -0
- package/test/conformance/cases/context/holds_fails_when_missing.eye +2 -0
- package/test/conformance/cases/context/holds_parts_from_formula.eye +2 -0
- package/test/conformance/cases/control/double_negation_ground_goal.eye +3 -0
- package/test/conformance/cases/control/forall_detects_counterexample.eye +5 -0
- package/test/conformance/cases/control/forall_empty_generator_true.eye +2 -0
- package/test/conformance/cases/control/negation_with_bound_generator.eye +5 -0
- package/test/conformance/cases/control/once_keeps_first_answer.eye +4 -0
- package/test/conformance/cases/declarations/det_semidet_do_not_emit_without_materialize.eye +5 -0
- package/test/conformance/cases/lists/head_rest_last.eye +4 -0
- package/test/conformance/cases/lists/length_empty_and_nested.eye +3 -0
- package/test/conformance/cases/lists/list_to_set_structural_duplicates.eye +2 -0
- package/test/conformance/cases/lists/min_list_empty_fails.eye +2 -0
- package/test/conformance/cases/lists/nth0_known_value.eye +2 -0
- package/test/conformance/cases/lists/nth0_out_of_range_fails.eye +2 -0
- package/test/conformance/cases/lists/reverse_empty.eye +2 -0
- package/test/conformance/cases/lists/select_all_occurrences.eye +2 -0
- package/test/conformance/cases/lists/set_nth0_middle.eye +2 -0
- package/test/conformance/cases/lists/slice_middle.eye +2 -0
- package/test/conformance/cases/lists/slice_out_of_range_fails.eye +2 -0
- package/test/conformance/cases/lists/sort_structured_terms.eye +2 -0
- package/test/conformance/cases/lists/sum_list_empty_zero.eye +2 -0
- package/test/conformance/cases/lists/sum_min_max_list.eye +4 -0
- package/test/conformance/cases/lists/take_zero_and_drop_all.eye +3 -0
- package/test/conformance/cases/materialize/arity_specific_outputs.eye +4 -0
- package/test/conformance/cases/rules/left_to_right_body_binding.eye +4 -0
- package/test/conformance/cases/rules/transitive_rule_three_edges.eye +7 -0
- package/test/conformance/cases/strings/atom_string_from_string.eye +2 -0
- package/test/conformance/cases/strings/casefold_atoms.eye +3 -0
- package/test/conformance/cases/strings/contains_empty_needle.eye +2 -0
- package/test/conformance/cases/strings/join_mixed_scalars.eye +2 -0
- package/test/conformance/cases/strings/matches_simple_alternation.eye +2 -0
- package/test/conformance/cases/strings/named_regex_two_groups.eye +2 -0
- package/test/conformance/cases/strings/not_matches_simple_pattern.eye +2 -0
- package/test/conformance/cases/strings/number_string_from_string.eye +2 -0
- package/test/conformance/cases/strings/number_string_rejects_non_numeric.eye +2 -0
- package/test/conformance/cases/strings/replace_empty_search_no_change.eye +2 -0
- package/test/conformance/cases/strings/split_without_separator_match.eye +2 -0
- package/test/conformance/cases/strings/substring_out_of_range_fails.eye +2 -0
- package/test/conformance/cases/strings/substring_zero_count.eye +2 -0
- package/test/conformance/cases/strings/term_string_nested_term.eye +2 -0
- package/test/conformance/cases/strings/trim_tabs_and_spaces.eye +3 -0
- package/test/conformance/cases/syntax/comments_inside_program.eye +4 -0
- package/test/conformance/cases/syntax/quoted_atom_with_newline_escape.eye +3 -0
- package/test/conformance/cases/syntax/string_with_tab_escape.eye +2 -0
- package/test/conformance/cases/table/tabled_left_recursion_path.eye +7 -0
- package/test/conformance/cases/terms/arg_first_and_second.eye +3 -0
- package/test/conformance/cases/terms/arg_zero_fails.eye +2 -0
- package/test/conformance/cases/terms/compound_name_arguments_bad_args_fail.eye +2 -0
- package/test/conformance/cases/terms/compound_name_arguments_builds_compound.eye +2 -0
- package/test/conformance/cases/terms/compound_name_arguments_iri_name.eye +2 -0
- package/test/conformance/cases/terms/functor_number_and_string.eye +3 -0
- package/test/conformance/cases/terms/term_string_readback_iri_list.eye +2 -0
- package/test/conformance/cases/unification/compound_arity_mismatch_fails.eye +2 -0
- package/test/conformance/cases/unification/list_tail_binding.eye +2 -0
- package/test/conformance/cases/unification/nested_repeated_variable.eye +2 -0
- package/test/conformance/cases/unification/scalar_cross_type_same_lexical_value.eye +3 -0
- package/test/conformance/cases/variables/clause_local_variable_names.eye +5 -0
- package/test/conformance/cases/variables/question_variable_digits_and_underscore.eye +2 -4
- package/test/conformance/cases/variables/question_variable_uppercase_name.eye +2 -0
- package/test/conformance/errors/atoms/hash_comment_not_atom_at_line_start.eye +1 -0
- package/test/conformance/errors/lists/missing_list_tail.eye +1 -0
- package/test/conformance/errors/rules/rule_head_cannot_be_empty_parentheses.eye +1 -0
- package/test/conformance/errors/syntax/angle_iri_with_space_rejected.eye +1 -0
- package/test/conformance/errors/syntax/bad_question_digit_variable.eye +1 -0
- package/test/conformance/errors/syntax/bad_question_variable.eye +1 -0
- package/test/conformance/errors/syntax/empty_body_after_rule_marker.eye +1 -0
- package/test/conformance/errors/syntax/empty_compound_nested.eye +1 -0
- package/test/conformance/errors/syntax/missing_period.eye +1 -0
- package/test/conformance/errors/syntax/relative_angle_iri_rejected.eye +1 -0
- package/test/conformance/errors/syntax/trailing_comma_in_body.eye +1 -0
- package/test/conformance/errors/syntax/unclosed_compound.eye +1 -0
- package/test/conformance/errors/syntax/unclosed_list.eye +1 -0
- package/test/conformance/errors/syntax/unclosed_quoted_atom.eye +1 -0
- package/test/conformance/errors/syntax/unclosed_string.eye +1 -0
- package/test/conformance/errors/syntax/unquoted_colon_predicate.eye +1 -0
- package/test/conformance/errors/syntax/unquoted_dotted_predicate.eye +1 -0
- package/test/conformance/errors/variables/bare_underscore_in_list_rejected.eye +1 -0
- package/test/conformance/errors/variables/bare_underscore_name_in_compound_rejected.eye +1 -0
- package/test/conformance/errors/variables/uppercase_in_body_rejected.eye +1 -0
- package/test/conformance/expected/aggregation/aggregate_max_no_answers_fails.eye +1 -0
- package/test/conformance/expected/aggregation/aggregate_min_structured_key.eye +1 -0
- package/test/conformance/expected/aggregation/countall_zero.eye +1 -0
- package/test/conformance/expected/aggregation/findall_empty_bag.eye +1 -0
- package/test/conformance/expected/aggregation/sumall_empty_zero.eye +1 -0
- package/test/conformance/expected/arithmetic/between_bound_value.eye +1 -0
- package/test/conformance/expected/arithmetic/between_singleton.eye +1 -0
- package/test/conformance/expected/arithmetic/duration_comparison.eye +1 -0
- package/test/conformance/expected/arithmetic/float_add_and_div.eye +2 -0
- package/test/conformance/expected/arithmetic/min_max_mixed.eye +2 -0
- package/test/conformance/expected/arithmetic/mod_negative_left.eye +1 -0
- package/test/conformance/expected/arithmetic/neg_abs_integer.eye +2 -0
- package/test/conformance/expected/arithmetic/pow_negative_exponent_fails.eye +1 -0
- package/test/conformance/expected/arithmetic/pow_zero_exponent.eye +1 -0
- package/test/conformance/expected/arithmetic/rounding_negative_float.eye +4 -0
- package/test/conformance/expected/arithmetic/smallest_divisor_prime.eye +1 -0
- package/test/conformance/expected/arithmetic/sqrt_negative_fails.eye +1 -0
- package/test/conformance/expected/atoms/angle_iri_percent_encoded.eye +0 -0
- package/test/conformance/expected/atoms/graphic_atom_predicate.eye +1 -0
- package/test/conformance/expected/atoms/iri_as_predicate_name_quoted.eye +1 -0
- package/test/conformance/expected/atoms/quoted_relative_iri_not_angle.eye +0 -0
- package/test/conformance/expected/context/holds_compound_formula.eye +1 -0
- package/test/conformance/expected/context/holds_fails_when_missing.eye +1 -0
- package/test/conformance/expected/context/holds_parts_from_formula.eye +2 -0
- package/test/conformance/expected/control/double_negation_ground_goal.eye +1 -0
- package/test/conformance/expected/control/forall_detects_counterexample.eye +1 -0
- package/test/conformance/expected/control/forall_empty_generator_true.eye +1 -0
- package/test/conformance/expected/control/negation_with_bound_generator.eye +1 -0
- package/test/conformance/expected/control/once_keeps_first_answer.eye +1 -0
- package/test/conformance/expected/declarations/det_semidet_do_not_emit_without_materialize.eye +1 -0
- package/test/conformance/expected/lists/head_rest_last.eye +3 -0
- package/test/conformance/expected/lists/length_empty_and_nested.eye +2 -0
- package/test/conformance/expected/lists/list_to_set_structural_duplicates.eye +1 -0
- package/test/conformance/expected/lists/min_list_empty_fails.eye +1 -0
- package/test/conformance/expected/lists/nth0_known_value.eye +1 -0
- package/test/conformance/expected/lists/nth0_out_of_range_fails.eye +1 -0
- package/test/conformance/expected/lists/reverse_empty.eye +1 -0
- package/test/conformance/expected/lists/select_all_occurrences.eye +3 -0
- package/test/conformance/expected/lists/set_nth0_middle.eye +1 -0
- package/test/conformance/expected/lists/slice_middle.eye +0 -0
- package/test/conformance/expected/lists/slice_out_of_range_fails.eye +1 -0
- package/test/conformance/expected/lists/sort_structured_terms.eye +1 -0
- package/test/conformance/expected/lists/sum_list_empty_zero.eye +1 -0
- package/test/conformance/expected/lists/sum_min_max_list.eye +3 -0
- package/test/conformance/expected/lists/take_zero_and_drop_all.eye +2 -0
- package/test/conformance/expected/materialize/arity_specific_outputs.eye +0 -0
- package/test/conformance/expected/rules/left_to_right_body_binding.eye +1 -0
- package/test/conformance/expected/rules/transitive_rule_three_edges.eye +6 -0
- package/test/conformance/expected/strings/atom_string_from_string.eye +1 -0
- package/test/conformance/expected/strings/casefold_atoms.eye +2 -0
- package/test/conformance/expected/strings/contains_empty_needle.eye +1 -0
- package/test/conformance/expected/strings/join_mixed_scalars.eye +1 -0
- package/test/conformance/expected/strings/matches_simple_alternation.eye +1 -0
- package/test/conformance/expected/strings/named_regex_two_groups.eye +1 -0
- package/test/conformance/expected/strings/not_matches_simple_pattern.eye +1 -0
- package/test/conformance/expected/strings/number_string_from_string.eye +1 -0
- package/test/conformance/expected/strings/number_string_rejects_non_numeric.eye +1 -0
- package/test/conformance/expected/strings/replace_empty_search_no_change.eye +1 -0
- package/test/conformance/expected/strings/split_without_separator_match.eye +1 -0
- package/test/conformance/expected/strings/substring_out_of_range_fails.eye +1 -0
- package/test/conformance/expected/strings/substring_zero_count.eye +1 -0
- package/test/conformance/expected/strings/term_string_nested_term.eye +1 -0
- package/test/conformance/expected/strings/trim_tabs_and_spaces.eye +1 -0
- package/test/conformance/expected/syntax/comments_inside_program.eye +0 -0
- package/test/conformance/expected/syntax/quoted_atom_with_newline_escape.eye +0 -0
- package/test/conformance/expected/syntax/string_with_tab_escape.eye +0 -0
- package/test/conformance/expected/table/tabled_left_recursion_path.eye +1 -0
- package/test/conformance/expected/terms/arg_first_and_second.eye +2 -0
- package/test/conformance/expected/terms/arg_zero_fails.eye +1 -0
- package/test/conformance/expected/terms/compound_name_arguments_bad_args_fail.eye +1 -0
- package/test/conformance/expected/terms/compound_name_arguments_builds_compound.eye +1 -0
- package/test/conformance/expected/terms/compound_name_arguments_iri_name.eye +1 -0
- package/test/conformance/expected/terms/functor_number_and_string.eye +2 -0
- package/test/conformance/expected/terms/term_string_readback_iri_list.eye +1 -0
- package/test/conformance/expected/unification/compound_arity_mismatch_fails.eye +1 -0
- package/test/conformance/expected/unification/list_tail_binding.eye +1 -0
- package/test/conformance/expected/unification/nested_repeated_variable.eye +1 -0
- package/test/conformance/expected/unification/scalar_cross_type_same_lexical_value.eye +2 -0
- package/test/conformance/expected/variables/clause_local_variable_names.eye +2 -0
- package/test/conformance/expected/variables/question_variable_digits_and_underscore.eye +1 -1
- package/test/conformance/expected/variables/question_variable_uppercase_name.eye +1 -0
- package/test/conformance/expected-errors/atoms/hash_comment_not_atom_at_line_start.txt +1 -0
- package/test/conformance/expected-errors/lists/missing_list_tail.txt +1 -0
- package/test/conformance/expected-errors/rules/rule_head_cannot_be_empty_parentheses.txt +1 -0
- package/test/conformance/expected-errors/syntax/angle_iri_with_space_rejected.txt +1 -0
- package/test/conformance/expected-errors/syntax/bad_question_digit_variable.txt +1 -0
- package/test/conformance/expected-errors/syntax/bad_question_variable.txt +1 -0
- package/test/conformance/expected-errors/syntax/empty_body_after_rule_marker.txt +1 -0
- package/test/conformance/expected-errors/syntax/empty_compound_nested.txt +1 -0
- package/test/conformance/expected-errors/syntax/missing_period.txt +1 -0
- package/test/conformance/expected-errors/syntax/relative_angle_iri_rejected.txt +1 -0
- package/test/conformance/expected-errors/syntax/trailing_comma_in_body.txt +1 -0
- package/test/conformance/expected-errors/syntax/unclosed_compound.txt +1 -0
- package/test/conformance/expected-errors/syntax/unclosed_list.txt +1 -0
- package/test/conformance/expected-errors/syntax/unclosed_quoted_atom.txt +1 -0
- package/test/conformance/expected-errors/syntax/unclosed_string.txt +1 -0
- package/test/conformance/expected-errors/syntax/unquoted_colon_predicate.txt +1 -0
- package/test/conformance/expected-errors/syntax/unquoted_dotted_predicate.txt +1 -0
- package/test/conformance/expected-errors/variables/bare_underscore_in_list_rejected.txt +1 -0
- package/test/conformance/expected-errors/variables/bare_underscore_name_in_compound_rejected.txt +1 -0
- package/test/conformance/expected-errors/variables/uppercase_in_body_rejected.txt +1 -0
- package/test/conformance/expected-proofs/proofs/bindings_nested_term.eye +16 -0
- package/test/conformance/expected-proofs/proofs/builtin_numeric.eye +16 -0
- package/test/conformance/expected-proofs/proofs/conjunction_order.eye +19 -0
- package/test/conformance/expected-proofs/proofs/iri_atom.eye +16 -0
- package/test/conformance/expected-proofs/proofs/list_builtin.eye +20 -0
- package/test/conformance/expected-proofs/proofs/once_child.eye +22 -0
- package/test/conformance/expected-proofs/proofs/rule_fact.eye +16 -0
- package/test/conformance/expected-proofs/proofs/table_recursive.eye +59 -0
- package/test/conformance/expected-warnings/negation/stratified_negative_unknown_after_positive_quiet.eye +1 -0
- package/test/conformance/expected-warnings/negation/stratified_negative_unknown_after_positive_quiet.txt +0 -0
- package/test/conformance/expected-warnings/negation/stratified_two_level_quiet.eye +1 -0
- package/test/conformance/expected-warnings/negation/stratified_two_level_quiet.txt +0 -0
- package/test/conformance/expected-warnings/negation/unstratified_positive_prefix.eye +0 -0
- package/test/conformance/expected-warnings/negation/unstratified_positive_prefix.txt +2 -0
- package/test/conformance/expected-warnings/negation/unstratified_two_arity_cycle.eye +0 -0
- package/test/conformance/expected-warnings/negation/unstratified_two_arity_cycle.txt +3 -0
- package/test/conformance/expected-warnings/negation/unstratified_two_independent_cycles.eye +0 -0
- package/test/conformance/expected-warnings/negation/unstratified_two_independent_cycles.txt +5 -0
- package/test/conformance/expected-warnings/negation/unstratified_with_iri_predicates.eye +0 -0
- package/test/conformance/expected-warnings/negation/unstratified_with_iri_predicates.txt +3 -0
- package/test/conformance/expected-warnings/negation/warning_preserves_multiple_stdout_answers.eye +0 -0
- package/test/conformance/expected-warnings/negation/warning_preserves_multiple_stdout_answers.txt +3 -0
- package/test/conformance/proofs/proofs/bindings_nested_term.eye +4 -0
- package/test/conformance/proofs/proofs/builtin_numeric.eye +3 -0
- package/test/conformance/proofs/proofs/conjunction_order.eye +5 -0
- package/test/conformance/proofs/proofs/iri_atom.eye +4 -0
- package/test/conformance/proofs/proofs/list_builtin.eye +3 -0
- package/test/conformance/proofs/proofs/once_child.eye +5 -0
- package/test/conformance/proofs/proofs/rule_fact.eye +4 -0
- package/test/conformance/proofs/proofs/table_recursive.eye +7 -0
- package/test/conformance/warnings/negation/stratified_negative_unknown_after_positive_quiet.eye +3 -0
- package/test/conformance/warnings/negation/stratified_two_level_quiet.eye +5 -0
- package/test/conformance/warnings/negation/unstratified_positive_prefix.eye +5 -0
- package/test/conformance/warnings/negation/unstratified_two_arity_cycle.eye +4 -0
- package/test/conformance/warnings/negation/unstratified_two_independent_cycles.eye +6 -0
- package/test/conformance/warnings/negation/unstratified_with_iri_predicates.eye +4 -0
- package/test/conformance/warnings/negation/warning_preserves_multiple_stdout_answers.eye +5 -0
- package/test/run-conformance-report.mjs +19 -7
- package/test/run-conformance.mjs +29 -0
- package/test/run-regression.mjs +12 -2
package/README.md
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Conformance Eyelang report
|
|
2
|
+
|
|
3
|
+
This report summarizes the file-based conformance corpus under `test/conformance/`.
|
|
4
|
+
|
|
5
|
+
| Category | Positive | Errors | Warnings | Proofs | Total |
|
|
6
|
+
|---|---:|---:|---:|---:|---:|
|
|
7
|
+
| aggregation | 5 | 0 | 0 | 0 | 5 |
|
|
8
|
+
| arithmetic | 12 | 0 | 0 | 0 | 12 |
|
|
9
|
+
| atoms | 14 | 5 | 0 | 0 | 19 |
|
|
10
|
+
| builtins | 2 | 0 | 0 | 0 | 2 |
|
|
11
|
+
| context | 3 | 0 | 0 | 0 | 3 |
|
|
12
|
+
| control | 5 | 0 | 0 | 0 | 5 |
|
|
13
|
+
| declarations | 5 | 0 | 0 | 0 | 5 |
|
|
14
|
+
| legacy-numbered | 104 | 0 | 0 | 0 | 104 |
|
|
15
|
+
| lists | 18 | 1 | 0 | 0 | 19 |
|
|
16
|
+
| materialize | 2 | 0 | 0 | 0 | 2 |
|
|
17
|
+
| negation | 3 | 0 | 13 | 0 | 16 |
|
|
18
|
+
| proofs | 0 | 0 | 0 | 8 | 8 |
|
|
19
|
+
| rules | 2 | 1 | 0 | 0 | 3 |
|
|
20
|
+
| strings | 15 | 0 | 0 | 0 | 15 |
|
|
21
|
+
| syntax | 4 | 19 | 0 | 0 | 23 |
|
|
22
|
+
| table | 2 | 0 | 0 | 0 | 2 |
|
|
23
|
+
| terms | 10 | 1 | 0 | 0 | 11 |
|
|
24
|
+
| unification | 4 | 0 | 0 | 0 | 4 |
|
|
25
|
+
| variables | 8 | 8 | 0 | 0 | 16 |
|
|
26
|
+
| **Total** | **218** | **35** | **13** | **8** | **274** |
|
package/docs/guide.md
CHANGED
|
@@ -503,7 +503,9 @@ Summarize the conformance corpus by category:
|
|
|
503
503
|
npm run conformance:report
|
|
504
504
|
```
|
|
505
505
|
|
|
506
|
-
|
|
506
|
+
Release preparation runs the same report and writes [`conformance-report.md`](../conformance-report.md), so each published package carries a current conformance summary.
|
|
507
|
+
|
|
508
|
+
The conformance suite lives in [`test/conformance/`](../test/conformance/) as a file-based eyelang corpus. Positive cases pair `cases/<name>.eye` with exact expected stdout under `expected/<name>.eye`; negative cases pair `errors/<name>.eye` with exact expected error text under `expected-errors/<name>.txt`; warning cases pair `warnings/<name>.eye` with exact `--warnings` stdout and stderr files under `expected-warnings/`; proof cases pair `proofs/<name>.eye` with exact `--proof` output under `expected-proofs/`. Cases may be grouped in category directories such as `arithmetic/`, `strings/`, `lists/`, `terms/`, `atoms/`, `variables/`, `negation/`, and `syntax/`, so another implementation can reuse the same corpus as an executable language contract. The suite covers the standard language surface from the language reference, including reusable built-ins, standard errors, standard warnings, and the machine-readable `why/2` proof-output contract. The regression suite lives in [`test/run-regression.mjs`](../test/run-regression.mjs) and covers CLI regressions, the public JavaScript API, and white-box invariants for parser, unification, and indexing behavior.
|
|
507
509
|
|
|
508
510
|
## Development and release
|
|
509
511
|
|
|
@@ -531,7 +533,8 @@ For a release:
|
|
|
531
533
|
2. update `README.md` and the language reference;
|
|
532
534
|
3. regenerate golden outputs if behavior changed;
|
|
533
535
|
4. run `npm run test:eyelang`;
|
|
534
|
-
5.
|
|
536
|
+
5. run `npm run conformance:report -- conformance-report.md`;
|
|
537
|
+
6. publish the repository with the browser playground assets if publishing the playground. The playground includes controls equivalent to CLI `--stats` and `--proof`.
|
|
535
538
|
|
|
536
539
|
## Relationship to Eyeling
|
|
537
540
|
|
|
@@ -702,7 +702,7 @@ A conforming eyelang implementation supports the standard language described abo
|
|
|
702
702
|
|
|
703
703
|
Browser execution, package layout, CLI URL loading, and any implementation-specific built-ins described in host documentation are outside this conformance surface unless separately standardized.
|
|
704
704
|
|
|
705
|
-
Conformance cases live in the repository under `test/conformance/`. They are run by `npm test` before the example suite, and can be run alone with `node test/run-conformance.mjs`. Positive cases have input programs under `conformance/cases/` and exact expected standard-output files under `conformance/expected/`; both use `.eye` so expected output remains eyelang-readable. Expected-error cases live under `conformance/errors/` with exact messages under `conformance/expected-errors/`. Expected-warning cases live under `conformance/warnings/` with exact `--warnings` stdout and stderr files under `conformance/expected-warnings/`.
|
|
705
|
+
Conformance cases live in the repository under `test/conformance/`. They are run by `npm test` before the example suite, and can be run alone with `node test/run-conformance.mjs`. Positive cases have input programs under `conformance/cases/` and exact expected standard-output files under `conformance/expected/`; both use `.eye` so expected output remains eyelang-readable. Expected-error cases live under `conformance/errors/` with exact messages under `conformance/expected-errors/`. Expected-warning cases live under `conformance/warnings/` with exact `--warnings` stdout and stderr files under `conformance/expected-warnings/`. The corpus is grouped by language area, including arithmetic, strings, lists, terms, atoms, variables, negation, declarations, materialization, rules, syntax, and errors.
|
|
706
706
|
|
|
707
707
|
## 15. Relationship to ISO Prolog
|
|
708
708
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eyelang",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "A small Prolog-like logic programming language for rules, goals, answers, and proofs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"playground.html",
|
|
31
31
|
"bin",
|
|
32
32
|
"src",
|
|
33
|
+
"conformance-report.md",
|
|
33
34
|
"docs",
|
|
34
35
|
"examples",
|
|
35
36
|
"test"
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"test:conformance": "node test/run-conformance.mjs",
|
|
44
45
|
"test:examples": "node test/run-examples.mjs",
|
|
45
46
|
"test:regression": "node test/run-regression.mjs",
|
|
46
|
-
"preversion": "npm test",
|
|
47
|
+
"preversion": "npm test && npm run conformance:report -- conformance-report.md",
|
|
47
48
|
"postversion": "git push origin HEAD --follow-tags",
|
|
48
49
|
"conformance:report": "node test/run-conformance-report.mjs"
|
|
49
50
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This directory contains the executable conformance cases for the Eyelang language and reference engine. The normative language description is in the [Eyelang language reference](../../../docs/language-reference.md).
|
|
4
4
|
|
|
5
|
-
The suite is intentionally file-based so another implementation can run the same programs and compare exact standard output, expected errors, and expected
|
|
5
|
+
The suite is intentionally file-based so another implementation can run the same programs and compare exact standard output, expected errors, expected warnings, and expected proof output. The conformance corpus is part of the public language contract, not just an implementation smoke test.
|
|
6
6
|
|
|
7
7
|
A normal positive case consists of:
|
|
8
8
|
|
|
@@ -20,7 +20,12 @@ Expected-warning cases consist of:
|
|
|
20
20
|
- `conformance/expected-warnings/<name>.eye` — exact expected standard output;
|
|
21
21
|
- `conformance/expected-warnings/<name>.txt` — exact expected standard error.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Expected-proof cases consist of:
|
|
24
|
+
|
|
25
|
+
- `conformance/proofs/<name>.eye` — input program run through the CLI with `--proof`;
|
|
26
|
+
- `conformance/expected-proofs/<name>.eye` — exact expected standard output, including both answer facts and `why/2` proof facts.
|
|
27
|
+
|
|
28
|
+
Case names may be nested in category directories such as `arithmetic/`, `strings/`, `lists/`, `terms/`, `atoms/`, `variables/`, `negation/`, or `syntax/`. Expected files mirror the same relative path.
|
|
24
29
|
|
|
25
30
|
## Running the suite
|
|
26
31
|
|
|
@@ -40,6 +45,7 @@ Summarize conformance coverage by category:
|
|
|
40
45
|
|
|
41
46
|
```sh
|
|
42
47
|
npm run conformance:report
|
|
48
|
+
npm run conformance:report -- conformance-report.md
|
|
43
49
|
```
|
|
44
50
|
|
|
45
51
|
Run matching conformance cases by passing a filename or directory fragment:
|
|
@@ -51,14 +57,14 @@ node test/run-conformance.mjs variables/
|
|
|
51
57
|
node test/run-conformance.mjs error/variables
|
|
52
58
|
```
|
|
53
59
|
|
|
54
|
-
The runner executes normal materialized programs in-process through the public JavaScript API so small conformance cases avoid measuring Node startup overhead. Warning cases intentionally use the CLI because warning output
|
|
60
|
+
The runner executes normal materialized programs in-process through the public JavaScript API so small conformance cases avoid measuring Node startup overhead. Warning and proof cases intentionally use the CLI because warning output and `why/2` proof output are host-interface contracts.
|
|
55
61
|
|
|
56
62
|
## Scope
|
|
57
63
|
|
|
58
|
-
The conformance corpus is a single eyelang suite. It covers the standard language described by the language reference: lexical syntax, facts, definite clauses, first-order terms, lists, conjunction, structured unification, left-to-right goal-directed proof search, materialized output, read-back printing, standard built-ins, declarations, warnings, errors, and standard host behavior.
|
|
64
|
+
The conformance corpus is a single eyelang suite. It covers the standard language described by the language reference: lexical syntax, facts, definite clauses, first-order terms, lists, conjunction, structured unification, left-to-right goal-directed proof search, materialized output, read-back printing, standard built-ins, declarations, warnings, errors, proof output, and standard host behavior.
|
|
59
65
|
|
|
60
66
|
The suite deliberately does not separate `core` and `extension` profiles. Reusable built-ins such as arithmetic, strings, lists, aggregation, context terms, term inspection, and search control are part of the standard eyelang conformance surface. Implementation-specific built-ins may still exist in downstream hosts, but they should have their own tests outside this corpus unless they are standardized.
|
|
61
67
|
|
|
62
68
|
## Updating expected output
|
|
63
69
|
|
|
64
|
-
There is no committed auto-accept mode. To update an expected file, run the matching case with the conformance runner, inspect the result, and replace the corresponding file under `conformance/expected/`, `conformance/expected-errors/`, or `conformance/expected-
|
|
70
|
+
There is no committed auto-accept mode. To update an expected file, run the matching case with the conformance runner, inspect the result, and replace the corresponding file under `conformance/expected/`, `conformance/expected-errors/`, `conformance/expected-warnings/`, or `conformance/expected-proofs/` deliberately.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#bad(ok).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer([a | ]).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
() :- seed(ok).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(<urn:example:a b>).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(?1).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(?x?).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok) :- .
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(pair(nil())).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(<relative>).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok) :- seed(ok), .
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(pair(a, b).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer([a, b).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer('abc).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer("abc).
|