eyeprolog 1.1.15 → 1.1.16

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.
@@ -0,0 +1,64 @@
1
+ :- use_module(library(iso_ext)).
2
+
3
+ % A bounded pipeline audit that composes every relation exported by
4
+ % library(iso_ext). The report counts a generated state space, summarizes each
5
+ % stage, builds a trace with an explicit difference-list tail, checks every
6
+ % transition, and compares variable-sharing schemas modulo variable names.
7
+
8
+ %% goal: pipeline_audit(X0)
9
+
10
+ stage(0, receive).
11
+ stage(1, parse).
12
+ stage(2, validate).
13
+ stage(3, reason).
14
+ stage(4, publish).
15
+
16
+ transition(Index, From, To) :-
17
+ cfor(0, 3, Index),
18
+ succ(Index, Next),
19
+ stage(Index, From),
20
+ stage(Next, To).
21
+
22
+ transition_is_well_formed(Index, From, To) :-
23
+ succ(Index, Next),
24
+ stage(Index, From),
25
+ stage(Next, To),
26
+ Index < Next.
27
+
28
+ linked_pipeline_schema(
29
+ pipeline(step(_Input, Shared), step(Shared, _Output))).
30
+
31
+ pipeline_audit(
32
+ report(
33
+ stages(StageCount),
34
+ transitions(TransitionCount),
35
+ summaries(StageSummaries),
36
+ trace(Trace),
37
+ invariant(true),
38
+ schema_variant(true)
39
+ )) :-
40
+ countall(stage(_, _), StageCount),
41
+ countall(transition(_, _, _), TransitionCount),
42
+ findall(
43
+ stage(Index, Name, outgoing(Outgoing)),
44
+ ( cfor(0, 4, Index),
45
+ stage(Index, Name),
46
+ countall(transition(Index, _, _), Outgoing)
47
+ ),
48
+ StageSummaries
49
+ ),
50
+ findall(
51
+ step(Index, From, To),
52
+ transition(Index, From, To),
53
+ Trace,
54
+ [complete]
55
+ ),
56
+ forall(
57
+ transition(Index, From, To),
58
+ transition_is_well_formed(Index, From, To)
59
+ ),
60
+ linked_pipeline_schema(Schema),
61
+ variant(
62
+ Schema,
63
+ pipeline(step(_Source, Middle), step(Middle, _Result))
64
+ ).
@@ -0,0 +1 @@
1
+ pipeline_audit(report(stages(5), transitions(4), summaries([stage(0, receive, outgoing(1)), stage(1, parse, outgoing(1)), stage(2, validate, outgoing(1)), stage(3, reason, outgoing(1)), stage(4, publish, outgoing(0))]), trace([step(0, receive, parse), step(1, parse, validate), step(2, validate, reason), step(3, reason, publish), complete]), invariant(true), schema_variant(true))).
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.1.15",
6
+ "version": "1.1.16",
7
7
  "description": "EyeProlog turns facts and rules into answers and proofs.",
8
8
  "type": "module",
9
9
  "main": "./index.js",
package/playground.html CHANGED
@@ -543,6 +543,7 @@
543
543
  "iso-atomic-conversion",
544
544
  "iso-control-and-errors",
545
545
  "iso-dynamic-database",
546
+ "iso-extension-pipeline-audit",
546
547
  "iso-extensions",
547
548
  "iso-grouped-solutions",
548
549
  "iso-integer-arithmetic",
@@ -6352,7 +6352,7 @@ Review questions:
6352
6352
  </figure>
6353
6353
 
6354
6354
  The [examples directory](https://github.com/eyereasoner/eyeprolog/tree/main/examples/) is the book's executable companion. The
6355
- top-level directory contains **205 self-contained runnable programs**. Every
6355
+ top-level directory contains **206 self-contained runnable programs**. Every
6356
6356
  source program has an exact answer file under
6357
6357
  [examples/output](https://github.com/eyereasoner/eyeprolog/tree/main/examples/output/), and **61 selected programs** have a checked
6358
6358
  explanation under [examples/proof](https://github.com/eyereasoner/eyeprolog/tree/main/examples/proof/). The thematic tables below link every top-level program and open the program
@@ -6408,6 +6408,7 @@ mode at a time.
6408
6408
  | [Dynamic database](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-dynamic-database.pl) | Initialization and ordered updates to a declared dynamic procedure. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-dynamic-database.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/iso-dynamic-database.pl) |
6409
6409
  | [Grouped solutions](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-grouped-solutions.pl) | `findall/3`, `bagof/3`, `setof/3`, existential qualification, and `clause/2`. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-grouped-solutions.pl) |
6410
6410
  | [Integer arithmetic](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-integer-arithmetic.pl) | Integer quotient/remainder choices plus bit operations. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-integer-arithmetic.pl) |
6411
+ | [ISO extension pipeline audit](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-extension-pipeline-audit.pl) | A bounded pipeline audit composing every `library(iso_ext)` relation: nested counting, universal validation, successor generation, difference-list collection, and schema comparison modulo variable names. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-extension-pipeline-audit.pl) |
6411
6412
  | [ISO extensions](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-extensions.pl) | Common control, collection, integer, and term-variant extensions from `library(iso_ext)`. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-extensions.pl) |
6412
6413
  | [Operators](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-operators.pl) | Custom syntax, standard term order, and operator-table inspection. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-operators.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/iso-operators.pl) |
6413
6414
  | [Reflective terms](https://github.com/eyereasoner/eyeprolog/blob/main/examples/iso-reflective-terms.pl) | Term shape, construction, copying, variables, identity, and standard order. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/iso-reflective-terms.pl) |