eyeling 1.32.0 → 1.33.0

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 (630) hide show
  1. package/README.md +123 -18
  2. package/bin/eyeling.cjs +56 -4
  3. package/browser.d.ts +63 -0
  4. package/dist/browser/eyeling.browser.js +298 -14
  5. package/examples/eyelang/INTEGRATION.md +13 -0
  6. package/examples/eyelang/README.md +628 -0
  7. package/examples/eyelang/SPEC.md +684 -0
  8. package/examples/eyelang/access-control-policy.pl +52 -0
  9. package/examples/eyelang/ackermann.pl +46 -0
  10. package/examples/eyelang/age.pl +28 -0
  11. package/examples/eyelang/aliases-and-namespaces.pl +22 -0
  12. package/examples/eyelang/alignment-demo.pl +44 -0
  13. package/examples/eyelang/allen-interval-calculus.pl +64 -0
  14. package/examples/eyelang/ancestor.pl +21 -0
  15. package/examples/eyelang/animal.pl +21 -0
  16. package/examples/eyelang/annotation-rdf12.ttl +12 -0
  17. package/examples/eyelang/annotation.pl +34 -0
  18. package/examples/eyelang/auroracare.pl +309 -0
  19. package/examples/eyelang/backward.pl +12 -0
  20. package/examples/eyelang/basic-monadic.pl +10018 -0
  21. package/examples/eyelang/bayes-diagnosis.pl +108 -0
  22. package/examples/eyelang/bayes-therapy.pl +182 -0
  23. package/examples/eyelang/beam-deflection.pl +50 -0
  24. package/examples/eyelang/blocks-world-planning.pl +75 -0
  25. package/examples/eyelang/bmi.pl +232 -0
  26. package/examples/eyelang/braking-safety-worlds.pl +69 -0
  27. package/examples/eyelang/buck-converter-design.pl +78 -0
  28. package/examples/eyelang/cache-performance.pl +54 -0
  29. package/examples/eyelang/canary-release.pl +49 -0
  30. package/examples/eyelang/cat-koko.pl +24 -0
  31. package/examples/eyelang/clinical-trial-screening.pl +92 -0
  32. package/examples/eyelang/collatz-1000.pl +14 -0
  33. package/examples/eyelang/combinatorics-findall-sort.pl +37 -0
  34. package/examples/eyelang/competitive-enzyme-kinetics.pl +78 -0
  35. package/examples/eyelang/complex-matrix-stability.pl +45 -0
  36. package/examples/eyelang/complex.pl +121 -0
  37. package/examples/eyelang/composition-of-injective-functions-is-injective.pl +50 -0
  38. package/examples/eyelang/context-association.pl +53 -0
  39. package/examples/eyelang/control-system.pl +72 -0
  40. package/examples/eyelang/cryptarithmetic-send-more-money.pl +49 -0
  41. package/examples/eyelang/cyclic-path.pl +16 -0
  42. package/examples/eyelang/d3-group.pl +100 -0
  43. package/examples/eyelang/dairy-energy-balance.pl +65 -0
  44. package/examples/eyelang/data-negotiation.pl +39 -0
  45. package/examples/eyelang/deep-taxonomy-10.pl +115 -0
  46. package/examples/eyelang/deep-taxonomy-100.pl +385 -0
  47. package/examples/eyelang/deep-taxonomy-1000.pl +3085 -0
  48. package/examples/eyelang/deep-taxonomy-10000.pl +30094 -0
  49. package/examples/eyelang/deep-taxonomy-100000.pl +300184 -0
  50. package/examples/eyelang/delfour.pl +281 -0
  51. package/examples/eyelang/dense-hamiltonian-cycle.pl +92 -0
  52. package/examples/eyelang/deontic-logic.pl +52 -0
  53. package/examples/eyelang/derived-backward-rule.pl +30 -0
  54. package/examples/eyelang/derived-rule.pl +27 -0
  55. package/examples/eyelang/diamond-property.pl +38 -0
  56. package/examples/eyelang/dijkstra-findall-sort.pl +44 -0
  57. package/examples/eyelang/dijkstra-risk-path.pl +86 -0
  58. package/examples/eyelang/dijkstra.pl +46 -0
  59. package/examples/eyelang/dining-philosophers.pl +140 -0
  60. package/examples/eyelang/directional-language.ttl +9 -0
  61. package/examples/eyelang/dog.pl +25 -0
  62. package/examples/eyelang/drone-corridor-planner.pl +51 -0
  63. package/examples/eyelang/easter-computus.pl +89 -0
  64. package/examples/eyelang/electrical-rc-filter.pl +36 -0
  65. package/examples/eyelang/epidemic-policy.pl +67 -0
  66. package/examples/eyelang/equivalence-classes-overlap-implies-same-class.pl +27 -0
  67. package/examples/eyelang/eulerian-path.pl +85 -0
  68. package/examples/eyelang/ev-range-worlds.pl +82 -0
  69. package/examples/eyelang/exact-cover-sudoku.pl +113 -0
  70. package/examples/eyelang/existential-rule.pl +18 -0
  71. package/examples/eyelang/exoplanet-validation-worlds.pl +88 -0
  72. package/examples/eyelang/expression-eval.pl +43 -0
  73. package/examples/eyelang/eyeling-ackermann.n3 +41 -0
  74. package/examples/eyelang/eyeling-age-threshold.n3 +12 -0
  75. package/examples/eyelang/eyeling-alignment-demo.n3 +11 -0
  76. package/examples/eyelang/eyeling-allen-interval-calculus-small.n3 +13 -0
  77. package/examples/eyelang/eyeling-backward-recursion.n3 +11 -0
  78. package/examples/eyelang/eyeling-backward.n3 +10 -0
  79. package/examples/eyelang/eyeling-basic-monadic-small.n3 +11 -0
  80. package/examples/eyelang/eyeling-bmi.n3 +10 -0
  81. package/examples/eyelang/eyeling-cat-koko.n3 +15 -0
  82. package/examples/eyelang/eyeling-collatz-small.n3 +11 -0
  83. package/examples/eyelang/eyeling-collection.n3 +11 -0
  84. package/examples/eyelang/eyeling-complex-arithmetic.n3 +10 -0
  85. package/examples/eyelang/eyeling-context-association.n3 +11 -0
  86. package/examples/eyelang/eyeling-control-system-small.n3 +11 -0
  87. package/examples/eyelang/eyeling-crypto-builtins-extra.n3 +10 -0
  88. package/examples/eyelang/eyeling-crypto-builtins.n3 +8 -0
  89. package/examples/eyelang/eyeling-deep-taxonomy-10.n3 +18 -0
  90. package/examples/eyelang/eyeling-derived-backward-rule-flat.n3 +10 -0
  91. package/examples/eyelang/eyeling-derived-rule-flat.n3 +9 -0
  92. package/examples/eyelang/eyeling-digital-product-passport-small.n3 +11 -0
  93. package/examples/eyelang/eyeling-dijkstra-tiny.n3 +14 -0
  94. package/examples/eyelang/eyeling-dog-license.n3 +13 -0
  95. package/examples/eyelang/eyeling-drone-corridor-planner-small.n3 +13 -0
  96. package/examples/eyelang/eyeling-equals.n3 +8 -0
  97. package/examples/eyelang/eyeling-equivalence-classes.n3 +11 -0
  98. package/examples/eyelang/eyeling-euler-identity.n3 +9 -0
  99. package/examples/eyelang/eyeling-existential-rule.n3 +9 -0
  100. package/examples/eyelang/eyeling-expression-eval.n3 +11 -0
  101. package/examples/eyelang/eyeling-family-cousins-extended.n3 +12 -0
  102. package/examples/eyelang/eyeling-fastpow.n3 +10 -0
  103. package/examples/eyelang/eyeling-fibonacci.n3 +44 -0
  104. package/examples/eyelang/eyeling-french-cities-reachability.n3 +22 -0
  105. package/examples/eyelang/eyeling-goldbach-small.n3 +22 -0
  106. package/examples/eyelang/eyeling-good-cobbler.n3 +9 -0
  107. package/examples/eyelang/eyeling-list-builtins.n3 +10 -0
  108. package/examples/eyelang/eyeling-list-collection-extra.n3 +9 -0
  109. package/examples/eyelang/eyeling-math-builtins.n3 +9 -0
  110. package/examples/eyelang/eyeling-string-builtins-extra.n3 +9 -0
  111. package/examples/eyelang/eyeling-string-builtins.n3 +10 -0
  112. package/examples/eyelang/eyeling-time-builtins.n3 +11 -0
  113. package/examples/eyelang/eyeling-time-components-extra.n3 +10 -0
  114. package/examples/eyelang/eyeling-witch.n3 +10 -0
  115. package/examples/eyelang/family-cousins.n3 +17 -0
  116. package/examples/eyelang/family-cousins.pl +65 -0
  117. package/examples/eyelang/fastpow.pl +53 -0
  118. package/examples/eyelang/fft8-numeric.pl +83 -0
  119. package/examples/eyelang/fibonacci.pl +53 -0
  120. package/examples/eyelang/field-nitrogen-balance.pl +70 -0
  121. package/examples/eyelang/flandor.pl +296 -0
  122. package/examples/eyelang/floating-point.pl +23 -0
  123. package/examples/eyelang/four-color-map.pl +127 -0
  124. package/examples/eyelang/fundamental-theorem-arithmetic.pl +113 -0
  125. package/examples/eyelang/gcd-bezout-identity.pl +48 -0
  126. package/examples/eyelang/gd-step-certified.pl +158 -0
  127. package/examples/eyelang/gdpr-compliance.pl +69 -0
  128. package/examples/eyelang/goldbach-1000.pl +185 -0
  129. package/examples/eyelang/good-cobbler.pl +14 -0
  130. package/examples/eyelang/gps.pl +152 -0
  131. package/examples/eyelang/graph-reachability.pl +36 -0
  132. package/examples/eyelang/gray-code-counter.pl +48 -0
  133. package/examples/eyelang/greatest-lower-bound-uniqueness.pl +28 -0
  134. package/examples/eyelang/group-inverse-uniqueness.pl +34 -0
  135. package/examples/eyelang/hamiltonian-cycle.pl +55 -0
  136. package/examples/eyelang/hamiltonian-path.pl +49 -0
  137. package/examples/eyelang/hamming-code.pl +105 -0
  138. package/examples/eyelang/hanoi.pl +20 -0
  139. package/examples/eyelang/heat-loss.pl +51 -0
  140. package/examples/eyelang/heron-theorem.pl +36 -0
  141. package/examples/eyelang/ideal-gas-law.pl +37 -0
  142. package/examples/eyelang/illegitimate-reasoning.pl +88 -0
  143. package/examples/eyelang/kaprekar.pl +32 -0
  144. package/examples/eyelang/law-of-cosines.pl +31 -0
  145. package/examples/eyelang/least-squares-regression.pl +81 -0
  146. package/examples/eyelang/list-collection.pl +33 -0
  147. package/examples/eyelang/lldm.pl +78 -0
  148. package/examples/eyelang/manufacturing-quality-control.pl +73 -0
  149. package/examples/eyelang/matrix.pl +296 -0
  150. package/examples/eyelang/microgrid-dispatch.pl +85 -0
  151. package/examples/eyelang/monkey-bananas.pl +45 -0
  152. package/examples/eyelang/n-queens.pl +23 -0
  153. package/examples/eyelang/n3-builtins.n3 +28 -0
  154. package/examples/eyelang/network-sla.pl +48 -0
  155. package/examples/eyelang/newton-raphson.pl +49 -0
  156. package/examples/eyelang/nixon-diamond.pl +37 -0
  157. package/examples/eyelang/odrl-dpv-healthcare-risk-ranked.pl +266 -0
  158. package/examples/eyelang/odrl-dpv-risk-ranked.pl +320 -0
  159. package/examples/eyelang/orbital-transfer-design.pl +113 -0
  160. package/examples/eyelang/output/access-control-policy.pl +2 -0
  161. package/examples/eyelang/output/ackermann.pl +12 -0
  162. package/examples/eyelang/output/age.pl +2 -0
  163. package/examples/eyelang/output/aliases-and-namespaces.pl +5 -0
  164. package/examples/eyelang/output/alignment-demo.pl +32 -0
  165. package/examples/eyelang/output/allen-interval-calculus.pl +154 -0
  166. package/examples/eyelang/output/ancestor.pl +6 -0
  167. package/examples/eyelang/output/animal.pl +4 -0
  168. package/examples/eyelang/output/annotation-rdf12.ttl +1 -0
  169. package/examples/eyelang/output/annotation.pl +4 -0
  170. package/examples/eyelang/output/auroracare.pl +117 -0
  171. package/examples/eyelang/output/backward.pl +1 -0
  172. package/examples/eyelang/output/basic-monadic.pl +1518 -0
  173. package/examples/eyelang/output/bayes-diagnosis.pl +13 -0
  174. package/examples/eyelang/output/bayes-therapy.pl +23 -0
  175. package/examples/eyelang/output/beam-deflection.pl +5 -0
  176. package/examples/eyelang/output/blocks-world-planning.pl +4 -0
  177. package/examples/eyelang/output/bmi.pl +32 -0
  178. package/examples/eyelang/output/braking-safety-worlds.pl +18 -0
  179. package/examples/eyelang/output/buck-converter-design.pl +6 -0
  180. package/examples/eyelang/output/cache-performance.pl +4 -0
  181. package/examples/eyelang/output/canary-release.pl +5 -0
  182. package/examples/eyelang/output/cat-koko.pl +3 -0
  183. package/examples/eyelang/output/clinical-trial-screening.pl +9 -0
  184. package/examples/eyelang/output/collatz-1000.pl +1000 -0
  185. package/examples/eyelang/output/combinatorics-findall-sort.pl +2 -0
  186. package/examples/eyelang/output/competitive-enzyme-kinetics.pl +6 -0
  187. package/examples/eyelang/output/complex-matrix-stability.pl +5 -0
  188. package/examples/eyelang/output/complex.pl +1 -0
  189. package/examples/eyelang/output/composition-of-injective-functions-is-injective.pl +2 -0
  190. package/examples/eyelang/output/context-association.pl +3 -0
  191. package/examples/eyelang/output/control-system.pl +6 -0
  192. package/examples/eyelang/output/cryptarithmetic-send-more-money.pl +6 -0
  193. package/examples/eyelang/output/cyclic-path.pl +16 -0
  194. package/examples/eyelang/output/d3-group.pl +2 -0
  195. package/examples/eyelang/output/dairy-energy-balance.pl +13 -0
  196. package/examples/eyelang/output/data-negotiation.pl +1 -0
  197. package/examples/eyelang/output/deep-taxonomy-10.pl +16 -0
  198. package/examples/eyelang/output/deep-taxonomy-100.pl +16 -0
  199. package/examples/eyelang/output/deep-taxonomy-1000.pl +16 -0
  200. package/examples/eyelang/output/deep-taxonomy-10000.pl +16 -0
  201. package/examples/eyelang/output/deep-taxonomy-100000.pl +16 -0
  202. package/examples/eyelang/output/delfour.pl +31 -0
  203. package/examples/eyelang/output/dense-hamiltonian-cycle.pl +4 -0
  204. package/examples/eyelang/output/deontic-logic.pl +4 -0
  205. package/examples/eyelang/output/derived-backward-rule.pl +3 -0
  206. package/examples/eyelang/output/derived-rule.pl +2 -0
  207. package/examples/eyelang/output/diamond-property.pl +4 -0
  208. package/examples/eyelang/output/dijkstra-findall-sort.pl +2 -0
  209. package/examples/eyelang/output/dijkstra-risk-path.pl +29 -0
  210. package/examples/eyelang/output/dijkstra.pl +16 -0
  211. package/examples/eyelang/output/dining-philosophers.pl +350 -0
  212. package/examples/eyelang/output/directional-language.ttl +1 -0
  213. package/examples/eyelang/output/dog.pl +1 -0
  214. package/examples/eyelang/output/drone-corridor-planner.pl +17 -0
  215. package/examples/eyelang/output/easter-computus.pl +30 -0
  216. package/examples/eyelang/output/electrical-rc-filter.pl +3 -0
  217. package/examples/eyelang/output/epidemic-policy.pl +14 -0
  218. package/examples/eyelang/output/equivalence-classes-overlap-implies-same-class.pl +18 -0
  219. package/examples/eyelang/output/eulerian-path.pl +3 -0
  220. package/examples/eyelang/output/ev-range-worlds.pl +19 -0
  221. package/examples/eyelang/output/exact-cover-sudoku.pl +3 -0
  222. package/examples/eyelang/output/existential-rule.pl +2 -0
  223. package/examples/eyelang/output/exoplanet-validation-worlds.pl +22 -0
  224. package/examples/eyelang/output/expression-eval.pl +1 -0
  225. package/examples/eyelang/output/eyeling-ackermann.n3 +12 -0
  226. package/examples/eyelang/output/eyeling-age-threshold.n3 +4 -0
  227. package/examples/eyelang/output/eyeling-alignment-demo.n3 +1 -0
  228. package/examples/eyelang/output/eyeling-allen-interval-calculus-small.n3 +3 -0
  229. package/examples/eyelang/output/eyeling-backward-recursion.n3 +9 -0
  230. package/examples/eyelang/output/eyeling-backward.n3 +1 -0
  231. package/examples/eyelang/output/eyeling-basic-monadic-small.n3 +8 -0
  232. package/examples/eyelang/output/eyeling-bmi.n3 +2 -0
  233. package/examples/eyelang/output/eyeling-cat-koko.n3 +3 -0
  234. package/examples/eyelang/output/eyeling-collatz-small.n3 +3 -0
  235. package/examples/eyelang/output/eyeling-collection.n3 +1 -0
  236. package/examples/eyelang/output/eyeling-complex-arithmetic.n3 +5 -0
  237. package/examples/eyelang/output/eyeling-context-association.n3 +4 -0
  238. package/examples/eyelang/output/eyeling-control-system-small.n3 +4 -0
  239. package/examples/eyelang/output/eyeling-crypto-builtins-extra.n3 +3 -0
  240. package/examples/eyelang/output/eyeling-crypto-builtins.n3 +2 -0
  241. package/examples/eyelang/output/eyeling-deep-taxonomy-10.n3 +32 -0
  242. package/examples/eyelang/output/eyeling-derived-backward-rule-flat.n3 +4 -0
  243. package/examples/eyelang/output/eyeling-derived-rule-flat.n3 +2 -0
  244. package/examples/eyelang/output/eyeling-digital-product-passport-small.n3 +3 -0
  245. package/examples/eyelang/output/eyeling-dijkstra-tiny.n3 +9 -0
  246. package/examples/eyelang/output/eyeling-dog-license.n3 +1 -0
  247. package/examples/eyelang/output/eyeling-drone-corridor-planner-small.n3 +5 -0
  248. package/examples/eyelang/output/eyeling-equals.n3 +1 -0
  249. package/examples/eyelang/output/eyeling-equivalence-classes.n3 +2 -0
  250. package/examples/eyelang/output/eyeling-euler-identity.n3 +3 -0
  251. package/examples/eyelang/output/eyeling-existential-rule.n3 +4 -0
  252. package/examples/eyelang/output/eyeling-expression-eval.n3 +3 -0
  253. package/examples/eyelang/output/eyeling-family-cousins-extended.n3 +6 -0
  254. package/examples/eyelang/output/eyeling-fastpow.n3 +4 -0
  255. package/examples/eyelang/output/eyeling-fibonacci.n3 +6 -0
  256. package/examples/eyelang/output/eyeling-french-cities-reachability.n3 +25 -0
  257. package/examples/eyelang/output/eyeling-goldbach-small.n3 +2 -0
  258. package/examples/eyelang/output/eyeling-good-cobbler.n3 +2 -0
  259. package/examples/eyelang/output/eyeling-list-builtins.n3 +6 -0
  260. package/examples/eyelang/output/eyeling-list-collection-extra.n3 +5 -0
  261. package/examples/eyelang/output/eyeling-math-builtins.n3 +5 -0
  262. package/examples/eyelang/output/eyeling-string-builtins-extra.n3 +3 -0
  263. package/examples/eyelang/output/eyeling-string-builtins.n3 +4 -0
  264. package/examples/eyelang/output/eyeling-time-builtins.n3 +4 -0
  265. package/examples/eyelang/output/eyeling-time-components-extra.n3 +5 -0
  266. package/examples/eyelang/output/eyeling-witch.n3 +2 -0
  267. package/examples/eyelang/output/family-cousins.n3 +8 -0
  268. package/examples/eyelang/output/family-cousins.pl +28 -0
  269. package/examples/eyelang/output/fastpow.pl +6 -0
  270. package/examples/eyelang/output/fft8-numeric.pl +4 -0
  271. package/examples/eyelang/output/fibonacci.pl +6 -0
  272. package/examples/eyelang/output/field-nitrogen-balance.pl +21 -0
  273. package/examples/eyelang/output/flandor.pl +43 -0
  274. package/examples/eyelang/output/floating-point.pl +9 -0
  275. package/examples/eyelang/output/four-color-map.pl +3 -0
  276. package/examples/eyelang/output/fundamental-theorem-arithmetic.pl +9 -0
  277. package/examples/eyelang/output/gcd-bezout-identity.pl +36 -0
  278. package/examples/eyelang/output/gd-step-certified.pl +79 -0
  279. package/examples/eyelang/output/gdpr-compliance.pl +6 -0
  280. package/examples/eyelang/output/goldbach-1000.pl +667 -0
  281. package/examples/eyelang/output/good-cobbler.pl +1 -0
  282. package/examples/eyelang/output/gps.pl +21 -0
  283. package/examples/eyelang/output/graph-reachability.pl +3 -0
  284. package/examples/eyelang/output/gray-code-counter.pl +1 -0
  285. package/examples/eyelang/output/greatest-lower-bound-uniqueness.pl +2 -0
  286. package/examples/eyelang/output/group-inverse-uniqueness.pl +2 -0
  287. package/examples/eyelang/output/hamiltonian-cycle.pl +4 -0
  288. package/examples/eyelang/output/hamiltonian-path.pl +121 -0
  289. package/examples/eyelang/output/hamming-code.pl +6 -0
  290. package/examples/eyelang/output/hanoi.pl +1 -0
  291. package/examples/eyelang/output/heat-loss.pl +5 -0
  292. package/examples/eyelang/output/heron-theorem.pl +4 -0
  293. package/examples/eyelang/output/ideal-gas-law.pl +3 -0
  294. package/examples/eyelang/output/illegitimate-reasoning.pl +15 -0
  295. package/examples/eyelang/output/kaprekar.pl +8 -0
  296. package/examples/eyelang/output/law-of-cosines.pl +3 -0
  297. package/examples/eyelang/output/least-squares-regression.pl +5 -0
  298. package/examples/eyelang/output/list-collection.pl +3 -0
  299. package/examples/eyelang/output/lldm.pl +6 -0
  300. package/examples/eyelang/output/manufacturing-quality-control.pl +6 -0
  301. package/examples/eyelang/output/matrix.pl +10 -0
  302. package/examples/eyelang/output/microgrid-dispatch.pl +6 -0
  303. package/examples/eyelang/output/monkey-bananas.pl +5 -0
  304. package/examples/eyelang/output/n-queens.pl +93 -0
  305. package/examples/eyelang/output/n3-builtins.n3 +6 -0
  306. package/examples/eyelang/output/network-sla.pl +4 -0
  307. package/examples/eyelang/output/newton-raphson.pl +3 -0
  308. package/examples/eyelang/output/nixon-diamond.pl +5 -0
  309. package/examples/eyelang/output/odrl-dpv-healthcare-risk-ranked.pl +42 -0
  310. package/examples/eyelang/output/odrl-dpv-risk-ranked.pl +120 -0
  311. package/examples/eyelang/output/orbital-transfer-design.pl +7 -0
  312. package/examples/eyelang/output/path-discovery.pl +3 -0
  313. package/examples/eyelang/output/peano-arithmetic.pl +3 -0
  314. package/examples/eyelang/output/peasant.pl +10 -0
  315. package/examples/eyelang/output/pendulum-period.pl +4 -0
  316. package/examples/eyelang/output/polynomial.pl +14 -0
  317. package/examples/eyelang/output/project-portfolio-optimization.pl +6 -0
  318. package/examples/eyelang/output/proof-contrapositive.pl +3 -0
  319. package/examples/eyelang/output/quadratic-formula.pl +6 -0
  320. package/examples/eyelang/output/quine-mccluskey.pl +3 -0
  321. package/examples/eyelang/output/radioactive-decay.pl +5 -0
  322. package/examples/eyelang/output/resilient-city-orchestration.pl +67 -0
  323. package/examples/eyelang/output/riemann-hypothesis.pl +12 -0
  324. package/examples/eyelang/output/sat-dpll.pl +5 -0
  325. package/examples/eyelang/output/security-incident-correlation.pl +3 -0
  326. package/examples/eyelang/output/service-impact.pl +11 -0
  327. package/examples/eyelang/output/sieve.pl +1 -0
  328. package/examples/eyelang/output/skolem-functions.pl +16 -0
  329. package/examples/eyelang/output/socket-age.pl +1 -0
  330. package/examples/eyelang/output/socket-family.pl +3 -0
  331. package/examples/eyelang/output/socrates.n3 +1 -0
  332. package/examples/eyelang/output/socrates.pl +2 -0
  333. package/examples/eyelang/output/statistics-summary.pl +4 -0
  334. package/examples/eyelang/output/sudoku.pl +2 -0
  335. package/examples/eyelang/output/superdense-coding.pl +6 -0
  336. package/examples/eyelang/output/traveling-salesman.pl +1 -0
  337. package/examples/eyelang/output/triple-term.n3 +2 -0
  338. package/examples/eyelang/output/turing.pl +12 -0
  339. package/examples/eyelang/output/vector-similarity.pl +4 -0
  340. package/examples/eyelang/output/witch.pl +7 -0
  341. package/examples/eyelang/output/wolf-goat-cabbage.pl +3 -0
  342. package/examples/eyelang/output/zebra.pl +3 -0
  343. package/examples/eyelang/path-discovery.pl +44998 -0
  344. package/examples/eyelang/peano-arithmetic.pl +31 -0
  345. package/examples/eyelang/peasant.pl +30 -0
  346. package/examples/eyelang/pendulum-period.pl +50 -0
  347. package/examples/eyelang/polynomial.pl +124 -0
  348. package/examples/eyelang/project-portfolio-optimization.pl +101 -0
  349. package/examples/eyelang/proof/age.pl +71 -0
  350. package/examples/eyelang/proof/aliases-and-namespaces.pl +78 -0
  351. package/examples/eyelang/proof/ancestor.pl +140 -0
  352. package/examples/eyelang/proof/animal.pl +68 -0
  353. package/examples/eyelang/proof/annotation.pl +80 -0
  354. package/examples/eyelang/proof/backward.pl +22 -0
  355. package/examples/eyelang/proof/cat-koko.pl +86 -0
  356. package/examples/eyelang/proof/data-negotiation.pl +76 -0
  357. package/examples/eyelang/proof/derived-rule.pl +43 -0
  358. package/examples/eyelang/proof/dog.pl +31 -0
  359. package/examples/eyelang/proof/electrical-rc-filter.pl +105 -0
  360. package/examples/eyelang/proof/existential-rule.pl +40 -0
  361. package/examples/eyelang/proof/floating-point.pl +160 -0
  362. package/examples/eyelang/proof/good-cobbler.pl +16 -0
  363. package/examples/eyelang/proof/group-inverse-uniqueness.pl +84 -0
  364. package/examples/eyelang/proof/list-collection.pl +52 -0
  365. package/examples/eyelang/proof/proof-contrapositive.pl +78 -0
  366. package/examples/eyelang/proof/socket-age.pl +32 -0
  367. package/examples/eyelang/proof/socket-family.pl +59 -0
  368. package/examples/eyelang/proof/socrates.pl +38 -0
  369. package/examples/eyelang/proof-contrapositive.pl +27 -0
  370. package/examples/eyelang/quadratic-formula.pl +54 -0
  371. package/examples/eyelang/quine-mccluskey.pl +143 -0
  372. package/examples/eyelang/radioactive-decay.pl +56 -0
  373. package/examples/eyelang/resilient-city-orchestration.pl +303 -0
  374. package/examples/eyelang/riemann-hypothesis.pl +110 -0
  375. package/examples/eyelang/sat-dpll.pl +80 -0
  376. package/examples/eyelang/security-incident-correlation.pl +69 -0
  377. package/examples/eyelang/service-impact.pl +41 -0
  378. package/examples/eyelang/sieve.pl +20 -0
  379. package/examples/eyelang/skolem-functions.pl +52 -0
  380. package/examples/eyelang/socket-age.pl +39 -0
  381. package/examples/eyelang/socket-family.pl +28 -0
  382. package/examples/eyelang/socrates.n3 +11 -0
  383. package/examples/eyelang/socrates.pl +19 -0
  384. package/examples/eyelang/statistics-summary.pl +54 -0
  385. package/examples/eyelang/sudoku.pl +20 -0
  386. package/examples/eyelang/superdense-coding.pl +84 -0
  387. package/examples/eyelang/traveling-salesman.pl +64 -0
  388. package/examples/eyelang/triple-term.n3 +9 -0
  389. package/examples/eyelang/turing.pl +67 -0
  390. package/examples/eyelang/vector-similarity.pl +56 -0
  391. package/examples/eyelang/witch.pl +38 -0
  392. package/examples/eyelang/wolf-goat-cabbage.pl +56 -0
  393. package/examples/eyelang/zebra.pl +44 -0
  394. package/eyelang.d.ts +92 -0
  395. package/eyeling-builtins.ttl +3 -3
  396. package/eyeling.js +298 -14
  397. package/index.d.ts +290 -283
  398. package/index.js +95 -1
  399. package/lib/builtins.js +297 -14
  400. package/lib/cli.js +1 -0
  401. package/lib/eyelang/bin.js +7 -0
  402. package/lib/eyelang/builtins/aggregation.mjs +81 -0
  403. package/lib/eyelang/builtins/alphametic.mjs +144 -0
  404. package/lib/eyelang/builtins/arithmetic.mjs +197 -0
  405. package/lib/eyelang/builtins/control.mjs +22 -0
  406. package/lib/eyelang/builtins/core.mjs +78 -0
  407. package/lib/eyelang/builtins/formula.mjs +42 -0
  408. package/lib/eyelang/builtins/lists.mjs +149 -0
  409. package/lib/eyelang/builtins/matrix.mjs +226 -0
  410. package/lib/eyelang/builtins/n3.mjs +483 -0
  411. package/lib/eyelang/builtins/number-theory.mjs +114 -0
  412. package/lib/eyelang/builtins/portfolio.mjs +73 -0
  413. package/lib/eyelang/builtins/registry.mjs +54 -0
  414. package/lib/eyelang/builtins/search.mjs +579 -0
  415. package/lib/eyelang/builtins/strings.mjs +41 -0
  416. package/lib/eyelang/builtins/sudoku.mjs +141 -0
  417. package/lib/eyelang/cli.mjs +192 -0
  418. package/lib/eyelang/explain.mjs +324 -0
  419. package/lib/eyelang/hash.mjs +294 -0
  420. package/lib/eyelang/index.mjs +48 -0
  421. package/lib/eyelang/parser.mjs +428 -0
  422. package/lib/eyelang/program.mjs +244 -0
  423. package/lib/eyelang/rdf.mjs +747 -0
  424. package/lib/eyelang/solver.mjs +237 -0
  425. package/lib/eyelang/term.mjs +328 -0
  426. package/package.json +15 -5
  427. package/test/builtins.test.js +49 -1
  428. package/test/eyelang/conformance/README.md +45 -0
  429. package/test/eyelang/conformance/cases/core/001_fact_output.pl +4 -0
  430. package/test/eyelang/conformance/cases/core/001_fact_query.query +1 -0
  431. package/test/eyelang/conformance/cases/core/002_rule_recursion.pl +7 -0
  432. package/test/eyelang/conformance/cases/core/002_rule_recursion.query +1 -0
  433. package/test/eyelang/conformance/cases/core/003_terms_and_readback.pl +16 -0
  434. package/test/eyelang/conformance/cases/core/003_terms_and_readback.query +1 -0
  435. package/test/eyelang/conformance/cases/core/004_conjunction_and_parentheses.pl +5 -0
  436. package/test/eyelang/conformance/cases/core/004_conjunction_and_parentheses.query +1 -0
  437. package/test/eyelang/conformance/cases/core/005_list_deconstruction.pl +6 -0
  438. package/test/eyelang/conformance/cases/core/005_list_deconstruction.query +1 -0
  439. package/test/eyelang/conformance/cases/core/006_comma_formula_data.pl +4 -0
  440. package/test/eyelang/conformance/cases/core/006_comma_formula_data.query +1 -0
  441. package/test/eyelang/conformance/cases/core/007_anonymous_variables.pl +5 -0
  442. package/test/eyelang/conformance/cases/core/007_anonymous_variables.query +1 -0
  443. package/test/eyelang/conformance/cases/core/008_graphic_atoms.pl +6 -0
  444. package/test/eyelang/conformance/cases/core/008_graphic_atoms.query +1 -0
  445. package/test/eyelang/conformance/cases/core/009_comments_and_whitespace.pl +5 -0
  446. package/test/eyelang/conformance/cases/core/009_comments_and_whitespace.query +1 -0
  447. package/test/eyelang/conformance/cases/core/010_variable_scope_and_reuse.pl +8 -0
  448. package/test/eyelang/conformance/cases/core/010_variable_scope_and_reuse.query +1 -0
  449. package/test/eyelang/conformance/cases/core/011_predicate_arity.pl +6 -0
  450. package/test/eyelang/conformance/cases/core/011_predicate_arity.query +1 -0
  451. package/test/eyelang/conformance/cases/core/012_nested_compound_unification.pl +5 -0
  452. package/test/eyelang/conformance/cases/core/012_nested_compound_unification.query +1 -0
  453. package/test/eyelang/conformance/cases/core/013_multiple_clauses_order.pl +6 -0
  454. package/test/eyelang/conformance/cases/core/013_multiple_clauses_order.query +1 -0
  455. package/test/eyelang/conformance/cases/core/014_failure_filters_answers.pl +7 -0
  456. package/test/eyelang/conformance/cases/core/014_failure_filters_answers.query +1 -0
  457. package/test/eyelang/conformance/cases/core/015_improper_list_unification.pl +6 -0
  458. package/test/eyelang/conformance/cases/core/015_improper_list_unification.query +1 -0
  459. package/test/eyelang/conformance/cases/core/016_zero_arity_compound.pl +4 -0
  460. package/test/eyelang/conformance/cases/core/016_zero_arity_compound.query +1 -0
  461. package/test/eyelang/conformance/cases/core/017_three_step_recursion.pl +8 -0
  462. package/test/eyelang/conformance/cases/core/017_three_step_recursion.query +1 -0
  463. package/test/eyelang/conformance/cases/core/018_quoted_atom_readback.pl +6 -0
  464. package/test/eyelang/conformance/cases/core/018_quoted_atom_readback.query +1 -0
  465. package/test/eyelang/conformance/cases/core/019_parenthesized_three_conjuncts.pl +7 -0
  466. package/test/eyelang/conformance/cases/core/019_parenthesized_three_conjuncts.query +1 -0
  467. package/test/eyelang/conformance/cases/core/020_nested_list_terms.pl +5 -0
  468. package/test/eyelang/conformance/cases/core/020_nested_list_terms.query +1 -0
  469. package/test/eyelang/conformance/cases/core/021_repeated_variable_head.pl +7 -0
  470. package/test/eyelang/conformance/cases/core/022_rule_head_structure.pl +5 -0
  471. package/test/eyelang/conformance/cases/core/023_quoted_escapes_readback.pl +5 -0
  472. package/test/eyelang/conformance/cases/core/024_numeric_literal_readback.pl +6 -0
  473. package/test/eyelang/conformance/cases/core/025_body_parentheses_with_formula_data.pl +5 -0
  474. package/test/eyelang/conformance/cases/core/026_underscore_named_variable_reuse.pl +5 -0
  475. package/test/eyelang/conformance/cases/extension/001_default_derived_output.pl +5 -0
  476. package/test/eyelang/conformance/cases/extension/002_materialize_focus.pl +5 -0
  477. package/test/eyelang/conformance/cases/extension/003_arithmetic_and_comparison.pl +12 -0
  478. package/test/eyelang/conformance/cases/extension/003_arithmetic_and_comparison.query +1 -0
  479. package/test/eyelang/conformance/cases/extension/004_strings_and_atoms.pl +6 -0
  480. package/test/eyelang/conformance/cases/extension/004_strings_and_atoms.query +1 -0
  481. package/test/eyelang/conformance/cases/extension/005_lists_aggregation_ordering.pl +10 -0
  482. package/test/eyelang/conformance/cases/extension/005_lists_aggregation_ordering.query +1 -0
  483. package/test/eyelang/conformance/cases/extension/006_formula_terms.pl +5 -0
  484. package/test/eyelang/conformance/cases/extension/006_formula_terms.query +1 -0
  485. package/test/eyelang/conformance/cases/extension/007_negation_once_generators.pl +7 -0
  486. package/test/eyelang/conformance/cases/extension/007_negation_once_generators.query +1 -0
  487. package/test/eyelang/conformance/cases/extension/008_equality_and_inequality.pl +6 -0
  488. package/test/eyelang/conformance/cases/extension/008_equality_and_inequality.query +1 -0
  489. package/test/eyelang/conformance/cases/extension/009_list_relations.pl +6 -0
  490. package/test/eyelang/conformance/cases/extension/009_list_relations.query +1 -0
  491. package/test/eyelang/conformance/cases/extension/010_append_splits.pl +3 -0
  492. package/test/eyelang/conformance/cases/extension/010_append_splits.query +1 -0
  493. package/test/eyelang/conformance/cases/extension/011_matching_and_comparison.pl +7 -0
  494. package/test/eyelang/conformance/cases/extension/011_matching_and_comparison.query +1 -0
  495. package/test/eyelang/conformance/cases/extension/012_memoize_declaration.pl +8 -0
  496. package/test/eyelang/conformance/cases/extension/012_memoize_declaration.query +1 -0
  497. package/test/eyelang/conformance/cases/extension/013_numeric_functions.pl +9 -0
  498. package/test/eyelang/conformance/cases/extension/013_numeric_functions.query +1 -0
  499. package/test/eyelang/conformance/cases/extension/014_between_enumeration.pl +3 -0
  500. package/test/eyelang/conformance/cases/extension/014_between_enumeration.query +1 -0
  501. package/test/eyelang/conformance/cases/extension/015_smallest_divisor.pl +3 -0
  502. package/test/eyelang/conformance/cases/extension/015_smallest_divisor.query +1 -0
  503. package/test/eyelang/conformance/cases/extension/016_negation_filter.pl +7 -0
  504. package/test/eyelang/conformance/cases/extension/016_negation_filter.query +1 -0
  505. package/test/eyelang/conformance/cases/extension/017_once_user_predicate.pl +5 -0
  506. package/test/eyelang/conformance/cases/extension/017_once_user_predicate.query +1 -0
  507. package/test/eyelang/conformance/cases/extension/018_findall_user_goal.pl +6 -0
  508. package/test/eyelang/conformance/cases/extension/018_findall_user_goal.query +1 -0
  509. package/test/eyelang/conformance/cases/extension/019_sort_deduplicates_atoms.pl +3 -0
  510. package/test/eyelang/conformance/cases/extension/019_sort_deduplicates_atoms.query +1 -0
  511. package/test/eyelang/conformance/cases/extension/020_append_bound_prefix_suffix.pl +4 -0
  512. package/test/eyelang/conformance/cases/extension/020_append_bound_prefix_suffix.query +1 -0
  513. package/test/eyelang/conformance/cases/extension/021_nth0_index_generation.pl +3 -0
  514. package/test/eyelang/conformance/cases/extension/021_nth0_index_generation.query +1 -0
  515. package/test/eyelang/conformance/cases/extension/022_set_nth0_edges.pl +4 -0
  516. package/test/eyelang/conformance/cases/extension/022_set_nth0_edges.query +1 -0
  517. package/test/eyelang/conformance/cases/extension/023_select_duplicate_occurrences.pl +3 -0
  518. package/test/eyelang/conformance/cases/extension/023_select_duplicate_occurrences.query +1 -0
  519. package/test/eyelang/conformance/cases/extension/024_not_member_filter.pl +6 -0
  520. package/test/eyelang/conformance/cases/extension/024_not_member_filter.query +1 -0
  521. package/test/eyelang/conformance/cases/extension/025_is_list_filter.pl +5 -0
  522. package/test/eyelang/conformance/cases/extension/025_is_list_filter.query +1 -0
  523. package/test/eyelang/conformance/cases/extension/026_nested_formula_terms.pl +5 -0
  524. package/test/eyelang/conformance/cases/extension/026_nested_formula_terms.query +1 -0
  525. package/test/eyelang/conformance/cases/extension/027_materialize_excludes_source_fact.pl +6 -0
  526. package/test/eyelang/conformance/cases/extension/028_numeric_and_lexical_comparison.pl +5 -0
  527. package/test/eyelang/conformance/cases/extension/028_numeric_and_lexical_comparison.query +1 -0
  528. package/test/eyelang/conformance/cases/extension/029_string_matching_filters.pl +6 -0
  529. package/test/eyelang/conformance/cases/extension/029_string_matching_filters.query +1 -0
  530. package/test/eyelang/conformance/cases/extension/030_string_and_atom_concat.pl +4 -0
  531. package/test/eyelang/conformance/cases/extension/030_string_and_atom_concat.query +1 -0
  532. package/test/eyelang/conformance/cases/extension/031_countall_empty_and_nonempty.pl +4 -0
  533. package/test/eyelang/conformance/cases/extension/031_countall_empty_and_nonempty.query +1 -0
  534. package/test/eyelang/conformance/cases/extension/032_sumall_numeric_template.pl +5 -0
  535. package/test/eyelang/conformance/cases/extension/032_sumall_numeric_template.query +1 -0
  536. package/test/eyelang/conformance/cases/extension/033_aggregate_min_template.pl +5 -0
  537. package/test/eyelang/conformance/cases/extension/033_aggregate_min_template.query +1 -0
  538. package/test/eyelang/conformance/cases/extension/034_aggregate_max_compound_key.pl +5 -0
  539. package/test/eyelang/conformance/cases/extension/034_aggregate_max_compound_key.query +1 -0
  540. package/test/eyelang/conformance/cases/extension/035_date_difference.pl +4 -0
  541. package/test/eyelang/conformance/cases/extension/036_extended_gcd.pl +3 -0
  542. package/test/eyelang/conformance/cases/extension/037_collatz_trajectory.pl +3 -0
  543. package/test/eyelang/conformance/cases/extension/038_kaprekar_steps.pl +3 -0
  544. package/test/eyelang/conformance/cases/extension/039_goldbach_pair.pl +3 -0
  545. package/test/eyelang/conformance/cases/extension/040_matrix_operations.pl +5 -0
  546. package/test/eyelang/conformance/cases/extension/041_atom_range_generators.pl +5 -0
  547. package/test/eyelang/conformance/cases/extension/042_n_queens_small.pl +3 -0
  548. package/test/eyelang/conformance/cases/extension/043_cnf_model.pl +3 -0
  549. package/test/eyelang/conformance/cases/extension/044_cover9_filter.pl +6 -0
  550. package/test/eyelang/conformance/cases/extension/045_alphametic_sum_small.pl +3 -0
  551. package/test/eyelang/conformance/cases/extension/046_bounded_subset.pl +4 -0
  552. package/test/eyelang/conformance/expected/core/001_fact_output.out +1 -0
  553. package/test/eyelang/conformance/expected/core/002_rule_recursion.out +2 -0
  554. package/test/eyelang/conformance/expected/core/003_terms_and_readback.out +13 -0
  555. package/test/eyelang/conformance/expected/core/004_conjunction_and_parentheses.out +1 -0
  556. package/test/eyelang/conformance/expected/core/005_list_deconstruction.out +2 -0
  557. package/test/eyelang/conformance/expected/core/006_comma_formula_data.out +1 -0
  558. package/test/eyelang/conformance/expected/core/007_anonymous_variables.out +1 -0
  559. package/test/eyelang/conformance/expected/core/008_graphic_atoms.out +3 -0
  560. package/test/eyelang/conformance/expected/core/009_comments_and_whitespace.out +2 -0
  561. package/test/eyelang/conformance/expected/core/010_variable_scope_and_reuse.out +2 -0
  562. package/test/eyelang/conformance/expected/core/011_predicate_arity.out +2 -0
  563. package/test/eyelang/conformance/expected/core/012_nested_compound_unification.out +2 -0
  564. package/test/eyelang/conformance/expected/core/013_multiple_clauses_order.out +2 -0
  565. package/test/eyelang/conformance/expected/core/014_failure_filters_answers.out +1 -0
  566. package/test/eyelang/conformance/expected/core/015_improper_list_unification.out +3 -0
  567. package/test/eyelang/conformance/expected/core/016_zero_arity_compound.out +1 -0
  568. package/test/eyelang/conformance/expected/core/017_three_step_recursion.out +3 -0
  569. package/test/eyelang/conformance/expected/core/018_quoted_atom_readback.out +3 -0
  570. package/test/eyelang/conformance/expected/core/019_parenthesized_three_conjuncts.out +1 -0
  571. package/test/eyelang/conformance/expected/core/020_nested_list_terms.out +2 -0
  572. package/test/eyelang/conformance/expected/core/021_repeated_variable_head.out +2 -0
  573. package/test/eyelang/conformance/expected/core/022_rule_head_structure.out +2 -0
  574. package/test/eyelang/conformance/expected/core/023_quoted_escapes_readback.out +2 -0
  575. package/test/eyelang/conformance/expected/core/024_numeric_literal_readback.out +3 -0
  576. package/test/eyelang/conformance/expected/core/025_body_parentheses_with_formula_data.out +1 -0
  577. package/test/eyelang/conformance/expected/core/026_underscore_named_variable_reuse.out +1 -0
  578. package/test/eyelang/conformance/expected/extension/001_default_derived_output.out +3 -0
  579. package/test/eyelang/conformance/expected/extension/002_materialize_focus.out +1 -0
  580. package/test/eyelang/conformance/expected/extension/003_arithmetic_and_comparison.out +10 -0
  581. package/test/eyelang/conformance/expected/extension/004_strings_and_atoms.out +4 -0
  582. package/test/eyelang/conformance/expected/extension/005_lists_aggregation_ordering.out +9 -0
  583. package/test/eyelang/conformance/expected/extension/006_formula_terms.out +4 -0
  584. package/test/eyelang/conformance/expected/extension/007_negation_once_generators.out +2 -0
  585. package/test/eyelang/conformance/expected/extension/008_equality_and_inequality.out +4 -0
  586. package/test/eyelang/conformance/expected/extension/009_list_relations.out +5 -0
  587. package/test/eyelang/conformance/expected/extension/010_append_splits.out +3 -0
  588. package/test/eyelang/conformance/expected/extension/011_matching_and_comparison.out +5 -0
  589. package/test/eyelang/conformance/expected/extension/012_memoize_declaration.out +2 -0
  590. package/test/eyelang/conformance/expected/extension/013_numeric_functions.out +7 -0
  591. package/test/eyelang/conformance/expected/extension/014_between_enumeration.out +3 -0
  592. package/test/eyelang/conformance/expected/extension/015_smallest_divisor.out +1 -0
  593. package/test/eyelang/conformance/expected/extension/016_negation_filter.out +2 -0
  594. package/test/eyelang/conformance/expected/extension/017_once_user_predicate.out +1 -0
  595. package/test/eyelang/conformance/expected/extension/018_findall_user_goal.out +1 -0
  596. package/test/eyelang/conformance/expected/extension/019_sort_deduplicates_atoms.out +1 -0
  597. package/test/eyelang/conformance/expected/extension/020_append_bound_prefix_suffix.out +2 -0
  598. package/test/eyelang/conformance/expected/extension/021_nth0_index_generation.out +1 -0
  599. package/test/eyelang/conformance/expected/extension/022_set_nth0_edges.out +2 -0
  600. package/test/eyelang/conformance/expected/extension/023_select_duplicate_occurrences.out +2 -0
  601. package/test/eyelang/conformance/expected/extension/024_not_member_filter.out +1 -0
  602. package/test/eyelang/conformance/expected/extension/025_is_list_filter.out +1 -0
  603. package/test/eyelang/conformance/expected/extension/026_nested_formula_terms.out +6 -0
  604. package/test/eyelang/conformance/expected/extension/027_materialize_excludes_source_fact.out +1 -0
  605. package/test/eyelang/conformance/expected/extension/028_numeric_and_lexical_comparison.out +3 -0
  606. package/test/eyelang/conformance/expected/extension/029_string_matching_filters.out +2 -0
  607. package/test/eyelang/conformance/expected/extension/030_string_and_atom_concat.out +2 -0
  608. package/test/eyelang/conformance/expected/extension/031_countall_empty_and_nonempty.out +1 -0
  609. package/test/eyelang/conformance/expected/extension/032_sumall_numeric_template.out +1 -0
  610. package/test/eyelang/conformance/expected/extension/033_aggregate_min_template.out +1 -0
  611. package/test/eyelang/conformance/expected/extension/034_aggregate_max_compound_key.out +1 -0
  612. package/test/eyelang/conformance/expected/extension/035_date_difference.out +2 -0
  613. package/test/eyelang/conformance/expected/extension/036_extended_gcd.out +1 -0
  614. package/test/eyelang/conformance/expected/extension/037_collatz_trajectory.out +1 -0
  615. package/test/eyelang/conformance/expected/extension/038_kaprekar_steps.out +1 -0
  616. package/test/eyelang/conformance/expected/extension/039_goldbach_pair.out +2 -0
  617. package/test/eyelang/conformance/expected/extension/040_matrix_operations.out +3 -0
  618. package/test/eyelang/conformance/expected/extension/041_atom_range_generators.out +8 -0
  619. package/test/eyelang/conformance/expected/extension/042_n_queens_small.out +2 -0
  620. package/test/eyelang/conformance/expected/extension/043_cnf_model.out +1 -0
  621. package/test/eyelang/conformance/expected/extension/044_cover9_filter.out +2 -0
  622. package/test/eyelang/conformance/expected/extension/045_alphametic_sum_small.out +4 -0
  623. package/test/eyelang/conformance/expected/extension/046_bounded_subset.out +5 -0
  624. package/test/eyelang/run-all.mjs +20 -0
  625. package/test/eyelang/run-conformance.mjs +80 -0
  626. package/test/eyelang/run-examples.mjs +126 -0
  627. package/test/eyelang/run-regression.mjs +640 -0
  628. package/test/eyelang/test-style.mjs +91 -0
  629. package/test/eyelang.test.js +58 -0
  630. package/test/run.js +1 -0
@@ -0,0 +1,628 @@
1
+ # eyelang
2
+
3
+ eyelang is a small rule engine for Prolog-style Horn clauses over ordinary terms, lists, arithmetic, strings, and finite search. The command-line executable is `eyelang`.
4
+
5
+ Programs write relations directly, for example `ancestor(pat, emma)` or `status(case1, accepted)`. eyelang output is ordinary eyelang syntax: by default, the CLI materializes selected answer facts and prints those facts only. Pass `--proof` (or `-p`) when you also want each answer followed by a `why/2` explanation fact that records the proof. Programs may add `materialize(Name, Arity).` declarations to focus output on selected predicates.
6
+
7
+
8
+ Try it in the [browser playground](https://eyereasoner.github.io/eyelang/playground). The playground includes run options equivalent to CLI `--stats` and `--proof`.
9
+
10
+ For the normative language definition, including lexical syntax, terms, clauses, goals, built-ins, `memoize/2`, `materialize/2`, and conformance boundaries, read the [eyelang specification](SPEC.md).
11
+
12
+ ## Contents
13
+
14
+ 1. [Quick start](#quick-start)
15
+ 2. [Running eyelang](#running-eyelang)
16
+ 3. [Default output](#default-output)
17
+ 4. [Writing programs](#writing-programs)
18
+ 5. [Aggregation helpers](#aggregation-helpers)
19
+ 6. [Formula data](#formula-data)
20
+ 7. [RDF 1.2 and Notation3 compatibility](#rdf-12-and-notation3-compatibility)
21
+ 8. [Example catalog](#example-catalog)
22
+ 9. [Golden outputs, tests, and conformance](#golden-outputs-tests-and-conformance)
23
+ 10. [Development and release](#development-and-release)
24
+ 11. [Relationship to Eyeling](#relationship-to-eyeling)
25
+ 12. [Performance notes](#performance-notes)
26
+ 13. [Implementation limits](#implementation-limits)
27
+
28
+ ## Quick start
29
+
30
+ Install dependencies, if any, and run the command-line executable:
31
+
32
+ ```sh
33
+ npm install
34
+ ```
35
+
36
+ There is no build step for the CLI. Run examples, multiple inputs, stdin, or a URL:
37
+
38
+ ```sh
39
+ bin/eyelang --version
40
+ bin/eyelang examples/ancestor.pl
41
+ bin/eyelang facts.pl rules.pl
42
+ printf 'works(stdin, true) :- eq(ok, ok).\n' | bin/eyelang -
43
+ bin/eyelang https://raw.githubusercontent.com/eyereasoner/eyelang/refs/heads/main/examples/ancestor.pl
44
+ ```
45
+
46
+ The CLI runs directly on Node.js 18 or newer. The browser playground uses the same source modules through `playground-worker.mjs`; no separate browser build is required.
47
+
48
+ Serve the playground locally:
49
+
50
+ ```sh
51
+ python3 -m http.server 8000
52
+ # then open http://localhost:8000/playground.html
53
+ ```
54
+
55
+ ## Running eyelang
56
+
57
+ Show the package version:
58
+
59
+ ```sh
60
+ bin/eyelang --version
61
+ bin/eyelang -v
62
+ ```
63
+
64
+ Run a program and let eyelang print derived binary facts:
65
+
66
+ ```sh
67
+ bin/eyelang examples/ancestor.pl
68
+ ```
69
+
70
+ Enable proof explanations when you want machine-readable provenance:
71
+
72
+ ```sh
73
+ bin/eyelang --proof examples/ancestor.pl
74
+ bin/eyelang -p examples/ancestor.pl
75
+ ```
76
+
77
+ eyelang-readable explanations are opt-in proof output. Each `why/2` fact contains a nested abstract proof term, and a blank line separates consecutive explanations. Using eyelang syntax for explanations keeps them in the same language as the answers themselves: they are readable by humans, parseable by eyelang, easy to test, and can be transformed or explained further like any other eyelang data. For example:
78
+
79
+ ```prolog
80
+ type(socrates, mortal).
81
+ why(
82
+ type(socrates, mortal),
83
+ proof(
84
+ goal(type(socrates, mortal)),
85
+ by(rule("socrates.pl", clause(4))),
86
+ bindings([binding("X", socrates)]),
87
+ uses([
88
+ proof(
89
+ goal(type(socrates, man)),
90
+ by(fact("socrates.pl", clause(3)))
91
+ )
92
+ ])
93
+ )
94
+ ).
95
+
96
+ ```
97
+
98
+ The explanation output can itself be read as eyelang input; for example, another program can materialize `why/2` facts such as `why(type(socrates, mortal), Proof)`. `--proof` adds only these explanation facts; it does not change the answers found by the solver.
99
+
100
+ ### Explanation cookbook
101
+
102
+ eyelang answers can carry their own provenance when proof output is enabled.
103
+
104
+ Explain one derived fact:
105
+
106
+ ```sh
107
+ bin/eyelang --proof examples/socrates.pl
108
+ ```
109
+
110
+ The output contains the answer and a `why/2` fact. The proof term shows the source rule that produced the answer and the source fact used below it. Source references use `rule("file.pl", clause(N))` and `fact("file.pl", clause(N))`, where `N` is the 1-based clause number in that file.
111
+
112
+ Inspect variable bindings with a small policy program:
113
+
114
+ ```prolog
115
+ score(case1, 95).
116
+ threshold(90).
117
+
118
+ status(Case, accepted) :-
119
+ score(Case, Score),
120
+ threshold(T),
121
+ ge(Score, T).
122
+ ```
123
+
124
+ ```sh
125
+ bin/eyelang --proof policy.pl
126
+ ```
127
+
128
+ The explanation contains the instantiated answer and the variables that made the rule succeed:
129
+
130
+ ```prolog
131
+ status(case1, accepted).
132
+ why(
133
+ status(case1, accepted),
134
+ proof(
135
+ goal(status(case1, accepted)),
136
+ by(rule("policy.pl", clause(3))),
137
+ bindings([binding("Case", case1), binding("Score", 95), binding("T", 90)]),
138
+ uses([...])
139
+ )
140
+ ).
141
+ ```
142
+
143
+ Use the `uses([...])` list to follow the proof tree. In the policy example it contains one subproof for `score(case1, 95)`, one for `threshold(90)`, and one for the built-in comparison `ge(95, 90)`. Built-ins are shown as `builtin(Name, Arity)` because they do not come from source clauses.
144
+
145
+ Reuse explanations as data:
146
+
147
+ ```sh
148
+ bin/eyelang --proof examples/socrates.pl > socrates.why.pl
149
+ ```
150
+
151
+ The resulting file is ordinary eyelang syntax containing both answers and `why/2` proof facts.
152
+
153
+ Compose multiple files, stdin, and URLs:
154
+
155
+ ```sh
156
+ bin/eyelang facts.pl rules.pl
157
+ printf 'works(stdin, true) :- eq(ok, ok).\n' | bin/eyelang -
158
+ bin/eyelang https://example.test/program.pl
159
+ ```
160
+
161
+ ## Default output
162
+
163
+ eyelang programs write relation predicates directly:
164
+
165
+ ```prolog
166
+ parent(pat, jan).
167
+ parent(jan, emma).
168
+
169
+ ancestor(X, Y) :- parent(X, Y).
170
+ ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).
171
+ ```
172
+
173
+ By default, eyelang asks for new ground consequences of selected output predicates, suppresses duplicates, excludes source facts, sorts the result, and prints Prolog facts:
174
+
175
+ ```prolog
176
+ ancestor(jan, emma).
177
+ ancestor(pat, emma).
178
+ ancestor(pat, jan).
179
+ ```
180
+
181
+ This default is intentionally output-oriented. It is not a complete bottom-up saturation engine. Built-ins and proof search remain goal-directed; use `materialize/2` declarations and small output predicates when you want a specific relation, arity, or non-binary answer.
182
+
183
+ ### Focusing default output
184
+
185
+ Large examples often have internal helper predicates. Add `materialize(Name, Arity).` declarations to restrict default output to selected predicates:
186
+
187
+ ```prolog
188
+ materialize(answer, 2).
189
+
190
+ seed(case1).
191
+ helper(Case, score(95)) :- seed(Case).
192
+ answer(Case, accepted) :- helper(Case, score(95)).
193
+ ```
194
+
195
+ The default output is then:
196
+
197
+ ```prolog
198
+ answer(case1, accepted).
199
+ ```
200
+
201
+ `materialize/2` is a declaration, not a logical rule to prove. It affects which predicates the CLI prints, not the meaning of the rules themselves.
202
+
203
+ ## Writing programs
204
+
205
+ A good eyelang program normally has three layers:
206
+
207
+ 1. source facts;
208
+ 2. helper predicates for calculation or search;
209
+ 3. concise relation-style outputs, usually binary predicates such as `status(Case, Value)`, `reason(Case, Text)`, `ancestor(Person, Ancestor)`, or `cost(Path, Amount)`.
210
+
211
+ Example:
212
+
213
+ ```prolog
214
+ score(case1, 95).
215
+ threshold(90).
216
+
217
+ accepted(Case) :-
218
+ score(Case, Score),
219
+ threshold(Threshold),
220
+ ge(Score, Threshold).
221
+
222
+ status(Case, accepted) :- accepted(Case).
223
+ reason(Case, "score exceeds threshold") :- accepted(Case).
224
+ ```
225
+
226
+ When `status/2` and `reason/2` are derived, they appear in default output. If the program has many helper binary predicates, declare the intended output predicates:
227
+
228
+ ```prolog
229
+ materialize(status, 2).
230
+ materialize(reason, 2).
231
+ ```
232
+
233
+ ### Naming
234
+
235
+ Predicate names and atom constants use the same lexical form. Namespace-like names should be plain names such as `type`, `person_name`, or `odrl_permission`; colon names are not part of the language.
236
+
237
+ ### Embedding remains general
238
+
239
+ The CLI is output-oriented and uses `materialize/2` to decide what to print. Embedders can still use the JavaScript API and `Solver` directly for arbitrary goals and arities.
240
+
241
+ Add `-s` or `--stats` when you want lightweight solver counters on stderr without changing stdout:
242
+
243
+ ```sh
244
+ bin/eyelang -s examples/sudoku.pl
245
+ ```
246
+
247
+ The playground has matching `--stats` and `--proof` checkboxes, so browser runs can show the same counters or explanations like the CLI.
248
+
249
+
250
+ ### Builtins
251
+
252
+ eyelang builtins are registered by name and arity in small modules under [`src/builtins`](src/builtins). This keeps the runtime portable to Node.js and the browser while giving each builtin family a clear boundary. Builtins are enabled by normal predicate calls.
253
+
254
+ The core builtin families cover unification, arithmetic, comparison, dates, strings, lists, aggregation, formula terms, and search control. Additional reusable finite-search helpers are available for examples that would otherwise need large amounts of repetitive generate-and-test code. These helpers are deliberately general relations rather than shortcuts tied to a particular example name. For example:
255
+
256
+ ```prolog
257
+ solution(Name, Rows) :-
258
+ puzzle(Name, Grid),
259
+ sudoku(Grid, Rows).
260
+
261
+ answer(Queens) :-
262
+ n_queens(8, Queens).
263
+
264
+ best(Cycle, Cost) :-
265
+ cities(Cities),
266
+ weighted_hamiltonian_cycle(edge, Cities, Cycle, Cost).
267
+ ```
268
+
269
+ `sudoku/2` accepts either an 81-character string or a 9x9 list. Digits `1` to `9` are givens; `0`, `.`, and `_` mark blanks. It returns the solved 9x9 list.
270
+
271
+ The reusable search and numeric helpers include `atom_range/4`, `atom_ranges/4`, `n_queens/2`, Hamiltonian path/cycle helpers, `cnf_model/3`, Quine-McCluskey helpers, bounded subset/path helpers, number-theory helpers such as `extended_gcd/5`, matrix helpers such as `matrix_multiply/2`, and `alphametic_sum/5`. These helpers are extension builtins of this implementation; [`SPEC.md`](SPEC.md) defines the portable core and standard builtin profile.
272
+
273
+ To add a builtin, create or extend a module with `register(registry)` and call `registry.add(name, arity, handler, options)`. The default registry is assembled in [`src/builtins/registry.js`](src/builtins/registry.js). Builtins that are only safe for specific argument modes should provide a `ready` predicate and `fallbackWhenNotReady: true`, so user-defined clauses remain visible until the builtin is applicable.
274
+
275
+
276
+ ## Aggregation helpers
277
+
278
+ eyelang includes goal-directed aggregation helpers for finite searches:
279
+
280
+ ```prolog
281
+ countall(Goal, Count).
282
+ sumall(Value, Goal, Sum).
283
+ aggregate_min(Key, Template, Goal, BestKey, BestTemplate).
284
+ aggregate_max(Key, Template, Goal, BestKey, BestTemplate).
285
+ ```
286
+
287
+ Use `countall/2` for solution counts, `sumall/3` for numeric totals, and `aggregate_min/5` or `aggregate_max/5` when a search should keep only the best candidate instead of collecting and sorting every answer. The `Key` can be a number, atom constant, string, compound term, or list; normal term ordering is used, so compound keys such as `[Cost, Path]` are useful for deterministic tie-breaking.
288
+
289
+ Example:
290
+
291
+ ```prolog
292
+ best_cycle(Cycle, Cost) :-
293
+ cities(Cities),
294
+ aggregate_min([Cost, Cycle], Cycle, candidate_cycle(Cities, Cycle, Cost), [Cost, Cycle], Cycle).
295
+ ```
296
+
297
+ ## Formula data
298
+
299
+ Comma terms can be data as well as conjunctions. eyelang provides relation-oriented formula utilities.
300
+
301
+ `formula_atom(Formula, Atom)` enumerates atomic formula terms inside a comma formula:
302
+
303
+ ```prolog
304
+ formula_atom((name(alice, "Alice"), knows(alice, bob)), X).
305
+ ```
306
+
307
+ `formula_binary(Formula, S, P, O)` enumerates binary terms and exposes their functor as an atom constant:
308
+
309
+ ```prolog
310
+ formula_binary((name(alice, "Alice"), knows(alice, bob)), S, P, O).
311
+ ```
312
+
313
+ This can yield `S = alice`, `P = name`, `O = "Alice"` and `S = alice`, `P = knows`, `O = bob`. The utility is useful for quoted formula data, but it does not make those formula members true in the ambient program.
314
+
315
+
316
+ ## RDF 1.2 and Notation3 compatibility
317
+
318
+ The core eyelang syntax remains Prolog-like, but `src/rdf.js` adds a compatibility layer for RDF 1.2 Turtle/N-Triples style data and a practical Notation3 rule subset. Use it from the CLI with `--rdf`, `--rdf12`, `--n3`, or `--input-format FORMAT`; file inputs ending in `.ttl`, `.nt`, or `.n3` are recognized when the CLI uses its default `auto` format.
319
+
320
+ ```sh
321
+ bin/eyelang --rdf data.ttl rules.n3
322
+ printf '@prefix : <http://example.com/> .
323
+ { ?x :parent ?y . } => { ?x :related ?y . } .
324
+ :alice :parent :bob .
325
+ ' | bin/eyelang --n3 -
326
+ ```
327
+
328
+ RDF triples are lowered to ordinary `rdf/3` goals:
329
+
330
+ ```prolog
331
+ rdf(Subject, Predicate, Object).
332
+ ```
333
+
334
+ RDF terms are explicit eyelang compound terms:
335
+
336
+ ```prolog
337
+ iri("http://example.com/alice")
338
+ bnode("b0")
339
+ literal("Alice", iri("http://www.w3.org/2001/XMLSchema#string"), "", "")
340
+ triple(Subject, Predicate, Object)
341
+ ```
342
+
343
+ The layer supports `PREFIX`/`@prefix`, `BASE`/`@base`, `VERSION`/`@version`, IRIs, prefixed names, blank nodes, strings, numeric and boolean literals, language-tagged and RDF 1.2 directional language-tagged strings, RDF collections, blank-node property lists, RDF 1.2 triple terms `<<( ... )>>`, reified triple sugar `<< ... >>`, annotation blocks `{| ... |}`, N3 rules of the form `{ antecedent } => { consequent } .`, reverse rules of the form `{ consequent } <= { antecedent } .`, and N3 equality `=` as `owl:sameAs`. Reified triples and annotations are expanded through `rdf:reifies`, so this Turtle fragment:
344
+
345
+ ```turtle
346
+ VERSION "1.2"
347
+ PREFIX : <http://example.com/>
348
+ :alice :name "Alice" ~ :t {| :statedBy :bob |} .
349
+ ```
350
+
351
+ is made available as eyelang facts like:
352
+
353
+ ```prolog
354
+ rdf(iri("http://example.com/alice"), iri("http://example.com/name"), literal("Alice", iri("http://www.w3.org/2001/XMLSchema#string"), "", "")).
355
+ rdf(iri("http://example.com/t"), iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"), triple(iri("http://example.com/alice"), iri("http://example.com/name"), literal("Alice", iri("http://www.w3.org/2001/XMLSchema#string"), "", ""))).
356
+ rdf(iri("http://example.com/t"), iri("http://example.com/statedBy"), iri("http://example.com/bob")).
357
+ ```
358
+
359
+ From JavaScript, use `parseRdfClauses(source, options)` when you want clause objects, or `rdfToEyelang(source, options)` when you want the lowered eyelang source text.
360
+
361
+ N3 body triples whose predicates are in the common SWAP namespaces are lowered to eyelang built-ins instead of `rdf/3` goals. The practical bridge covers math comparisons and arithmetic such as `math:sum`, `math:difference`, `math:product`, `math:quotient`, `math:rounded`, and trigonometric functions, with exact BigInt-backed integer paths for large N3 arithmetic examples; string predicates such as `string:contains`, `string:startsWith`, `string:concatenation`, `string:length`, `string:replace`, and `string:scrape`; list predicates such as `list:member`, `list:append`, `list:first`, `list:rest`, `list:length`, `list:reverse`, and `list:sort`; `crypto:sha`, `crypto:md5`, `crypto:sha256`, `crypto:sha512`; simple `time:*` component extraction; and selected `log:*` helpers such as `log:equalTo`, `log:notEqualTo`, `log:uri`, `log:dtlit`, and `log:rawType`. This follows the builtin families used by eyeling while keeping eyelang's execution model small.
362
+
363
+ RDF/N3 examples now live directly in [`examples/`](examples/), with golden outputs in [`examples/output/`](examples/output/), matching the existing example layout. They include eyeling-inspired `socrates.n3`, `family-cousins.n3`, and `annotation-rdf12.ttl` examples; focused RDF 1.2 triple-term and directional-language examples; `n3-builtins.n3`; and a larger `eyeling-*.n3` set adapted from the eyeling example directory. The added eyeling-style examples cover backward rules, recursive `<=`, equality, collection/list handling, Ackermann-style hyperoperations, Fibonacci numbers, dog-license, witch, Cat Koko, family/cousin, alignment, BMI, and SWAP math/string/list/crypto/time builtins. Run them with auto format detection or force the reader explicitly:
364
+
365
+ ```sh
366
+ bin/eyelang examples/socrates.n3
367
+ bin/eyelang --rdf12 examples/annotation-rdf12.ttl
368
+ bin/eyelang --n3 examples/n3-builtins.n3
369
+ bin/eyelang --n3 examples/eyeling-backward-recursion.n3
370
+ bin/eyelang --n3 examples/eyeling-ackermann.n3
371
+ bin/eyelang --n3 examples/eyeling-fibonacci.n3
372
+ ```
373
+
374
+ This is a compatibility layer, not a validating W3C conformance parser. It intentionally covers the graph-oriented syntax, common RDF 1.2 constructs, and the N3 Horn-rule/builtin patterns that map cleanly to eyelang; it does not implement RDF/XML, full TriG datasets, SPARQL, scoped N3 formula built-ins such as full `log:semantics`, or every Notation3 construct.
375
+
376
+ ## Example catalog
377
+
378
+ The repository includes examples for recursion, graph reachability, finite search, arithmetic, list processing, optimization, policies, puzzles, N3-inspired rule chains, and applied scientific calculations. Bundled examples use relation-style output.
379
+
380
+ | Input | Short description | Output |
381
+ | --- | --- | --- |
382
+ | [`access-control-policy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/access-control-policy.pl) | Evaluates role and condition based access decisions. | [`output/access-control-policy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/access-control-policy.pl) |
383
+ | [`ackermann.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/ackermann.pl) | Computes Ackermann-style hyperoperation values. | [`output/ackermann.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/ackermann.pl) |
384
+ | [`age.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/age.pl) | Checks whether people meet age thresholds. | [`output/age.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/age.pl) |
385
+ | [`aliases-and-namespaces.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/aliases-and-namespaces.pl) | Shows ordinary predicate names for vocabulary aliases. | [`output/aliases-and-namespaces.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/aliases-and-namespaces.pl) |
386
+ | [`alignment-demo.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/alignment-demo.pl) | Rolls dataset concepts up through a small alignment taxonomy. | [`output/alignment-demo.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/alignment-demo.pl) |
387
+ | [`allen-interval-calculus.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/allen-interval-calculus.pl) | Classifies interval relations with integer time offsets. | [`output/allen-interval-calculus.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/allen-interval-calculus.pl) |
388
+ | [`ancestor.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/ancestor.pl) | Derives ancestors from parent facts. | [`output/ancestor.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/ancestor.pl) |
389
+ | [`animal.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/animal.pl) | Classifies animals from traits. | [`output/animal.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/animal.pl) |
390
+ | [`annotation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/annotation.pl) | Derives facts from quoted annotation data. | [`output/annotation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/annotation.pl) |
391
+ | [`annotation-rdf12.ttl`](https://github.com/eyereasoner/eyelang/blob/main/examples/annotation-rdf12.ttl) | Demonstrates RDF 1.2 annotation syntax lowered through `rdf:reifies`. | [`output/annotation-rdf12.ttl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/annotation-rdf12.ttl) |
392
+ | [`auroracare.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/auroracare.pl) | Evaluates purpose-based medical data access scenarios. | [`output/auroracare.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/auroracare.pl) |
393
+ | [`backward.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/backward.pl) | Shows a backward-rule pattern as a goal-directed numeric rule. | [`output/backward.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/backward.pl) |
394
+ | [`basic-monadic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/basic-monadic.pl) | Runs a monadic benchmark over generated inputs. | [`output/basic-monadic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/basic-monadic.pl) |
395
+ | [`bayes-diagnosis.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/bayes-diagnosis.pl) | Computes scaled Bayesian diagnosis posteriors. | [`output/bayes-diagnosis.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/bayes-diagnosis.pl) |
396
+ | [`bayes-therapy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/bayes-therapy.pl) | Ranks therapies using Bayesian disease likelihoods. | [`output/bayes-therapy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/bayes-therapy.pl) |
397
+ | [`beam-deflection.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/beam-deflection.pl) | Computes cantilever beam deflection. | [`output/beam-deflection.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/beam-deflection.pl) |
398
+ | [`blocks-world-planning.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/blocks-world-planning.pl) | Searches a finite blocks-world plan. | [`output/blocks-world-planning.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/blocks-world-planning.pl) |
399
+ | [`bmi.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/bmi.pl) | Normalizes BMI inputs and classifies weight. | [`output/bmi.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/bmi.pl) |
400
+ | [`braking-safety-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/braking-safety-worlds.pl) | Classifies braking safety under alternative worlds. | [`output/braking-safety-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/braking-safety-worlds.pl) |
401
+ | [`buck-converter-design.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/buck-converter-design.pl) | Checks buck-converter ripple design. | [`output/buck-converter-design.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/buck-converter-design.pl) |
402
+ | [`cache-performance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/cache-performance.pl) | Summarizes cache latency performance. | [`output/cache-performance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/cache-performance.pl) |
403
+ | [`canary-release.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/canary-release.pl) | Decides canary rollout or rollback. | [`output/canary-release.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/canary-release.pl) |
404
+ | [`cat-koko.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/cat-koko.pl) | Demonstrates named existential witnesses from a Cat Koko rule pattern. | [`output/cat-koko.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/cat-koko.pl) |
405
+ | [`clinical-trial-screening.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/clinical-trial-screening.pl) | Screens candidates for a trial. | [`output/clinical-trial-screening.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/clinical-trial-screening.pl) |
406
+ | [`collatz-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/collatz-1000.pl) | Computes shared Collatz trajectories. | [`output/collatz-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/collatz-1000.pl) |
407
+ | [`combinatorics-findall-sort.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/combinatorics-findall-sort.pl) | Collects and sorts finite combinations. | [`output/combinatorics-findall-sort.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/combinatorics-findall-sort.pl) |
408
+ | [`competitive-enzyme-kinetics.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/competitive-enzyme-kinetics.pl) | Computes inhibited enzyme reaction rates. | [`output/competitive-enzyme-kinetics.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/competitive-enzyme-kinetics.pl) |
409
+ | [`complex-matrix-stability.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/complex-matrix-stability.pl) | Checks stability of a 2x2 system. | [`output/complex-matrix-stability.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/complex-matrix-stability.pl) |
410
+ | [`complex.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/complex.pl) | Performs arithmetic on complex pairs. | [`output/complex.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/complex.pl) |
411
+ | [`composition-of-injective-functions-is-injective.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/composition-of-injective-functions-is-injective.pl) | Encodes composition and injectivity of finite functions. | [`output/composition-of-injective-functions-is-injective.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/composition-of-injective-functions-is-injective.pl) |
412
+ | [`context-association.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/context-association.pl) | Associates named contexts with their contents. | [`output/context-association.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/context-association.pl) |
413
+ | [`control-system.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/control-system.pl) | Evaluates control-system measurements and targets. | [`output/control-system.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/control-system.pl) |
414
+ | [`cryptarithmetic-send-more-money.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/cryptarithmetic-send-more-money.pl) | Solves SEND+MORE and related puzzles. | [`output/cryptarithmetic-send-more-money.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/cryptarithmetic-send-more-money.pl) |
415
+ | [`cyclic-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/cyclic-path.pl) | Computes paths in a cyclic graph. | [`output/cyclic-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/cyclic-path.pl) |
416
+ | [`d3-group.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/d3-group.pl) | Enumerates subgroups of the D3 group. | [`output/d3-group.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/d3-group.pl) |
417
+ | [`dairy-energy-balance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dairy-energy-balance.pl) | Classifies dairy cow energy balance. | [`output/dairy-energy-balance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dairy-energy-balance.pl) |
418
+ | [`data-negotiation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/data-negotiation.pl) | Chooses an accepted data-negotiation offer. | [`output/data-negotiation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/data-negotiation.pl) |
419
+ | [`deep-taxonomy-10.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deep-taxonomy-10.pl) | Stress-tests recursive taxonomy depth 10. | [`output/deep-taxonomy-10.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deep-taxonomy-10.pl) |
420
+ | [`deep-taxonomy-100.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deep-taxonomy-100.pl) | Stress-tests recursive taxonomy depth 100. | [`output/deep-taxonomy-100.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deep-taxonomy-100.pl) |
421
+ | [`deep-taxonomy-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deep-taxonomy-1000.pl) | Stress-tests recursive taxonomy depth 1000. | [`output/deep-taxonomy-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deep-taxonomy-1000.pl) |
422
+ | [`deep-taxonomy-10000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deep-taxonomy-10000.pl) | Stress-tests recursive taxonomy depth 10000. | [`output/deep-taxonomy-10000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deep-taxonomy-10000.pl) |
423
+ | [`deep-taxonomy-100000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deep-taxonomy-100000.pl) | Stress-tests recursive taxonomy depth 100000. | [`output/deep-taxonomy-100000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deep-taxonomy-100000.pl) |
424
+ | [`delfour.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/delfour.pl) | Derives shopping and authorization recommendations. | [`output/delfour.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/delfour.pl) |
425
+ | [`dense-hamiltonian-cycle.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dense-hamiltonian-cycle.pl) | Searches a dense Hamiltonian cycle with aggregate minimization. | [`output/dense-hamiltonian-cycle.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dense-hamiltonian-cycle.pl) |
426
+ | [`deontic-logic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/deontic-logic.pl) | Reports obligations, prohibitions, and violations. | [`output/deontic-logic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/deontic-logic.pl) |
427
+ | [`derived-backward-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/derived-backward-rule.pl) | Derives an inverse-property backward rule from rule data. | [`output/derived-backward-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/derived-backward-rule.pl) |
428
+ | [`derived-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/derived-rule.pl) | Derives conclusions from rule data. | [`output/derived-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/derived-rule.pl) |
429
+ | [`diamond-property.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/diamond-property.pl) | Checks the diamond property of a relation. | [`output/diamond-property.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/diamond-property.pl) |
430
+ | [`dijkstra-findall-sort.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dijkstra-findall-sort.pl) | Finds shortest paths using collected candidates. | [`output/dijkstra-findall-sort.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dijkstra-findall-sort.pl) |
431
+ | [`dijkstra-risk-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dijkstra-risk-path.pl) | Ranks routes by cost and trust. | [`output/dijkstra-risk-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dijkstra-risk-path.pl) |
432
+ | [`dijkstra.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dijkstra.pl) | Enumerates weighted simple paths. | [`output/dijkstra.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dijkstra.pl) |
433
+ | [`dining-philosophers.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dining-philosophers.pl) | Simulates Chandy-Misra fork exchanges. | [`output/dining-philosophers.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dining-philosophers.pl) |
434
+ | [`dog.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/dog.pl) | Counts dogs and derives when a license is required. | [`output/dog.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/dog.pl) |
435
+ | [`drone-corridor-planner.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/drone-corridor-planner.pl) | Plans bounded drone corridor routes. | [`output/drone-corridor-planner.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/drone-corridor-planner.pl) |
436
+ | [`easter-computus.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/easter-computus.pl) | Computes Gregorian Easter dates. | [`output/easter-computus.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/easter-computus.pl) |
437
+ | [`electrical-rc-filter.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/electrical-rc-filter.pl) | Sizes an RC low-pass filter. | [`output/electrical-rc-filter.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/electrical-rc-filter.pl) |
438
+ | [`epidemic-policy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/epidemic-policy.pl) | Chooses policies from risk and social cost. | [`output/epidemic-policy.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/epidemic-policy.pl) |
439
+ | [`equivalence-classes-overlap-implies-same-class.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/equivalence-classes-overlap-implies-same-class.pl) | Packages the shared-member proof pattern for equivalence classes. | [`output/equivalence-classes-overlap-implies-same-class.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/equivalence-classes-overlap-implies-same-class.pl) |
440
+ | [`eulerian-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/eulerian-path.pl) | Finds an Eulerian path using each edge once. | [`output/eulerian-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/eulerian-path.pl) |
441
+ | [`ev-range-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/ev-range-worlds.pl) | Estimates electric-vehicle trip feasibility. | [`output/ev-range-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/ev-range-worlds.pl) |
442
+ | [`exact-cover-sudoku.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/exact-cover-sudoku.pl) | Solves Sudoku via exact-cover-style constraints. | [`output/exact-cover-sudoku.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/exact-cover-sudoku.pl) |
443
+ | [`existential-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/existential-rule.pl) | Represents existential witnesses with explicit Skolem-style terms. | [`output/existential-rule.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/existential-rule.pl) |
444
+ | [`exoplanet-validation-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/exoplanet-validation-worlds.pl) | Validates exoplanet candidates across worlds. | [`output/exoplanet-validation-worlds.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/exoplanet-validation-worlds.pl) |
445
+ | [`expression-eval.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/expression-eval.pl) | Evaluates a small arithmetic expression tree. | [`output/expression-eval.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/expression-eval.pl) |
446
+ | [`family-cousins.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/family-cousins.pl) | Derives cousin and family labels. | [`output/family-cousins.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/family-cousins.pl) |
447
+ | [`fastpow.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/fastpow.pl) | Computes powers by repeated squaring. | [`output/fastpow.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/fastpow.pl) |
448
+ | [`fft8-numeric.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/fft8-numeric.pl) | Runs an 8-point FFT over complex pairs. | [`output/fft8-numeric.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/fft8-numeric.pl) |
449
+ | [`fibonacci.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/fibonacci.pl) | Computes large Fibonacci numbers by fast doubling. | [`output/fibonacci.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/fibonacci.pl) |
450
+ | [`field-nitrogen-balance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/field-nitrogen-balance.pl) | Classifies field nitrogen balance. | [`output/field-nitrogen-balance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/field-nitrogen-balance.pl) |
451
+ | [`floating-point.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/floating-point.pl) | Exercises floating-point arithmetic and comparisons. | [`output/floating-point.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/floating-point.pl) |
452
+ | [`flandor.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/flandor.pl) | Derives a Flanders macro-insight authorization and retooling package. | [`output/flandor.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/flandor.pl) |
453
+ | [`four-color-map.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/four-color-map.pl) | Checks a four-colour map assignment. | [`output/four-color-map.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/four-color-map.pl) |
454
+ | [`fundamental-theorem-arithmetic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/fundamental-theorem-arithmetic.pl) | Factors integers and reconstructs products. | [`output/fundamental-theorem-arithmetic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/fundamental-theorem-arithmetic.pl) |
455
+ | [`gcd-bezout-identity.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/gcd-bezout-identity.pl) | Computes gcd and Bézout coefficients. | [`output/gcd-bezout-identity.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/gcd-bezout-identity.pl) |
456
+ | [`gd-step-certified.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/gd-step-certified.pl) | Certifies a gradient-descent step. | [`output/gd-step-certified.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/gd-step-certified.pl) |
457
+ | [`gdpr-compliance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/gdpr-compliance.pl) | Checks GDPR-style processing compliance. | [`output/gdpr-compliance.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/gdpr-compliance.pl) |
458
+ | [`goldbach-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/goldbach-1000.pl) | Finds Goldbach prime pairs up to 1000. | [`output/goldbach-1000.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/goldbach-1000.pl) |
459
+ | [`good-cobbler.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/good-cobbler.pl) | Demonstrates term-level structure with a good-cobbler statement. | [`output/good-cobbler.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/good-cobbler.pl) |
460
+ | [`gps.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/gps.pl) | Finds and verifies route paths. | [`output/gps.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/gps.pl) |
461
+ | [`graph-reachability.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/graph-reachability.pl) | Derives reachable nodes in a graph. | [`output/graph-reachability.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/graph-reachability.pl) |
462
+ | [`gray-code-counter.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/gray-code-counter.pl) | Generates Gray-code counter states. | [`output/gray-code-counter.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/gray-code-counter.pl) |
463
+ | [`greatest-lower-bound-uniqueness.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/greatest-lower-bound-uniqueness.pl) | Shows uniqueness of greatest lower bounds in a finite order instance. | [`output/greatest-lower-bound-uniqueness.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/greatest-lower-bound-uniqueness.pl) |
464
+ | [`group-inverse-uniqueness.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/group-inverse-uniqueness.pl) | Shows uniqueness of inverses in a finite group instance. | [`output/group-inverse-uniqueness.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/group-inverse-uniqueness.pl) |
465
+ | [`hamiltonian-cycle.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/hamiltonian-cycle.pl) | Finds a Hamiltonian cycle. | [`output/hamiltonian-cycle.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/hamiltonian-cycle.pl) |
466
+ | [`hamiltonian-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/hamiltonian-path.pl) | Finds a Hamiltonian path. | [`output/hamiltonian-path.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/hamiltonian-path.pl) |
467
+ | [`hamming-code.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/hamming-code.pl) | Corrects a single-bit Hamming word. | [`output/hamming-code.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/hamming-code.pl) |
468
+ | [`hanoi.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/hanoi.pl) | Derives the Towers of Hanoi moves. | [`output/hanoi.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/hanoi.pl) |
469
+ | [`heat-loss.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/heat-loss.pl) | Computes conductive heat loss. | [`output/heat-loss.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/heat-loss.pl) |
470
+ | [`heron-theorem.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/heron-theorem.pl) | Computes triangle area by Heron's theorem. | [`output/heron-theorem.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/heron-theorem.pl) |
471
+ | [`ideal-gas-law.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/ideal-gas-law.pl) | Applies the ideal gas law. | [`output/ideal-gas-law.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/ideal-gas-law.pl) |
472
+ | [`illegitimate-reasoning.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/illegitimate-reasoning.pl) | Detects suspect reasoning patterns. | [`output/illegitimate-reasoning.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/illegitimate-reasoning.pl) |
473
+ | [`kaprekar.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/kaprekar.pl) | Iterates toward Kaprekar's constant. | [`output/kaprekar.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/kaprekar.pl) |
474
+ | [`law-of-cosines.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/law-of-cosines.pl) | Computes a triangle side by cosine law. | [`output/law-of-cosines.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/law-of-cosines.pl) |
475
+ | [`least-squares-regression.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/least-squares-regression.pl) | Fits a least-squares regression line. | [`output/least-squares-regression.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/least-squares-regression.pl) |
476
+ | [`list-collection.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/list-collection.pl) | Demonstrates list and collection built-ins. | [`output/list-collection.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/list-collection.pl) |
477
+ | [`lldm.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/lldm.pl) | Calculates leg-length discrepancy measurements. | [`output/lldm.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/lldm.pl) |
478
+ | [`manufacturing-quality-control.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/manufacturing-quality-control.pl) | Evaluates process capability and quality. | [`output/manufacturing-quality-control.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/manufacturing-quality-control.pl) |
479
+ | [`matrix.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/matrix.pl) | Runs matrix operations over sample inputs. | [`output/matrix.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/matrix.pl) |
480
+ | [`microgrid-dispatch.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/microgrid-dispatch.pl) | Plans microgrid dispatch and reserve. | [`output/microgrid-dispatch.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/microgrid-dispatch.pl) |
481
+ | [`monkey-bananas.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/monkey-bananas.pl) | Solves the monkey-and-bananas puzzle. | [`output/monkey-bananas.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/monkey-bananas.pl) |
482
+ | [`n-queens.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/n-queens.pl) | Searches for N-queens placements. | [`output/n-queens.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/n-queens.pl) |
483
+ | [`network-sla.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/network-sla.pl) | Checks network path SLA compliance. | [`output/network-sla.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/network-sla.pl) |
484
+ | [`newton-raphson.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/newton-raphson.pl) | Finds roots by Newton-Raphson iteration. | [`output/newton-raphson.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/newton-raphson.pl) |
485
+ | [`nixon-diamond.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/nixon-diamond.pl) | Reports the classic Nixon-diamond conflict. | [`output/nixon-diamond.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/nixon-diamond.pl) |
486
+ | [`odrl-dpv-healthcare-risk-ranked.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/odrl-dpv-healthcare-risk-ranked.pl) | Ranks healthcare policy risks and mitigations. | [`output/odrl-dpv-healthcare-risk-ranked.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/odrl-dpv-healthcare-risk-ranked.pl) |
487
+ | [`odrl-dpv-risk-ranked.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/odrl-dpv-risk-ranked.pl) | Ranks data-policy risks and mitigations. | [`output/odrl-dpv-risk-ranked.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/odrl-dpv-risk-ranked.pl) |
488
+ | [`orbital-transfer-design.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/orbital-transfer-design.pl) | Designs a Hohmann orbital transfer. | [`output/orbital-transfer-design.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/orbital-transfer-design.pl) |
489
+ | [`path-discovery.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/path-discovery.pl) | Discovers bounded air-route paths. | [`output/path-discovery.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/path-discovery.pl) |
490
+ | [`peano-arithmetic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/peano-arithmetic.pl) | Computes Peano addition, multiplication, and factorial. | [`output/peano-arithmetic.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/peano-arithmetic.pl) |
491
+ | [`peasant.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/peasant.pl) | Performs peasant multiplication and exponentiation. | [`output/peasant.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/peasant.pl) |
492
+ | [`pendulum-period.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/pendulum-period.pl) | Computes simple pendulum periods. | [`output/pendulum-period.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/pendulum-period.pl) |
493
+ | [`polynomial.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/polynomial.pl) | Finds complex integer polynomial roots. | [`output/polynomial.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/polynomial.pl) |
494
+ | [`project-portfolio-optimization.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/project-portfolio-optimization.pl) | Optimizes a constrained project portfolio with pruning and aggregate builtins. | [`output/project-portfolio-optimization.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/project-portfolio-optimization.pl) |
495
+ | [`proof-contrapositive.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/proof-contrapositive.pl) | Models proof by contrapositive. | [`output/proof-contrapositive.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/proof-contrapositive.pl) |
496
+ | [`quadratic-formula.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/quadratic-formula.pl) | Solves sample quadratic equations. | [`output/quadratic-formula.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/quadratic-formula.pl) |
497
+ | [`quine-mccluskey.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/quine-mccluskey.pl) | Minimizes Boolean terms with Quine-McCluskey. | [`output/quine-mccluskey.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/quine-mccluskey.pl) |
498
+ | [`radioactive-decay.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/radioactive-decay.pl) | Computes radioactive decay over time. | [`output/radioactive-decay.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/radioactive-decay.pl) |
499
+ | [`resilient-city-orchestration.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/resilient-city-orchestration.pl) | Orchestrates storm-response missions from signals, policy, routes, teams, and portfolio optimization. | [`output/resilient-city-orchestration.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/resilient-city-orchestration.pl) |
500
+ | [`riemann-hypothesis.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/riemann-hypothesis.pl) | Checks a finite catalogue of non-trivial zeta zeros against the Riemann-hypothesis condition. | [`output/riemann-hypothesis.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/riemann-hypothesis.pl) |
501
+ | [`sat-dpll.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/sat-dpll.pl) | Solves a finite SAT instance. | [`output/sat-dpll.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/sat-dpll.pl) |
502
+ | [`security-incident-correlation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/security-incident-correlation.pl) | Correlates security incidents across signals. | [`output/security-incident-correlation.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/security-incident-correlation.pl) |
503
+ | [`service-impact.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/service-impact.pl) | Analyzes service impact over cyclic dependencies. | [`output/service-impact.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/service-impact.pl) |
504
+ | [`sieve.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/sieve.pl) | Enumerates primes with a sieve-style program. | [`output/sieve.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/sieve.pl) |
505
+ | [`skolem-functions.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/skolem-functions.pl) | Generates deterministic functional terms. | [`output/skolem-functions.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/skolem-functions.pl) |
506
+ | [`socket-age.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/socket-age.pl) | Shows socket-declared age reasoning inputs and plugs. | [`output/socket-age.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/socket-age.pl) |
507
+ | [`socket-family.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/socket-family.pl) | Shows socket-declared family-source inputs and ancestry rules. | [`output/socket-family.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/socket-family.pl) |
508
+ | [`socrates.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/socrates.pl) | Derives that Socrates is mortal. | [`output/socrates.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/socrates.pl) |
509
+ | [`statistics-summary.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/statistics-summary.pl) | Computes population statistics for a sample. | [`output/statistics-summary.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/statistics-summary.pl) |
510
+ | [`sudoku.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/sudoku.pl) | Solves generic 9x9 Sudoku strings through the sudoku/2 builtin. | [`output/sudoku.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/sudoku.pl) |
511
+ | [`superdense-coding.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/superdense-coding.pl) | Models superdense-coding bit transmission. | [`output/superdense-coding.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/superdense-coding.pl) |
512
+ | [`traveling-salesman.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/traveling-salesman.pl) | Finds an optimal traveling-salesman tour. | [`output/traveling-salesman.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/traveling-salesman.pl) |
513
+ | [`turing.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/turing.pl) | Simulates a binary-increment Turing machine. | [`output/turing.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/turing.pl) |
514
+ | [`vector-similarity.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/vector-similarity.pl) | Computes dot product, norm, and cosine similarity. | [`output/vector-similarity.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/vector-similarity.pl) |
515
+ | [`witch.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/witch.pl) | Derives the classic “burn the witch” N3 rule chain. | [`output/witch.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/witch.pl) |
516
+ | [`wolf-goat-cabbage.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/wolf-goat-cabbage.pl) | Solves the wolf-goat-cabbage river crossing. | [`output/wolf-goat-cabbage.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/wolf-goat-cabbage.pl) |
517
+ | [`zebra.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/zebra.pl) | Solves the zebra logic puzzle. | [`output/zebra.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/zebra.pl) |
518
+
519
+
520
+ | [`directional-language.ttl`](https://github.com/eyereasoner/eyelang/blob/main/examples/directional-language.ttl) | Demonstrates RDF 1.2 directional language-tagged strings. | [`output/directional-language.ttl`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/directional-language.ttl) |
521
+ | [`n3-builtins.n3`](https://github.com/eyereasoner/eyelang/blob/main/examples/n3-builtins.n3) | Uses N3 `<=` plus `math:`, `string:`, and `list:` builtins. | [`output/n3-builtins.n3`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/n3-builtins.n3) |
522
+ | [`triple-term.n3`](https://github.com/eyereasoner/eyelang/blob/main/examples/triple-term.n3) | Demonstrates RDF 1.2 triple terms in N3 data and rules. | [`output/triple-term.n3`](https://github.com/eyereasoner/eyelang/blob/main/examples/output/triple-term.n3) |
523
+
524
+ ## Golden outputs, tests, and conformance
525
+
526
+ Golden answer outputs live in [`examples/output`](examples/output). `npm run test:examples` covers every top-level runnable example with extension `.pl`, `.n3`, `.ttl`, or `.nt`. A curated proof-output suite for `.pl` examples lives in [`examples/proof`](examples/proof). Example tests pin `local_time/1` to `2026-05-30` so date-dependent examples stay deterministic. Regenerate them after an intentional output or explanation change:
527
+
528
+ ```sh
529
+ for f in examples/*.pl examples/*.n3 examples/*.ttl examples/*.nt; do
530
+ [ -e "$f" ] || continue
531
+ b=$(basename "$f")
532
+ EYELANG_LOCAL_TIME=2026-05-30 bin/eyelang "$f" > "examples/output/$b"
533
+ done
534
+
535
+ for f in examples/proof/*.pl; do
536
+ b=$(basename "$f")
537
+ EYELANG_LOCAL_TIME=2026-05-30 bin/eyelang --proof "examples/$b" > "examples/proof/$b"
538
+ done
539
+ ```
540
+
541
+ Run the full test suite:
542
+
543
+ ```sh
544
+ npm test
545
+ ```
546
+
547
+ The test suite runs in this order: Conformance, Regression/API/White-box, Examples. Each section prints its own subtotal, followed by a suite-specific grand total. The suite checks the conformance cases derived from `SPEC.md`, supplemental regression/API/white-box checks, and every runnable example against its golden output.
548
+
549
+ Run only one suite when you are iterating:
550
+
551
+ ```sh
552
+ npm run test:conformance
553
+ npm run test:regression
554
+ npm run test:examples
555
+ ```
556
+
557
+ The conformance suite lives in [`conformance/`](conformance/) and is split into `core` and `extension` profiles matching `SPEC.md`. Each case is a small program with an exact expected stdout file, and some internal conformance cases also include a goal file for testing the embeddable solver, so other implementations can reuse the same cases. The regression suite lives in [`test/run-regression.js`](test/run-regression.js) and covers CLI regressions, the public JavaScript API, and white-box invariants for parser, unification, and indexing behavior.
558
+
559
+ ## Development and release
560
+
561
+ Common commands:
562
+
563
+ ```sh
564
+ npm test # conformance, regression/API/white-box, and examples
565
+ npm run test:conformance # only the conformance suite
566
+ npm run test:regression # CLI regression, API, and white-box checks
567
+ npm run test:examples # every example against examples/output
568
+ node bin/eyelang --help
569
+ ```
570
+
571
+ Useful profiling smoke test:
572
+
573
+ ```sh
574
+ bin/eyelang -s examples/sudoku.pl > /dev/null
575
+ ```
576
+
577
+ For a release:
578
+
579
+ 1. update `VERSION`;
580
+ 2. update `README.md` and `SPEC.md`;
581
+ 3. regenerate golden outputs if behavior changed;
582
+ 4. run `npm test`;
583
+ 5. publish the repository with `playground.html` and `playground-worker.mjs` if publishing the playground. The playground includes controls equivalent to CLI `--stats` and `--proof`.
584
+
585
+ ## Relationship to Eyeling
586
+
587
+ [Eyeling](https://github.com/eyereasoner/eyeling) and eyelang share the same goal of small, inspectable rule-based reasoning in JavaScript, but they make different language and implementation trade-offs.
588
+
589
+ Eyeling is the RDF/Notation3 member of the family. It reads N3-style triples, quoted formulas, forward rules written with `=>`, backward rules written with `<=`, RDF terms, RDF-JS data, and RDF-oriented streams. That makes it the better fit when data interchange with RDF/N3 tools is the main requirement.
590
+
591
+ eyelang is the compact Prolog-style member of the family. It uses ordinary predicate syntax such as `parent(alice, bob).` and `ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).` This keeps the core syntax close to the ISO-standardized Prolog tradition while deliberately staying much smaller than ISO Prolog. It is a good fit when the problem is naturally relational, goal-directed, finite, and does not need RDF graph interchange.
592
+
593
+ A useful rule of thumb:
594
+
595
+ | Use case | Prefer | Why |
596
+ | --- | --- | --- |
597
+ | RDF/N3 data, triples, prefixes, graph terms, RDF-JS, RDF message streams | Eyeling | The surface language and APIs are RDF/Notation3-native. |
598
+ | Compact relational rules over ordinary terms, lists, arithmetic, and finite search | eyelang | The syntax is shorter for non-RDF relation programs and output is ordinary facts. |
599
+ | Human-auditable derivations | Either | Both can emit proof explanations when requested. |
600
+ | Large generated Horn-clause workloads | eyelang | The engine specializes in predicate/arity indexing, scalar argument indexes, fast fact paths, and materialized output goals. |
601
+
602
+ For the deep taxonomy benchmark, eyelang is substantially faster in current local checks. On one sandbox run, `node bin/eyelang examples/deep-taxonomy-100000.pl > /dev/null` took about `1.60 sec`, while `eyeling` package version `1.28.7` on `examples/deep-taxonomy-100000.n3` took about `4.56 sec` without proof and about `5.04 sec` with proof. Treat those numbers as a smoke comparison rather than a formal benchmark: hardware, Node.js version, package version, and CLI startup all matter.
603
+
604
+ The projects are therefore complementary rather than replacements for each other: Eyeling optimizes for Semantic Web interoperability and N3 expressiveness; eyelang optimizes for a small standard-looking relational rule language and fast finite goal-directed execution.
605
+
606
+ ## Performance notes
607
+
608
+ Use `-s` or `--stats` for a quick sanity check while optimizing solver changes. It prints counters such as `solve_goals_calls`, `unify_calls`, `deterministic_rule_expansions`, `candidate_lists_selected`, `clause_candidates_considered`, `clauses_tried`, `max_depth`, and `max_solver_call_depth` to stderr, leaving normal output stable for golden-file tests. The `max_solver_call_depth` counter is especially useful for browser regressions, where the VM call stack can be tighter than a command-line run.
609
+
610
+ eyelang hashes predicate groups by name and arity, then indexes clauses by scalar argument values. It also builds two-argument composite indexes for scalar pairs and probes those composite indexes without per-lookup heap allocation. This helps both large generated programs with many predicates and selective queries such as:
611
+
612
+ ```prolog
613
+ edge(g1, a, X).
614
+ path(a, Y).
615
+ status(Case, accepted).
616
+ ```
617
+
618
+ Ground facts use a fast path that avoids freshening and copying a rule body. Recursive-predicate detection uses an explicit work stack, which keeps large predicate chains safer in the browser. Recursive examples use an active-call variant guard to prevent common cyclic closures from looping. Selected predicates can be memoized with:
619
+
620
+ ```prolog
621
+ memoize(path, 2).
622
+ ```
623
+
624
+ For large programs, keep helper predicates selective, bind arguments early, and declare focused output predicates with `materialize/2` when default output would otherwise solve broad helper goals.
625
+
626
+ ## Implementation limits
627
+
628
+ eyelang is intentionally smaller than ISO Prolog. It has no operators, cut, modules, dynamic database updates, DCGs, or complete ISO library. Negation is negation-as-failure through `not/1`. Search is goal-directed and expected to be finite for the selected output goals. Output explanations are non-normative proof printouts and do not change answer semantics. The RDF 1.2 / Notation3 reader is an implementation compatibility layer over `rdf/3`, not a normative RDF conformance profile.