eyeprolog 1.3.57 → 1.3.58
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 +7 -1
- package/conformance-report.md +2 -2
- package/package.json +1 -1
- package/test/conformance/ISO-BUILTIN-MODE-ERROR-MATRIX.md +2 -2
- package/test/conformance/ISO-COMPLIANCE.md +14 -4
- package/test/conformance/ISO-IMPLEMENTATION-DEFINED.md +11 -8
- package/test/conformance/ISO-MATRIX.md +1 -1
- package/test/conformance/ISO-PROCESSOR-REQUIREMENTS.md +1 -1
- package/test/conformance/README.md +3 -3
- package/test/conformance/STC-DRAFT-STATUS.md +11 -7
- package/test/conformance/cases/stc/float_underflow_input.pl +5 -3
- package/test/conformance/errors/stc/float_overflow_negative_number_chars.pl +2 -2
- package/test/conformance/errors/stc/float_overflow_negative_number_codes.pl +4 -0
- package/test/conformance/errors/stc/float_overflow_positive_number_chars.pl +2 -2
- package/test/conformance/errors/stc/float_overflow_positive_number_codes.pl +4 -0
- package/test/conformance/expected-errors/stc/float_overflow_negative_number_codes.txt +1 -0
- package/test/conformance/expected-errors/stc/float_overflow_positive_number_codes.txt +1 -0
- package/test/run-iso-strict.mjs +23 -0
- package/test/run-regression.mjs +24 -1
- package/the-art-of-eyeprolog.md +10 -4
- package/why-eyeprolog.md +4 -1
package/README.md
CHANGED
|
@@ -228,7 +228,13 @@ ongoing issue #65 audit additionally tightens Prolog-text declaration ordering,
|
|
|
228
228
|
initialization lifetime, stream/open/close behavior, character/byte stream
|
|
229
229
|
errors, `keysort/2` error cases, and strict arithmetic-extension boundaries.
|
|
230
230
|
Those additions improve the Part 1 surface without turning the remaining audit
|
|
231
|
-
rows into a blanket conformance claim.
|
|
231
|
+
rows into a blanket conformance claim. The post-N289 WG17/STC working draft is
|
|
232
|
+
reviewed separately rather than treated as a fourth Corrigendum. The
|
|
233
|
+
2026-08-23 draft items #73-#76 are now pinned explicitly: float input limits for
|
|
234
|
+
`read*` and `number_*` conversions, invalid-character term input, and the draft
|
|
235
|
+
proposal that would make the two power-underflow rows depend on the processor's
|
|
236
|
+
9.1.4.2 `resultF` choice. Strict mode retains the published Part 1 +
|
|
237
|
+
Corrigenda 1-3 behavior where the draft has not been standardized.
|
|
232
238
|
|
|
233
239
|
The auditable processor-requirement checklist lives in
|
|
234
240
|
[`test/conformance/ISO-COMPLIANCE.md`](test/conformance/ISO-COMPLIANCE.md).
|
package/conformance-report.md
CHANGED
|
@@ -18,10 +18,10 @@ This report summarizes the file-based conformance corpus under `test/conformance
|
|
|
18
18
|
| proofs | 0 | 0 | 0 | 21 | 21 |
|
|
19
19
|
| query | 8 | 2 | 0 | 0 | 10 |
|
|
20
20
|
| rules | 13 | 3 | 0 | 0 | 16 |
|
|
21
|
-
| stc | 5 |
|
|
21
|
+
| stc | 5 | 6 | 0 | 0 | 11 |
|
|
22
22
|
| strings | 40 | 0 | 0 | 0 | 40 |
|
|
23
23
|
| syntax | 12 | 23 | 0 | 0 | 35 |
|
|
24
24
|
| terms | 26 | 3 | 0 | 0 | 29 |
|
|
25
25
|
| unification | 18 | 0 | 0 | 0 | 18 |
|
|
26
26
|
| variables | 16 | 7 | 0 | 0 | 23 |
|
|
27
|
-
| **Total** | **490** | **
|
|
27
|
+
| **Total** | **490** | **272** | **19** | **21** | **802** |
|
package/package.json
CHANGED
|
@@ -260,8 +260,8 @@ The Corrigendum 2 additions have the same shape.
|
|
|
260
260
|
| --- | --- | --- | --- |
|
|
261
261
|
| 8.14.1 `read_term/3`, `read_term/2`, `read/1-2` | read a term using the standardized read-option surface | covered | term-I/O corpus, Corrigendum 3 cases, strict success/error suite |
|
|
262
262
|
| 8.14.1 option/argument errors | stream/option instantiation, non-list options, invalid read option | covered | strict 8.14.1 individual-condition assertions |
|
|
263
|
-
| 8.14.1 stream/input errors | invalid/missing/output/binary stream, past-end state, invalid input character, syntax error | covered | strict and constructed-stream assertions |
|
|
264
|
-
| 8.14.1 conditional finite-number/arity representation branches | limits tied to finite selected processor bounds | not applicable where bound is unbounded | EyeProlog selects unbounded integers/`max_arity`; finite binary64 input limits
|
|
263
|
+
| 8.14.1 stream/input errors | invalid/missing/output/binary stream, past-end state, invalid input character, syntax error | covered | strict and constructed-stream assertions; post-N289 STC #76 is pinned by invalid-character read regressions |
|
|
264
|
+
| 8.14.1 conditional finite-number/arity representation branches | limits tied to finite selected processor bounds | not applicable where bound is unbounded | EyeProlog selects unbounded integers/`max_arity`; the implementation-defined finite binary64 input limits are pinned separately, including post-N289 STC #73 `max_float` / `min_float` coverage |
|
|
265
265
|
| 8.14.1 Corrigendum options | `variables/1`, `variable_names/1`, `singletons/1` list traversal/unification behavior | covered | Corrigendum 3 metadata tests and STC #48 regression |
|
|
266
266
|
| 8.14.2 `write_term/3`, `write_term/2`, `write/1-2`, `writeq/1-2` | write terms under standardized write options | covered | term-I/O/write-back corpus and strict writer suite |
|
|
267
267
|
| 8.14.2 option/argument errors | stream/option instantiation, non-list options, invalid write option | covered | strict 8.14.2 assertions |
|
|
@@ -39,12 +39,12 @@ relevant implementation-dependent overlap choice to an explicit audit outcome.
|
|
|
39
39
|
| 7.5-7.6 — database and term/clause conversion | audit | Dynamic database and logical-update-view suites. Strict mode restores Part 1 private-static/public-dynamic `clause/2` access; focused strict checks cover the database built-ins and empty-procedure lifetime. Clause-body conversion now applies 7.6.2 both to prepared source clauses and runtime `asserta/1` / `assertz/1`: variables become `call/1`, `,/2`, `;/2`, and `->/2` are converted recursively, and head/body variable identity is preserved so `clause/2` and `retract/1` observe the converted term correctly. Runtime protection includes the solver-native conjunction control construct `','/2` and, following STC #56's accepted-direction action item, `(:-)/1-2` for database modification/private access while leaving their call behavior distinct. The remaining clause-conversion shall-by-shall mapping is still open. |
|
|
40
40
|
| 7.7 — execution and backtracking | audit | Control/search suites. Strict mode disables EyeProlog automatic tabling, cycle guards, and recursive numeric shortcuts so core execution uses ordinary clause selection/backtracking. |
|
|
41
41
|
| 7.8 — control constructs and exceptions | audit | call, cut, conjunction, disjunction (including failed branches after callee-local cuts), if-then, catch/throw, renamed-copy tests. The 8.15 built-in slice (`\+/1`, `once/1`, `repeat/0`, Corrigendum 2 `call/2..8`, `false/0`) is now row-audited in [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md); the remaining general control-construct semantics ledger stays open. |
|
|
42
|
-
| 7.9 — expression evaluation | audit | Arithmetic/evaluation/error suites, including Corrigenda. Strict mode now pins direct-variable precedence, 7.9.2 non-evaluable `F/N` errors (including STC #69), arithmetic numeric/integer type errors, float-only rounding conversions, the Part 1 mixed integer/float comparison conversion rule, I->F overflow before floating evaluable functors (STC #42),
|
|
42
|
+
| 7.9 — expression evaluation | audit | Arithmetic/evaluation/error suites, including Corrigenda. Strict mode now pins direct-variable precedence, 7.9.2 non-evaluable `F/N` errors (including STC #69), arithmetic numeric/integer type errors, float-only rounding conversions, the Part 1 mixed integer/float comparison conversion rule, I->F overflow before floating evaluable functors (STC #42), the published `exp/1`/power underflow rows, and prescribed negative/zero power errors before later conversion overflow. Post-N289 STC #75's proposal to make the two power-underflow rows conditional on the 9.1.4.2 choice is tracked separately and is not silently substituted for the licensed baseline. Unbounded integer powers/shifts no longer leak host `RangeError`; finite-host exhaustion is normalized to `resource_error(memory)` in line with the Part 1 resource-error note and STC #21. The remaining exceptional-value/error-precedence rows are still being exhaustively enumerated. |
|
|
43
43
|
| 7.10 — input/output concepts | audit | Stream, character/byte I/O, read/write options, operator-sensitive write-back, and Corrigendum 3 writer cases. The complete 8.11-8.14 built-in mode/error family is now row-audited in [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md), including lifecycle/current-stream handling, stream positions, text/binary permissions, EOF actions, `force(true)`, input-code representation timing, term-I/O options, operators, and character conversion. `stream_property/2` now also distinguishes a malformed stream-term (domain error) from a valid stream-term whose stream is no longer open (ordinary failure). The higher-level 7.10 source/sink, buffering, positioning, and implementation-defined stream semantics remain under shall-by-shall audit. |
|
|
44
44
|
| 7.11 — flags | covered | The complete Part 1 flag set, selected defaults, standard value domains, changeability, `current_prolog_flag/2`, and `set_prolog_flag/2` error behavior have dedicated strict tests. EyeProlog selects `bounded=false` and `integer_rounding_function=toward_zero`; valid alternative values of those fixed flags reach `permission_error(modify,flag,...)`, while `max_integer` and `min_integer` have no current value. STC #70 is recorded explicitly: EyeProlog has no separate finite procedure-arity ceiling, so the optional `max_procedure_arity` flag is absent while `max_arity` remains `unbounded`. Strict mode excludes the EyeProlog `occurs_check` extension. |
|
|
45
45
|
| 7.12 — errors | audit | ISO `error(Error, Context)` envelope, type/domain/permission/representation/evaluation/syntax/resource families and focused error cases. [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md) now gives explicit mode/error-condition outcomes across the complete 8.2-8.17 built-in family, including Corrigendum additions and not-applicable conditional branches. The audit records the 7.12 rule that simultaneous error conditions are implementation dependent: overlap regressions document stable EyeProlog choices rather than inventing a universal table-order requirement. Remaining work is concentrated in non-built-in Clause 7 semantics, Clause 9 exceptional interactions, and processor-level error conditions. |
|
|
46
46
|
| 8.2-8.17 — built-in predicates | covered | [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md) now records the complete Part 1 + Corrigenda built-in family at one row per prescribed mode, success/failure behavior, individual error condition, and conditional/not-applicable branch. The row audit exposed and fixed source/runtime 7.6.2 body conversion/variable sharing, strict host-string leakage, input-code error timing, `close/2` force handling, and closed-stream `stream_property/2` behavior. Simultaneous-error choices are documented as implementation dependent under 7.12 unless separately constrained. |
|
|
47
|
-
| Clause 9 — evaluable functors | audit | Integer/float/rounding/transcendental/bitwise suites and corrigendum cases. Strict mode excludes the EyeProlog-only evaluable atom `e`, retains Corrigendum 2 arithmetic additions, reports unknown zero-arity evaluables with the required `F/0` culprit shape, distinguishes non-evaluable `F/N` errors from numeric/integer operand errors per 7.9.2 and STC #69, and enforces float-only rounding modes, performs I->F conversion before floating functors (including overflow), reports the
|
|
47
|
+
| Clause 9 — evaluable functors | audit | Integer/float/rounding/transcendental/bitwise suites and corrigendum cases. Strict mode excludes the EyeProlog-only evaluable atom `e`, retains Corrigendum 2 arithmetic additions, reports unknown zero-arity evaluables with the required `F/0` culprit shape, distinguishes non-evaluable `F/N` errors from numeric/integer operand errors per 7.9.2 and STC #69, and enforces float-only rounding modes, performs I->F conversion before floating functors (including overflow), reports the published `exp/1`, `**/2`, and Corrigendum 2 `^/2` underflow conditions, tracks STC #75's proposed conditional power interpretation without adopting it as published text, preserves the power-specific undefined conditions ahead of conversion overflow, and uses the Part 1 integer-to-float rule for mixed arithmetic comparisons. Normal mode retains EyeProlog's exact mixed-type comparison and round-to-zero arithmetic behavior as extensions. Unbounded BigInt resource exhaustion is translated into the Prolog error model rather than leaking host exceptions. Host floating-point representation choices remain documented implementation-defined behavior; the remaining exceptional-value rows are still under audit. |
|
|
48
48
|
| Corrigendum 1 | covered | Double-quoted atom/operator-priority corrections have dedicated cases. |
|
|
49
49
|
| Corrigendum 2 | covered | Added predicates/functors, catch corrections, bar/operator and uninstantiation corrections have dedicated cases. |
|
|
50
50
|
| Corrigendum 3 | covered | Writer options, `variable_names/1`, canonical list output and negative-power corrections have dedicated cases. |
|
|
@@ -232,8 +232,18 @@ compound terms. EyeProlog therefore selects `unbounded` and does not invent a
|
|
|
232
232
|
finite predicate/procedure ceiling merely to preserve the former 65535 value.
|
|
233
233
|
STC #56, which became a WG17 action item, is implemented narrowly for database
|
|
234
234
|
protection: `(:-)/1-2` are static/private for modification and `clause/2`
|
|
235
|
-
access, while ordinary calls retain their separate existence behavior.
|
|
236
|
-
draft/
|
|
235
|
+
access, while ordinary calls retain their separate existence behavior. The 2026-08-23 post-N289 draft adds four more executable review points. STC
|
|
236
|
+
#73 confirms the draft `max_float` / `min_float` representation-limit shape for
|
|
237
|
+
`read/1-2` and `read_term/2-3`; STC #74 extends the same distinction to
|
|
238
|
+
`number_chars/2` and `number_codes/2`; STC #76 proposes the
|
|
239
|
+
`representation_error(character)` already exercised by EyeProlog's invalid-UTF-8
|
|
240
|
+
read regressions. STC #75 is deliberately different: it proposes changing the
|
|
241
|
+
published power-underflow conditions so that they depend on the 9.1.4.2
|
|
242
|
+
`resultF` choice. Because that proposal is not a published Corrigendum, strict
|
|
243
|
+
mode keeps the licensed Part 1/Corrigendum 2 power errors while the draft
|
|
244
|
+
divergence is pinned and documented.
|
|
245
|
+
|
|
246
|
+
Other draft/editorial or deliberately controversial proposals (for example deleting
|
|
237
247
|
standalone if-then) remain outside the Part 1 + Corrigenda 1-3 strict baseline
|
|
238
248
|
until standardized or adopted as an explicit compatibility extension.
|
|
239
249
|
|
|
@@ -73,7 +73,7 @@ Status values are:
|
|
|
73
73
|
| 8.17.3 | Other effects of `halt/0` | Terminates EyeProlog execution and returns host/process status `0`; it produces no Prolog solution. | **defined** — `HaltSignal`, `haltBuiltin()`, CLI/runner handling. |
|
|
74
74
|
| 8.17.4 | Meaning/effects of `halt(Status)` | Integer `Status` is converted to the host process/runner halt code; it produces no Prolog solution. | **defined** — `haltBuiltin()`, `src/execute.js`, `src/cli.js`. |
|
|
75
75
|
| 9.1.4.1 | Floating-point rounding function `rndF` | Floating values and operations use ECMAScript `Number` (IEEE-754 binary64) and the host's specified binary64 arithmetic/conversions. | **defined** — `src/iso-arithmetic.js`, `src/number-value.js`. |
|
|
76
|
-
| 9.1.4.2 | Floating-point result function for operations whose result is governed only by `resultF` | EyeProlog chooses `round(x)` rather than the optional exceptional value `underflow`. ECMAScript binary64 arithmetic therefore preserves a representable subnormal result and rounds a still-smaller generic arithmetic result to `0.0`, consistently with float-token and `
|
|
76
|
+
| 9.1.4.2 | Floating-point result function for operations whose result is governed only by `resultF` | EyeProlog chooses `round(x)` rather than the optional exceptional value `underflow`. ECMAScript binary64 arithmetic therefore preserves a representable subnormal result and rounds a still-smaller generic arithmetic result to `0.0`, consistently with float-token, `number_chars/2`, and `number_codes/2` input. The published Part 1 `**/2` and Corrigendum 2 `^/2` tables still contain separate unconditional underflow rows, which strict mode retains; post-N289 STC #75 proposes making those two power rows conditional on this `resultF` choice and is tracked separately as draft work. `exp/1` has its own published exceptional condition and is not the subject of STC #75. | **defined** — arithmetic evaluation in `src/iso-arithmetic.js` and parser/number conversion; strict exceptional-value regressions. |
|
|
77
77
|
| 9.1.4.3 | Approximate-addition function | ECMAScript binary64 addition is used; subtraction is implemented through the corresponding host operation and all finite results remain binary64 values. | **defined** — arithmetic evaluation in `src/iso-arithmetic.js`. |
|
|
78
78
|
| 9.4 | Representation of negative integers for bitwise operations | BigInt's unbounded signed binary semantics are used, equivalent to an infinite two's-complement sign extension for bitwise operations. | **defined** — `src/iso-arithmetic.js` BigInt bitwise operators. |
|
|
79
79
|
| 9.4.1 | Right shift of negative integers and unusual shift counts | `>>` is arithmetic/sign-propagating. A negative count reverses direction according to JavaScript BigInt shift semantics; there is no finite integer bit-size ceiling in the Prolog model. | **defined** — `a >> b` in `src/iso-arithmetic.js`. |
|
|
@@ -93,13 +93,16 @@ subnormal values remain non-zero and still-smaller generic results round to
|
|
|
93
93
|
`0.0`. Float-token and `number_chars/2` input use the same finite-double
|
|
94
94
|
rounding policy.
|
|
95
95
|
|
|
96
|
-
That generic implementation-defined choice is distinct from
|
|
97
|
-
|
|
98
|
-
`**/2`, and Corrigendum 2 `^/2`
|
|
99
|
-
`evaluation_error(underflow)` when
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
`
|
|
96
|
+
That generic implementation-defined choice is distinct from the currently
|
|
97
|
+
published evaluable-functor error clauses. In the licensed Part 1 + Corrigenda
|
|
98
|
+
baseline, `exp/1`, Part 1 `**/2`, and Corrigendum 2 `^/2` have explicit
|
|
99
|
+
underflow conditions, so strict mode raises `evaluation_error(underflow)` when
|
|
100
|
+
those published conditions are met. The 2026-08-23 post-N289 draft adds STC
|
|
101
|
+
#75, proposing that the two *power* underflow rows apply only when the processor
|
|
102
|
+
selects `underflow` in 9.1.4.2. EyeProlog records that proposal but does not
|
|
103
|
+
silently replace the published strict baseline with it. The regression suite
|
|
104
|
+
pins both the published power behavior and the generic round-to-zero choice;
|
|
105
|
+
`stc/float_underflow_input` covers the separate input-conversion policy.
|
|
103
106
|
|
|
104
107
|
## Implementation-specific features required to be documented by 5.4
|
|
105
108
|
|
|
@@ -18,7 +18,7 @@ compliance audit and the remaining work before a full conformance claim.
|
|
|
18
18
|
| 8.15 logic and control | negation, once, repeat, `call/2` through `call/8`, `false/0` | `logtalk_once`, `corrigenda_call_closure`, `false_builtin`, plus the complete 8.15 row-audit in `ISO-BUILTIN-MODE-ERROR-MATRIX.md` |
|
|
19
19
|
| 8.16 atomic processing | atoms, characters, codes and number conversion with prescribed errors | `atomic_term_processing`, focused forward/reverse cases, parenthesized-number rejection, Logtalk-derived cases, and the complete 8.16 mode/error slice in `ISO-BUILTIN-MODE-ERROR-MATRIX.md` |
|
|
20
20
|
| 8.17 flags and halt | complete required Part 1 flag set, selected defaults, standard value domains/changeability, and halt status handling | `exceptions_and_flags`, `remaining_builtins_and_directives`, the complete strict flag audit, halt cases, and explicit 8.17 rows in `ISO-BUILTIN-MODE-ERROR-MATRIX.md` |
|
|
21
|
-
| Clause 9 evaluable functors | integer, float, rounding, transcendental and bitwise operations | `arithmetic`, `corrigenda_arithmetic`, `corrigenda_atan2_zero`, `corrigenda_integer_negative_power`, strict exclusion of the normal-mode `e` evaluable extension, zero-arity unknown-evaluable checks, prescribed operand/type and power-error precedence, float-only rounding modes, I->F overflow before floating functors,
|
|
21
|
+
| Clause 9 evaluable functors | integer, float, rounding, transcendental and bitwise operations | `arithmetic`, `corrigenda_arithmetic`, `corrigenda_atan2_zero`, `corrigenda_integer_negative_power`, strict exclusion of the normal-mode `e` evaluable extension, zero-arity unknown-evaluable checks, prescribed operand/type and power-error precedence, float-only rounding modes, I->F overflow before floating functors, published `exp/1`/`**/2`/`^/2` underflow (with post-N289 STC #75 tracked separately), Part 1 mixed integer/float comparison conversion, and resource-error normalization for finite-host exhaustion of unbounded integer operations |
|
|
22
22
|
| Module compatibility profile (related to ISO/IEC 13211-2 and later WG17 amendment work) | module declarations, exports, imports, qualification, meta-predicate context | `modules/qualified_call`, `modules/selective_library_import`, `dcg_module_nonterminal_indicator` |
|
|
23
23
|
| Part 3-oriented DCG compatibility profile | `-->`, terminal and partial sequences, grammar control constructs, semicontexts, nonterminal indicators, modules, `phrase/2-3`, steadfastness and errors | `dcg_terminals_and_remainder`, `dcg_control_constructs`, `dcg_partial_sequences`, `dcg_phrase_steadfastness`, `dcg_dynamic_nonterminal_indicator`, `logtalk_dcg_phrase_identity`, `logtalk_dcg_semicontexts`, DCG error and precedence cases |
|
|
24
24
|
|
|
@@ -44,7 +44,7 @@ certification claim.
|
|
|
44
44
|
| 5.5.7 additional control constructs | covered | `tnot/1` and implementation-specific execution optimizations are absent/disabled in strict mode; standard control constructs remain separately audited |
|
|
45
45
|
| 5.5.8 additional flags | covered | normal `occurs_check` extension is absent from strict mode; the Part 1 flag family is fully audited |
|
|
46
46
|
| 5.5.9 additional built-in predicates and error forms | covered | strict registry excludes normal-profile library/native additions; `ISO-BUILTIN-MODE-ERROR-MATRIX.md` closes the complete 8.2-8.17 family row-by-row; simultaneous-error choices are documented per 7.12 rather than treated as a global table-order mandate |
|
|
47
|
-
| 5.5.10 additional evaluable functors/types | audit | strict mode excludes normal-profile arithmetic extensions such as evaluable `e`; Clause 9 exceptional-value
|
|
47
|
+
| 5.5.10 additional evaluable functors/types | audit | strict mode excludes normal-profile arithmetic extensions such as evaluable `e`; the 9.1.4.2 `resultF` choice is documented, and post-N289 STC #75's proposed conditional power-underflow interpretation is kept separate from the published baseline; the remaining Clause 9 exceptional-value/error rows stay under audit |
|
|
48
48
|
| 5.5.11 reserved atoms | not applicable | EyeProlog declares no reserved-atom extension; extension names remain ordinary atoms unless used in a documented syntactic/predicate/directive role |
|
|
49
49
|
|
|
50
50
|
## Exit-use rule
|
|
@@ -15,7 +15,7 @@ tracks the row-by-row built-in audit, while
|
|
|
15
15
|
Clause 5 processor obligations. [WG17-SYNTAX-STATUS.md](WG17-SYNTAX-STATUS.md) records the
|
|
16
16
|
complete one-to-one trace for the vendored active upstream WG17 syntax cases.
|
|
17
17
|
[STC-DRAFT-STATUS.md](STC-DRAFT-STATUS.md) separately tracks executable
|
|
18
|
-
implementation questions from the post-N289 working draft; those cases are
|
|
18
|
+
implementation questions from the post-N289 working draft (reviewed through the 2026-08-23 items #73-#76); those cases are
|
|
19
19
|
review evidence, not normative ISO claims.
|
|
20
20
|
|
|
21
21
|
“Conformance” here means conformance to EyeProlog's documented ISO compatibility
|
|
@@ -141,8 +141,8 @@ Selected cases are adapted from the ISO and standard-core suites of Logtalk,
|
|
|
141
141
|
Scryer Prolog, Trealla Prolog, and SWI-Prolog. Their upstream identifiers and licenses
|
|
142
142
|
are recorded in [THIRD_PARTY.md](THIRD_PARTY.md).
|
|
143
143
|
|
|
144
|
-
The corpus has 386 cases in `iso/` and
|
|
145
|
-
total. Of those,
|
|
144
|
+
The corpus has 386 cases in `iso/` and 802 file-based conformance cases in
|
|
145
|
+
total. Of those, 11 cases in `stc/` are explicitly labelled working-draft
|
|
146
146
|
review evidence rather than normative ISO claims. The separate strict-reader WG17 matrix has 366 executable dispositions.
|
|
147
147
|
The generated `conformance-report.md` is the authoritative source for current
|
|
148
148
|
category totals. Together with regression, documentation-sync, API, example,
|
|
@@ -39,7 +39,11 @@ regressions.
|
|
|
39
39
|
| [#69](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#69) | arithmetic example culprit | **Found a #65 gap.** Strict expression evaluation now applies 7.9.2(c) to an atomic subexpression such as `foo`: it reports `type_error(evaluable,foo/0)` rather than the misleading `type_error(number,foo)` shown by the old 9.1.7 example. |
|
|
40
40
|
| [#70](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#70) | optional `max_procedure_arity` | Reviewed after issue #66 corrected the earlier #71 pointer. EyeProlog has no declared procedure-arity limit smaller than its `max_arity=unbounded` term model, so the implementation-defined optional flag is intentionally absent. |
|
|
41
41
|
| [#72](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#72) | tentative non-ground stream-term instances | Reviewed as a tentative post-2026 proposal. EyeProlog does not make this draft wording normative in `--iso-strict`; the published Part 1 stream-term/domain rules remain the baseline until WG17 settles the proposal. |
|
|
42
|
-
| [
|
|
42
|
+
| [#73](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#73) | `read/1-2` and `read_term/2-3` representation limits | The 2026-08-23 post-N289 draft now explicitly proposes `max_float` / `min_float` alongside the existing representation-limit flags. EyeProlog already reports those errors while reading overflowing positive/negative float tokens; strict regression coverage now exercises both `read/1` and `read_term/2`, and the literal STC cases pin parser preparation. |
|
|
43
|
+
| [#74](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#74) | `number_chars/2` and `number_codes/2` representation limits | Positive and negative overflow now have explicit draft-facing cases for both conversion predicates, reporting `representation_error(max_float)` / `representation_error(min_float)` rather than a syntax error. |
|
|
44
|
+
| [#75](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#75) | power underflow versus the 9.1.4.2 `resultF` choice | The draft proposes making the Part 1 `**/2` and Corrigendum 2 `^/2` underflow rows conditional on the implementation-defined `resultF` underflow choice. EyeProlog's published-baseline strict mode intentionally retains the currently published unconditional power-underflow clauses; its separate 9.1.4.2 choice remains `round(x)`. This proposal is tracked, not silently adopted. |
|
|
45
|
+
| [#76](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#76) | `read/1-2` and `read_term/2-3` invalid input entity | Existing file-stream regressions already require `representation_error(character)` for invalid UTF-8 through all four read/read_term arities. The regression is now cross-referenced to the new draft item. |
|
|
46
|
+
| [issue #54](https://github.com/eyereasoner/eyeprolog/issues/54) | float input range and underflow background | The earlier EyeProlog issue remains useful background for finite-double input overflow/underflow. Its overflow cases are now tracked by STC #73/#74; input underflow remains a separate implementation-profile check and must not be conflated with STC #75's power-underflow proposal. |
|
|
43
47
|
|
|
44
48
|
## Float-reading note from issue #54
|
|
45
49
|
|
|
@@ -54,13 +58,13 @@ record the behavior discussed in issue #54:
|
|
|
54
58
|
- overflow produced by arithmetic evaluation remains
|
|
55
59
|
`evaluation_error(float_overflow)`.
|
|
56
60
|
|
|
57
|
-
These `max_float` / `min_float` names are treated as a **
|
|
58
|
-
extension**, not as a claim about the currently published ISO core standard.
|
|
61
|
+
These `max_float` / `min_float` names are treated as a **draft-facing representation-limit extension**, now explicitly reflected by post-N289 STC #73/#74, not as a claim that the currently published ISO core standard already contains those flag names.
|
|
59
62
|
The earlier WG17 float-update material also uses
|
|
60
|
-
`representation_error(float_overflow)` for unsupported infinity input, while
|
|
61
|
-
|
|
62
|
-
the implementation's
|
|
63
|
-
when WG17 settles the wording.
|
|
63
|
+
`representation_error(float_overflow)` for unsupported infinity input, while
|
|
64
|
+
STC #73/#74 use `max_float` / `min_float` for a finite numeric text that lies
|
|
65
|
+
outside the implementation's finite float range. Those cases should remain
|
|
66
|
+
distinct when WG17 settles the wording. STC #75 is independent again: it asks
|
|
67
|
+
how power underflow relates to the implementation-defined `resultF` choice.
|
|
64
68
|
|
|
65
69
|
Relevant background:
|
|
66
70
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
%
|
|
2
|
-
%
|
|
3
|
-
%
|
|
1
|
+
% Issue #54 input-underflow review. EyeProlog's finite-double profile permits
|
|
2
|
+
% input underflow to round to zero. This is distinct from STC #75, which asks
|
|
3
|
+
% whether the published power-underflow errors should depend on the 9.1.4.2
|
|
4
|
+
% resultF choice.
|
|
5
|
+
% https://github.com/eyereasoner/eyeprolog/issues/54
|
|
4
6
|
%% goal: float_underflow_input
|
|
5
7
|
|
|
6
8
|
float_underflow_input :-
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
%
|
|
2
|
-
% https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#
|
|
1
|
+
% STC #74: number_chars/2 reports the draft floating representation limit.
|
|
2
|
+
% https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#74
|
|
3
3
|
%% goal: number_chars(_, "-1.0e99999")
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
%
|
|
2
|
-
% https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#
|
|
1
|
+
% STC #74: number_chars/2 reports the draft floating representation limit.
|
|
2
|
+
% https://www.complang.tuwien.ac.at/ulrich/iso-prolog/stc#74
|
|
3
3
|
%% goal: number_chars(_, "1.0e99999")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
error(representation_error(min_float))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
error(representation_error(max_float))
|
package/test/run-iso-strict.mjs
CHANGED
|
@@ -614,6 +614,29 @@ export function runIsoStrict(reporter = new TestReporter()) {
|
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
616
|
|
|
617
|
+
reporter.test('tracks post-N289 STC draft items 73-76 without replacing the published baseline', () => {
|
|
618
|
+
for (const [goal, input, expected, label] of [
|
|
619
|
+
['read(X)', '1.0e99999.\n', 'representation_error(max_float)', 'STC #73 read/1 max_float'],
|
|
620
|
+
['read_term(X,[])', '-1.0e99999.\n', 'representation_error(min_float)', 'STC #73 read_term/2 min_float'],
|
|
621
|
+
]) {
|
|
622
|
+
equal(capture(() => run('', { isoStrict: true, goal, ioOptions: { input } })).formal, expected, label);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
for (const [goal, expected, label] of [
|
|
626
|
+
["number_chars(N,['1','.','0',e,'9','9','9','9','9'])", 'representation_error(max_float)', 'STC #74 number_chars/2'],
|
|
627
|
+
['number_codes(N,[45,49,46,48,101,57,57,57,57,57])', 'representation_error(min_float)', 'STC #74 number_codes/2'],
|
|
628
|
+
]) equal(capture(() => run('', { isoStrict: true, goal })).formal, expected, label);
|
|
629
|
+
|
|
630
|
+
// STC #75 proposes conditioning the published **/2 and Corrigendum 2 ^/2
|
|
631
|
+
// underflow rows on the implementation-defined 9.1.4.2 resultF choice.
|
|
632
|
+
// Until that proposal is standardized, strict mode keeps the published
|
|
633
|
+
// unconditional error clauses; the draft divergence is documented.
|
|
634
|
+
equal(capture(() => run('', { isoStrict: true, goal: 'X is 2.0 ** -1075.0' })).formal,
|
|
635
|
+
'evaluation_error(underflow)', 'published **/2 underflow baseline');
|
|
636
|
+
equal(capture(() => run('', { isoStrict: true, goal: 'X is 2.0 ^ -1075.0' })).formal,
|
|
637
|
+
'evaluation_error(underflow)', 'published ^/2 underflow baseline');
|
|
638
|
+
});
|
|
639
|
+
|
|
617
640
|
reporter.test('reports explicit transcendental and power underflow in strict mode', () => {
|
|
618
641
|
for (const [goal, label] of [
|
|
619
642
|
['X is exp(-1000.0)', 'exp/1 underflow'],
|
package/test/run-regression.mjs
CHANGED
|
@@ -845,6 +845,29 @@ c4 ?- call((!;1)).
|
|
|
845
845
|
}
|
|
846
846
|
assertEqual(readError?.formal, 'representation_error(max_float)', 'read/1 overflow');
|
|
847
847
|
|
|
848
|
+
let readTermError = null;
|
|
849
|
+
try {
|
|
850
|
+
runEyeProlog('', {
|
|
851
|
+
goal: 'read_term(X, [])',
|
|
852
|
+
ioOptions: { input: '-1.0e99999.\n' },
|
|
853
|
+
});
|
|
854
|
+
} catch (error) {
|
|
855
|
+
readTermError = error;
|
|
856
|
+
}
|
|
857
|
+
assertEqual(readTermError?.formal, 'representation_error(min_float)', 'read_term/2 overflow (STC #73)');
|
|
858
|
+
|
|
859
|
+
const numberCodes = createDefaultRegistry().get('number_codes', 2).handler;
|
|
860
|
+
let numberCodesError = null;
|
|
861
|
+
try {
|
|
862
|
+
numberCodes({
|
|
863
|
+
goal: compound('number_codes', [variable('N'), listFromItems(Array.from('1.0e99999', (c) => numberTerm(String(c.codePointAt(0))))) ]),
|
|
864
|
+
env: new Env(),
|
|
865
|
+
}).next();
|
|
866
|
+
} catch (error) {
|
|
867
|
+
numberCodesError = error;
|
|
868
|
+
}
|
|
869
|
+
assertEqual(numberCodesError?.formal, 'representation_error(max_float)', 'number_codes positive overflow (STC #74)');
|
|
870
|
+
|
|
848
871
|
const isHandler = createDefaultRegistry().get('is', 2).handler;
|
|
849
872
|
let hostTermError = null;
|
|
850
873
|
try {
|
|
@@ -3323,7 +3346,7 @@ child.stdin.write(\`consult(${consultedAtom}).\\n\`);
|
|
|
3323
3346
|
},
|
|
3324
3347
|
},
|
|
3325
3348
|
{
|
|
3326
|
-
name: 'read and read_term report invalid UTF-8 as representation_error(character) (issue #64)',
|
|
3349
|
+
name: 'read and read_term report invalid UTF-8 as representation_error(character) (issue #64, STC #76)',
|
|
3327
3350
|
run: () => {
|
|
3328
3351
|
const invalidPath = path.join(tmp, `read-invalid-utf8-${++tmpCounter}.bin`);
|
|
3329
3352
|
fs.writeFileSync(invalidPath, Buffer.from([0xff]));
|
package/the-art-of-eyeprolog.md
CHANGED
|
@@ -5495,9 +5495,15 @@ The long catalogs are meant to be entered locally, not memorized linearly.
|
|
|
5495
5495
|
## 38. Language and ISO profile
|
|
5496
5496
|
|
|
5497
5497
|
The normative strict-core baseline is ISO/IEC 13211-1:1995, as corrected by
|
|
5498
|
-
Technical Corrigenda 1:2007, 2:2012, and 3:2017.
|
|
5499
|
-
|
|
5500
|
-
|
|
5498
|
+
Technical Corrigenda 1:2007, 2:2012, and 3:2017. The post-N289 WG17/STC
|
|
5499
|
+
working draft is used as defect-discovery input, not as an unpublished fourth
|
|
5500
|
+
Corrigendum. The 2026-08-23 draft through items #73-#76 is tracked by
|
|
5501
|
+
`test/conformance/STC-DRAFT-STATUS.md`; where a proposal changes published
|
|
5502
|
+
semantics, such as #75's conditional power-underflow proposal, strict mode keeps
|
|
5503
|
+
the licensed baseline until the change is standardized or explicitly adopted as
|
|
5504
|
+
a compatibility extension. Normal EyeProlog additionally provides a practical
|
|
5505
|
+
module interface aligned with later WG17 module amendment work and a
|
|
5506
|
+
definite-clause-grammar profile following ISO/IEC TS 13211-3. Those
|
|
5501
5507
|
normal-mode profiles are documented and tested compatibility surfaces; they are
|
|
5502
5508
|
not currently claimed as complete clause-by-clause certifications of Part 2 or
|
|
5503
5509
|
Part 3.
|
|
@@ -7591,7 +7597,7 @@ upstream syntax cases. Reviewed cases can pin exact strict-reader outcomes, whil
|
|
|
7591
7597
|
newly upgraded cases execute directly against the upstream Codex expectation.
|
|
7592
7598
|
|
|
7593
7599
|
The complete suite must pass before release. The file-based conformance corpus
|
|
7594
|
-
contains
|
|
7600
|
+
contains 802 cases, including 386 focused ISO
|
|
7595
7601
|
cases derived from the success, failure, mode, and error behavior in
|
|
7596
7602
|
ISO/IEC 13211-1 clauses 7 and 8, Part 2 modules, and Part 3 grammar rules.
|
|
7597
7603
|
Separate exact-output suites check 210 normal
|
package/why-eyeprolog.md
CHANGED
|
@@ -19,7 +19,10 @@ syntax.
|
|
|
19
19
|
|
|
20
20
|
EyeProlog targets the Part 1 core together with Technical Corrigenda 1, 2,
|
|
21
21
|
and 3, and provides documented module and definite-clause-grammar compatibility
|
|
22
|
-
profiles for normal-mode programs. The
|
|
22
|
+
profiles for normal-mode programs. The post-N289 WG17/STC working draft is
|
|
23
|
+
tracked as audit input rather than silently treated as another published
|
|
24
|
+
Corrigendum; the conformance ledger records where draft wording differs from
|
|
25
|
+
the published strict baseline. The processor character model is explicitly
|
|
23
26
|
implementation defined: EyeProlog uses Unicode scalar values as the PCS and as
|
|
24
27
|
collating-sequence integers in both normal and strict profiles. Strict mode
|
|
25
28
|
therefore rejects implementation-specific language extensions without changing
|