eyeling 1.22.3 → 1.22.4

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.
Files changed (38) hide show
  1. package/examples/arcling/README.md +24 -22
  2. package/package.json +1 -1
  3. package/test/examples.test.js +20 -2
  4. /package/examples/output/{auroracare.n3 → auroracare.txt} +0 -0
  5. /package/examples/output/{bmi.n3 → bmi.txt} +0 -0
  6. /package/examples/output/{calidor.n3 → calidor.txt} +0 -0
  7. /package/examples/output/{control-system.n3 → control-system.txt} +0 -0
  8. /package/examples/output/{deep-taxonomy-10.n3 → deep-taxonomy-10.txt} +0 -0
  9. /package/examples/output/{deep-taxonomy-100.n3 → deep-taxonomy-100.txt} +0 -0
  10. /package/examples/output/{deep-taxonomy-1000.n3 → deep-taxonomy-1000.txt} +0 -0
  11. /package/examples/output/{deep-taxonomy-10000.n3 → deep-taxonomy-10000.txt} +0 -0
  12. /package/examples/output/{deep-taxonomy-100000.n3 → deep-taxonomy-100000.txt} +0 -0
  13. /package/examples/output/{delfour.n3 → delfour.txt} +0 -0
  14. /package/examples/output/{digital-product-passport.n3 → digital-product-passport.txt} +0 -0
  15. /package/examples/output/{easter.n3 → easter.txt} +0 -0
  16. /package/examples/output/{flandor.n3 → flandor.txt} +0 -0
  17. /package/examples/output/{french-cities.n3 → french-cities.txt} +0 -0
  18. /package/examples/output/{genetic-algorithm-knapsack.n3 → genetic-algorithm-knapsack.txt} +0 -0
  19. /package/examples/output/{genetic-algorithm.n3 → genetic-algorithm.txt} +0 -0
  20. /package/examples/output/{gps.n3 → gps.txt} +0 -0
  21. /package/examples/output/{interop-demo.n3 → interop-demo.txt} +0 -0
  22. /package/examples/output/{matrix-mechanics.n3 → matrix-mechanics.txt} +0 -0
  23. /package/examples/output/{medior.n3 → medior.txt} +0 -0
  24. /package/examples/output/{n3-speaks-for-itself.n3 → n3-speaks-for-itself.txt} +0 -0
  25. /package/examples/output/{odrl-dpv-ehds-risk-ranked.n3 → odrl-dpv-ehds-risk-ranked.txt} +0 -0
  26. /package/examples/output/{odrl-dpv-healthcare-risk-ranked.n3 → odrl-dpv-healthcare-risk-ranked.txt} +0 -0
  27. /package/examples/output/{odrl-dpv-risk-ranked.n3 → odrl-dpv-risk-ranked.txt} +0 -0
  28. /package/examples/output/{odrl-risk-mitigation.n3 → odrl-risk-mitigation.txt} +0 -0
  29. /package/examples/output/{odrl-risk.n3 → odrl-risk.txt} +0 -0
  30. /package/examples/output/{parcellocker.n3 → parcellocker.txt} +0 -0
  31. /package/examples/output/{pn-junction-tunneling.n3 → pn-junction-tunneling.txt} +0 -0
  32. /package/examples/output/{resto.n3 → resto.txt} +0 -0
  33. /package/examples/output/{sqrt2-cauchy.n3 → sqrt2-cauchy.txt} +0 -0
  34. /package/examples/output/{sqrt2-dedekind.n3 → sqrt2-dedekind.txt} +0 -0
  35. /package/examples/output/{sudoku.n3 → sudoku.txt} +0 -0
  36. /package/examples/output/{transcendental-numbers-stretched.n3 → transcendental-numbers-stretched.txt} +0 -0
  37. /package/examples/output/{transistor-switch.n3 → transistor-switch.txt} +0 -0
  38. /package/examples/output/{wind-turbine.n3 → wind-turbine.txt} +0 -0
@@ -16,39 +16,41 @@ That makes the examples below especially relevant: Eyeling can derive those narr
16
16
 
17
17
  ## ARC-style examples in `examples/`
18
18
 
19
+ Each entry links to both the source example and the corresponding generated output in [`examples/output/`](../output/).
20
+
19
21
  ### Insight Economy and governed-data cases
20
22
 
21
- - [`../auroracare.n3`](../auroracare.n3) — Purpose-based medical data exchange with explicit allow/deny reasoning and checks around role, purpose, and conditions.
22
- - [`../calidor.n3`](../calidor.n3) — Heatwave-response case where private household signals become a narrow, expiring cooling-support insight.
23
- - [`../delfour.n3`](../delfour.n3) — Shopping-assistance case where a private condition becomes a bounded “prefer lower-sugar products” insight.
24
- - [`../flandor.n3`](../flandor.n3) — Macro-economic coordination case for Flanders that turns sensitive local signals into a regional retooling insight.
25
- - [`../medior.n3`](../medior.n3) — Post-discharge care-coordination case that derives a minimal continuity-bundle insight without sharing the full record.
26
- - [`../parcellocker.n3`](../parcellocker.n3) — One-time parcel pickup authorization with a clear permit decision, justification, and misuse checks.
23
+ - [`../auroracare.n3`](../auroracare.n3) · [`../output/auroracare.txt`](../output/auroracare.txt) — Purpose-based medical data exchange with explicit allow/deny reasoning and checks around role, purpose, and conditions.
24
+ - [`../calidor.n3`](../calidor.n3) · [`../output/calidor.txt`](../output/calidor.txt) — Heatwave-response case where private household signals become a narrow, expiring cooling-support insight.
25
+ - [`../delfour.n3`](../delfour.n3) · [`../output/delfour.txt`](../output/delfour.txt) — Shopping-assistance case where a private condition becomes a bounded “prefer lower-sugar products” insight.
26
+ - [`../flandor.n3`](../flandor.n3) · [`../output/flandor.txt`](../output/flandor.txt) — Macro-economic coordination case for Flanders that turns sensitive local signals into a regional retooling insight.
27
+ - [`../medior.n3`](../medior.n3) · [`../output/medior.txt`](../output/medior.txt) — Post-discharge care-coordination case that derives a minimal continuity-bundle insight without sharing the full record.
28
+ - [`../parcellocker.n3`](../parcellocker.n3) · [`../output/parcellocker.txt`](../output/parcellocker.txt) — One-time parcel pickup authorization with a clear permit decision, justification, and misuse checks.
27
29
 
28
30
  ### Core ARC-style walkthroughs
29
31
 
30
- - [`../bmi.n3`](../bmi.n3) — Body Mass Index calculation with normalization, WHO category assignment, and boundary checks.
31
- - [`../control-system.n3`](../control-system.n3) — Small control-system example that derives actuator commands and explains feedforward and feedback contributions.
32
- - [`../easter.n3`](../easter.n3) — Gregorian Easter computus with a readable explanation and date-window checks.
33
- - [`../french-cities.n3`](../french-cities.n3) — Graph reachability over French cities with explicit path reasoning.
34
- - [`../gps.n3`](../gps.n3) — Tiny route-planning example for western Belgium with route comparison and metric checks.
35
- - [`../resto.n3`](../resto.n3) — RESTdesc-style service composition from person and date to a concrete restaurant reservation.
36
- - [`../sudoku.n3`](../sudoku.n3) — Sudoku solver and report generator with consistency checks over the solved grid.
37
- - [`../wind-turbine.n3`](../wind-turbine.n3) — Predictive-maintenance example that turns sensor readings into an auditable inspection decision.
32
+ - [`../bmi.n3`](../bmi.n3) · [`../output/bmi.txt`](../output/bmi.txt) — Body Mass Index calculation with normalization, WHO category assignment, and boundary checks.
33
+ - [`../control-system.n3`](../control-system.n3) · [`../output/control-system.txt`](../output/control-system.txt) — Small control-system example that derives actuator commands and explains feedforward and feedback contributions.
34
+ - [`../easter.n3`](../easter.n3) · [`../output/easter.txt`](../output/easter.txt) — Gregorian Easter computus with a readable explanation and date-window checks.
35
+ - [`../french-cities.n3`](../french-cities.n3) · [`../output/french-cities.txt`](../output/french-cities.txt) — Graph reachability over French cities with explicit path reasoning.
36
+ - [`../gps.n3`](../gps.n3) · [`../output/gps.txt`](../output/gps.txt) — Tiny route-planning example for western Belgium with route comparison and metric checks.
37
+ - [`../resto.n3`](../resto.n3) · [`../output/resto.txt`](../output/resto.txt) — RESTdesc-style service composition from person and date to a concrete restaurant reservation.
38
+ - [`../sudoku.n3`](../sudoku.n3) · [`../output/sudoku.txt`](../output/sudoku.txt) — Sudoku solver and report generator with consistency checks over the solved grid.
39
+ - [`../wind-turbine.n3`](../wind-turbine.n3) · [`../output/wind-turbine.txt`](../output/wind-turbine.txt) — Predictive-maintenance example that turns sensor readings into an auditable inspection decision.
38
40
 
39
41
  ### Technical and scientific ARC demos
40
42
 
41
- - [`../matrix-mechanics.n3`](../matrix-mechanics.n3) — Small 2×2 matrix example deriving trace, determinant, products, and a non-zero commutator.
42
- - [`../pn-junction-tunneling.n3`](../pn-junction-tunneling.n3) — Semiconductor toy model that explains current-proxy behavior across bias points.
43
- - [`../transistor-switch.n3`](../transistor-switch.n3) — NPN low-side switch model with exact arithmetic and cutoff-versus-saturation checks.
43
+ - [`../matrix-mechanics.n3`](../matrix-mechanics.n3) · [`../output/matrix-mechanics.txt`](../output/matrix-mechanics.txt) — Small 2×2 matrix example deriving trace, determinant, products, and a non-zero commutator.
44
+ - [`../pn-junction-tunneling.n3`](../pn-junction-tunneling.n3) · [`../output/pn-junction-tunneling.txt`](../output/pn-junction-tunneling.txt) — Semiconductor toy model that explains current-proxy behavior across bias points.
45
+ - [`../transistor-switch.n3`](../transistor-switch.n3) · [`../output/transistor-switch.txt`](../output/transistor-switch.txt) — NPN low-side switch model with exact arithmetic and cutoff-versus-saturation checks.
44
46
 
45
47
  ### Deep-classification stress tests
46
48
 
47
- - [`../deep-taxonomy-10.n3`](../deep-taxonomy-10.n3) — ARC-style deep-taxonomy benchmark at depth 10.
48
- - [`../deep-taxonomy-100.n3`](../deep-taxonomy-100.n3) — ARC-style deep-taxonomy benchmark at depth 100.
49
- - [`../deep-taxonomy-1000.n3`](../deep-taxonomy-1000.n3) — ARC-style deep-taxonomy benchmark at depth 1000.
50
- - [`../deep-taxonomy-10000.n3`](../deep-taxonomy-10000.n3) — ARC-style deep-taxonomy benchmark at depth 10000.
51
- - [`../deep-taxonomy-100000.n3`](../deep-taxonomy-100000.n3) — ARC-style deep-taxonomy benchmark at depth 100000.
49
+ - [`../deep-taxonomy-10.n3`](../deep-taxonomy-10.n3) · [`../output/deep-taxonomy-10.txt`](../output/deep-taxonomy-10.txt) — ARC-style deep-taxonomy benchmark at depth 10.
50
+ - [`../deep-taxonomy-100.n3`](../deep-taxonomy-100.n3) · [`../output/deep-taxonomy-100.txt`](../output/deep-taxonomy-100.txt) — ARC-style deep-taxonomy benchmark at depth 100.
51
+ - [`../deep-taxonomy-1000.n3`](../deep-taxonomy-1000.n3) · [`../output/deep-taxonomy-1000.txt`](../output/deep-taxonomy-1000.txt) — ARC-style deep-taxonomy benchmark at depth 1000.
52
+ - [`../deep-taxonomy-10000.n3`](../deep-taxonomy-10000.n3) · [`../output/deep-taxonomy-10000.txt`](../output/deep-taxonomy-10000.txt) — ARC-style deep-taxonomy benchmark at depth 10000.
53
+ - [`../deep-taxonomy-100000.n3`](../deep-taxonomy-100000.n3) · [`../output/deep-taxonomy-100000.txt`](../output/deep-taxonomy-100000.txt) — ARC-style deep-taxonomy benchmark at depth 100000.
52
54
 
53
55
  ## Why these examples fit together
54
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.22.3",
3
+ "version": "1.22.4",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [
@@ -78,6 +78,24 @@ function showDiff({ examplesDir, expectedPath, generatedPath }) {
78
78
  if (d.stderr) process.stderr.write(d.stderr);
79
79
  }
80
80
 
81
+ function resolveExpectedPath(outputDir, inputFile) {
82
+ const exactPath = path.join(outputDir, inputFile);
83
+ if (fs.existsSync(exactPath)) return exactPath;
84
+
85
+ const stem = path.basename(inputFile, path.extname(inputFile));
86
+ const candidates = fs
87
+ .readdirSync(outputDir)
88
+ .filter((name) => path.basename(name, path.extname(name)) === stem)
89
+ .sort((a, b) => {
90
+ if (path.extname(a) === '.txt' && path.extname(b) !== '.txt') return -1;
91
+ if (path.extname(a) !== '.txt' && path.extname(b) === '.txt') return 1;
92
+ return a.localeCompare(b);
93
+ });
94
+
95
+ if (candidates.length === 0) return null;
96
+ return path.join(outputDir, candidates[0]);
97
+ }
98
+
81
99
  function main() {
82
100
  const suiteStart = Date.now();
83
101
 
@@ -123,7 +141,7 @@ function main() {
123
141
  const start = Date.now();
124
142
 
125
143
  const filePath = path.join(examplesDir, file);
126
- const expectedPath = path.join(outputDir, file);
144
+ const expectedPath = resolveExpectedPath(outputDir, file);
127
145
 
128
146
  let n3Text;
129
147
  try {
@@ -144,7 +162,7 @@ function main() {
144
162
  if (!fs.existsSync(expectedPath)) {
145
163
  const ms = Date.now() - start;
146
164
  fail(`${idx} ${file} ${msTag(ms)}`);
147
- fail(`Missing expected output/${file}`);
165
+ fail(`Missing expected output for ${path.basename(file, path.extname(file))}.*`);
148
166
  failed++;
149
167
  continue;
150
168
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes