eyemind 0.2.10 → 0.3.1

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 CHANGED
@@ -14,9 +14,9 @@ JavaScript library, and a browser application, with no dependencies.
14
14
  The guide shows how to run programs, write rules, check proofs, use the
15
15
  library and develop eyemind; the playground runs programs in your browser;
16
16
  the specification defines the language, its canonical text, the proof format
17
- and the C1–C8 checks. The examples are 94 runnable programs, each with a card
17
+ and the C1–C9 checks. The examples are 94 runnable programs, each with a card
18
18
  deck and saved conclusions, proofs and check reports. The conformance suite
19
- has 1270 cases that test any implementation of the specification through its
19
+ has 1283 cases that test any implementation of the specification through its
20
20
  command line; run it [in your browser](https://eyereasoner.github.io/eyemind/playground/conformance).
21
21
 
22
22
  ```js
package/SPEC.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```text
4
4
  Title: The eyemind Rule Language and Proof Format
5
- Version: eyemind 0.2.10
5
+ Version: eyemind 0.3.1
6
6
  ```
7
7
 
8
8
  This document specifies the syntax and meaning of eyemind programs and data
@@ -63,6 +63,7 @@ proof.
63
63
  - [10.1 Structure](#101-structure)
64
64
  - [10.2 Clause displays](#102-clause-displays)
65
65
  - [10.3 Steps](#103-steps)
66
+ - [10.4 Search certificates](#104-search-certificates)
66
67
  - [11. Proof Checking](#11-proof-checking)
67
68
  - [11.1 Reading the document](#111-reading-the-document)
68
69
  - [11.2 C1 Resolution](#112-c1-resolution)
@@ -73,8 +74,9 @@ proof.
73
74
  - [11.7 C6 Boundary consistency](#117-c6-boundary-consistency)
74
75
  - [11.8 C7 Relevance](#118-c7-relevance)
75
76
  - [11.9 C8 Witness integrity](#119-c8-witness-integrity)
76
- - [11.10 Counts and validity](#1110-counts-and-validity)
77
- - [11.11 Scope of a valid proof](#1111-scope-of-a-valid-proof)
77
+ - [11.10 C9 Search closure](#1110-c9-search-closure)
78
+ - [11.11 Counts and validity](#1111-counts-and-validity)
79
+ - [11.12 Scope of a valid proof](#1112-scope-of-a-valid-proof)
78
80
  - [12. Check Reports](#12-check-reports)
79
81
  - [12.1 JSON form](#121-json-form)
80
82
  - [13. Command-Line Interface](#13-command-line-interface)
@@ -365,8 +367,9 @@ A clause MUST be rejected when:
365
367
  - a head is not an atom or compound, or is a list, the atom `'[]'` or a
366
368
  `'.'/2` compound, which as a goal would be a conjunction (Section 4.1) and
367
369
  could never call the clause;
368
- - a head uses `step/4` or `clause/2`, reserved for proof documents, or
369
- explicitly states the reserved predicate `activated/2`;
370
+ - a head uses `step/4`, `clause/2`, `searched/2` or `derived/2`, reserved
371
+ for proof documents, or explicitly states the reserved predicate
372
+ `activated/2`;
370
373
  - a head is a primitive or control, except the head `'true'` of a query or
371
374
  `'false'` of a contradiction; `implies` MUST NOT conclude either atom;
372
375
  - a body goal is neither a variable, atom nor compound, or is an empty or
@@ -709,7 +712,7 @@ be bound first. Section 11.9 rejects certificates that bypass this boundary.
709
712
 
710
713
  Inspection uses a fixed source catalogue, so its own results do not depend on
711
714
  forward rounds. Other goals using derived patterns still participate in
712
- stratification. Negation and collection retain their explicit obligations.
715
+ stratification. Negation and collection keep their own justifications (Section 10.3).
713
716
 
714
717
  ## 7. Semantics
715
718
 
@@ -807,7 +810,8 @@ infinite closure. A finite model does not ensure search termination:
807
810
  recurs indefinitely. Exceeding a resource bound raises an error (Section
808
811
  8.3). Contradictions halt without completing the closure (Section 8.5).
809
812
  A valid proof establishes only its claims subject to its trusted boundaries
810
- (Section 11.11), not completeness of the model or the answers.
813
+ (Section 11.12), not completeness of the model or the answers. Its search
814
+ certificate settles the negations and collections it can (Section 10.4).
811
815
 
812
816
  ## 8. Evaluation and Conclusions
813
817
 
@@ -949,11 +953,16 @@ differently; they are ignored when the output is read (Section 9.1).
949
953
  When a proof is requested, each solution records how each of its goals was
950
954
  justified: by a fact or rule of the program, by a derived fact (whose own
951
955
  record is kept), by a primitive, by a control, by an absence (a negation) or
952
- by a collection (`findall`). For each conclusion the first derivation found
953
- is recorded. A reasoner MUST check every proof it generates (Section 11)
954
- before returning it, and MUST fail with an error rather than return a proof
955
- that does not pass. A run without conclusions has a proof without claims,
956
- which is valid and certifies nothing.
956
+ by a collection (`findall`). For each conclusion the first derivation found is
957
+ recorded. Each negation and collection of a proof gets the search certificate
958
+ that settles it (Sections 10.4 and 11.10) whenever Section 11.10 allows one. A
959
+ table holds every answer of its call, so it can search beyond where the run
960
+ stopped, as under `once`; a boundary whose tables would meet an error, or
961
+ exceed `max_inferences` calls and answers (Section 8.3), stays trusted. A
962
+ reasoner MUST check every proof it generates (Section 11) before returning it,
963
+ and MUST fail with an error rather than return a proof that does not pass. A
964
+ run without conclusions has a proof without claims, which is valid and
965
+ certifies nothing.
957
966
 
958
967
  A goal such as `is_var(X)` followed by `unify(X, 'a')`
959
968
  cannot be recorded faithfully by its final substitution, so such a run
@@ -1096,13 +1105,16 @@ A proof document is a document (Section 9.1) holding, in this order:
1096
1105
  increasing `N`;
1097
1106
  4. an empty line;
1098
1107
  5. when there are steps, comment lines saying what a step records, then one
1099
- `step(Goal, By, Bindings, Uses)` per justified goal.
1108
+ `step(Goal, By, Bindings, Uses)` per justified goal;
1109
+ 6. when it has a search certificate (Section 10.4), an empty line, comment
1110
+ lines introducing it, then one `derived(Pattern, Facts)` per listed
1111
+ relation, then one `searched(Call, Answers)` per table.
1100
1112
 
1101
1113
  Comments are informative and MAY be worded differently; they are ignored when
1102
1114
  the document is read.
1103
1115
 
1104
- A checker MUST treat every statement that is neither `clause/2` nor `step/4`
1105
- as a claim, whatever its position.
1116
+ A checker MUST treat every statement that is neither `clause/2`, `step/4`,
1117
+ `searched/2` nor `derived/2` as a claim, whatever its position.
1106
1118
 
1107
1119
  ### 10.2 Clause displays
1108
1120
 
@@ -1146,8 +1158,8 @@ order. `By` is one of:
1146
1158
  | `source(N)` | `Goal` is an instance of the inspectable source rule `N` as `implies(Body, Head)` or `implied_by(Head, Body)`. | empty | empty |
1147
1159
  | `'builtin'` | `Goal` is a primitive that holds. | empty | empty |
1148
1160
  | `'control'` | `Goal` is `call`, `once` or a disjunction, solved by `Uses`. | empty | the solved goals; for a disjunction, the side that was solved, so `or(or(A, B), C)` solved by `A` uses `or(A, B)`, which has a step of its own |
1149
- | `'absent'` | `Goal` is a negation taken on trust. | empty | empty |
1150
- | `'collected'` | `Goal` is a `findall` taken on trust. | empty | empty |
1161
+ | `'absent'` | `Goal` is a negation, settled by the search certificate or taken on trust. | empty | empty |
1162
+ | `'collected'` | `Goal` is a `findall`, settled by the search certificate or taken on trust. | empty | empty |
1151
1163
 
1152
1164
  `Bindings` is an object from each variable name of the cited clause, as
1153
1165
  the program wrote it, to its value in this step: `{X: 'socrates'}`. A key
@@ -1163,12 +1175,44 @@ empty bindings. A derived clause's bindings also include variables of its
1163
1175
  enclosing generators' scope projections, so their witnesses can be checked.
1164
1176
  These variables are renamed together with the clause's head and full body.
1165
1177
 
1178
+ ### 10.4 Search certificates
1179
+
1180
+ No step can show that a goal has no solution, or that a list holds every
1181
+ solution. A search certificate shows it by recording the searches behind a
1182
+ proof's negations and collections:
1183
+
1184
+ - `searched(Call, Answers)` is a **table**: `Call` is a goal as one of those
1185
+ searches called it, and `Answers` the array of its answers, each the
1186
+ instance of `Call` that one solution gave, in the order of Section 8.1,
1187
+ repetitions included. Each answer's variables are its own: they are shared
1188
+ neither with `Call` nor with another answer.
1189
+ - `derived(Pattern, Facts)` is a **listing**: `Pattern` is the name of a
1190
+ relation that forward rules conclude, applied to distinct variables, or the
1191
+ name alone for arity 0, and `Facts` the array of every fact the run derived
1192
+ for that relation, in the order derived (Section 8.2). Each listed fact has
1193
+ steps of its own.
1194
+
1195
+ A table exists for each call to a relation that a backward rule defines or
1196
+ forward rules conclude, made by those searches or by the closure checks of
1197
+ Section 11.10; a call to a relation defined by facts alone needs none. A
1198
+ listing exists for each relation forward rules conclude that a table or a
1199
+ closure check consults. A reasoner writes only the tables and listings of
1200
+ the boundaries it settles: listings first, in the order first consulted,
1201
+ then tables, in the order their calls are first met. For example:
1202
+
1203
+ ```js
1204
+ derived(nonpacifist(A), [nonpacifist('nixon')])
1205
+ searched(nonpacifist('ada'), [])
1206
+ ```
1207
+
1166
1208
  ## 11. Proof Checking
1167
1209
 
1168
1210
  A checker is given a program, a proof document and, when the proof answers
1169
1211
  goals asked from outside the program, those goals. It MUST NOT call a
1170
- reasoner to supply a missing step; it MAY recompute primitives. It
1171
- establishes eight conditions and records each failure with its condition, a
1212
+ reasoner to supply a missing step; it MAY recompute primitives, and it MAY
1213
+ expand a call one level against the program with every inner call answered
1214
+ by the search certificate (Section 11.10). It
1215
+ establishes nine conditions and records each failure with its condition, a
1172
1216
  detail and, where there is one, the term concerned.
1173
1217
 
1174
1218
  ### 11.1 Reading the document
@@ -1179,8 +1223,12 @@ program whose display (Section 10.2) is identical to `Display`, variable
1179
1223
  names included, so a display that merely renames the clause's variables
1180
1224
  differs; otherwise C1 fails. Each `step` MUST have bindings that read as a list of `'='/2` pairs,
1181
1225
  as an object literal does, and a list of uses, and no two steps may have
1182
- identical goals; otherwise C3 fails and the step is set aside. Every other
1183
- statement is a claim (Section 10.1).
1226
+ identical goals; otherwise C3 fails and the step is set aside. A `searched`
1227
+ statement MUST have a callable `Call` and an array of answers, and a
1228
+ `derived` statement a callable `Pattern` and an array of facts; no two tables
1229
+ may have calls identical up to renaming of their variables, and no two
1230
+ listings may name the same relation; otherwise C3 fails and the statement is
1231
+ set aside. Every other statement is a claim (Section 10.1).
1184
1232
 
1185
1233
  ### 11.2 C1 Resolution
1186
1234
 
@@ -1223,7 +1271,7 @@ failure, whose conclusion is the goal of that step.
1223
1271
  no bindings and no uses and a goal that is a primitive; an `'absent'` or
1224
1272
  `'collected'` step MUST have no bindings and no uses and a goal that is a
1225
1273
  negation or a `findall`, respectively. A step that fails C3 is not a trusted
1226
- boundary: it counts in neither `trusted` nor C6.
1274
+ boundary: it counts in neither `trusted`, C6 nor C9.
1227
1275
 
1228
1276
  ### 11.5 C4 Coverage
1229
1277
 
@@ -1253,14 +1301,18 @@ proof fail on an implementation other than the one that made it.
1253
1301
 
1254
1302
  ### 11.7 C6 Boundary consistency
1255
1303
 
1256
- A trusted boundary cannot be proved, but the evidence at hand can refute it.
1257
- The evidence for a goal is: when the goal is a ground primitive, the goal
1258
- itself if it holds, and otherwise the recomputed fact that it fails; when it
1259
- is a control, none, and the boundary is left undecided; otherwise the
1260
- program's facts and the goals of the document's steps with the same name and
1261
- arity. A goal of the last kind **has evidence** only when there is at least
1262
- one such fact or step goal; with none, nothing could refute the boundary, and
1263
- it is left undecided.
1304
+ A negation or collection is a **boundary**. A boundary that its search
1305
+ certificate settles or refutes is checked by C9 (Section 11.10); C6
1306
+ confronts every other well-formed boundary step with the evidence at hand.
1307
+
1308
+ A boundary that is not settled cannot be proved, but the evidence at
1309
+ hand can refute it. The evidence for a goal is: when the goal is a ground
1310
+ primitive, the goal itself if it holds, and otherwise the recomputed fact
1311
+ that it fails; when it is a control, none, and the boundary is left
1312
+ undecided; otherwise the program's facts and the goals of the document's
1313
+ steps with the same name and arity. A goal of the last kind **has evidence**
1314
+ only when there is at least one such fact or step goal; with none, nothing
1315
+ could refute the boundary, and it is left undecided.
1264
1316
 
1265
1317
  - An absence `not(G)` is decided when `G` is a single goal, or a ground
1266
1318
  conjunction, whose every goal has evidence. It fails C6 when every goal of
@@ -1270,7 +1322,7 @@ it is left undecided.
1270
1322
  decided when `G` is a single goal with evidence. It fails C6 when an
1271
1323
  instance of `T` for some evidence of `G` unifies with no element of `L`.
1272
1324
 
1273
- A boundary that is not refuted remains an obligation (Section 12).
1325
+ A trusted boundary that is not refuted remains an obligation (Section 12).
1274
1326
 
1275
1327
  ### 11.8 C7 Relevance
1276
1328
 
@@ -1279,7 +1331,9 @@ Otherwise the questions are, for each forward rule, each ordinary head other
1279
1331
  than `'true'`, and the rule's body as a conjunction when one of its heads is
1280
1332
  `'true'` and no claim is `'false'`. Each claim MUST be an instance of a
1281
1333
  question. Each step MUST be reachable from a conjunct of a claim through the
1282
- conjuncts of uses.
1334
+ conjuncts of uses and, from a settled boundary, through the facts of the
1335
+ listings it rests on. Each table and listing MUST be consulted by the search
1336
+ or closure check of some boundary.
1283
1337
 
1284
1338
  ### 11.9 C8 Witness integrity
1285
1339
 
@@ -1318,7 +1372,65 @@ even when the body leaves it unbound; its value comes from the uses, which
1318
1372
  other conditions check. A step with no witnesses in its own forward head or enclosing generators is
1319
1373
  not covered by C8.
1320
1374
 
1321
- ### 11.10 Counts and validity
1375
+ ### 11.10 C9 Search closure
1376
+
1377
+ A checker tries to **settle** each well-formed boundary step (Sections 11.4
1378
+ and 11.7) with the search certificate, by searching its goal `G` as Section
1379
+ 8.1 does, except that:
1380
+
1381
+ - a call to a relation that a backward rule defines or forward rules
1382
+ conclude is answered by the table whose call is identical to it up to
1383
+ renaming, each answer renamed apart in turn, and a call to a relation
1384
+ defined by facts alone by those facts, in clause order;
1385
+ - a negation inside the search treats its unbound variables as anonymous.
1386
+
1387
+ The **expansion** of a call is the search of Section 8.1 taken one level:
1388
+ the facts in the listing of its relation, in order, then the program's facts
1389
+ and backward rules of that name and arity, in clause order, each rule's body
1390
+ searched in its place, inner calls answered as above. The boundary's search
1391
+ **rests on** each table and listing it consults, and on those its tables and
1392
+ the closure checks of its listings consult, transitively. The boundary is
1393
+ settled when:
1394
+
1395
+ 1. each table it rests on equals its expansion: the same number of answers,
1396
+ each identical up to renaming of variables to the answer in the same
1397
+ position;
1398
+ 2. each listing it rests on has a step for each fact, every fact of the
1399
+ listed name and arity and ground, and is **closed**: for each forward
1400
+ rule with a head of that relation, each solution of the rule's body under
1401
+ the certificate, with the rule's witnesses bound to their Skolem terms
1402
+ (Section 8.2), gives head instances of that relation that are listed or
1403
+ are ground facts of the program;
1404
+ 3. no table it rests on depends on itself through the tables its expansion
1405
+ consults;
1406
+ 4. its outcome agrees: for a negation, `G` has no solution; for a collection
1407
+ `findall(T, G, L)`, `L` is an instance of the list of the instances of
1408
+ `T`, one per solution of `G`, in order, each renamed apart;
1409
+ 5. no collection or `once` within its search, a table it rests on or a
1410
+ closure check uses a table whose answers rest on a listing, since the
1411
+ order of derived facts cannot be checked this way; and its search reaches
1412
+ no source inspection and no clause appended by a template, and it
1413
+ consults no listing whose relation a forward rule with a template head
1414
+ or captures concludes (Section 6.2).
1415
+
1416
+ For example, the absence `not(nonpacifist('ada'))` rests on the table
1417
+ `searched(nonpacifist('ada'), [])` and the listing `derived(nonpacifist(A),
1418
+ [nonpacifist('nixon')])`. The table equals its expansion: the listed fact
1419
+ does not match the call, and no backward rule defines `nonpacifist/1`. The
1420
+ listing is closed: the only rule concluding `nonpacifist/1` derives
1421
+ `nonpacifist('nixon')`, which is listed, and that fact has its own step.
1422
+
1423
+ A boundary fails C9 when its certificate is wrong: a table differs from its
1424
+ expansion, a listed fact has no step or another name or arity, a listing is
1425
+ not closed, tables depend on themselves, a search leads to an error, or a
1426
+ negation's goal has a solution. Each wrong table or listing is reported once,
1427
+ for the first boundary resting on it. A boundary whose certificate is
1428
+ missing, incomplete or not applicable under item 5, or a collection whose
1429
+ list does not agree, is not settled. A boundary that is not settled is
1430
+ trusted, including one that fails C9; C6 confronts each boundary C9 neither
1431
+ settled nor refuted with the evidence (Section 11.7).
1432
+
1433
+ ### 11.11 Counts and validity
1322
1434
 
1323
1435
  | Condition | Covered |
1324
1436
  | --- | --- |
@@ -1327,23 +1439,25 @@ not covered by C8.
1327
1439
  | C3 justification | steps |
1328
1440
  | C4 coverage | claims plus uses |
1329
1441
  | C5 re_decision | `'builtin'` and `'control'` steps that passed C5 |
1330
- | C6 boundary_consistency | boundaries decided |
1442
+ | C6 boundary_consistency | boundaries not settled that the evidence decided |
1331
1443
  | C7 relevance | claims plus steps |
1332
1444
  | C8 witness_integrity | `clause` steps with witnesses in their forward head or enclosing generators that passed C8 |
1445
+ | C9 search_closure | boundaries their search certificate settled or refuted |
1333
1446
 
1334
1447
  A check also counts the **steps** it read, the **claims**, the `clause` steps
1335
1448
  **verified** by C1, the `source` inspection steps also **verified** by C1,
1336
1449
  the `'builtin'` steps **recomputed** by C5, the
1337
1450
  `'control'` steps **composed** by C5, and the `'absent'` and `'collected'`
1338
- steps **trusted**.
1451
+ steps **trusted**, those C9 did not settle.
1339
1452
 
1340
1453
  A proof is **valid** when no condition failed. A valid proof with trusted
1341
1454
  boundaries is valid *conditional on* them.
1342
1455
 
1343
- ### 11.11 Scope of a valid proof
1456
+ ### 11.12 Scope of a valid proof
1344
1457
 
1345
1458
  A valid proof establishes that each of its claims follows from the program
1346
- by the recorded steps, given its trusted boundaries. It does not establish
1459
+ by the recorded steps, given its trusted boundaries; a settled boundary is
1460
+ established by its search certificate. It does not establish
1347
1461
  that the claims are all the conclusions of the program, that the program
1348
1462
  derives no `'false'`, or that the program is the one intended: a proof MAY
1349
1463
  leave conclusions out, and a run's own proof holds exactly its conclusions.
@@ -1354,14 +1468,14 @@ A check report is a document (Section 9.1) beginning with the proof's claims,
1354
1468
  in proof order, in canonical text, one per line, followed by a blank line and
1355
1469
  the following report facts, one per line:
1356
1470
 
1357
- 1. `condition(Id, Name, Outcome, Covered)` for C1 to C8, where `Outcome` is
1471
+ 1. `condition(Id, Name, Outcome, Covered)` for C1 to C9, where `Outcome` is
1358
1472
  `'ok'` or `failed(N)`, `N` the number of that condition's failures;
1359
1473
  2. `failure(Condition, Subject, Detail)` per failure, where `Subject` is the
1360
1474
  term concerned or `'proof_document'`, and `Detail` an atom;
1361
1475
  3. `obligation(Kind, 'theory_scoped', Goal)` per trusted boundary, in step
1362
1476
  order, where `Kind` is `'absent'` or `'collected'`;
1363
1477
  4. `steps(N)`, `verified(N)`, `recomputed(N)`, `composed(N)`, `trusted(N)`,
1364
- `claims(N)`, the counts of Section 11.10;
1478
+ `claims(N)`, the counts of Section 11.11;
1365
1479
  5. `verdict(V)`, where `V` is `failed(N)` when `N` failures were recorded,
1366
1480
  otherwise `'checked_with_obligations'` when there are obligations,
1367
1481
  otherwise `'checked'`.
@@ -1371,15 +1485,17 @@ report is valid with no obligations. A valid report with obligations MUST
1371
1485
  label them as conditional on those obligations. A failed report MUST label
1372
1486
  them as unverified claims; their inclusion does not validate them. A valid
1373
1487
  report with no claims MUST say it establishes no conclusions. Comments also
1374
- explain the C1-C8 order, failures and obligations when present, the statistics,
1488
+ explain the C1-C9 order, failures and obligations when present, the statistics,
1375
1489
  and that the verdict does not establish completeness. Comments are informative
1376
1490
  and MAY be worded differently. They are ignored when the document is read.
1377
1491
 
1378
1492
  Failures are listed in the order they are found: those of reading the
1379
1493
  document (Section 11.1), in document order; C4 for each claim, in claim
1380
1494
  order; then for each step, in document order, C4 for its uses and the C1, C3,
1381
- C5 or C8 failure of its justification; C6 for each boundary, in step order;
1382
- C7 for each claim, then for each step; and C2.
1495
+ C5 or C8 failure of its justification; for each boundary, in step order, the
1496
+ C9 failures of its search certificate in the order found, or else its C6
1497
+ failure; C7 for each claim, then
1498
+ for each step, then for each table and listing, in document order; and C2.
1383
1499
 
1384
1500
  `Detail` is informative text identifying what failed; its wording is not
1385
1501
  specified. It MUST NOT affect validity, counts or the condition reported.
@@ -1553,7 +1669,7 @@ including proofs, reports, goals and `facts_from` input, MUST be read as data
1553
1669
  without executing code. A deployment accepting untrusted documents SHOULD
1554
1670
  bound their size, nesting depth, processing time and memory, in addition to
1555
1671
  the reasoning bounds of Section 8.3. A valid proof establishes only the
1556
- claims and assumptions described in Section 11.11.
1672
+ claims and assumptions described in Section 11.12.
1557
1673
 
1558
1674
  ## Appendix A. Document Grammar
1559
1675
 
@@ -1622,8 +1738,8 @@ clause(1, fact(type('socrates', 'human')))
1622
1738
  clause(2, fact(subclass_of('human', 'mortal')))
1623
1739
  clause(3, implies([type(S, A), subclass_of(A, B)], type(S, B)))
1624
1740
 
1625
- // Steps: each goal, what justifies it (a clause, a builtin, a control, or an
1626
- // absence or collection taken on trust), the bindings and the goals it uses.
1741
+ // Steps: each goal, what justifies it (a clause, a builtin, a control, an
1742
+ // absence or a collection), the bindings and the goals it uses.
1627
1743
  step(type('socrates', 'mortal'), clause(3), {S: 'socrates', A: 'human', B: 'mortal'}, [type('socrates', 'human'), subclass_of('human', 'mortal')])
1628
1744
  step(type('socrates', 'human'), clause(1), {}, [])
1629
1745
  step(subclass_of('human', 'mortal'), clause(2), {}, [])
@@ -1636,8 +1752,8 @@ Its check report (Section 12):
1636
1752
  type('socrates', 'mortal')
1637
1753
  type('socrates', 'human')
1638
1754
 
1639
- // C1-C8: resolution, acyclicity, justification, coverage,
1640
- // re-decision, boundary consistency, relevance and witness integrity.
1755
+ // C1-C9: resolution, acyclicity, justification, coverage, re-decision,
1756
+ // boundary consistency, relevance, witness integrity and search closure.
1641
1757
  condition('C1', 'resolution', 'ok', 3)
1642
1758
  condition('C2', 'well_founded', 'ok', 3)
1643
1759
  condition('C3', 'justification', 'ok', 3)
@@ -1646,6 +1762,7 @@ condition('C5', 're_decision', 'ok', 0)
1646
1762
  condition('C6', 'boundary_consistency', 'ok', 0)
1647
1763
  condition('C7', 'relevance', 'ok', 5)
1648
1764
  condition('C8', 'witness_integrity', 'ok', 0)
1765
+ condition('C9', 'search_closure', 'ok', 0)
1649
1766
 
1650
1767
  // Proof statistics: recorded steps and how they were checked.
1651
1768
  steps(3)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyemind",
3
- "version": "0.2.10",
3
+ "version": "0.3.1",
4
4
  "description": "A dependency-free JavaScript rule language with forward and backward reasoning and checkable proofs.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/cli.js CHANGED
@@ -9,7 +9,7 @@ export const HELP = `Usage: eyemind [OPTION ...] [FILE ...]
9
9
  Programs are JavaScript; forward rules run to a fixpoint.
10
10
  -p, --proof Print the claims with clause(...) and step(...) records
11
11
  -c, --prove-and-check Generate a proof and check it against the input program
12
- --check-proof FILE Print checked answers and a C1-C8 report (- for stdin)
12
+ --check-proof FILE Print checked answers and a C1-C9 report (- for stdin)
13
13
  --json Print the check report as JSON instead
14
14
  --goal GOAL Ask a backward goal after forward reasoning; with
15
15
  --check-proof, the goal the proof answers