eyeprolog 1.5.89 → 1.5.91

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.
Files changed (85) hide show
  1. package/conformance-report.md +2 -2
  2. package/package.json +1 -1
  3. package/test/conformance/README.md +1 -1
  4. package/test/conformance/THIRD_PARTY.md +5 -0
  5. package/test/conformance/cases/iso/scryer_call_zero_arity.pl +6 -0
  6. package/test/conformance/cases/iso/scryer_current_predicate_after_existence_error.pl +7 -0
  7. package/test/conformance/cases/iso/scryer_current_prolog_flag_shared_var.pl +6 -0
  8. package/test/conformance/cases/iso/scryer_op_bar_prefix_permission.pl +6 -0
  9. package/test/conformance/cases/iso/scryer_op_name_list_unbound_element.pl +6 -0
  10. package/test/conformance/cases/iso/scryer_op_name_type_error.pl +6 -0
  11. package/test/conformance/cases/iso/scryer_op_specifier_type_error.pl +6 -0
  12. package/test/conformance/cases/iso/scryer_op_wrong_arity_existence_error.pl +6 -0
  13. package/test/conformance/cases/iso/trealla_bagof_setof_duplicate_handling.pl +15 -0
  14. package/test/conformance/cases/iso/trealla_call_transparent_to_disjunction.pl +7 -0
  15. package/test/conformance/cases/iso/trealla_clause_enumeration_backtracking.pl +13 -0
  16. package/test/conformance/cases/iso/trealla_compare_standard_order.pl +8 -0
  17. package/test/conformance/cases/iso/trealla_copy_term_binding_direction.pl +9 -0
  18. package/test/conformance/cases/iso/trealla_copy_term_bound_list_tail.pl +6 -0
  19. package/test/conformance/cases/iso/trealla_curly_and_colon_syntax_equivalence.pl +10 -0
  20. package/test/conformance/cases/iso/trealla_curly_braces_as_predicate.pl +10 -0
  21. package/test/conformance/cases/iso/trealla_dif_unification_shared_var.pl +6 -0
  22. package/test/conformance/cases/iso/trealla_disjunction_commit_and_fallthrough.pl +11 -0
  23. package/test/conformance/cases/iso/trealla_findall_bagof_grouping.pl +13 -0
  24. package/test/conformance/cases/iso/trealla_float_literal_representation_error.pl +9 -0
  25. package/test/conformance/cases/iso/trealla_forall_arithmetic_facts.pl +10 -0
  26. package/test/conformance/cases/iso/trealla_functor_arg_partial_term.pl +18 -0
  27. package/test/conformance/cases/iso/trealla_ground_progressive_backtracking.pl +21 -0
  28. package/test/conformance/cases/iso/trealla_if_then_noncallable_then.pl +6 -0
  29. package/test/conformance/cases/iso/trealla_mod_sign_rules.pl +14 -0
  30. package/test/conformance/cases/iso/trealla_negation_eager_callability.pl +9 -0
  31. package/test/conformance/cases/iso/trealla_number_chars_skips_comments.pl +7 -0
  32. package/test/conformance/cases/iso/trealla_number_chars_syntax_error.pl +6 -0
  33. package/test/conformance/cases/iso/trealla_occurs_check_rational_tree_subtleties.pl +8 -0
  34. package/test/conformance/cases/iso/trealla_occurs_check_reverse_order.pl +7 -0
  35. package/test/conformance/cases/iso/trealla_once_inside_findall_template.pl +12 -0
  36. package/test/conformance/cases/iso/trealla_quoted_atom_line_continuation.pl +7 -0
  37. package/test/conformance/cases/iso/trealla_retract_backtracking.pl +15 -0
  38. package/test/conformance/cases/iso/trealla_shared_argument_aliasing.pl +8 -0
  39. package/test/conformance/cases/iso/trealla_sort_duplicates_and_empty.pl +9 -0
  40. package/test/conformance/cases/iso/trealla_unicode_length_agreement.pl +9 -0
  41. package/test/conformance/cases/iso/trealla_variable_aliasing_across_calls.pl +9 -0
  42. package/test/conformance/cases/iso/trealla_write_associative_operators.pl +11 -0
  43. package/test/conformance/cases/iso/trealla_write_term_ignore_ops_quoted_independence.pl +10 -0
  44. package/test/conformance/cases/iso/trealla_write_term_variable_names_malformed.pl +6 -0
  45. package/test/conformance/expected/iso/scryer_call_zero_arity.pl +1 -0
  46. package/test/conformance/expected/iso/scryer_current_predicate_after_existence_error.pl +1 -0
  47. package/test/conformance/expected/iso/scryer_current_prolog_flag_shared_var.pl +1 -0
  48. package/test/conformance/expected/iso/scryer_op_bar_prefix_permission.pl +1 -0
  49. package/test/conformance/expected/iso/scryer_op_name_list_unbound_element.pl +1 -0
  50. package/test/conformance/expected/iso/scryer_op_name_type_error.pl +1 -0
  51. package/test/conformance/expected/iso/scryer_op_specifier_type_error.pl +1 -0
  52. package/test/conformance/expected/iso/scryer_op_wrong_arity_existence_error.pl +1 -0
  53. package/test/conformance/expected/iso/trealla_bagof_setof_duplicate_handling.pl +1 -0
  54. package/test/conformance/expected/iso/trealla_call_transparent_to_disjunction.pl +1 -0
  55. package/test/conformance/expected/iso/trealla_clause_enumeration_backtracking.pl +1 -0
  56. package/test/conformance/expected/iso/trealla_compare_standard_order.pl +1 -0
  57. package/test/conformance/expected/iso/trealla_copy_term_binding_direction.pl +1 -0
  58. package/test/conformance/expected/iso/trealla_copy_term_bound_list_tail.pl +1 -0
  59. package/test/conformance/expected/iso/trealla_curly_and_colon_syntax_equivalence.pl +1 -0
  60. package/test/conformance/expected/iso/trealla_curly_braces_as_predicate.pl +1 -0
  61. package/test/conformance/expected/iso/trealla_dif_unification_shared_var.pl +1 -0
  62. package/test/conformance/expected/iso/trealla_disjunction_commit_and_fallthrough.pl +1 -0
  63. package/test/conformance/expected/iso/trealla_findall_bagof_grouping.pl +1 -0
  64. package/test/conformance/expected/iso/trealla_float_literal_representation_error.pl +1 -0
  65. package/test/conformance/expected/iso/trealla_forall_arithmetic_facts.pl +1 -0
  66. package/test/conformance/expected/iso/trealla_functor_arg_partial_term.pl +2 -0
  67. package/test/conformance/expected/iso/trealla_ground_progressive_backtracking.pl +1 -0
  68. package/test/conformance/expected/iso/trealla_if_then_noncallable_then.pl +1 -0
  69. package/test/conformance/expected/iso/trealla_mod_sign_rules.pl +1 -0
  70. package/test/conformance/expected/iso/trealla_negation_eager_callability.pl +1 -0
  71. package/test/conformance/expected/iso/trealla_number_chars_skips_comments.pl +1 -0
  72. package/test/conformance/expected/iso/trealla_number_chars_syntax_error.pl +1 -0
  73. package/test/conformance/expected/iso/trealla_occurs_check_rational_tree_subtleties.pl +1 -0
  74. package/test/conformance/expected/iso/trealla_occurs_check_reverse_order.pl +1 -0
  75. package/test/conformance/expected/iso/trealla_once_inside_findall_template.pl +1 -0
  76. package/test/conformance/expected/iso/trealla_quoted_atom_line_continuation.pl +2 -0
  77. package/test/conformance/expected/iso/trealla_retract_backtracking.pl +5 -0
  78. package/test/conformance/expected/iso/trealla_shared_argument_aliasing.pl +2 -0
  79. package/test/conformance/expected/iso/trealla_sort_duplicates_and_empty.pl +1 -0
  80. package/test/conformance/expected/iso/trealla_unicode_length_agreement.pl +1 -0
  81. package/test/conformance/expected/iso/trealla_variable_aliasing_across_calls.pl +1 -0
  82. package/test/conformance/expected/iso/trealla_write_associative_operators.pl +7 -0
  83. package/test/conformance/expected/iso/trealla_write_term_ignore_ops_quoted_independence.pl +6 -0
  84. package/test/conformance/expected/iso/trealla_write_term_variable_names_malformed.pl +1 -0
  85. package/the-art-of-eyeprolog.md +1 -1
@@ -24,7 +24,7 @@ bytes, avoiding a second live fetch and its race window.
24
24
  | context | 11 | 0 | 0 | 0 | 11 |
25
25
  | control | 15 | 0 | 0 | 0 | 15 |
26
26
  | explicit-tabling | 6 | 0 | 0 | 0 | 6 |
27
- | iso | 211 | 219 | 0 | 0 | 430 |
27
+ | iso | 251 | 219 | 0 | 0 | 470 |
28
28
  | lists | 52 | 3 | 0 | 0 | 55 |
29
29
  | modules | 2 | 0 | 0 | 0 | 2 |
30
30
  | negation | 8 | 0 | 19 | 0 | 27 |
@@ -37,7 +37,7 @@ bytes, avoiding a second live fetch and its race window.
37
37
  | terms | 26 | 3 | 0 | 0 | 29 |
38
38
  | unification | 18 | 0 | 0 | 0 | 18 |
39
39
  | variables | 16 | 7 | 0 | 0 | 23 |
40
- | **Total** | **533** | **274** | **19** | **21** | **847** |
40
+ | **Total** | **573** | **274** | **19** | **21** | **887** |
41
41
 
42
42
  ## DCG conformance clarification
43
43
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.5.89",
6
+ "version": "1.5.91",
7
7
  "description": "EyeProlog turns facts and rules into answers and proofs.",
8
8
  "type": "module",
9
9
  "main": "./index.js",
@@ -138,7 +138,7 @@ Selected cases are adapted from the ISO and standard-core suites of Logtalk,
138
138
  Scryer Prolog, Trealla Prolog, and SWI-Prolog. Their upstream identifiers and licenses
139
139
  are recorded in [THIRD_PARTY.md](THIRD_PARTY.md).
140
140
 
141
- The corpus has 430 cases in `iso/` and 847 file-based conformance cases in total. Of those, 11 cases in `stc/` are explicitly labelled working-draft review evidence rather than normative ISO claims. The strict-reader WG17 syntax matrix is discovered dynamically and executed live by the Neumerkel gate, the same as its other seven TU Wien sources; release/report checks separately verify the tracked `NEUMERKEL-LATEST.md`. The generated `conformance-report.md` records local corpus totals and links to that live evidence. Together with regression, documentation-sync, API, example, and book-example checks, `npm test` is the release gate.
141
+ The corpus has 470 cases in `iso/` and 887 file-based conformance cases in total. Of those, 11 cases in `stc/` are explicitly labelled working-draft review evidence rather than normative ISO claims. The strict-reader WG17 syntax matrix is discovered dynamically and executed live by the Neumerkel gate, the same as its other seven TU Wien sources; release/report checks separately verify the tracked `NEUMERKEL-LATEST.md`. The generated `conformance-report.md` records local corpus totals and links to that live evidence. Together with regression, documentation-sync, API, example, and book-example checks, `npm test` is the release gate.
142
142
 
143
143
  ## Updating expected output
144
144
 
@@ -36,6 +36,11 @@ adapted from `tests-pl/iso-conformity-tests.pl` in
36
36
  identifies the corresponding upstream test numbers. The cases were rewritten
37
37
  for EyeProlog's file-based query and exact-output harness.
38
38
 
39
+ Additional operator-directive and control-construct error-condition cases
40
+ under `iso/` are adapted from Scryer's `tests-pl/invalid_decl*.pl` and
41
+ `tests-pl/issue831-call0.pl` regression fixtures. Each adapted file identifies
42
+ its upstream source file.
43
+
39
44
  BSD 3-Clause License
40
45
 
41
46
  Copyright (c) 2016, Mark Thom
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/issue831-call0.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: call_zero_arity(X0)
4
+
5
+ call_zero_arity(E) :-
6
+ catch(call, error(E, _), true).
@@ -0,0 +1,7 @@
1
+ % Adapted from Scryer Prolog tests-pl/issue3370_current_predicate_call.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: current_predicate_after_existence_error(X0)
4
+
5
+ current_predicate_after_existence_error(R) :-
6
+ catch(call(foo_undefined, 1), _, true),
7
+ ( current_predicate(foo_undefined/1) -> R = defined ; R = not_defined ).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/issue2914.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: current_prolog_flag_shared_var(X0)
4
+
5
+ current_prolog_flag_shared_var(R) :-
6
+ ( current_prolog_flag(X, X) -> R = true ; R = false ).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/invalid_decl15.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: op_bar_prefix_permission(X0)
4
+
5
+ op_bar_prefix_permission(E) :-
6
+ catch(op(1150, fx, '|'), error(E, _), true).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/invalid_decl11.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: op_name_list_unbound_element(X0)
4
+
5
+ op_name_list_unbound_element(E) :-
6
+ catch(op(10, xf, [example, _]), error(E, _), true).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/invalid_decl3.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: op_name_type_error(X0)
4
+
5
+ op_name_type_error(E) :-
6
+ catch(op(5, xfx, example(a, b)), error(E, _), true).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/invalid_decl7.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: op_specifier_type_error(X0)
4
+
5
+ op_specifier_type_error(E) :-
6
+ catch(op(10, 42, example), error(E, _), true).
@@ -0,0 +1,6 @@
1
+ % Adapted from Scryer Prolog tests-pl/invalid_decl4.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: op_wrong_arity_existence_error(X0)
4
+
5
+ op_wrong_arity_existence_error(E) :-
6
+ catch(op(5, xfx, example, extra), error(E, _), true).
@@ -0,0 +1,15 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0049.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: bagof_setof_duplicate_handling(X0, X1)
4
+
5
+ foo_dup(a, b, c).
6
+ foo_dup(a, b, d).
7
+ foo_dup(a, b, a).
8
+ foo_dup(a, b, a).
9
+ foo_dup(b, c, f).
10
+ foo_dup(b, c, e).
11
+ foo_dup(c, c, g).
12
+
13
+ bagof_setof_duplicate_handling(Bag, Set) :-
14
+ bagof(C, A^B^foo_dup(A, B, C), Bag),
15
+ setof(C, A^B^foo_dup(A, B, C), Set).
@@ -0,0 +1,7 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0016.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: call_transparent_to_disjunction(ok)
4
+
5
+ call_transparent_to_disjunction(ok) :-
6
+ call((true ; false)),
7
+ call((false ; true)).
@@ -0,0 +1,13 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0019.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: clause_enumeration_backtracking(X0)
4
+
5
+ populate_x24c :-
6
+ assertz(x24c(0)),
7
+ assertz(x24c(1)),
8
+ assertz(x24c(2)),
9
+ assertz(x24c(3)).
10
+
11
+ clause_enumeration_backtracking(L) :-
12
+ populate_x24c,
13
+ findall(X - B, clause(x24c(X), B), L).
@@ -0,0 +1,8 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test15d).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: compare_standard_order(ok)
4
+
5
+ compare_standard_order(ok) :-
6
+ compare(<, 1, 2),
7
+ compare(=, 2, 2),
8
+ compare(>, 3, 2).
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/issues/test1136.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: copy_term_binding_direction(ok)
4
+
5
+ copy_term_binding_direction(ok) :-
6
+ copy_term(X, 3), var(X),
7
+ copy_term(f(Y), f(3)), var(Y),
8
+ copy_term(3, Z), Z == 3,
9
+ \+ copy_term(f(_), 3).
@@ -0,0 +1,6 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0070.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: copy_term_bound_list_tail(X0)
4
+
5
+ copy_term_bound_list_tail(T2) :-
6
+ L = [aa, bb, cc], L = [_ | T], copy_term(T, T2).
@@ -0,0 +1,10 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0073.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: curly_and_colon_syntax_equivalence(X0, X1, X2, X3, X4)
4
+
5
+ curly_and_colon_syntax_equivalence(X, Y, Z, A, B) :-
6
+ X = {a:b},
7
+ Y = {}(a:b),
8
+ Z = :(a, b),
9
+ A = a:b,
10
+ B = (a:b).
@@ -0,0 +1,10 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test17).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: curly_braces_as_predicate(ok)
4
+
5
+ curly_braces_as_predicate(ok) :-
6
+ assertz({abc, 123}), assertz({xyz, 456}),
7
+ clause({abc, X}, B), X = 123, B = true,
8
+ clause({xyz, Y}, C), Y = 456, C = true,
9
+ {abc, Z}, Z = 123,
10
+ retract({xyz, W}), W = 456.
@@ -0,0 +1,6 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0090.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: dif_unification_shared_var(ok)
4
+
5
+ dif_unification_shared_var(ok) :-
6
+ [A, 1] \= [A, 2].
@@ -0,0 +1,11 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test5a, test5b).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: disjunction_commit_and_fallthrough(ok)
4
+
5
+ name_d(john).
6
+ name_d(mary).
7
+ name_d(tom).
8
+
9
+ disjunction_commit_and_fallthrough(ok) :-
10
+ ( name_d(john) ; write('ERROR') ), !,
11
+ ( name_d(fred) ; name_d(mary) ), !.
@@ -0,0 +1,13 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0028.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: findall_bagof_grouping(X0)
4
+
5
+ foo_groups(a, b, c).
6
+ foo_groups(a, b, d).
7
+ foo_groups(b, c, e).
8
+ foo_groups(b, c, f).
9
+ foo_groups(c, c, g).
10
+ foo_groups(d, e, g).
11
+
12
+ findall_bagof_grouping(L) :-
13
+ findall(Cs, bagof(C, foo_groups(_, _, C), Cs), L).
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/issues/test1140.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: float_literal_representation_error(X0, X1, X2, X3)
4
+
5
+ float_literal_representation_error(MaxFloat, MinFloat, Underflow, BadSyntax) :-
6
+ catch(number_chars(_, "9.9e999"), error(MaxFloat, _), true),
7
+ catch(number_chars(_, "-9.9e999"), error(MinFloat, _), true),
8
+ number_chars(Underflow, "9.9e-999"),
9
+ catch(number_chars(_, "9.9ee"), error(BadSyntax, _), true).
@@ -0,0 +1,10 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0032.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: forall_arithmetic_facts(ok)
4
+
5
+ eq32(3, 1 + 2).
6
+ eq32(24, 6 * 4).
7
+ eq32(1, 5 mod 2).
8
+
9
+ forall_arithmetic_facts(ok) :-
10
+ forall(eq32(Left, Right), Left =:= Right).
@@ -0,0 +1,18 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test1, test3).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: functor_arg_partial_term(ok)
4
+
5
+ functor_arg_partial_term(ok) :-
6
+ F = f(a, _, c),
7
+ functor(F, f, 3),
8
+ arg(2, F, b),
9
+ F = f(a, b, c).
10
+
11
+ %% goal: copy_term_then_reunify_propagates(ok)
12
+
13
+ copy_term_then_reunify_propagates(ok) :-
14
+ F = f(A, B, C),
15
+ copy_term(F, X),
16
+ F = X,
17
+ A = a, B = b, C = c,
18
+ arg(2, X, b).
@@ -0,0 +1,21 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test18).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: ground_progressive_backtracking(ok)
4
+
5
+ t18a2(X) :- X = f(a, b), fail.
6
+ t18a2(X) :- X = f(b, c), fail.
7
+ t18a2(X) :- X = f(_, world).
8
+ t18a(X) :- t18a2(X).
9
+
10
+ t18b2(X) :- X = f(e, f), fail.
11
+ t18b2(X) :- X = f(f, g), fail.
12
+ t18b2(X) :- X = f(hello, _).
13
+ t18b(X) :- t18b2(X).
14
+
15
+ ground_progressive_backtracking(ok) :-
16
+ X = f(_, _),
17
+ t18a(X),
18
+ \+ ground(X),
19
+ t18b(X),
20
+ ground(X),
21
+ X = f(hello, world).
@@ -0,0 +1,6 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0898.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: if_then_noncallable_then(X0)
4
+
5
+ if_then_noncallable_then(E) :-
6
+ catch(call((true -> false, 1)), error(E, _), true).
@@ -0,0 +1,14 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0078.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: mod_sign_rules(X0, X1, X2, X3, X4, X5, X6, X7, X8)
4
+
5
+ mod_sign_rules(M1, M2, M3, M4, M5, M6, M7, Big, M8) :-
6
+ M1 is 1 mod 3,
7
+ M2 is -1 mod 3,
8
+ M3 is -1 mod -3,
9
+ M4 is 1 mod -3,
10
+ M5 is -2 mod 3,
11
+ M6 is -2 mod -3,
12
+ M7 is 2 mod -3,
13
+ Big is (1 << 150) mod (3 << 150),
14
+ M8 is -5 mod -3.
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/issues/test1110.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: negation_eager_callability(X0, X1, X2, X3)
4
+
5
+ negation_eager_callability(DisjSecond, DisjFirst, Conj, Ordinary) :-
6
+ catch((\+ (true ; 1), fail), error(DisjSecond, _), true),
7
+ catch((\+ (1 ; true), fail), error(DisjFirst, _), true),
8
+ catch((\+ (fail, 1), fail), error(Conj, _), true),
9
+ ( \+ fail, \+ \+ true, \+ member(z, [a, b, c]) -> Ordinary = ok ; Ordinary = bad ).
@@ -0,0 +1,7 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0796.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: number_chars_skips_comments(X0, X1)
4
+
5
+ number_chars_skips_comments(N1, N2) :-
6
+ number_chars(N1, "%$$$\n1"),
7
+ number_chars(N2, "/*$$$*/-2").
@@ -0,0 +1,6 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0791.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: number_chars_syntax_error(X0)
4
+
5
+ number_chars_syntax_error(E) :-
6
+ catch(number_chars(_, "1-2"), error(E, _), true).
@@ -0,0 +1,8 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0092.pl (main2, main3).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: occurs_check_rational_tree_subtleties(ok)
4
+
5
+ occurs_check_rational_tree_subtleties(ok) :-
6
+ \+ (A4 = [A4 | A4], A4 = [_B4, A4]),
7
+ \+ (A5 = B5, A5 = [A5 | A5], A5 = [B5, A5]),
8
+ \+ unify_with_occurs_check(A, [[[A]] | A]).
@@ -0,0 +1,7 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0805.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: occurs_check_reverse_order(ok)
4
+
5
+ occurs_check_reverse_order(ok) :-
6
+ \+ unify_with_occurs_check(L, [_ | L]),
7
+ \+ unify_with_occurs_check([_ | L], L).
@@ -0,0 +1,12 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test16c).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: once_inside_findall_template(X0)
4
+
5
+ age_once(peter, 7).
6
+ age_once(anne, 5).
7
+ age_once(pat, 8).
8
+ age_once(tom, 5).
9
+
10
+ once_inside_findall_template(L) :-
11
+ findall(X, once(age_once(X, _)), L),
12
+ ground(L), L = [peter].
@@ -0,0 +1,7 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0039.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: quoted_atom_line_continuation(ok)
4
+
5
+ quoted_atom_line_continuation(ok) :-
6
+ write('foo\
7
+ bar'), nl.
@@ -0,0 +1,15 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0021.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: retract_backtracking(ok)
4
+
5
+ :- dynamic(x24/1).
6
+
7
+ populate_x24 :-
8
+ assertz(x24(0)),
9
+ assertz(x24(1)),
10
+ assertz(x24(2)),
11
+ assertz(x24(3)).
12
+
13
+ retract_backtracking(ok) :-
14
+ populate_x24,
15
+ ( retract(x24(X)), write(X), nl, fail ; true ).
@@ -0,0 +1,8 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0047.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: shared_argument_aliasing(ok)
4
+
5
+ foo_shared(A, B) :- A = 1, write(B), nl.
6
+
7
+ shared_argument_aliasing(ok) :-
8
+ foo_shared(X, X).
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/issues/test0114.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: sort_duplicates_and_empty(X0, X1, X2)
4
+
5
+ sort_duplicates_and_empty(Empty, Sorted, SortedCodes) :-
6
+ sort([], Empty),
7
+ sort("", Empty),
8
+ sort([c, b, a, ' ', a, b, c], Sorted),
9
+ sort("cba abc", SortedCodes).
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0013.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: unicode_length_agreement(X0)
4
+
5
+ unicode_length_agreement(L) :-
6
+ atom_length('一二三', L1),
7
+ length("一二三", L2),
8
+ L1 = L2, L1 = 3,
9
+ L = L1.
@@ -0,0 +1,9 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0059.pl (test14).
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: variable_aliasing_across_calls(ok)
4
+
5
+ bar_alias([A], B) :- A = B.
6
+ foo_alias(A, B) :- bar_alias(A, B).
7
+
8
+ variable_aliasing_across_calls(ok) :-
9
+ A = a, foo_alias([A], B), A = B.
@@ -0,0 +1,11 @@
1
+ % Adapted from Trealla Prolog tests/tests/test0035.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: write_associative_operators(ok)
4
+
5
+ write_associative_operators(ok) :-
6
+ write((1 / 2 / 3)), nl,
7
+ write((a, b, c)), nl,
8
+ write({a, b, c}), nl,
9
+ write(((1 / 2) / 3)), nl,
10
+ write((a, (b, c))), nl,
11
+ write({a, (b, c)}), nl.
@@ -0,0 +1,10 @@
1
+ % Adapted from Trealla Prolog tests/issues/test1137.pl.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: write_term_ignore_ops_quoted_independence(ok)
4
+
5
+ write_term_ignore_ops_quoted_independence(ok) :-
6
+ write_term('a b', [ignore_ops(true)]), nl,
7
+ write_term('a b', [ignore_ops(true), quoted(true)]), nl,
8
+ write_term(1 + 2 * 3, [ignore_ops(true)]), nl,
9
+ write_term([a, b | c], [ignore_ops(true)]), nl,
10
+ write_term({a}, [ignore_ops(true)]), nl.
@@ -0,0 +1,6 @@
1
+ % Adapted from Trealla Prolog tests/issues/test1090.pl (first sub-case only;
2
+ % see test/conformance/THIRD_PARTY.md).
3
+ %% goal: write_term_variable_names_malformed(X0)
4
+
5
+ write_term_variable_names_malformed(E1) :-
6
+ catch(write_term(_, [variable_names([a | non_list])]), error(E1, _), true).
@@ -0,0 +1 @@
1
+ call_zero_arity(existence_error(procedure, call / 0)).
@@ -0,0 +1 @@
1
+ current_predicate_after_existence_error(not_defined).
@@ -0,0 +1 @@
1
+ current_prolog_flag_shared_var(false).
@@ -0,0 +1 @@
1
+ op_bar_prefix_permission(permission_error(create, operator, '|')).
@@ -0,0 +1 @@
1
+ op_name_list_unbound_element(instantiation_error).
@@ -0,0 +1 @@
1
+ op_name_type_error(type_error(list, example(a, b))).
@@ -0,0 +1 @@
1
+ op_specifier_type_error(type_error(atom, 42)).
@@ -0,0 +1 @@
1
+ op_wrong_arity_existence_error(existence_error(procedure, op / 4)).
@@ -0,0 +1 @@
1
+ bagof_setof_duplicate_handling("cdaafeg", "acdefg").
@@ -0,0 +1 @@
1
+ call_transparent_to_disjunction(ok).
@@ -0,0 +1 @@
1
+ clause_enumeration_backtracking([0 - true, 1 - true, 2 - true, 3 - true]).
@@ -0,0 +1 @@
1
+ compare_standard_order(ok).
@@ -0,0 +1 @@
1
+ copy_term_binding_direction(ok).
@@ -0,0 +1 @@
1
+ copy_term_bound_list_tail([bb, cc]).
@@ -0,0 +1 @@
1
+ curly_and_colon_syntax_equivalence({a:b}, {a:b}, a:b, a:b, a:b).
@@ -0,0 +1 @@
1
+ curly_braces_as_predicate(ok).
@@ -0,0 +1 @@
1
+ dif_unification_shared_var(ok).
@@ -0,0 +1 @@
1
+ disjunction_commit_and_fallthrough(ok).
@@ -0,0 +1 @@
1
+ findall_bagof_grouping(["cd", "ef", "g", "g"]).
@@ -0,0 +1 @@
1
+ float_literal_representation_error(representation_error(max_float), representation_error(min_float), 0.0, syntax_error(number)).
@@ -0,0 +1 @@
1
+ forall_arithmetic_facts(ok).
@@ -0,0 +1,2 @@
1
+ functor_arg_partial_term(ok).
2
+ copy_term_then_reunify_propagates(ok).
@@ -0,0 +1 @@
1
+ ground_progressive_backtracking(ok).
@@ -0,0 +1 @@
1
+ if_then_noncallable_then(type_error(callable, (true -> false, 1))).
@@ -0,0 +1 @@
1
+ mod_sign_rules(1, 2, -1, -2, 1, -2, -1, 1427247692705959881058285969449495136382746624, -2).
@@ -0,0 +1 @@
1
+ negation_eager_callability(type_error(callable, (true ; 1)), type_error(callable, (1 ; true)), type_error(callable, (fail, 1)), ok).
@@ -0,0 +1 @@
1
+ number_chars_skips_comments(1, -2).
@@ -0,0 +1 @@
1
+ number_chars_syntax_error(syntax_error(number)).
@@ -0,0 +1 @@
1
+ occurs_check_rational_tree_subtleties(ok).
@@ -0,0 +1 @@
1
+ occurs_check_reverse_order(ok).
@@ -0,0 +1 @@
1
+ once_inside_findall_template([peter]).
@@ -0,0 +1,2 @@
1
+ foobar
2
+ quoted_atom_line_continuation(ok).
@@ -0,0 +1,5 @@
1
+ 0
2
+ 1
3
+ 2
4
+ 3
5
+ retract_backtracking(ok).
@@ -0,0 +1,2 @@
1
+ 1
2
+ shared_argument_aliasing(ok).
@@ -0,0 +1 @@
1
+ sort_duplicates_and_empty([], " abc", " abc").
@@ -0,0 +1 @@
1
+ unicode_length_agreement(3).
@@ -0,0 +1 @@
1
+ variable_aliasing_across_calls(ok).
@@ -0,0 +1,7 @@
1
+ 1/2/3
2
+ a,b,c
3
+ {a,b,c}
4
+ 1/2/3
5
+ a,b,c
6
+ {a,b,c}
7
+ write_associative_operators(ok).
@@ -0,0 +1,6 @@
1
+ a b
2
+ 'a b'
3
+ +(1,*(2,3))
4
+ .(a,.(b,c))
5
+ {}(a)
6
+ write_term_ignore_ops_quoted_independence(ok).
@@ -0,0 +1 @@
1
+ write_term_variable_names_malformed(domain_error(write_option, variable_names("a"||non_list))).
@@ -10438,7 +10438,7 @@ must preserve the same observable outcome. Additional normal-mode syntax may
10438
10438
  accept texts outside the strict grammar, but it may not reinterpret an accepted
10439
10439
  standard case.
10440
10440
 
10441
- The file-based conformance corpus contains 847 cases, including 430 focused ISO cases derived from the success, failure, mode, and error behavior in ISO/IEC 13211-1 clauses 7 and 8, Part 2 modules, and Part 3 grammar rules.
10441
+ The file-based conformance corpus contains 887 cases, including 470 focused ISO cases derived from the success, failure, mode, and error behavior in ISO/IEC 13211-1 clauses 7 and 8, Part 2 modules, and Part 3 grammar rules.
10442
10442
  Separate exact-output suites check 229 normal examples and 61 proof examples; all executable chapter programs are parsed and their declared goals are executed. The nine-case
10443
10443
  playground contract suite imports the production worker, sends real reasoning
10444
10444
  requests through its message protocol, and crawls the served module graph for