eyelang 1.7.3 → 1.7.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/README.md +1 -0
- package/docs/guide.md +8 -1
- package/docs/language-reference.md +1 -1
- package/package.json +3 -2
- package/test/conformance/README.md +7 -1
- 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/graphic_less_than_atom.eye +4 -0
- package/test/conformance/cases/atoms/iri_as_predicate_name_quoted.eye +3 -0
- package/test/conformance/cases/atoms/iri_mailto_readback.eye +4 -0
- package/test/conformance/cases/atoms/iri_query_fragment_readback.eye +4 -0
- package/test/conformance/cases/atoms/iri_urn_readback.eye +4 -0
- package/test/conformance/cases/atoms/quoted_relative_iri_not_angle.eye +2 -0
- package/test/conformance/cases/atoms/quoted_urn_iri_readback.eye +4 -0
- package/test/conformance/cases/builtins/atom_string_iri_atom.eye +3 -0
- package/test/conformance/cases/builtins/eq_unifies_iri_atoms.eye +3 -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/declarations/mode_ignored_when_arity_mismatch.eye +5 -0
- package/test/conformance/cases/declarations/table_is_also_fact.eye +4 -0
- package/test/conformance/cases/lists/empty_list_term.eye +4 -0
- package/test/conformance/cases/lists/head_rest_last.eye +4 -0
- package/test/conformance/cases/lists/improper_list_readback.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/list_with_iri_atoms.eye +4 -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/materialize/source_facts_suppressed.eye +5 -0
- package/test/conformance/cases/negation/not_known_goal_fails.eye +4 -0
- package/test/conformance/cases/negation/not_unknown_goal_succeeds.eye +3 -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 +2 -0
- package/test/conformance/cases/syntax/comments_inside_program.eye +4 -0
- package/test/conformance/cases/syntax/parenthesized_query_style_body.eye +5 -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_atom_zero_args.eye +3 -0
- package/test/conformance/cases/terms/compound_name_arguments_bad_args_fail.eye +2 -0
- package/test/conformance/cases/terms/compound_name_arguments_builds_atom_from_empty_args.eye +3 -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_atom_arity_zero.eye +3 -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/anonymous_in_two_goals.eye +4 -0
- package/test/conformance/cases/variables/clause_local_variable_names.eye +5 -0
- package/test/conformance/cases/variables/question_uppercase_variable.eye +4 -0
- package/test/conformance/cases/variables/question_variable_digits_and_underscore.eye +2 -0
- package/test/conformance/cases/variables/question_variable_uppercase_name.eye +2 -0
- package/test/conformance/cases/variables/variable_scope_per_clause.eye +6 -0
- package/test/conformance/errors/atoms/hash_comment_not_atom_at_line_start.eye +1 -0
- package/test/conformance/errors/atoms/relative_angle_name_rejected.eye +1 -0
- package/test/conformance/errors/atoms/space_in_angle_iri_rejected.eye +1 -0
- package/test/conformance/errors/atoms/unclosed_angle_iri_rejected.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_final_dot_rejected.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_list_rejected.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/syntax/uppercase_predicate_rejected.eye +1 -0
- package/test/conformance/errors/terms/zero_arity_compound_nested_rejected.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/question_digit_rejected.eye +1 -0
- package/test/conformance/errors/variables/question_dot_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/graphic_less_than_atom.eye +1 -0
- package/test/conformance/expected/atoms/iri_as_predicate_name_quoted.eye +1 -0
- package/test/conformance/expected/atoms/iri_mailto_readback.eye +1 -0
- package/test/conformance/expected/atoms/iri_query_fragment_readback.eye +1 -0
- package/test/conformance/expected/atoms/iri_urn_readback.eye +1 -0
- package/test/conformance/expected/atoms/quoted_relative_iri_not_angle.eye +0 -0
- package/test/conformance/expected/atoms/quoted_urn_iri_readback.eye +1 -0
- package/test/conformance/expected/builtins/atom_string_iri_atom.eye +1 -0
- package/test/conformance/expected/builtins/eq_unifies_iri_atoms.eye +1 -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/declarations/mode_ignored_when_arity_mismatch.eye +1 -0
- package/test/conformance/expected/declarations/table_is_also_fact.eye +1 -0
- package/test/conformance/expected/lists/empty_list_term.eye +1 -0
- package/test/conformance/expected/lists/head_rest_last.eye +3 -0
- package/test/conformance/expected/lists/improper_list_readback.eye +1 -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/list_with_iri_atoms.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/materialize/source_facts_suppressed.eye +1 -0
- package/test/conformance/expected/negation/not_known_goal_fails.eye +0 -0
- package/test/conformance/expected/negation/not_unknown_goal_succeeds.eye +1 -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/parenthesized_query_style_body.eye +1 -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_atom_zero_args.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_atom_from_empty_args.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_atom_arity_zero.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/anonymous_in_two_goals.eye +1 -0
- package/test/conformance/expected/variables/clause_local_variable_names.eye +2 -0
- package/test/conformance/expected/variables/question_uppercase_variable.eye +1 -0
- package/test/conformance/expected/variables/question_variable_digits_and_underscore.eye +1 -0
- package/test/conformance/expected/variables/question_variable_uppercase_name.eye +1 -0
- package/test/conformance/expected/variables/variable_scope_per_clause.eye +2 -0
- package/test/conformance/expected-errors/atoms/hash_comment_not_atom_at_line_start.txt +1 -0
- package/test/conformance/expected-errors/atoms/relative_angle_name_rejected.txt +1 -0
- package/test/conformance/expected-errors/atoms/space_in_angle_iri_rejected.txt +1 -0
- package/test/conformance/expected-errors/atoms/unclosed_angle_iri_rejected.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_final_dot_rejected.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_list_rejected.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/syntax/uppercase_predicate_rejected.txt +1 -0
- package/test/conformance/expected-errors/terms/zero_arity_compound_nested_rejected.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/question_digit_rejected.txt +1 -0
- package/test/conformance/expected-errors/variables/question_dot_rejected.txt +1 -0
- package/test/conformance/expected-errors/variables/uppercase_in_body_rejected.txt +1 -0
- package/test/conformance/expected-warnings/negation/negative_unknown_group_quiet.eye +1 -0
- package/test/conformance/expected-warnings/negation/negative_unknown_group_quiet.txt +0 -0
- package/test/conformance/expected-warnings/negation/no_negation_quiet.eye +1 -0
- package/test/conformance/expected-warnings/negation/no_negation_quiet.txt +0 -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_three_step.eye +1 -0
- package/test/conformance/expected-warnings/negation/unstratified_three_step.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/warnings/negation/negative_unknown_group_quiet.eye +2 -0
- package/test/conformance/warnings/negation/no_negation_quiet.eye +3 -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_three_step.eye +6 -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 +108 -0
- package/test/run-regression.mjs +13 -0
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok).
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(a).
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(a).
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
answer(ok).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/conformance/expected-warnings/negation/warning_preserves_multiple_stdout_answers.eye
ADDED
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Static conformance corpus report.
|
|
3
|
+
// This complements the executable runner with a category summary that makes
|
|
4
|
+
// coverage growth visible without running every case.
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)));
|
|
10
|
+
const conformanceRoot = path.join(root, 'conformance');
|
|
11
|
+
|
|
12
|
+
const KINDS = [
|
|
13
|
+
{ kind: 'cases', expectedKind: 'expected', expectedExt: '.eye', column: 'positive' },
|
|
14
|
+
{ kind: 'errors', expectedKind: 'expected-errors', expectedExt: '.txt', column: 'errors' },
|
|
15
|
+
{ kind: 'warnings', expectedKind: 'expected-warnings', expectedExt: '.eye', column: 'warnings' },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export function buildConformanceReport() {
|
|
19
|
+
const categories = new Map();
|
|
20
|
+
const issues = [];
|
|
21
|
+
|
|
22
|
+
for (const { kind, expectedKind, expectedExt, column } of KINDS) {
|
|
23
|
+
const base = path.join(conformanceRoot, kind);
|
|
24
|
+
if (!fs.existsSync(base)) continue;
|
|
25
|
+
for (const file of listEyeFiles(base)) {
|
|
26
|
+
const category = categoryOf(file);
|
|
27
|
+
const counts = ensureCategory(categories, category);
|
|
28
|
+
counts[column]++;
|
|
29
|
+
counts.total++;
|
|
30
|
+
|
|
31
|
+
const stem = file.slice(0, -4);
|
|
32
|
+
const expected = path.join(conformanceRoot, expectedKind, `${stem}${expectedExt}`);
|
|
33
|
+
if (!fs.existsSync(expected)) issues.push(`missing ${expectedKind}/${stem}${expectedExt}`);
|
|
34
|
+
if (kind === 'warnings') {
|
|
35
|
+
const expectedStderr = path.join(conformanceRoot, expectedKind, `${stem}.txt`);
|
|
36
|
+
if (!fs.existsSync(expectedStderr)) issues.push(`missing ${expectedKind}/${stem}.txt`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const rows = [...categories.entries()]
|
|
42
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
43
|
+
.map(([category, counts]) => ({ category, ...counts }));
|
|
44
|
+
const total = rows.reduce((acc, row) => ({
|
|
45
|
+
positive: acc.positive + row.positive,
|
|
46
|
+
errors: acc.errors + row.errors,
|
|
47
|
+
warnings: acc.warnings + row.warnings,
|
|
48
|
+
total: acc.total + row.total,
|
|
49
|
+
}), { positive: 0, errors: 0, warnings: 0, total: 0 });
|
|
50
|
+
|
|
51
|
+
return { rows, total, issues: issues.sort() };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function formatConformanceReport(report = buildConformanceReport()) {
|
|
55
|
+
const lines = [
|
|
56
|
+
'# Conformance Eyelang report',
|
|
57
|
+
'',
|
|
58
|
+
'This report summarizes the file-based conformance corpus under `test/conformance/`.',
|
|
59
|
+
'',
|
|
60
|
+
'| Category | Positive | Errors | Warnings | Total |',
|
|
61
|
+
'|---|---:|---:|---:|---:|',
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
for (const row of report.rows) {
|
|
65
|
+
lines.push(`| ${row.category} | ${row.positive} | ${row.errors} | ${row.warnings} | ${row.total} |`);
|
|
66
|
+
}
|
|
67
|
+
lines.push(`| **Total** | **${report.total.positive}** | **${report.total.errors}** | **${report.total.warnings}** | **${report.total.total}** |`);
|
|
68
|
+
|
|
69
|
+
if (report.issues.length > 0) {
|
|
70
|
+
lines.push('', '## Corpus issues', '');
|
|
71
|
+
for (const issue of report.issues) lines.push(`- ${issue}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return `${lines.join('\n')}\n`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function listEyeFiles(base, dir = base) {
|
|
78
|
+
const files = [];
|
|
79
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
80
|
+
const full = path.join(dir, entry.name);
|
|
81
|
+
if (entry.isDirectory()) {
|
|
82
|
+
files.push(...listEyeFiles(base, full));
|
|
83
|
+
} else if (entry.isFile() && entry.name.endsWith('.eye')) {
|
|
84
|
+
files.push(path.relative(base, full).split(path.sep).join('/'));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return files.sort();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function categoryOf(file) {
|
|
91
|
+
const parts = file.split('/');
|
|
92
|
+
return parts.length > 1 ? parts[0] : 'legacy-numbered';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function ensureCategory(categories, category) {
|
|
96
|
+
let counts = categories.get(category);
|
|
97
|
+
if (!counts) {
|
|
98
|
+
counts = { positive: 0, errors: 0, warnings: 0, total: 0 };
|
|
99
|
+
categories.set(category, counts);
|
|
100
|
+
}
|
|
101
|
+
return counts;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (process.argv[1] != null && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
105
|
+
const report = buildConformanceReport();
|
|
106
|
+
process.stdout.write(formatConformanceReport(report));
|
|
107
|
+
if (report.issues.length > 0) process.exit(1);
|
|
108
|
+
}
|
package/test/run-regression.mjs
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
import { parseGoalText } from '../src/parser.js';
|
|
36
36
|
import { selectClauseCandidates } from '../src/program.js';
|
|
37
37
|
import { TestReporter, isMainModule } from './test-style.mjs';
|
|
38
|
+
import { buildConformanceReport, formatConformanceReport } from './run-conformance-report.mjs';
|
|
38
39
|
import { hashHex } from '../src/hash.js';
|
|
39
40
|
|
|
40
41
|
const testRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)));
|
|
@@ -365,6 +366,18 @@ function documentationSyncCases() {
|
|
|
365
366
|
name: 'documented npm scripts exist in package.json',
|
|
366
367
|
run: () => assertArrayEqual(missingDocumentedPackageScripts(), [], 'missing documented npm scripts'),
|
|
367
368
|
},
|
|
369
|
+
{
|
|
370
|
+
name: 'conformance report summarizes public corpus',
|
|
371
|
+
run: () => {
|
|
372
|
+
const report = buildConformanceReport();
|
|
373
|
+
assertArrayEqual(report.issues, [], 'conformance report issues');
|
|
374
|
+
assertEqual(report.total.total >= 250, true, 'conformance case count');
|
|
375
|
+
assertEqual(report.total.positive + report.total.errors + report.total.warnings, report.total.total, 'conformance total');
|
|
376
|
+
const text = formatConformanceReport(report);
|
|
377
|
+
assertIncludes(text, '| variables |', 'report');
|
|
378
|
+
assertIncludes(text, '| **Total** |', 'report');
|
|
379
|
+
},
|
|
380
|
+
},
|
|
368
381
|
{
|
|
369
382
|
name: 'source-checkout setup docs match package bin',
|
|
370
383
|
run: () => {
|