eyeprolog 1.5.26 → 1.5.27
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/package.json +1 -1
- package/test/conformance/ISO-BUILTIN-MODE-ERROR-MATRIX.md +7 -3
- package/test/conformance/ISO-COMPLIANCE.md +19 -13
- package/test/conformance/ISO-CORRIGENDA-MATRIX.md +93 -0
- package/test/conformance/ISO-PROCESSOR-REQUIREMENTS.md +1 -1
- package/test/conformance/README.md +4 -0
- package/test/run-iso-strict.mjs +44 -0
- package/test/run-regression.mjs +39 -1
package/package.json
CHANGED
|
@@ -17,11 +17,13 @@ table.
|
|
|
17
17
|
The table is intentionally explicit about what has and has not been closed.
|
|
18
18
|
The current audit now covers the complete 8.2-8.17 built-in family at the
|
|
19
19
|
level of prescribed modes, success/failure behavior, individual error
|
|
20
|
-
conditions, and explicit not-applicable processor branches.
|
|
21
|
-
|
|
20
|
+
conditions, and explicit not-applicable processor branches. Closely related
|
|
21
|
+
conditions may share a row only when that row names every condition and the
|
|
22
|
+
executable evidence for each. Higher-level Clause 7 and Clause 9 semantics
|
|
23
|
+
remain tracked separately.
|
|
22
24
|
|
|
23
25
|
The focused assertions added for this matrix live in `test/run-iso-strict.mjs`;
|
|
24
|
-
existing file-based cases remain additional
|
|
26
|
+
existing file-based cases remain additional regression evidence.
|
|
25
27
|
|
|
26
28
|
## 8.2 — term unification
|
|
27
29
|
|
|
@@ -369,6 +371,8 @@ built-in matrix does not have a gap at 8.17.
|
|
|
369
371
|
The built-in **8.2-8.17 row audit is complete** at the level tracked by this
|
|
370
372
|
file: prescribed modes, success/failure behavior, individual error conditions,
|
|
371
373
|
and conditional/not-applicable processor branches all have explicit outcomes.
|
|
374
|
+
“Row audit” means condition-by-condition accounting; it does not promise one
|
|
375
|
+
Markdown table row per condition when a grouped row enumerates them all.
|
|
372
376
|
ISO 7.12 simultaneous-error selection remains an implementation-dependent
|
|
373
377
|
processor choice unless more specific normative text constrains it.
|
|
374
378
|
|
|
@@ -5,12 +5,16 @@ EyeProlog's ISO/IEC 13211-1 core. The normative baseline is ISO/IEC 13211-1:1995
|
|
|
5
5
|
together with Technical Corrigenda 1:2007, 2:2012, and 3:2017. Detailed
|
|
6
6
|
row-level evidence lives only where it adds information: the built-in, processor,
|
|
7
7
|
term-semantics, Prolog-text/execution, evaluable-functor, implementation-defined,
|
|
8
|
-
WG17-syntax, and STC draft ledgers in this directory. The generated
|
|
8
|
+
published-Corrigenda, WG17-syntax, and STC draft ledgers in this directory. The generated
|
|
9
9
|
[`conformance-report.md`](../../conformance-report.md) gives the current executable WG17 syntax result together with file-based case totals.
|
|
10
10
|
|
|
11
11
|
The ledger deliberately does **not** claim independent certification. A row
|
|
12
12
|
marked `covered` means EyeProlog has implementation and executable tests for
|
|
13
|
-
that family
|
|
13
|
+
that family, an explicit disposition for every requirement accounted for by
|
|
14
|
+
the linked audit rows, and no known open defect in the listed behavior. An
|
|
15
|
+
audit row may group closely related modes or error conditions, but it must name
|
|
16
|
+
each grouped condition and its evidence; `covered` does not imply one Markdown
|
|
17
|
+
row per occurrence of the word `shall`. A row marked
|
|
14
18
|
`audit` means the family is implemented and tested, but the project has not yet
|
|
15
19
|
mapped every normative `shall`, option combination, prescribed error, and
|
|
16
20
|
relevant implementation-dependent overlap choice to an explicit audit outcome.
|
|
@@ -23,7 +27,7 @@ relevant implementation-dependent overlap choice to an explicit audit outcome.
|
|
|
23
27
|
| 5.1(b) execute conforming Prolog goals | covered | Clause 7 term/control/execution semantics, the higher-level 7.10 stream model, 7.11 flags, the 7.12 error envelope, all 8.2-8.17 built-in rows, and Clause 9 arithmetic have explicit executable dispositions. |
|
|
24
28
|
| 5.1(c) reject nonconforming text/read-terms | covered | WG17 negative syntax cases, focused malformed-production/escape/comment/operator cases, read-term syntax errors, and strict rejection of implementation-specific syntax provide explicit rejection evidence across the Clause 6 families. |
|
|
25
29
|
| 5.1(d) document permitted variations | covered | The clause-by-clause [ISO 5.4 decision index](ISO-IMPLEMENTATION-DEFINED.md) records every explicit implementation-defined decision found in the Part 1 + Corrigenda baseline and separately inventories implementation-specific extension families. The index retains an `audit gap` category for future discoveries; no current release-facing row depends on one. |
|
|
26
|
-
| 5.1(e) offer a strictly conforming mode | covered | `--iso-strict` and API option `isoStrict: true` restrict the processor to the Part 1 + Corrigenda 1-3 core language surface, remove EyeProlog-only registry/flag/operator features, reject explicit tabling and other normal-profile extensions, and reject the normal-profile host `stringTerm
|
|
30
|
+
| 5.1(e) offer a strictly conforming mode | covered | `--iso-strict` and API option `isoStrict: true` restrict the processor to the Part 1 + Corrigenda 1-3 core language surface, remove EyeProlog-only registry/flag/operator features, reject explicit tabling and other normal-profile extensions, and reject the normal-profile host `stringTerm(Text)` term type at strict program/goal entry. |
|
|
27
31
|
| 5.4 accompanying documentation | covered | *The Art of EyeProlog* remains the implementation reference; [ISO-IMPLEMENTATION-DEFINED.md](ISO-IMPLEMENTATION-DEFINED.md) is the closed clause-by-clause 5.4 decision index and points each decision to implementation evidence. |
|
|
28
32
|
| 5.5 extension boundaries | covered | [ISO-PROCESSOR-REQUIREMENTS.md](ISO-PROCESSOR-REQUIREMENTS.md) gives an explicit disposition for every 5.5 extension hook. The Clause 6 cross-profile gate verifies that normal-mode syntax extensions do not reinterpret standard text accepted by the strict reader. |
|
|
29
33
|
|
|
@@ -31,7 +35,7 @@ relevant implementation-dependent overlap choice to an explicit audit outcome.
|
|
|
31
35
|
|
|
32
36
|
| Standard area | Status | Current evidence |
|
|
33
37
|
| --- | --- | --- |
|
|
34
|
-
| Clause 6 — tokens, terms, lists, operators, quoted text | covered | The strict Clause 6 gate maps atomic/variable/compound/operator/list/curly/double-quoted term forms, layout/comments, quoted escapes, integer bases/character codes, floating tokens, and solo/meta token boundaries, with malformed counterparts rejected. The complete 366-case WG17 syntax matrix provides
|
|
38
|
+
| Clause 6 — tokens, terms, lists, operators, quoted text | covered | The strict Clause 6 gate maps atomic/variable/compound/operator/list/curly/double-quoted term forms, layout/comments, quoted escapes, integer bases/character codes, floating tokens, and solo/meta token boundaries, with malformed counterparts rejected. The complete 366-case WG17 syntax matrix provides externally sourced production-level expectations, and a cross-profile gate verifies that normal syntax extensions preserve every strict-accepted standard observation. The implementation-defined 6.5/6.6 PCS/collation choices are documented separately. |
|
|
35
39
|
| 7.1-7.3 — term types, term order, unification | covered | [ISO-TERM-SEMANTICS-MATRIX.md](ISO-TERM-SEMANTICS-MATRIX.md) records the five mutually exclusive strict term types, derived variable/compound/list notions, the complete standard-order classes and implementation-dependent variable-order choice, NSTO MGU/failure behavior, and EyeProlog's permitted consistent occurs-check failure for Part 1's undefined STO ordinary-unification cases. The normal JavaScript API string term is documented as a 5.5.4 extension and rejected at strict program/goal entry. |
|
|
36
40
|
| 7.4 — Prolog text and directives | covered | [ISO-PROLOG-TEXT-EXECUTION-MATRIX.md](ISO-PROLOG-TEXT-EXECUTION-MATRIX.md) closes the preparation/directive rows: declaration semantics, source clauses, cross-text operators/character conversion/flags, initialization order/lifetime, `include/1`, and one-time `ensure_loaded/1`, with implementation-defined cross-text choices indexed under 5.4. |
|
|
37
41
|
| 7.5-7.6 — database and term/clause conversion | covered | [ISO-PROLOG-TEXT-EXECUTION-MATRIX.md](ISO-PROLOG-TEXT-EXECUTION-MATRIX.md) closes static/dynamic and private/public procedure semantics, clause order, logical-update visibility, empty/unknown lifetime, and term/body/clause conversion. Source and runtime assertion conversion recurse through `,/2`, `;/2`, and `->/2`, preserve variable identity, and protect standardized static/control procedures. |
|
|
@@ -41,11 +45,11 @@ relevant implementation-dependent overlap choice to an explicit audit outcome.
|
|
|
41
45
|
| 7.10 — input/output concepts | covered | Higher-level stream semantics are pinned for non-atom ground stream terms, alias lifetime, current/target stream selection and fallback, write truncation, append positioning, contradictory stream options, exact binary round-tripping, flushing, standard-stream close behavior, and repositioned overwrite. Term-output spelling is also checked lexically where ISO distinguishes token forms: Corrigendum 2 bar operators are written with bare `|`, ordinary atom/functor `|` remains quoted, and the semicolon name token is emitted bare by canonical output. The complete 8.11-8.14 built-in mode/error family remains row-audited in [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md), while all implementation-defined stream choices are indexed in [ISO-IMPLEMENTATION-DEFINED.md](ISO-IMPLEMENTATION-DEFINED.md). |
|
|
42
46
|
| 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. |
|
|
43
47
|
| 7.12 — errors | covered | The strict error-envelope gate exercises instantiation, type, domain, existence, permission, representation, evaluation, resource, syntax, and system errors through `error(Error, Context)`. Built-in rows provide the individual prescribed conditions, implementation-defined representation/context choices are documented, and simultaneous-error regressions pin deterministic EyeProlog choices without treating textual table order as normative. |
|
|
44
|
-
| 8.2-8.17 — built-in predicates | covered | [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md)
|
|
48
|
+
| 8.2-8.17 — built-in predicates | covered | [ISO-BUILTIN-MODE-ERROR-MATRIX.md](ISO-BUILTIN-MODE-ERROR-MATRIX.md) accounts for the complete Part 1 + Corrigenda built-in family across prescribed modes, success/failure behavior, individual error conditions, and conditional/not-applicable branches. Closely related conditions may share a row when every condition and its executable evidence are named. The 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. |
|
|
45
49
|
| Clause 9 — evaluable functors | covered | [ISO-EVALUABLE-FUNCTOR-MATRIX.md](ISO-EVALUABLE-FUNCTOR-MATRIX.md) records the published Part 1 + Corrigenda arithmetic templates and exceptional branches across 9.1, 9.3, and 9.4. It pins the unbounded integer model, `rndI`/`rndF`/`resultF` choices, float-only conversion rules, I->F overflow, explicit `exp/1` and power underflow, Corrigendum 2 additions and mixed-type `max/2`/`min/2` implementation-dependent choice, Corrigendum 3 negative-power correction, signed bitwise/shift choices, and resource-error translation. Post-N289 STC #75 remains a separately tracked draft proposal rather than a silent change to the published baseline. |
|
|
46
|
-
| Corrigendum 1 | covered |
|
|
47
|
-
| Corrigendum 2 | covered |
|
|
48
|
-
| Corrigendum 3 | covered |
|
|
50
|
+
| Corrigendum 1 | covered | [ISO-CORRIGENDA-MATRIX.md](ISO-CORRIGENDA-MATRIX.md) dispositions every amendment cluster, including the square-root boundary, double-quoted operator atoms, typed expression errors, clause/operator enumeration, and atomic-conversion corrections; editorial items and the later-superseded set-order example are identified explicitly. |
|
|
51
|
+
| Corrigendum 2 | covered | [ISO-CORRIGENDA-MATRIX.md](ISO-CORRIGENDA-MATRIX.md) tracks the bar/operator changes, new predicates and evaluable functors, catch and uninstantiation corrections, atomic-conversion errors, and every other amendment cluster to executable evidence or an explicit editorial disposition. |
|
|
52
|
+
| Corrigendum 3 | covered | [ISO-CORRIGENDA-MATRIX.md](ISO-CORRIGENDA-MATRIX.md) tracks option-extension/error rules, final layout, term-to-body conversion, metadata traversal, writing rules, stream/built-in corrections, and negative integer powers; editorial changes are dispositioned separately. |
|
|
49
53
|
|
|
50
54
|
## Conformance corrections and audit closure
|
|
51
55
|
|
|
@@ -248,8 +252,10 @@ not interpret the following as core-language features:
|
|
|
248
252
|
- the implementation-specific `occurs_check` Prolog flag;
|
|
249
253
|
- Part 2 module directives (`module/2`, `use_module/1-2`, `meta_predicate/1`);
|
|
250
254
|
- Part 3 grammar-rule expansion and `phrase/2-3`;
|
|
251
|
-
- explicit tabling,
|
|
252
|
-
|
|
255
|
+
- explicit tabling, EyeProlog well-founded evaluation via `tnot/1` and
|
|
256
|
+
`wfs_truth/2`, WFS runtime statistics, and recursive numeric execution shortcuts;
|
|
257
|
+
- normal-profile integer digit separators and Trealla-compatible
|
|
258
|
+
`"text"||Tail` double-quoted-list splicing;
|
|
253
259
|
- the JavaScript API `stringTerm(Text)` additional term type (normal mode only).
|
|
254
260
|
|
|
255
261
|
The predefined Part 1 `1200 fx` `?-` operator and `1200 xfx` `-->` operator
|
|
@@ -288,13 +294,13 @@ post-N289 STC drafts remain review input until standardized.
|
|
|
288
294
|
| Clause 5 processor obligations have explicit dispositions | covered | `ISO-PROCESSOR-REQUIREMENTS.md` gives explicit outcomes for 5.1-5.5, including the strict/normal extension boundary. |
|
|
289
295
|
| Clause 6 lexical/syntactic requirements have explicit dispositions | covered | the strict Clause 6 production/rejection gate and the 366-case vendored WG17 matrix cover the standard families; cross-profile preservation verifies that normal extensions do not reinterpret strict-accepted text. |
|
|
290
296
|
| Clause 7 semantic requirements have explicit dispositions | covered | 7.1-7.12 now have explicit semantic, implementation-defined, or error-envelope dispositions backed by strict tests and the specialized matrices. |
|
|
291
|
-
| Clause 8 built-in modes/errors have explicit dispositions | covered | `ISO-BUILTIN-MODE-ERROR-MATRIX.md`
|
|
297
|
+
| Clause 8 built-in modes/errors have explicit dispositions | covered | `ISO-BUILTIN-MODE-ERROR-MATRIX.md` accounts for 8.2-8.17 condition by condition, using grouped rows only where every grouped condition and its evidence are named |
|
|
292
298
|
| Clause 9 evaluable-functor requirements have explicit dispositions | covered | `ISO-EVALUABLE-FUNCTOR-MATRIX.md` plus the strict arithmetic regression closes the published Part 1 + Corrigenda arithmetic rows |
|
|
293
299
|
| Implementation-defined choices are documented | covered | `ISO-IMPLEMENTATION-DEFINED.md` is the Clause 5.4 decision index and strict tests pin execution-visible choices |
|
|
294
300
|
| Implementation-specific strict/normal boundary is documented and tested | covered | all 5.5 hooks have explicit dispositions; the WG17 cross-profile gate verifies syntax-preservation for standard text accepted by the strict reader. |
|
|
295
|
-
| Published Corrigenda 1-3 are incorporated | covered |
|
|
301
|
+
| Published Corrigenda 1-3 are incorporated | covered | `ISO-CORRIGENDA-MATRIX.md` inventories every published amendment cluster with executable, editorial, or superseded disposition |
|
|
296
302
|
| Current post-N289 draft is tracked without silently changing the published baseline | covered | `STC-DRAFT-STATUS.md` tracks reviewed draft items separately from normative requirements |
|
|
297
|
-
|
|
|
303
|
+
| Externally sourced syntax corpus is an offline release gate | covered | the vendored WG17 syntax matrix has 366 executable dispositions checked against its upstream expectations; this is external review evidence, not certification |
|
|
298
304
|
| Third-party standard-core regression provenance is retained | covered | adapted Logtalk, Scryer, Trealla, and SWI-Prolog cases retain source identifiers and licenses in `THIRD_PARTY.md` |
|
|
299
305
|
| No unexplained deviation remains in the release-facing ledger | covered | the release-facing ledger contains no remaining `audit` rows; documented variation points are implementation-defined/specific or draft-only rather than unexplained deviations. |
|
|
300
306
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# ISO/IEC 13211-1 published Corrigenda audit
|
|
2
|
+
|
|
3
|
+
This matrix records every amendment cluster in Technical Corrigenda 1:2007,
|
|
4
|
+
2:2012, and 3:2017 against EyeProlog's published Part 1 baseline. It separates
|
|
5
|
+
behavior-changing requirements from editorial/example-only corrections and
|
|
6
|
+
from text superseded by a later Corrigendum. A `covered` behavior row names
|
|
7
|
+
executable evidence; an `editorial` row records that no processor behavior was
|
|
8
|
+
changed; a `superseded` row points to the later published amendment.
|
|
9
|
+
|
|
10
|
+
The stable audit IDs are checked by the documentation regression suite. They
|
|
11
|
+
make omission detectable without reproducing the licensed standard text here.
|
|
12
|
+
|
|
13
|
+
## Technical Corrigendum 1:2007
|
|
14
|
+
|
|
15
|
+
| Audit ID | Clauses / amendment cluster | Disposition | EyeProlog evidence |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| C1-01 | 3.106, 3.108, 3.125, 3.148 terminology and typography | editorial | Definitions/source typography; no processor behavior changes. |
|
|
18
|
+
| C1-02 | 4.1.3.5 non-negative square-root axiom | covered | Strict test `pins behavior-changing Technical Corrigendum 1 corrections` checks `sqrt(0)`. |
|
|
19
|
+
| C1-03 | 6.3.7 priority of a double-quoted atom that names an operator | covered | Same strict test plus `iso/corrigendum1_double_quote_operator`. |
|
|
20
|
+
| C1-04 | 7.2.5 compound-term ordering wording | editorial | The corrected condition is represented by the Clause 7.2 standard-order tests. |
|
|
21
|
+
| C1-05 | 7.8.5.4, table 35, and 7.8.8.4 control-model/example corrections | editorial | Corrected notation; conjunction and if-then-else behavior is independently covered by the strict 7.8 audit. |
|
|
22
|
+
| C1-06 | 7.9.2 integer- and float-operand type errors | covered | Strict Clause 7.9 tests exercise integer-only and float-only templates. |
|
|
23
|
+
| C1-07 | 7.12.2 representation-error metavariable capitalization | editorial | Error-term representation is covered by the 7.12 envelope; this amendment changes notation only. |
|
|
24
|
+
| C1-08 | 8.8.1.1 selected `clause/2` result is unified with head/body | covered | Strict test `pins behavior-changing Technical Corrigendum 1 corrections`. |
|
|
25
|
+
| C1-09 | 8.9.4.1 `abolish/1` note wording | editorial | Singular/plural note correction only. |
|
|
26
|
+
| C1-10 | 8.10.3.4 set-order example | superseded | Corrigendum 3 explicitly restores the original example; current behavior follows Corrigendum 3. |
|
|
27
|
+
| C1-11 | 8.13.3.4 `put_byte/1-2` example values | editorial | Examples corrected; byte-output semantics are covered by the strict 8.13 audit. |
|
|
28
|
+
| C1-12 | 8.14.1.4 input-stream names and post-syntax-error example state | editorial | Examples corrected; read-stream behavior is covered by strict term-I/O tests. |
|
|
29
|
+
| C1-13 | 8.14.4.1 selected `current_op/3` result is unified with its arguments | covered | Strict test `pins behavior-changing Technical Corrigendum 1 corrections`. |
|
|
30
|
+
| C1-14 | 8.16.4 `atom_chars/2` accepts a matching supplied list prefix | covered | Strict test `pins behavior-changing Technical Corrigendum 1 corrections`. |
|
|
31
|
+
| C1-15 | 8.16.5 `atom_codes/2` accepts a matching supplied list prefix | covered | Strict test `pins behavior-changing Technical Corrigendum 1 corrections`. |
|
|
32
|
+
| C1-16 | 9.1.4.1 and 9.1.7 arithmetic notes/examples | editorial | Corrected examples and reference; corresponding arithmetic operations are covered by the Clause 9 matrix. |
|
|
33
|
+
| C1-17 | 9.3.5.4 and 9.3.6.4 transcendental example constants | editorial | Example constants only; `exp/1` and `log/1` have executable strict coverage. |
|
|
34
|
+
| C1-18 | 9.4.1-9.4.4 example error terms | editorial | Corrected examples; evaluable-functor and integer-operand errors are covered by strict Clause 9 tests. |
|
|
35
|
+
|
|
36
|
+
## Technical Corrigendum 2:2012
|
|
37
|
+
|
|
38
|
+
| Audit ID | Clauses / amendment cluster | Disposition | EyeProlog evidence |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| C2-01 | 6.3.4, 6.4, 6.5 bar token/operator rules and protected `[]`/`{}` operators | covered | WG17 lexical output cases, `corrigenda_bar_operator`, and strict `op/3` tests. |
|
|
41
|
+
| C2-02 | 6.3.4.4 predefined unary plus and `div` operators | covered | Strict predefined-operator and arithmetic tests. |
|
|
42
|
+
| C2-03 | 7.1.1.5 witness-variable list | covered | `term_variables/2`, read-option traversal, and variable-order tests. |
|
|
43
|
+
| C2-04 | 7.1.6.9 list-prefix definition | covered | Atomic-conversion partial/improper-list tests. |
|
|
44
|
+
| C2-05 | 7.8.3.4 complete term-to-body error culprit for `call/1` | covered | Strict 7.8 callability and recursive body-conversion tests. |
|
|
45
|
+
| C2-06 | 7.8.9 `catch/3` catches errors arising from its protected goal | covered | `corrigenda_catch_callability` and strict exception tests. |
|
|
46
|
+
| C2-07 | 7.9 typed evaluable-operand error selection | covered | Strict Clause 7.9/9 operand-template tests. |
|
|
47
|
+
| C2-08 | 7.12.2 pair/order domains and uninstantiation error class | covered | Strict error envelope and Corrigendum-specific output-argument tests. |
|
|
48
|
+
| C2-09 | 8.1.3 output-mode arguments use uninstantiation errors | covered | Strict `open/4` output argument test. |
|
|
49
|
+
| C2-10 | 8.2.4 `subsumes_term/2` | covered | Strict registry and Corrigendum term-predicate tests. |
|
|
50
|
+
| C2-11 | 8.3.9-8.3.11 `callable/1`, `ground/1`, `acyclic_term/1` | covered | Strict registry/type tests and `corrigenda_term_predicates`. |
|
|
51
|
+
| C2-12 | 8.4.2-8.4.4 `compare/3`, `sort/2`, `keysort/2` | covered | Strict mode/error rows and `corrigenda_sort_keysort`. |
|
|
52
|
+
| C2-13 | 8.5.5 `term_variables/2` | covered | Strict mode/error rows and `corrigenda_term_predicates`. |
|
|
53
|
+
| C2-14 | 8.9.3 static `retract/1` uses modify permission | covered | Strict database predicate error tests. |
|
|
54
|
+
| C2-15 | 8.9.5 `retractall/1` | covered | Strict lifetime/error tests and `corrigenda_retractall`. |
|
|
55
|
+
| C2-16 | 8.11.5 non-variable `open/4` stream result | covered | Strict uninstantiation-error test. |
|
|
56
|
+
| C2-17 | 8.14.3 protected operator priority/specifier combinations | covered | Strict `op/3` row audit and bar-operator cases. |
|
|
57
|
+
| C2-18 | 8.15.4 `call/2..8` and implementation-dependent higher arities | covered | Strict closure expansion, error, and selected ceiling tests. |
|
|
58
|
+
| C2-19 | 8.15.5 `false/0` | covered | Strict registry, execution, and static-procedure protection tests. |
|
|
59
|
+
| C2-20 | 8.16.4-8.16.8 atomic/number conversion partial-list errors | covered | Individual strict mode/error assertions for all four predicates. |
|
|
60
|
+
| C2-21 | 9.1 unary plus and flooring integer `div/2` | covered | Strict arithmetic matrix and negative-operand distinction from `//2`. |
|
|
61
|
+
| C2-22 | 9.3 `max/2`, `min/2`, `^/2`, inverse trig, `atan2/2`, `tan/1`, and `pi/0` | covered | Strict evaluable-functor matrix and exceptional-value tests. |
|
|
62
|
+
| C2-23 | 9.4.6 `xor/2` | covered | Strict signed bitwise and operand-type tests. |
|
|
63
|
+
|
|
64
|
+
## Technical Corrigendum 3:2017
|
|
65
|
+
|
|
66
|
+
| Audit ID | Clauses / amendment cluster | Disposition | EyeProlog evidence |
|
|
67
|
+
| --- | --- | --- | --- |
|
|
68
|
+
| C3-01 | 5.5.12 implementation-specific options and their error classification | covered | Strict option surfaces reject normal-only options and exercise variable/domain distinctions. |
|
|
69
|
+
| C3-02 | 6.2.1 optional final layout text | covered | Strict test `pins behavior-changing Technical Corrigendum 3 corrections`. |
|
|
70
|
+
| C3-03 | 7.1.6.3 iterated-goal term uses structural form rather than unification | covered | Strict `bagof/3`/`setof/3` grouping and error tests. |
|
|
71
|
+
| C3-04 | 7.8.3 `call/1` applies term-to-body conversion before execution | covered | Strict call/cut-scope and variable-body conversion regressions. |
|
|
72
|
+
| C3-05 | 7.10.3 read-option unification and left-to-right variable traversal | covered | Corrigendum 3 metadata traversal tests. |
|
|
73
|
+
| C3-06 | 7.10.4 `variable_names/1` write option | covered | Strict test `pins behavior-changing Technical Corrigendum 3 corrections` and file-based writer case. |
|
|
74
|
+
| C3-07 | 7.10.5 variable, list, curly, functional, and operator writing rules | covered | Strict writer suite and exact WG17 writer assertions. |
|
|
75
|
+
| C3-08 | 7.12.2 error-classification set corrections | editorial | Corrected type/domain/permission enumerations are reflected by individual strict errors. |
|
|
76
|
+
| C3-09 | 8.1.2/8.1.3 option-list modes and component-variable errors | covered | Strict open/close/read/write option-list assertions. |
|
|
77
|
+
| C3-10 | 8.5.1.4 conditional `max_arity` example | editorial | Example disposition is documented; EyeProlog selects `max_arity=unbounded`. |
|
|
78
|
+
| C3-11 | 8.9.2.1 assertion-description variable correction | editorial | Metavariable typo only; `assertz/1` conversion behavior is strictly tested. |
|
|
79
|
+
| C3-12 | 8.10.3.4 restores the original set-order example | superseded | Supersedes C1-10; current grouped-solution order is tested and documented as implementation dependent where permitted. |
|
|
80
|
+
| C3-13 | 8.11.4.1 explicit success of `set_output/1` | covered | Strict stream-selection success test. |
|
|
81
|
+
| C3-14 | 8.11.5, 8.11.6, 8.14.1, 8.14.2 option-list error rewrites | covered | Individual strict option instantiation/list/domain assertions. |
|
|
82
|
+
| C3-15 | 8.14.1.1 corrected syntax reference | editorial | Reference correction only; read-term syntax errors are executable. |
|
|
83
|
+
| C3-16 | 8.14.2.4 canonical-list and option-error examples | covered | Canonical list output, variable option, and invalid option tests. |
|
|
84
|
+
| C3-17 | 8.17.1.4 unknown flag uses the `prolog_flag` domain | covered | Strict `set_prolog_flag/2` unknown-flag test. |
|
|
85
|
+
| C3-18 | 9.3.1.3 arithmetic metavariable correction | editorial | Metavariable typo only. |
|
|
86
|
+
| C3-19 | 9.3.10 negative integer exponent requires a float base | covered | Strict test `pins behavior-changing Technical Corrigendum 3 corrections`. |
|
|
87
|
+
|
|
88
|
+
## Closure rule
|
|
89
|
+
|
|
90
|
+
The three Corrigenda rows in `ISO-COMPLIANCE.md` may be marked `covered` only
|
|
91
|
+
while this complete stable-ID inventory passes its structural regression and
|
|
92
|
+
every behavior-changing row retains executable evidence. Editorial and
|
|
93
|
+
superseded rows are explicit dispositions rather than silently omitted tests.
|
|
@@ -50,7 +50,7 @@ certification claim.
|
|
|
50
50
|
|
|
51
51
|
The production audit is kept here rather than in another status file. The strict
|
|
52
52
|
regression gate covers the following families directly, while the complete WG17
|
|
53
|
-
matrix supplies
|
|
53
|
+
matrix supplies detailed externally sourced syntax expectations.
|
|
54
54
|
|
|
55
55
|
| Clause family | Disposition | Executable evidence |
|
|
56
56
|
| --- | --- | --- |
|
|
@@ -14,6 +14,10 @@ tracks the row-by-row built-in audit,
|
|
|
14
14
|
closes 7.4-7.8, [ISO-EVALUABLE-FUNCTOR-MATRIX.md](ISO-EVALUABLE-FUNCTOR-MATRIX.md)
|
|
15
15
|
closes 7.9/Clause 9, and [ISO-PROCESSOR-REQUIREMENTS.md](ISO-PROCESSOR-REQUIREMENTS.md)
|
|
16
16
|
decomposes the Clause 5 processor obligations.
|
|
17
|
+
[ISO-CORRIGENDA-MATRIX.md](ISO-CORRIGENDA-MATRIX.md) gives every published
|
|
18
|
+
Corrigenda amendment cluster an executable, editorial, or superseded
|
|
19
|
+
disposition. Built-in rows may group closely related conditions only when the
|
|
20
|
+
row names every grouped condition and its executable evidence.
|
|
17
21
|
The exit checklist is embedded in [ISO-COMPLIANCE.md](ISO-COMPLIANCE.md). [WG17-SYNTAX-STATUS.md](WG17-SYNTAX-STATUS.md) records the
|
|
18
22
|
complete one-to-one trace for the vendored active upstream WG17 syntax cases.
|
|
19
23
|
[STC-DRAFT-STATUS.md](STC-DRAFT-STATUS.md) separately tracks executable
|
package/test/run-iso-strict.mjs
CHANGED
|
@@ -28,6 +28,50 @@ export function runIsoStrict(reporter = new TestReporter()) {
|
|
|
28
28
|
equal(result.stdout, 'p(1).\n', 'stdout');
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
reporter.test('pins behavior-changing Technical Corrigendum 1 corrections', () => {
|
|
32
|
+
equal(run('', { isoStrict: true, goal: 'X is sqrt(0), X =:= 0.0' }).stats.completed_goal_lists,
|
|
33
|
+
1, 'non-negative square-root boundary');
|
|
34
|
+
equal(run('', {
|
|
35
|
+
isoStrict: true,
|
|
36
|
+
goal: "atom_chars('North',['N'|Tail]), Tail == [o,r,t,h]",
|
|
37
|
+
}).stats.completed_goal_lists, 1, 'atom_chars/2 accepts a supplied list prefix');
|
|
38
|
+
equal(run('', {
|
|
39
|
+
isoStrict: true,
|
|
40
|
+
goal: "atom_codes('North',[78|Tail]), Tail == [111,114,116,104]",
|
|
41
|
+
}).stats.completed_goal_lists, 1, 'atom_codes/2 accepts a supplied list prefix');
|
|
42
|
+
|
|
43
|
+
const source = [
|
|
44
|
+
':- dynamic(p/1).',
|
|
45
|
+
'p(a).',
|
|
46
|
+
'p(b).',
|
|
47
|
+
':- op(500, xfy, likes).',
|
|
48
|
+
':- set_prolog_flag(double_quotes, atom).',
|
|
49
|
+
'double_quote_operator :- (alice "likes" bob) = likes(alice,bob).',
|
|
50
|
+
'',
|
|
51
|
+
].join('\n');
|
|
52
|
+
equal(run(source, { isoStrict: true, goal: 'clause(p(X),true), X == a' }).stats.completed_goal_lists,
|
|
53
|
+
1, 'clause/2 unifies the selected clause');
|
|
54
|
+
equal(run(source, { isoStrict: true, goal: 'current_op(500,xfy,likes)' }).stats.completed_goal_lists,
|
|
55
|
+
1, 'current_op/3 unifies the selected operator');
|
|
56
|
+
equal(run(source, { isoStrict: true, goal: 'double_quote_operator' }).stats.completed_goal_lists,
|
|
57
|
+
1, 'double-quoted atom receives its operator priority');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
reporter.test('pins behavior-changing Technical Corrigendum 3 corrections', () => {
|
|
61
|
+
const trailingLayout = Program.parse('p.\n % trailing layout is a complete Prolog text\n', {
|
|
62
|
+
isoStrict: true,
|
|
63
|
+
});
|
|
64
|
+
equal(Boolean(trailingLayout.findGroup('p', 0)), true, 'optional final layout text');
|
|
65
|
+
|
|
66
|
+
const written = run('', {
|
|
67
|
+
isoStrict: true,
|
|
68
|
+
goal: "write_term(pair(X,X),[variable_names(['Named'=X])])",
|
|
69
|
+
});
|
|
70
|
+
includes(written.stdout, 'pair(Named,Named)', 'write variable_names/1');
|
|
71
|
+
equal(capture(() => run('', { isoStrict: true, goal: 'X is 2^(-1)' })).formal,
|
|
72
|
+
'type_error(float)', 'negative integer exponent correction');
|
|
73
|
+
});
|
|
74
|
+
|
|
31
75
|
reporter.test('keeps Corrigendum 2 core predicates and excludes Part 3 phrase', () => {
|
|
32
76
|
const registry = createStrictIsoRegistry();
|
|
33
77
|
equal(Boolean(registry.get('subsumes_term', 2)), true, 'subsumes_term/2');
|
package/test/run-regression.mjs
CHANGED
|
@@ -5285,6 +5285,34 @@ ${profile}`;
|
|
|
5285
5285
|
assertIncludes(arithmetic, '`float_integer_part/1`, `float_fractional_part/1`', 'float-only conversion row');
|
|
5286
5286
|
},
|
|
5287
5287
|
},
|
|
5288
|
+
{
|
|
5289
|
+
name: 'published ISO Corrigenda have a complete stable audit inventory',
|
|
5290
|
+
run: () => {
|
|
5291
|
+
const compliance = fs.readFileSync(path.join(testRoot, 'conformance', 'ISO-COMPLIANCE.md'), 'utf8');
|
|
5292
|
+
const matrix = fs.readFileSync(path.join(testRoot, 'conformance', 'ISO-CORRIGENDA-MATRIX.md'), 'utf8');
|
|
5293
|
+
const expected = [
|
|
5294
|
+
...Array.from({ length: 18 }, (_, index) => `C1-${String(index + 1).padStart(2, '0')}`),
|
|
5295
|
+
...Array.from({ length: 23 }, (_, index) => `C2-${String(index + 1).padStart(2, '0')}`),
|
|
5296
|
+
...Array.from({ length: 19 }, (_, index) => `C3-${String(index + 1).padStart(2, '0')}`),
|
|
5297
|
+
];
|
|
5298
|
+
const rows = matrix.split('\n')
|
|
5299
|
+
.filter((line) => /^\| C[123]-\d\d \|/.test(line))
|
|
5300
|
+
.map((line) => line.split('|').slice(1, -1).map((cell) => cell.trim()));
|
|
5301
|
+
assertEqual(rows.map(([id]) => id).join(','), expected.join(','), 'Corrigenda stable audit IDs');
|
|
5302
|
+
for (const [id, clauses, disposition, evidence] of rows) {
|
|
5303
|
+
assertEqual(Boolean(clauses), true, `${id} clause/amendment cluster`);
|
|
5304
|
+
assertEqual(['covered', 'editorial', 'superseded'].includes(disposition), true, `${id} disposition`);
|
|
5305
|
+
assertEqual(Boolean(evidence), true, `${id} evidence`);
|
|
5306
|
+
if (disposition === 'covered') {
|
|
5307
|
+
assertEqual(/test|WG17|strict|case/i.test(evidence), true, `${id} executable evidence`);
|
|
5308
|
+
}
|
|
5309
|
+
}
|
|
5310
|
+
assertIncludes(compliance, '[ISO-CORRIGENDA-MATRIX.md](ISO-CORRIGENDA-MATRIX.md)', 'Corrigenda matrix link');
|
|
5311
|
+
for (const corrigendum of ['Corrigendum 1', 'Corrigendum 2', 'Corrigendum 3']) {
|
|
5312
|
+
assertIncludes(compliance, `| ${corrigendum} | covered |`, `${corrigendum} covered row`);
|
|
5313
|
+
}
|
|
5314
|
+
},
|
|
5315
|
+
},
|
|
5288
5316
|
{
|
|
5289
5317
|
name: 'ISO 7.4-7.8 execution matrix is closed',
|
|
5290
5318
|
run: () => {
|
|
@@ -5313,6 +5341,16 @@ ${profile}`;
|
|
|
5313
5341
|
]) assertIncludes(compliance, row, row);
|
|
5314
5342
|
assertIncludes(processor, '## Clause 6 syntax-preservation closure', 'Clause 6 closure map');
|
|
5315
5343
|
assertIncludes(processor, '| 5.5.1 syntax extensions preserve standard token/text meaning | covered |', '5.5.1 covered');
|
|
5344
|
+
|
|
5345
|
+
const boundary = compliance.slice(
|
|
5346
|
+
compliance.indexOf('## Strict-core boundary'),
|
|
5347
|
+
compliance.indexOf('## Release gate'),
|
|
5348
|
+
);
|
|
5349
|
+
assertIncludes(boundary, '`wfs_truth/2`', 'strict boundary includes wfs_truth/2');
|
|
5350
|
+
assertIncludes(boundary, 'integer digit separators', 'strict boundary includes digit separators');
|
|
5351
|
+
assertIncludes(boundary, '`"text"||Tail`', 'strict boundary includes double-bar list splicing');
|
|
5352
|
+
assertEqual((boundary.match(/`tnot\/1`/g) ?? []).length, 1, 'strict boundary lists tnot/1 once');
|
|
5353
|
+
assertEqual(compliance.includes('`stringTerm/1` term type'), false, 'JavaScript stringTerm uses call notation');
|
|
5316
5354
|
},
|
|
5317
5355
|
},
|
|
5318
5356
|
{
|
|
@@ -5325,7 +5363,7 @@ ${profile}`;
|
|
|
5325
5363
|
'| Clause 7 semantic requirements have explicit dispositions | covered |',
|
|
5326
5364
|
'| Clause 8 built-in modes/errors have explicit dispositions | covered |',
|
|
5327
5365
|
'| Clause 9 evaluable-functor requirements have explicit dispositions | covered |',
|
|
5328
|
-
'|
|
|
5366
|
+
'| Externally sourced syntax corpus is an offline release gate | covered |',
|
|
5329
5367
|
'| No unexplained deviation remains in the release-facing ledger | covered |',
|
|
5330
5368
|
]) assertIncludes(exit, item, item);
|
|
5331
5369
|
assertNotIncludes(exit, '| audit |', 'no release-facing audit rows remain');
|