eyeprolog 1.5.17 → 1.5.18
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
CHANGED
package/test/run-regression.mjs
CHANGED
|
@@ -4797,18 +4797,28 @@ function documentationSyncCases() {
|
|
|
4797
4797
|
|
|
4798
4798
|
const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyeprolog.md'), 'utf8');
|
|
4799
4799
|
const section = between(book, '<!-- eyeprolog-predicate-reference:start -->', '<!-- eyeprolog-predicate-reference:end -->');
|
|
4800
|
-
assertEqual(section.split('\n').some((line) => line.trimStart().startsWith('|')), false, 'predicate reference avoids
|
|
4801
|
-
assertEqual((section.match(/^- \*\*`/gm) ?? []).length, 518, 'one
|
|
4802
|
-
assertEqual((section.match(/<a id="predicate-reference-\d{4}"><\/a>/g) ?? []).length, 518, 'one explicit
|
|
4800
|
+
assertEqual(section.split('\n').some((line) => line.trimStart().startsWith('|')), false, 'predicate reference avoids wide table markup');
|
|
4801
|
+
assertEqual((section.match(/^- \*\*`/gm) ?? []).length, 518, 'one reference entry per predicate');
|
|
4802
|
+
assertEqual((section.match(/<a id="predicate-reference-\d{4}"><\/a>/g) ?? []).length, 518, 'one explicit anchor per predicate');
|
|
4803
4803
|
assertEqual((section.match(/\]\(#predicate-reference-\d{4}\)/g) ?? []).length, 518, 'one direct index link per predicate');
|
|
4804
4804
|
assertNotIncludes(section, '[Symbols](#predicate-reference-symbols)', 'predicate index does not rely on renderer-generated group anchors');
|
|
4805
|
-
assertIncludes(section, 'stable numeric IDs instead of relying on Markdown heading-slug rules', 'renderer-independent predicate anchors');
|
|
4806
|
-
assertIncludes(section, 'wrap naturally on narrow screens without horizontal scrolling', 'responsive predicate reference layout');
|
|
4807
4805
|
|
|
4808
4806
|
const chapter = between(book, '## 39. Predicate reference', '## 40. Running EyeProlog: command line and corpus');
|
|
4809
|
-
assertEqual(chapter.split('\n').some((line) => line.trimStart().startsWith('|')), false, 'Chapter 39
|
|
4807
|
+
assertEqual(chapter.split('\n').some((line) => line.trimStart().startsWith('|')), false, 'Chapter 39 avoids wide table markup');
|
|
4808
|
+
for (const backstage of [
|
|
4809
|
+
'stacked layout',
|
|
4810
|
+
'Markdown tables',
|
|
4811
|
+
'horizontal scrollbars',
|
|
4812
|
+
'horizontal scrolling',
|
|
4813
|
+
'documentation test',
|
|
4814
|
+
'documentation regression',
|
|
4815
|
+
'stable numeric IDs',
|
|
4816
|
+
'generated reference',
|
|
4817
|
+
'Read the chapter in that order',
|
|
4818
|
+
'final generated section',
|
|
4819
|
+
]) assertNotIncludes(chapter, backstage, `Chapter 39 avoids editorial/process prose: ${backstage}`);
|
|
4810
4820
|
const orderedHeadings = [
|
|
4811
|
-
'###
|
|
4821
|
+
'### Notation and conventions',
|
|
4812
4822
|
'### Core registry',
|
|
4813
4823
|
'### Normal-mode extensions',
|
|
4814
4824
|
'### Bundled libraries',
|
|
@@ -4825,6 +4835,35 @@ function documentationSyncCases() {
|
|
|
4825
4835
|
}
|
|
4826
4836
|
},
|
|
4827
4837
|
},
|
|
4838
|
+
{
|
|
4839
|
+
name: 'book keeps editorial and build mechanics out of reader-facing prose',
|
|
4840
|
+
run: () => {
|
|
4841
|
+
const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyeprolog.md'), 'utf8');
|
|
4842
|
+
for (const backstage of [
|
|
4843
|
+
'stacked layout',
|
|
4844
|
+
'Markdown tables',
|
|
4845
|
+
'horizontal scrollbars',
|
|
4846
|
+
'horizontal scrolling',
|
|
4847
|
+
'documentation test',
|
|
4848
|
+
'documentation regression',
|
|
4849
|
+
'stable numeric IDs',
|
|
4850
|
+
'generated reference',
|
|
4851
|
+
'final generated section',
|
|
4852
|
+
'Read the chapter in that order',
|
|
4853
|
+
'after editing the book',
|
|
4854
|
+
'should be rebuilt with `npm run generate`',
|
|
4855
|
+
'Keeping these details here',
|
|
4856
|
+
'# Part XII — Development note',
|
|
4857
|
+
'## 46. AI-assisted editing',
|
|
4858
|
+
'release gate',
|
|
4859
|
+
'release-facing',
|
|
4860
|
+
'# Refresh the vendored TU Wien WG17 inventory',
|
|
4861
|
+
'the tables in this chapter',
|
|
4862
|
+
'The generated [`examples/book/`',
|
|
4863
|
+
]) assertNotIncludes(book, backstage, `book avoids backstage prose: ${backstage}`);
|
|
4864
|
+
assertIncludes(book, 'Chapters are numbered continuously across eleven parts, from Chapter 1 to Chapter 45.', 'reader-facing chapter count');
|
|
4865
|
+
},
|
|
4866
|
+
},
|
|
4828
4867
|
{
|
|
4829
4868
|
name: 'reference docs match explicit tabling and current runtime extensions',
|
|
4830
4869
|
run: () => {
|
|
@@ -4844,7 +4883,7 @@ ${profile}`;
|
|
|
4844
4883
|
assertIncludes(book, 'including recursive calls, use depth-first resolution unless the source', 'ordinary recursion is depth-first');
|
|
4845
4884
|
assertIncludes(book, 'explicitly declares `:- table p/n.`', 'tabling is explicit');
|
|
4846
4885
|
assertIncludes(book, 'The autoload index covers every', 'generic bundled-library autoload');
|
|
4847
|
-
assertIncludes(book, 'interactive top-level query
|
|
4886
|
+
assertIncludes(book, 'interactive top-level query autoloads its canonical bundled provider', 'REPL autoload');
|
|
4848
4887
|
assertIncludes(book, 'Autoloading therefore supplies', 'autoload syntax boundary');
|
|
4849
4888
|
assertIncludes(book, 'Residual constraints are part of the displayed answer even when', 'top-level hidden residuals');
|
|
4850
4889
|
assertIncludes(book, 'EyeProlog normal mode also accepts `:+`', 'Eyelet forward-rule extension');
|
package/the-art-of-eyeprolog.md
CHANGED
|
@@ -17,8 +17,7 @@ the two.
|
|
|
17
17
|
This book is also the reference for the EyeProlog implementation. EyeProlog is a
|
|
18
18
|
standards-based reasoning system: programs use the documented and tested ISO
|
|
19
19
|
Prolog profile.
|
|
20
|
-
Chapters 38–40 define the supported ISO Prolog profile,
|
|
21
|
-
needed to use those details correctly.
|
|
20
|
+
Chapters 38–40 define the supported ISO Prolog profile, predicate surface, libraries, and execution interface. Chapter 39 describes every supported built-in and library predicate, with compact contracts for all **518 distinct predicate indicators** in the normal EyeProlog surface; Chapter 40 documents command-line execution. The explanatory chapters give the reasoning and operational context needed to use those details correctly.
|
|
22
21
|
|
|
23
22
|
Its subject is not syntax alone. A logic program has two inseparable aspects:
|
|
24
23
|
the relation described by its clauses and the procedure induced when goals are
|
|
@@ -114,14 +113,12 @@ require their documented host environment.
|
|
|
114
113
|
|
|
115
114
|
The best way to read is beside a running interpreter. Before each run, predict
|
|
116
115
|
the answer; after it, change one fact or query and explain the difference.
|
|
117
|
-
Use `npm run generate` after editing the book to refresh the extracted
|
|
118
|
-
`examples/book/` files.
|
|
119
116
|
|
|
120
117
|
### Reading conventions
|
|
121
118
|
|
|
122
119
|
Code displays serve three different purposes:
|
|
123
120
|
|
|
124
|
-
- an `eyeprolog` block is Prolog source accepted by EyeProlog; complete blocks
|
|
121
|
+
- an `eyeprolog` block is Prolog source accepted by EyeProlog; complete blocks also appear under
|
|
125
122
|
`examples/book/`, although a short block may rely on facts introduced in the
|
|
126
123
|
surrounding chapter;
|
|
127
124
|
- a `text` block shows output, a trace, a data shape, or pseudocode and is not
|
|
@@ -130,8 +127,8 @@ Code displays serve three different purposes:
|
|
|
130
127
|
|
|
131
128
|
Top-level programs under [`examples/`](https://github.com/eyereasoner/eyeprolog/tree/main/examples/) are the complete runnable
|
|
132
129
|
cases. Their exact outputs live under `examples/output/`; selected proof
|
|
133
|
-
outputs live under `examples/proof/`. Use
|
|
134
|
-
|
|
130
|
+
outputs live under `examples/proof/`. Use `examples/book/` to copy a particular
|
|
131
|
+
display and the top-level corpus for end-to-end experiments.
|
|
135
132
|
|
|
136
133
|
### The promise of this book
|
|
137
134
|
|
|
@@ -152,10 +149,7 @@ tricks. By the end, a reader should be able to:
|
|
|
152
149
|
That is the stake in the ground: a focused implementation of standard Prolog
|
|
153
150
|
is enough to teach the large ideas when semantics, execution, and evidence
|
|
154
151
|
remain visible together.
|
|
155
|
-
The implementation is therefore part of the argument
|
|
156
|
-
programs, the reference chapters are the reference for the running system, and
|
|
157
|
-
`npm test` checks the complete code displays, local references, and
|
|
158
|
-
built-in index against the source tree.
|
|
152
|
+
The implementation is therefore part of the argument: the examples are executable programs, the reference chapters describe the running system, and proof terms remain available for inspection.
|
|
159
153
|
|
|
160
154
|
### A working discipline
|
|
161
155
|
|
|
@@ -242,8 +236,7 @@ making a relationship visible that prose alone would make easy to miss.
|
|
|
242
236
|
|
|
243
237
|
## Contents
|
|
244
238
|
|
|
245
|
-
Chapters are numbered continuously across
|
|
246
|
-
Chapter 46.
|
|
239
|
+
Chapters are numbered continuously across eleven parts, from Chapter 1 to Chapter 45.
|
|
247
240
|
|
|
248
241
|
### Part I — Relations
|
|
249
242
|
|
|
@@ -345,12 +338,6 @@ Chapter 45
|
|
|
345
338
|
|
|
346
339
|
- [45. Checkpoint notes and selected answers](#45-checkpoint-notes-and-selected-answers)
|
|
347
340
|
|
|
348
|
-
### Part XII — Development note
|
|
349
|
-
|
|
350
|
-
Chapter 46
|
|
351
|
-
|
|
352
|
-
- [46. AI-assisted editing](#46-ai-assisted-editing)
|
|
353
|
-
|
|
354
341
|
---
|
|
355
342
|
|
|
356
343
|
# Part I — Relations
|
|
@@ -4351,9 +4338,7 @@ Before trusting an EyeProlog conclusion, ask:
|
|
|
4351
4338
|
9. What counterexample would overturn the model?
|
|
4352
4339
|
10. Can the result be reconstructed under the same source and theory version?
|
|
4353
4340
|
|
|
4354
|
-
That ritual
|
|
4355
|
-
question. Let the machine search. Inspect the witness. Challenge the premises.
|
|
4356
|
-
Preserve the proof.
|
|
4341
|
+
That ritual captures the discipline. State a small theory. Ask a precise question. Let the machine search. Inspect the witness. Challenge the premises. Preserve the proof.
|
|
4357
4342
|
|
|
4358
4343
|
**Exercises.**
|
|
4359
4344
|
|
|
@@ -4428,8 +4413,7 @@ state a claim precisely, derive consequences, seek counterexamples, measure the
|
|
|
4428
4413
|
computation, and preserve enough evidence for another person to repeat the
|
|
4429
4414
|
work.
|
|
4430
4415
|
|
|
4431
|
-
|
|
4432
|
-
language feature. It shows how to make theories survive change.
|
|
4416
|
+
The reasoning laboratory turns these ideas into a daily discipline. It adds no new language feature; it shows how to make theories survive change.
|
|
4433
4417
|
|
|
4434
4418
|
## 31. Testing a theory
|
|
4435
4419
|
|
|
@@ -4873,7 +4857,7 @@ choice, repaired invariant, and test that would fail if the defect returned.
|
|
|
4873
4857
|
|
|
4874
4858
|
A pattern is not a copied code fragment. It is a recurring arrangement of
|
|
4875
4859
|
meaning, representation, and control that solves a named design problem. The
|
|
4876
|
-
following patterns summarize
|
|
4860
|
+
following patterns summarize recurring constructions that are especially useful in practice.
|
|
4877
4861
|
|
|
4878
4862
|
<figure>
|
|
4879
4863
|
<img src="book-assets/pattern-selection-map.svg" alt="Six recurring design symptoms point to patterns for meaning, tabling, closed boundaries, finite search, proof-carrying answers, and canonical representation.">
|
|
@@ -5916,21 +5900,11 @@ Queries for predicates with no group follow the known groups.
|
|
|
5916
5900
|
|
|
5917
5901
|
## 39. Predicate reference
|
|
5918
5902
|
|
|
5919
|
-
|
|
5920
|
-
reference. The surface has two layers: **129 core registry indicators** and
|
|
5921
|
-
**389 distinct non-ISO library or normal-extension indicators**. Because
|
|
5922
|
-
`phrase/2` and `phrase/3` occur in both layers, their union contains **518
|
|
5923
|
-
distinct predicate indicators**.
|
|
5903
|
+
EyeProlog's normal predicate surface has two layers: **129 core registry indicators** and **389 distinct non-ISO library or normal-extension indicators**. Because `phrase/2` and `phrase/3` occur in both layers, their union contains **518 distinct predicate indicators**.
|
|
5924
5904
|
|
|
5925
|
-
|
|
5926
|
-
the language-level operations available without a library import. The bundled
|
|
5927
|
-
library layer then adds reusable relations, followed by the portability and
|
|
5928
|
-
implementation boundaries that explain how those libraries behave across
|
|
5929
|
-
EyeProlog, Trealla, and Scryer. The final generated section is deliberately a
|
|
5930
|
-
lookup index: it gives one compact contract and one stable link for every one of
|
|
5931
|
-
the 518 indicators without interrupting the explanatory flow above it.
|
|
5905
|
+
Core predicates are available without a library import. Bundled libraries add reusable relations for collections, constraints, graphs, text, time, cryptography, files, and other domains. Interoperability notes identify the subset shared with Trealla and Scryer, and the complete alphabetical reference gives one compact contract for every indicator.
|
|
5932
5906
|
|
|
5933
|
-
###
|
|
5907
|
+
### Notation and conventions
|
|
5934
5908
|
|
|
5935
5909
|
The call patterns below use `+` for an argument that must be sufficiently
|
|
5936
5910
|
instantiated, `-` for a result normally produced by the call, and `?` for an
|
|
@@ -5948,12 +5922,6 @@ indicator, EyeProlog uses the source clauses. `false/0` is stricter still and is
|
|
|
5948
5922
|
rejected as a source-clause head. Portable programs should avoid every such
|
|
5949
5923
|
collision because other Prolog systems commonly reject it while loading.
|
|
5950
5924
|
|
|
5951
|
-
Reference material in this chapter uses a single stacked layout instead of wide
|
|
5952
|
-
Markdown tables. A bold term introduces one predicate, role, flag, error form,
|
|
5953
|
-
or module; the explanation follows on the same item and wraps normally on narrow
|
|
5954
|
-
screens. This keeps the reference usable on phones and avoids horizontal
|
|
5955
|
-
scrollbars while preserving copyable predicate indicators.
|
|
5956
|
-
|
|
5957
5925
|
### Core registry
|
|
5958
5926
|
|
|
5959
5927
|
EyeProlog's default registry contains the built-ins in its ISO compatibility
|
|
@@ -6168,11 +6136,7 @@ non-BMP character. Trailing layout, comments, and other material are rejected;
|
|
|
6168
6136
|
bound integers are converted to their canonical decimal spelling, and
|
|
6169
6137
|
non-finite values are rejected. Equivalent spellings of the same numeric type
|
|
6170
6138
|
compare by value, preserving the standard conversion round trip, while integer
|
|
6171
|
-
and floating-point terms remain distinct. The
|
|
6172
|
-
regression gate vendors all 74 numbered cases from Ulrich Neumerkel's contemporary
|
|
6173
|
-
`number_chars/2` comparison, including the Cor.2 error-precedence cases;
|
|
6174
|
-
`number_codes/2` shares the same numeric parser and has mirrored coverage for
|
|
6175
|
-
the recent numeric-syntax regressions.
|
|
6139
|
+
and floating-point terms remain distinct. The numeric conversion behavior follows the 74 numbered cases in Ulrich Neumerkel's contemporary `number_chars/2` comparison, including the Corrigendum 2 error-precedence cases; `number_codes/2` uses the same numeric parser.
|
|
6176
6140
|
|
|
6177
6141
|
#### Streams and unit I/O
|
|
6178
6142
|
|
|
@@ -6340,19 +6304,12 @@ only the modules it needs, and
|
|
|
6340
6304
|
module exposes p.p.1 through p.p.11 of the
|
|
6341
6305
|
[working-draft Prologue](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/prologue),
|
|
6342
6306
|
as a compatibility facade over the canonical `lists`, `between`, `iso_ext`,
|
|
6343
|
-
and `freeze` modules.
|
|
6344
|
-
quads are retained as offline regressions. `src/standard-library.js` registers the module sources and explicit module-owned
|
|
6345
|
-
host adapters. For example, attributed-variable support lives in
|
|
6307
|
+
and `freeze` modules. `src/standard-library.js` registers the module sources and explicit module-owned host adapters. For example, attributed-variable support lives in
|
|
6346
6308
|
`src/atts-host.js`, while cryptographic primitives live in `src/crypto-host.js`. Whenever `src/lib/foo.pl` needs a private runtime primitive, that
|
|
6347
6309
|
primitive is registered from `src/foo-host.js`; pure Prolog libraries deliberately
|
|
6348
6310
|
have no host file. This keeps character I/O, filesystem access, crypto, timing,
|
|
6349
6311
|
attributed-variable support, and other runtime bridges with the module that owns
|
|
6350
|
-
their public semantics instead of in a compatibility grab bag.
|
|
6351
|
-
enforce this ownership and reject the retired `library-host.js` and
|
|
6352
|
-
`scryer-compat.js`. Explicit `use_module/1-2`
|
|
6353
|
-
loads remain supported; outside strict ISO mode, the bundled-library autoloader
|
|
6354
|
-
may also load the canonical owner of any exported `src/lib/` predicate. The
|
|
6355
|
-
autoload index is generated from the libraries' `module/2` declarations.
|
|
6312
|
+
their public semantics instead of in a compatibility grab bag. Private runtime adapters remain owned by the module whose public semantics they support; no shared compatibility grab bag participates in library execution. Explicit `use_module/1-2` loads remain supported; outside strict ISO mode, the bundled-library autoloader may also load the canonical owner of any exported `src/lib/` predicate.
|
|
6356
6313
|
The core registry remains available through `createDefaultRegistry()` and
|
|
6357
6314
|
`getDefaultRegistry()` for low-level embedding. The stricter Part 1 +
|
|
6358
6315
|
Corrigenda registry is exposed as `createStrictIsoRegistry()` and
|
|
@@ -6710,9 +6667,9 @@ extension_answer(same_shape, true) :-
|
|
|
6710
6667
|
EyeProlog keeps four related concepts separate:
|
|
6711
6668
|
|
|
6712
6669
|
- ****ISO core**** — The documented ISO predicate profile built into the processor. No EyeProlog library import is involved.
|
|
6713
|
-
- ****EyeProlog library surface**** — Every module and exported predicate
|
|
6670
|
+
- ****EyeProlog library surface**** — Every public module and exported predicate in the bundled library layer. Programs normally access these with `use_module/1-2`.
|
|
6714
6671
|
- ****Interoperability profile**** — A deliberately smaller set of library names and predicate interfaces that EyeProlog intends to keep source-compatible with Trealla and Scryer where practical.
|
|
6715
|
-
- ****Autoload
|
|
6672
|
+
- ****Autoload surface**** — Every bundled predicate with one canonical provider per unambiguous indicator.
|
|
6716
6673
|
|
|
6717
6674
|
These layers answer different questions. A predicate may be implemented entirely
|
|
6718
6675
|
as ordinary Prolog and still be outside the cross-processor interoperability
|
|
@@ -6728,16 +6685,7 @@ follows Scryer's module name so explicit Scryer-style imports remain available.
|
|
|
6728
6685
|
That interoperability profile currently spans 26 modules and is intentionally
|
|
6729
6686
|
narrower than either implementation's union of exports; EyeProlog's explicit-state
|
|
6730
6687
|
`random/3` and `uuid/3`, for example, remain useful extensions rather than shared
|
|
6731
|
-
interfaces. Separately, all 32 bundled EyeProlog modules whose basenames overlap
|
|
6732
|
-
Scryer's current `src/lib/` tree are checked against the frozen export snapshot in
|
|
6733
|
-
`test/scryer-library-exports.json` and cover the corresponding Scryer public
|
|
6734
|
-
predicate surface. The same structural check is now applied to Trealla: the 26
|
|
6735
|
-
bundled modules that have public-module counterparts in Trealla `library/` cover
|
|
6736
|
-
Trealla's exported predicates at pinned upstream commit
|
|
6737
|
-
`f7a93bd521c07a4841f5123348111dd005918c89`, recorded in
|
|
6738
|
-
`test/trealla-library-exports.json`. This is module-overlap coverage, not a claim
|
|
6739
|
-
that EyeProlog bundles Trealla's native host libraries such as `curl`, `gsl`,
|
|
6740
|
-
`janus`, `raylib`, `socket`, or `sqlite3`.
|
|
6688
|
+
interfaces. Separately, all 32 bundled EyeProlog modules whose basenames overlap Scryer's current `src/lib/` tree cover the corresponding Scryer public predicate surface. The 26 bundled modules that have public-module counterparts in Trealla `library/` cover Trealla's exported predicates at pinned upstream commit `f7a93bd521c07a4841f5123348111dd005918c89`. This is module-overlap coverage, not a claim that EyeProlog bundles Trealla's native host libraries such as `curl`, `gsl`, `janus`, `raylib`, `socket`, or `sqlite3`.
|
|
6741
6689
|
|
|
6742
6690
|
Source reuse is preferred over translation. `clpb.pl`, `ordsets.pl`,
|
|
6743
6691
|
`reif.pl`, and `ugraphs.pl` retain the upstream Prolog algorithms and license
|
|
@@ -6760,7 +6708,7 @@ parallel scheduling behavior. The
|
|
|
6760
6708
|
[portable library overlap example](https://github.com/eyereasoner/eyeprolog/blob/main/examples/portable-library-overlap.pl)
|
|
6761
6709
|
composes Boolean constraints, ordered sets, graphs, reification, delayed goals,
|
|
6762
6710
|
generated names, character conversion, transposition, and explicit table
|
|
6763
|
-
syntax in one
|
|
6711
|
+
syntax in one runnable program.
|
|
6764
6712
|
|
|
6765
6713
|
Two matching upstream basenames are intentionally not exposed as portable
|
|
6766
6714
|
libraries. The two `builtins.pl` files are private engine facades and have no
|
|
@@ -6853,12 +6801,7 @@ too few parameters raises `existence_error(lambda_parameter, ...)`. EyeProlog
|
|
|
6853
6801
|
uses its ISO `copy_term/2` implementation for the fresh-copy step and does not
|
|
6854
6802
|
require a separate `copy_term_nat/2` predicate.
|
|
6855
6803
|
|
|
6856
|
-
Autoloading is a convenience layered on top of the module system and is
|
|
6857
|
-
independent of the smaller interoperability profile. At build time EyeProlog
|
|
6858
|
-
uses a generated index derived from every bundled `src/lib/*.pl` `module/2`
|
|
6859
|
-
export list. An otherwise unresolved predicate in source, initialization code, an explicit
|
|
6860
|
-
CLI/API goal, or an interactive top-level query therefore autoloads its canonical
|
|
6861
|
-
bundled provider.
|
|
6804
|
+
Autoloading is a convenience layered on top of the module system and is independent of the smaller interoperability profile. An otherwise unresolved predicate in source, initialization code, an explicit CLI/API goal, or an interactive top-level query autoloads its canonical bundled provider.
|
|
6862
6805
|
For example:
|
|
6863
6806
|
|
|
6864
6807
|
- **`member/2`** — `library(lists)`
|
|
@@ -6871,9 +6814,7 @@ The resolution order is deliberately conservative with respect to Prolog
|
|
|
6871
6814
|
semantics: a predicate already defined by the program wins; ISO/standard
|
|
6872
6815
|
built-ins are not replaced by an autoloaded library; an explicit module import
|
|
6873
6816
|
wins over autoloading; only then is the bundled autoload index consulted.
|
|
6874
|
-
Facade modules such as `library(prologue)` may re-export predicates from focused
|
|
6875
|
-
modules; the generated index chooses the unique module that actually defines
|
|
6876
|
-
the predicate. If more than one bundled module genuinely defines the same
|
|
6817
|
+
Facade modules such as `library(prologue)` may re-export predicates from focused modules; autoload resolution chooses the unique module that actually defines the predicate. If more than one bundled module genuinely defines the same
|
|
6877
6818
|
export, EyeProlog reports an import ambiguity and requires explicit
|
|
6878
6819
|
`use_module/1-2` rather than guessing. The interactive top level applies this
|
|
6879
6820
|
same resolution after a query has been parsed. Autoloading therefore supplies
|
|
@@ -6881,11 +6822,7 @@ predicates, not retroactive syntax: a library that introduces operators (for
|
|
|
6881
6822
|
example `library(clpz)` and `ins`) must still be explicitly imported before a
|
|
6882
6823
|
query or source term uses those operators.
|
|
6883
6824
|
|
|
6884
|
-
|
|
6885
|
-
`src/library-autoload-index.js`, and the documentation regression suite checks
|
|
6886
|
-
that it is synchronized with the current `src/lib/` sources. Explicit imports
|
|
6887
|
-
remain the clearest way to state dependencies when portability or module intent
|
|
6888
|
-
should be visible in the source:
|
|
6825
|
+
Explicit imports remain the clearest way to state dependencies when portability or module intent should be visible in the source:
|
|
6889
6826
|
|
|
6890
6827
|
```text
|
|
6891
6828
|
:- use_module(library(lists)).
|
|
@@ -6897,22 +6834,11 @@ library dependency should be explicit. `--iso-strict` always disables EyeProlog
|
|
|
6897
6834
|
library autoloading, so strict ISO execution never gains procedures from this
|
|
6898
6835
|
implementation convenience.
|
|
6899
6836
|
|
|
6900
|
-
`-w` / `--warnings` reports explicit dependencies on non-profile libraries and
|
|
6901
|
-
calls to non-profile predicates from otherwise common modules. `--portable`
|
|
6902
|
-
turns those diagnostics into a failing run, making the conservative profile
|
|
6903
|
-
suitable for continuous integration. `npm run test:interop` executes the same
|
|
6904
|
-
portable Towers of Hanoi source under EyeProlog, Trealla, and Scryer when those commands
|
|
6905
|
-
are installed. Because those are external runtimes, the default `npm test`
|
|
6906
|
-
instead validates all four generated OpenRuleBench source trees and their
|
|
6907
|
-
engine-specific tabling and WFS adaptations without requiring them. The fast
|
|
6908
|
-
structural check is also available directly as `npm run test:openrulebench`.
|
|
6837
|
+
`-w` / `--warnings` reports explicit dependencies on non-profile libraries and calls to non-profile predicates from otherwise common modules. `--portable` turns those diagnostics into a failing run, making the conservative profile suitable for continuous integration. Cross-engine portability can be exercised with `npm run test:interop` when EyeProlog, Trealla, and Scryer are installed.
|
|
6909
6838
|
|
|
6910
6839
|
### Specialized library implementation notes
|
|
6911
6840
|
|
|
6912
|
-
|
|
6913
|
-
notes record implementation details and semantic boundaries that matter when a
|
|
6914
|
-
library uses attributed variables, delayed goals, host services, tabling, or
|
|
6915
|
-
mutable runtime state.
|
|
6841
|
+
Several libraries have implementation details and semantic boundaries that matter when they use attributed variables, delayed goals, host services, tabling, or mutable runtime state.
|
|
6916
6842
|
|
|
6917
6843
|
`freeze(?Term,:Goal)` runs `Goal` immediately when `Term` is already nonvariable;
|
|
6918
6844
|
otherwise it delays the goal until `Term` becomes nonvariable. Suspensions are
|
|
@@ -6942,9 +6868,7 @@ bindings make one aligned subterm pair sufficient. For example:
|
|
|
6942
6868
|
; A = B, dif(X, Y).
|
|
6943
6869
|
```
|
|
6944
6870
|
|
|
6945
|
-
The
|
|
6946
|
-
The following notes describe useful parts of that surface without extending the
|
|
6947
|
-
cross-engine claims made above.
|
|
6871
|
+
The following notes describe implementation-specific library behavior without extending the cross-engine compatibility claims.
|
|
6948
6872
|
|
|
6949
6873
|
`library(atts)` is the Prolog-facing attributed-variable layer over the persistent
|
|
6950
6874
|
annotated-variable machinery in `src/term.js`, with its small host bridge in
|
|
@@ -6953,9 +6877,7 @@ accepts `:- attribute ...` declarations, invokes module-local
|
|
|
6953
6877
|
`verify_attributes/3` before an attributed binding is committed, and schedules
|
|
6954
6878
|
the returned goals immediately after the binding. Attribute maps are copied only
|
|
6955
6879
|
when changed and therefore backtrack with `Env` branches; the interactive top
|
|
6956
|
-
level projects module `attribute_goals//1` hooks as residual goals.
|
|
6957
|
-
[`examples/attributed-variables.pl`](https://github.com/eyereasoner/eyeprolog/blob/main/examples/attributed-variables.pl)
|
|
6958
|
-
demonstrates binding verification and attribute transfer across aliases.
|
|
6880
|
+
level projects module `attribute_goals//1` hooks as residual goals. [`examples/attributed-variables.pl`](https://github.com/eyereasoner/eyeprolog/blob/main/examples/attributed-variables.pl) demonstrates binding verification and attribute transfer across aliases.
|
|
6959
6881
|
|
|
6960
6882
|
`library(clpz)` is Markus Triska's MIT-licensed Scryer Prolog implementation of
|
|
6961
6883
|
constraint logic programming over integers, bundled as `src/lib/clpz.pl`.
|
|
@@ -7023,15 +6945,13 @@ the common stateful generator used by `uuidv4/1`.
|
|
|
7023
6945
|
<!-- eyeprolog-predicate-reference:start -->
|
|
7024
6946
|
### Complete predicate indicator reference
|
|
7025
6947
|
|
|
7026
|
-
|
|
6948
|
+
The normal EyeProlog surface contains **518 distinct predicate indicators**: 129 core registry indicators plus 391 bundled-library indicators, with `phrase/2` and `phrase/3` present in both layers and therefore counted once.
|
|
7027
6949
|
|
|
7028
6950
|
Each entry is a compact contract. `+` marks a principal input, `-` a principal output, and `?` an argument that may be supplied or produced. These are documented operating modes rather than parser-enforced mode declarations. **Solutions** uses `det`, `semidet`, `multi`, `nondet`, `delayed`, `meta`, `mode-dependent`, `declaration`, or `terminal`; `meta` means the solution behavior depends materially on a called goal.
|
|
7029
6951
|
|
|
7030
|
-
The reference uses stacked entries instead of wide Markdown tables, so principal calls and contracts wrap naturally on narrow screens without horizontal scrolling. It is checked against the live core registry and every `src/lib/*.pl` export. Adding, removing, or renaming a predicate therefore makes the documentation test fail until its contract metadata is updated.
|
|
7031
|
-
|
|
7032
6952
|
#### Predicate index
|
|
7033
6953
|
|
|
7034
|
-
|
|
6954
|
+
Each indicator links directly to its contract.
|
|
7035
6955
|
|
|
7036
6956
|
**Symbols:** [`-->/2`](#predicate-reference-0001) · [`->/2`](#predicate-reference-0002) · [`,/3`](#predicate-reference-0003) · [`;/2`](#predicate-reference-0004) · [`;/3`](#predicate-reference-0005) · [`!/0`](#predicate-reference-0006) · [`.../2`](#predicate-reference-0007) · [`@</2`](#predicate-reference-0008) · [`@=</2`](#predicate-reference-0009) · [`@>/2`](#predicate-reference-0010) · [`@>=/2`](#predicate-reference-0011) · [`*/1`](#predicate-reference-0012) · [`\/1`](#predicate-reference-0013) · [`\/2`](#predicate-reference-0014) · [`\/3`](#predicate-reference-0015) · [`\/4`](#predicate-reference-0016) · [`\/5`](#predicate-reference-0017) · [`\/6`](#predicate-reference-0018) · [`\/7`](#predicate-reference-0019) · [`\/8`](#predicate-reference-0020) · [`\+/1`](#predicate-reference-0021) · [`\=/2`](#predicate-reference-0022) · [`\==/2`](#predicate-reference-0023) · [`#/\/2`](#predicate-reference-0024) · [`#\//2`](#predicate-reference-0025) · [`#\/1`](#predicate-reference-0026) · [`#\/2`](#predicate-reference-0027) · [`#\=/2`](#predicate-reference-0028) · [`#</2`](#predicate-reference-0029) · [`#</3`](#predicate-reference-0030) · [`#<==/2`](#predicate-reference-0031) · [`#<==>/2`](#predicate-reference-0032) · [`#=/2`](#predicate-reference-0033) · [`#=/3`](#predicate-reference-0034) · [`#=</2`](#predicate-reference-0035) · [`#==>/2`](#predicate-reference-0036) · [`#>/2`](#predicate-reference-0037) · [`#>=/2`](#predicate-reference-0038) · [`^/10`](#predicate-reference-0039) · [`^/3`](#predicate-reference-0040) · [`^/4`](#predicate-reference-0041) · [`^/5`](#predicate-reference-0042) · [`^/6`](#predicate-reference-0043) · [`^/7`](#predicate-reference-0044) · [`^/8`](#predicate-reference-0045) · [`^/9`](#predicate-reference-0046) · [`+\/2`](#predicate-reference-0047) · [`+\/3`](#predicate-reference-0048) · [`+\/4`](#predicate-reference-0049) · [`+\/5`](#predicate-reference-0050) · [`+\/6`](#predicate-reference-0051) · [`+\/7`](#predicate-reference-0052) · [`+\/8`](#predicate-reference-0053) · [`+\/9`](#predicate-reference-0054) · [`</2`](#predicate-reference-0055) · [`=:=/2`](#predicate-reference-0056) · [`=../2`](#predicate-reference-0057) · [`=/2`](#predicate-reference-0058) · [`=/3`](#predicate-reference-0059) · [`=\=/2`](#predicate-reference-0060) · [`=</2`](#predicate-reference-0061) · [`==/2`](#predicate-reference-0062) · [`>/2`](#predicate-reference-0063) · [`>=/2`](#predicate-reference-0064) · [`$-/1`](#predicate-reference-0065) · [`$/1`](#predicate-reference-0066)
|
|
7037
6957
|
|
|
@@ -9605,13 +9525,7 @@ and the chosen resource measure improves on the relevant scale case.
|
|
|
9605
9525
|
|
|
9606
9526
|
### The corpus as executable documentation
|
|
9607
9527
|
|
|
9608
|
-
The files under `examples/` pair readable programs with checked output under
|
|
9609
|
-
`examples/output/`. The conformance cases under `test/conformance/` focus on
|
|
9610
|
-
language behavior, including success, failure, errors, warnings, and file
|
|
9611
|
-
loading. Use an example to learn a modeling pattern and a conformance case to
|
|
9612
|
-
settle an exact processor question. `npm test` checks both along with the book's
|
|
9613
|
-
extracted programs; `npm run generate` refreshes those extracted examples after
|
|
9614
|
-
changing executable book blocks.
|
|
9528
|
+
The files under `examples/` pair readable programs with checked output under `examples/output/`. The conformance cases under `test/conformance/` focus on language behavior, including success, failure, errors, warnings, and file loading. Use an example to learn a modeling pattern and a conformance case to settle an exact processor question. Run `npm test` to execute the complete correctness corpus.
|
|
9615
9529
|
|
|
9616
9530
|
**Checkpoint.** Run one example with `--proof --stats`. Identify which bytes
|
|
9617
9531
|
belong to the reusable logical result, which describe this execution, and which
|
|
@@ -9700,16 +9614,10 @@ The [examples directory](https://github.com/eyereasoner/eyeprolog/tree/main/exam
|
|
|
9700
9614
|
top-level directory contains **224 self-contained runnable programs**. Every
|
|
9701
9615
|
source program has an exact answer file under
|
|
9702
9616
|
[examples/output](https://github.com/eyereasoner/eyeprolog/tree/main/examples/output/), and **61 selected programs** have a checked
|
|
9703
|
-
explanation under [examples/proof](https://github.com/eyereasoner/eyeprolog/tree/main/examples/proof/). The thematic
|
|
9617
|
+
explanation under [examples/proof](https://github.com/eyereasoner/eyeprolog/tree/main/examples/proof/). The thematic lists link every top-level program and open the program
|
|
9704
9618
|
itself rather than merely naming it.
|
|
9705
9619
|
|
|
9706
|
-
|
|
9707
|
-
purpose: it mirrors the complete inline EyeProlog displays chapter by chapter.
|
|
9708
|
-
Those files are checked for syntax, and displays containing queries are
|
|
9709
|
-
executed, but some teaching fragments deliberately depend on neighboring
|
|
9710
|
-
facts or helpers. Use the top-level catalog below when you want a self-contained
|
|
9711
|
-
program with a golden answer; use `examples/book/` when you want the exact
|
|
9712
|
-
display being discussed on a page.
|
|
9620
|
+
[`examples/book/`](https://github.com/eyereasoner/eyeprolog/tree/main/examples/book/) mirrors the inline EyeProlog displays chapter by chapter. Those files are checked for syntax, and displays containing queries are executed, but some teaching fragments deliberately depend on neighboring facts or helpers. Use the top-level examples when you want a self-contained program with a golden answer; use `examples/book/` when you want the exact display being discussed on a page.
|
|
9713
9621
|
|
|
9714
9622
|
For any named example, the three useful views are:
|
|
9715
9623
|
|
|
@@ -10161,11 +10069,7 @@ When adding an example:
|
|
|
10161
10069
|
6. include both a positive case and a meaningful boundary or failure case;
|
|
10162
10070
|
7. run the full corpus before treating the example as documentation.
|
|
10163
10071
|
|
|
10164
|
-
|
|
10165
|
-
the tables in this chapter link every top-level program under `examples/`. The
|
|
10166
|
-
thematic tables remain the recommended reading routes; the final alphabetical
|
|
10167
|
-
table completes the index. Apply the same reading discipline to every example—
|
|
10168
|
-
sentence, mode, finite domain, answer, proof, and revision.
|
|
10072
|
+
Every top-level program under `examples/` appears in the thematic lists and the alphabetical index. Apply the same reading discipline to every example—sentence, mode, finite domain, answer, proof, and revision.
|
|
10169
10073
|
|
|
10170
10074
|
## 42. Standards, limits, and implementation boundaries
|
|
10171
10075
|
|
|
@@ -10184,8 +10088,6 @@ syntax. Separate corpora cover expected errors, warnings, and proofs:
|
|
|
10184
10088
|
npm run test:conformance
|
|
10185
10089
|
npm run test:iso-strict
|
|
10186
10090
|
npm run test:wg17
|
|
10187
|
-
# Refresh the vendored TU Wien WG17 inventory when upstream changes:
|
|
10188
|
-
npm run wg17:upgrade
|
|
10189
10091
|
node test/run-conformance-report.mjs
|
|
10190
10092
|
```
|
|
10191
10093
|
|
|
@@ -10209,32 +10111,19 @@ must preserve the same observable outcome. Additional normal-mode syntax may
|
|
|
10209
10111
|
accept texts outside the strict grammar, but it may not reinterpret an accepted
|
|
10210
10112
|
standard case.
|
|
10211
10113
|
|
|
10212
|
-
The
|
|
10213
|
-
|
|
10214
|
-
cases derived from the success, failure, mode, and error behavior in
|
|
10215
|
-
ISO/IEC 13211-1 clauses 7 and 8, Part 2 modules, and Part 3 grammar rules.
|
|
10216
|
-
Separate exact-output suites check 210 normal
|
|
10217
|
-
examples and 61 proof examples; all extracted book programs are parsed and
|
|
10218
|
-
their declared goals are executed. The eight-case
|
|
10114
|
+
The file-based conformance corpus contains 802 cases, including 386 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.
|
|
10115
|
+
Separate exact-output suites check 210 normal examples and 61 proof examples; all executable chapter programs are parsed and their declared goals are executed. The eight-case
|
|
10219
10116
|
playground contract suite imports the production worker, sends real reasoning
|
|
10220
10117
|
requests through its message protocol, and crawls the served module graph for
|
|
10221
|
-
missing assets, bad MIME types, and static Node-only imports.
|
|
10222
|
-
`conformance-report.md` is the authoritative source for the current executable
|
|
10223
|
-
WG17 syntax result and file-based conformance category totals.
|
|
10118
|
+
missing assets, bad MIME types, and static Node-only imports. `conformance-report.md` records the current executable WG17 syntax result and file-based conformance category totals.
|
|
10224
10119
|
|
|
10225
|
-
###
|
|
10120
|
+
### Conformance artifacts
|
|
10226
10121
|
|
|
10227
|
-
|
|
10122
|
+
The repository exposes several forms of executable evidence:
|
|
10228
10123
|
|
|
10229
|
-
- `conformance-report.md`
|
|
10230
|
-
- `examples/book/`
|
|
10231
|
-
|
|
10232
|
-
- `examples/output/` and `examples/proof/` contain reviewed exact-output
|
|
10233
|
-
goldens that make behavior changes visible in version control.
|
|
10234
|
-
|
|
10235
|
-
Release preparation runs the complete suite and refreshes the conformance
|
|
10236
|
-
report. Keeping these details here allows the README to remain a short project
|
|
10237
|
-
landing page while this book remains the implementation reference.
|
|
10124
|
+
- `conformance-report.md` records the vendored WG17 syntax result and inventories the file-based conformance corpus;
|
|
10125
|
+
- `examples/book/` contains the executable code displays associated with the chapters;
|
|
10126
|
+
- `examples/output/` and `examples/proof/` contain reviewed exact-output goldens that make behavior changes visible in version control.
|
|
10238
10127
|
|
|
10239
10128
|
Run the browser contract independently with:
|
|
10240
10129
|
|
|
@@ -10266,13 +10155,10 @@ that Part 1 strict surface.
|
|
|
10266
10155
|
The strict-core audit has explicit dispositions for the Clause 5 processor
|
|
10267
10156
|
obligations, Clause 6 syntax and rejection families, Clause 7 term/execution/I/O
|
|
10268
10157
|
and error semantics, the 8.2-8.17 built-in families, and Clause 9 evaluable
|
|
10269
|
-
functors. The complete vendored WG17 syntax matrix is
|
|
10270
|
-
strict-success WG17 observation is also checked through normal mode so syntax
|
|
10271
|
-
extensions cannot reinterpret accepted standard text. Implementation-defined
|
|
10158
|
+
functors. The complete vendored WG17 syntax matrix is checked together with normal-mode safety: each strict-success WG17 observation must keep the same result when normal-mode extensions are enabled. Implementation-defined
|
|
10272
10159
|
choices—including the Unicode-scalar processor character set, stream details,
|
|
10273
10160
|
flag defaults, floating behavior, and signed bitwise/shift semantics—are indexed
|
|
10274
|
-
in `test/conformance/ISO-IMPLEMENTATION-DEFINED.md`. The
|
|
10275
|
-
ledger is `test/conformance/ISO-COMPLIANCE.md`.
|
|
10161
|
+
in `test/conformance/ISO-IMPLEMENTATION-DEFINED.md`. The conformance closure ledger is `test/conformance/ISO-COMPLIANCE.md`.
|
|
10276
10162
|
|
|
10277
10163
|
Notable implementation boundaries are:
|
|
10278
10164
|
|
|
@@ -10294,9 +10180,7 @@ Notable implementation boundaries are:
|
|
|
10294
10180
|
|
|
10295
10181
|
Write terms explicitly, keep variables uppercase or underscore-prefixed, and
|
|
10296
10182
|
quote atom names that are neither lowercase plain names nor graphic tokens.
|
|
10297
|
-
The conformance ledger
|
|
10298
|
-
boundary. Their closure is implementation evidence, not independent ISO
|
|
10299
|
-
certification.
|
|
10183
|
+
The conformance ledger provides executable evidence for this documented strict-core boundary; it is not independent ISO certification.
|
|
10300
10184
|
|
|
10301
10185
|
### Security and resource use
|
|
10302
10186
|
|
|
@@ -10451,8 +10335,7 @@ can discuss, answers you can test, and proofs you can carry forward as data.
|
|
|
10451
10335
|
|
|
10452
10336
|
### Glossary
|
|
10453
10337
|
|
|
10454
|
-
|
|
10455
|
-
broader mathematical meaning is explicitly stated.
|
|
10338
|
+
The glossary uses the following EyeProlog-specific meanings unless a broader mathematical meaning is explicitly stated.
|
|
10456
10339
|
|
|
10457
10340
|
**Aggregate.** A relation that evaluates a finite nested solution space and
|
|
10458
10341
|
combines its solutions, as `findall/3`, `countall/2`, `sumall/3`,
|
|
@@ -10677,9 +10560,7 @@ such as a path, assignment, factorization, schedule, or proof-relevant object.
|
|
|
10677
10560
|
|
|
10678
10561
|
## 44. Twelve laboratories
|
|
10679
10562
|
|
|
10680
|
-
These laboratories turn the
|
|
10681
|
-
acceptance test, and a reflection question. Complete them in order or choose a
|
|
10682
|
-
route suited to a study group.
|
|
10563
|
+
These laboratories turn the preceding material into hands-on work. Each has a deliverable, an acceptance test, and a reflection question. Complete them in order or choose a route suited to a study group.
|
|
10683
10564
|
|
|
10684
10565
|
<figure>
|
|
10685
10566
|
<img src="book-assets/laboratory-progression.svg" alt="Twelve laboratories progress from relational foundations through finite search, mathematical and symbolic methods, domain reasoning, and a release-quality reasoning service.">
|
|
@@ -11061,18 +10942,5 @@ counterexample refutes a universal claim; an exhausted finite carrier proves a
|
|
|
11061
10942
|
property only for that model; repeated bounded confirmations do not become an
|
|
11062
10943
|
unbounded theorem.
|
|
11063
10944
|
|
|
11064
|
-
For laboratory checkpoints, leave an artifact. A useful completion is not
|
|
11065
|
-
merely a paragraph: it is a small source file, predicted output, actual output,
|
|
11066
|
-
and one sentence explaining any difference. The extracted chapter examples,
|
|
11067
|
-
top-level goldens, and `npm test` demonstrate that rhythm at repository scale.
|
|
11068
|
-
|
|
11069
|
-
# Part XII — Development note
|
|
11070
|
-
|
|
11071
|
-
## 46. AI-assisted editing
|
|
11072
|
-
|
|
11073
|
-
GPT-5.6 was used during the development of this book to assist with chapter
|
|
11074
|
-
reorganisation, refinement of explanations, and review of examples and
|
|
11075
|
-
diagrams.
|
|
10945
|
+
For laboratory checkpoints, leave an artifact. A useful completion is not merely a paragraph: it is a small source file, predicted output, actual output, and one sentence explaining any difference.
|
|
11076
10946
|
|
|
11077
|
-
All suggestions were evaluated and directed by the author, who remains
|
|
11078
|
-
responsible for the book's claims, choices, and any remaining errors.
|
|
@@ -147,19 +147,16 @@ function renderSection(byIndicator, surface) {
|
|
|
147
147
|
START,
|
|
148
148
|
'### Complete predicate indicator reference',
|
|
149
149
|
'',
|
|
150
|
-
`
|
|
150
|
+
`The normal EyeProlog surface contains **${EXPECTED_COUNT} distinct predicate indicators**: ` +
|
|
151
151
|
`${surface.core.size} core registry indicators plus ${surface.library.size} bundled-library indicators, with ` +
|
|
152
152
|
'`phrase/2` and `phrase/3` present in both layers and therefore counted once.',
|
|
153
153
|
'',
|
|
154
154
|
'Each entry is a compact contract. `+` marks a principal input, `-` a principal output, and `?` an argument that may be supplied or produced. ' +
|
|
155
155
|
'These are documented operating modes rather than parser-enforced mode declarations. **Solutions** uses `det`, `semidet`, `multi`, `nondet`, `delayed`, `meta`, `mode-dependent`, `declaration`, or `terminal`; `meta` means the solution behavior depends materially on a called goal.',
|
|
156
156
|
'',
|
|
157
|
-
'The reference uses stacked entries instead of wide Markdown tables, so principal calls and contracts wrap naturally on narrow screens without horizontal scrolling. ' +
|
|
158
|
-
'It is checked against the live core registry and every `src/lib/*.pl` export. Adding, removing, or renaming a predicate therefore makes the documentation test fail until its contract metadata is updated.',
|
|
159
|
-
'',
|
|
160
157
|
'#### Predicate index',
|
|
161
158
|
'',
|
|
162
|
-
'
|
|
159
|
+
'Each indicator links directly to its contract.',
|
|
163
160
|
'',
|
|
164
161
|
];
|
|
165
162
|
|