universal-physics-tensor 9.0.0 → 11.0.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 (1109) hide show
  1. package/README.md +21 -17
  2. package/bin/upt.mjs +13 -1
  3. package/data/atlas/atlas.json +79 -68
  4. package/data/atlas/atlas.jsonld +1 -1
  5. package/data/atlas/diffusion.json +24 -23
  6. package/data/atlas/oscillators.json +21 -16
  7. package/data/atlas/waves.json +36 -31
  8. package/data/atlas/witness-results.json +11 -11
  9. package/data/bridge-catalog.json +1192 -1636
  10. package/data/bridge-catalog.schema.json +390 -135
  11. package/data/quantities.json +53 -19
  12. package/data/schemas/atlas-record.v0.json +184 -46
  13. package/data/units.json +33 -4
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +35 -18
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/association.js.map +1 -1
  18. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
  19. package/dist/atlas/benchmark/backend-shapes.js +5 -1
  20. package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
  21. package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
  22. package/dist/atlas/benchmark/baselines.js +8 -0
  23. package/dist/atlas/benchmark/baselines.js.map +1 -1
  24. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +12 -3
  25. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  26. package/dist/atlas/benchmark/hybrid-retrieval.js +30 -21
  27. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  28. package/dist/atlas/benchmark/leakage.js.map +1 -1
  29. package/dist/atlas/benchmark/loader.js +2 -2
  30. package/dist/atlas/benchmark/loader.js.map +1 -1
  31. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
  32. package/dist/atlas/benchmark/run-atlas.js +14 -2
  33. package/dist/atlas/benchmark/run-atlas.js.map +1 -1
  34. package/dist/atlas/benchmark/stats.d.ts +3 -3
  35. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  36. package/dist/atlas/benchmark/stats.js +16 -8
  37. package/dist/atlas/benchmark/stats.js.map +1 -1
  38. package/dist/atlas/benchmark/study.js.map +1 -1
  39. package/dist/atlas/benchmark/types.js.map +1 -1
  40. package/dist/atlas/bridge-record.d.ts +4 -4
  41. package/dist/atlas/bridge-record.d.ts.map +1 -1
  42. package/dist/atlas/bridge-record.js +6 -6
  43. package/dist/atlas/bridge-record.js.map +1 -1
  44. package/dist/atlas/catalog-formal-ref.d.ts +26 -3
  45. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
  46. package/dist/atlas/catalog-formal-ref.js +52 -5
  47. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  48. package/dist/atlas/chain-pipeline.d.ts +0 -11
  49. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  50. package/dist/atlas/chain-pipeline.js +12 -24
  51. package/dist/atlas/chain-pipeline.js.map +1 -1
  52. package/dist/atlas/composition-table.js.map +1 -1
  53. package/dist/atlas/conventions.js.map +1 -1
  54. package/dist/atlas/coverage.d.ts +2 -2
  55. package/dist/atlas/coverage.js.map +1 -1
  56. package/dist/atlas/derivation.js.map +1 -1
  57. package/dist/atlas/derive-evidence.d.ts +6 -4
  58. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  59. package/dist/atlas/derive-evidence.js +7 -2
  60. package/dist/atlas/derive-evidence.js.map +1 -1
  61. package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
  62. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  63. package/dist/atlas/diffusion/bridges-closure.js +8 -17
  64. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  65. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  66. package/dist/atlas/diffusion/bridges.js +27 -42
  67. package/dist/atlas/diffusion/bridges.js.map +1 -1
  68. package/dist/atlas/diffusion/dimensions.d.ts +6 -14
  69. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
  70. package/dist/atlas/diffusion/dimensions.js +8 -16
  71. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  72. package/dist/atlas/diffusion/index.d.ts +1 -1
  73. package/dist/atlas/diffusion/index.d.ts.map +1 -1
  74. package/dist/atlas/diffusion/index.js.map +1 -1
  75. package/dist/atlas/diffusion/models.d.ts +3 -3
  76. package/dist/atlas/diffusion/models.d.ts.map +1 -1
  77. package/dist/atlas/diffusion/models.js +5 -10
  78. package/dist/atlas/diffusion/models.js.map +1 -1
  79. package/dist/atlas/diffusion/numerics.d.ts +16 -4
  80. package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
  81. package/dist/atlas/diffusion/numerics.js +38 -24
  82. package/dist/atlas/diffusion/numerics.js.map +1 -1
  83. package/dist/atlas/error-algebra.d.ts +6 -0
  84. package/dist/atlas/error-algebra.d.ts.map +1 -1
  85. package/dist/atlas/error-algebra.js +26 -0
  86. package/dist/atlas/error-algebra.js.map +1 -1
  87. package/dist/atlas/export.d.ts +18 -2
  88. package/dist/atlas/export.d.ts.map +1 -1
  89. package/dist/atlas/export.js +9 -3
  90. package/dist/atlas/export.js.map +1 -1
  91. package/dist/atlas/families.d.ts +19 -2
  92. package/dist/atlas/families.d.ts.map +1 -1
  93. package/dist/atlas/families.js +26 -3
  94. package/dist/atlas/families.js.map +1 -1
  95. package/dist/atlas/family.d.ts +27 -0
  96. package/dist/atlas/family.d.ts.map +1 -0
  97. package/dist/atlas/family.js +12 -0
  98. package/dist/atlas/family.js.map +1 -0
  99. package/dist/atlas/index.d.ts +3 -2
  100. package/dist/atlas/index.d.ts.map +1 -1
  101. package/dist/atlas/index.js +2 -1
  102. package/dist/atlas/index.js.map +1 -1
  103. package/dist/atlas/link-prediction.d.ts +107 -4
  104. package/dist/atlas/link-prediction.d.ts.map +1 -1
  105. package/dist/atlas/link-prediction.js +212 -66
  106. package/dist/atlas/link-prediction.js.map +1 -1
  107. package/dist/atlas/model.js.map +1 -1
  108. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  109. package/dist/atlas/oscillators/bridges-coarse.js +7 -12
  110. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  111. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  112. package/dist/atlas/oscillators/bridges-exact.js +6 -10
  113. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  114. package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
  115. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  116. package/dist/atlas/oscillators/bridges-limits.js +23 -36
  117. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  118. package/dist/atlas/oscillators/dimensions.d.ts +9 -21
  119. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
  120. package/dist/atlas/oscillators/dimensions.js +9 -21
  121. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  122. package/dist/atlas/oscillators/index.d.ts +1 -16
  123. package/dist/atlas/oscillators/index.d.ts.map +1 -1
  124. package/dist/atlas/oscillators/index.js.map +1 -1
  125. package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
  126. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
  127. package/dist/atlas/oscillators/limit-witnesses.js +17 -15
  128. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  129. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  130. package/dist/atlas/oscillators/models.js +2 -6
  131. package/dist/atlas/oscillators/models.js.map +1 -1
  132. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
  133. package/dist/atlas/oscillators/norm-transport.js.map +1 -1
  134. package/dist/atlas/oscillators/norms.js.map +1 -1
  135. package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
  136. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
  137. package/dist/atlas/oscillators/pendulum-motion.js +60 -40
  138. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  139. package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
  140. package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
  141. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
  142. package/dist/atlas/oscillators/phase-translation.js +3 -4
  143. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  144. package/dist/atlas/oscillators/position-translation.d.ts +68 -7
  145. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
  146. package/dist/atlas/oscillators/position-translation.js +123 -12
  147. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  148. package/dist/atlas/oscillators/rejections.d.ts +0 -2
  149. package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
  150. package/dist/atlas/oscillators/rejections.js +0 -7
  151. package/dist/atlas/oscillators/rejections.js.map +1 -1
  152. package/dist/atlas/path-bound.js.map +1 -1
  153. package/dist/atlas/physjs-entries.generated.d.ts +25 -24
  154. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  155. package/dist/atlas/physjs-entries.generated.js +25 -24
  156. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  157. package/dist/atlas/physjs-ref.d.ts +107 -70
  158. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  159. package/dist/atlas/physjs-ref.js +184 -101
  160. package/dist/atlas/physjs-ref.js.map +1 -1
  161. package/dist/atlas/physjs-reviewed.d.ts +31 -0
  162. package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
  163. package/dist/atlas/physjs-reviewed.js +194 -0
  164. package/dist/atlas/physjs-reviewed.js.map +1 -0
  165. package/dist/atlas/poster/associations.js.map +1 -1
  166. package/dist/atlas/poster/derivations.js.map +1 -1
  167. package/dist/atlas/poster/statements.d.ts +0 -19
  168. package/dist/atlas/poster/statements.d.ts.map +1 -1
  169. package/dist/atlas/poster/statements.js +1 -1
  170. package/dist/atlas/poster/statements.js.map +1 -1
  171. package/dist/atlas/proof-target.d.ts +1 -1
  172. package/dist/atlas/proof-target.js +1 -1
  173. package/dist/atlas/proof-target.js.map +1 -1
  174. package/dist/atlas/public.d.ts +2 -1
  175. package/dist/atlas/public.d.ts.map +1 -1
  176. package/dist/atlas/public.js +2 -1
  177. package/dist/atlas/public.js.map +1 -1
  178. package/dist/atlas/regime.d.ts +1 -1
  179. package/dist/atlas/regime.d.ts.map +1 -1
  180. package/dist/atlas/regime.js +1 -1
  181. package/dist/atlas/regime.js.map +1 -1
  182. package/dist/atlas/serialize.d.ts +18 -12
  183. package/dist/atlas/serialize.d.ts.map +1 -1
  184. package/dist/atlas/serialize.js +28 -18
  185. package/dist/atlas/serialize.js.map +1 -1
  186. package/dist/atlas/statement.js.map +1 -1
  187. package/dist/atlas/text-overlap.d.ts +23 -0
  188. package/dist/atlas/text-overlap.d.ts.map +1 -0
  189. package/dist/atlas/text-overlap.js +41 -0
  190. package/dist/atlas/text-overlap.js.map +1 -0
  191. package/dist/atlas/translation-registry.js.map +1 -1
  192. package/dist/atlas/translation.js.map +1 -1
  193. package/dist/atlas/types.d.ts +9 -2
  194. package/dist/atlas/types.d.ts.map +1 -1
  195. package/dist/atlas/types.js +1 -1
  196. package/dist/atlas/types.js.map +1 -1
  197. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  198. package/dist/atlas/waves/bridges-closure.js +2 -9
  199. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  200. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  201. package/dist/atlas/waves/bridges.js +32 -52
  202. package/dist/atlas/waves/bridges.js.map +1 -1
  203. package/dist/atlas/waves/index.d.ts +1 -1
  204. package/dist/atlas/waves/index.d.ts.map +1 -1
  205. package/dist/atlas/waves/index.js.map +1 -1
  206. package/dist/atlas/waves/models.d.ts +5 -6
  207. package/dist/atlas/waves/models.d.ts.map +1 -1
  208. package/dist/atlas/waves/models.js +7 -13
  209. package/dist/atlas/waves/models.js.map +1 -1
  210. package/dist/atlas/waves/numerics.d.ts.map +1 -1
  211. package/dist/atlas/waves/numerics.js +10 -3
  212. package/dist/atlas/waves/numerics.js.map +1 -1
  213. package/dist/atlas/witness-artifact.js.map +1 -1
  214. package/dist/atlas/witness-dominance.d.ts +4 -3
  215. package/dist/atlas/witness-dominance.d.ts.map +1 -1
  216. package/dist/atlas/witness-dominance.js +15 -5
  217. package/dist/atlas/witness-dominance.js.map +1 -1
  218. package/dist/atlas/witness-numeric.d.ts +38 -4
  219. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  220. package/dist/atlas/witness-numeric.js +80 -2
  221. package/dist/atlas/witness-numeric.js.map +1 -1
  222. package/dist/atlas/witness-result.d.ts +7 -1
  223. package/dist/atlas/witness-result.d.ts.map +1 -1
  224. package/dist/atlas/witness-result.js.map +1 -1
  225. package/dist/atlas/witness-specs.d.ts.map +1 -1
  226. package/dist/atlas/witness-specs.js +19 -0
  227. package/dist/atlas/witness-specs.js.map +1 -1
  228. package/dist/atlas/witness-symbolic.d.ts +75 -3
  229. package/dist/atlas/witness-symbolic.d.ts.map +1 -1
  230. package/dist/atlas/witness-symbolic.js +116 -10
  231. package/dist/atlas/witness-symbolic.js.map +1 -1
  232. package/dist/atlas/witnesses/quantum-support.js.map +1 -1
  233. package/dist/bridges/caller-table.d.ts +1 -1
  234. package/dist/bridges/caller-table.d.ts.map +1 -1
  235. package/dist/bridges/caller-table.js.map +1 -1
  236. package/dist/bridges/carrier-sign.d.ts.map +1 -1
  237. package/dist/bridges/carrier-sign.js +8 -3
  238. package/dist/bridges/carrier-sign.js.map +1 -1
  239. package/dist/bridges/catalog-adapter.d.ts +12 -3
  240. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  241. package/dist/bridges/catalog-adapter.js +17 -9
  242. package/dist/bridges/catalog-adapter.js.map +1 -1
  243. package/dist/bridges/catalog-load.d.ts +12 -2
  244. package/dist/bridges/catalog-load.d.ts.map +1 -1
  245. package/dist/bridges/catalog-load.js +181 -13
  246. package/dist/bridges/catalog-load.js.map +1 -1
  247. package/dist/bridges/catalog-types.d.ts +74 -26
  248. package/dist/bridges/catalog-types.d.ts.map +1 -1
  249. package/dist/bridges/catalog-types.js +11 -1
  250. package/dist/bridges/catalog-types.js.map +1 -1
  251. package/dist/bridges/coefficient-statement.js +1 -5
  252. package/dist/bridges/coefficient-statement.js.map +1 -1
  253. package/dist/bridges/confrontation-coverage.js.map +1 -1
  254. package/dist/bridges/confrontations.d.ts +1 -1
  255. package/dist/bridges/confrontations.d.ts.map +1 -1
  256. package/dist/bridges/confrontations.js +1 -1
  257. package/dist/bridges/confrontations.js.map +1 -1
  258. package/dist/bridges/evaluation-errors.d.ts +46 -3
  259. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  260. package/dist/bridges/evaluation-errors.js +40 -4
  261. package/dist/bridges/evaluation-errors.js.map +1 -1
  262. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  263. package/dist/bridges/evaluator-inputs.js +7 -5
  264. package/dist/bridges/evaluator-inputs.js.map +1 -1
  265. package/dist/bridges/evaluators.d.ts +17 -2
  266. package/dist/bridges/evaluators.d.ts.map +1 -1
  267. package/dist/bridges/evaluators.js +76 -28
  268. package/dist/bridges/evaluators.js.map +1 -1
  269. package/dist/bridges/expr-parse.d.ts +38 -4
  270. package/dist/bridges/expr-parse.d.ts.map +1 -1
  271. package/dist/bridges/expr-parse.js +101 -12
  272. package/dist/bridges/expr-parse.js.map +1 -1
  273. package/dist/bridges/holds.d.ts +40 -4
  274. package/dist/bridges/holds.d.ts.map +1 -1
  275. package/dist/bridges/holds.js +128 -19
  276. package/dist/bridges/holds.js.map +1 -1
  277. package/dist/bridges/index.d.ts +15 -14
  278. package/dist/bridges/index.d.ts.map +1 -1
  279. package/dist/bridges/index.js +14 -15
  280. package/dist/bridges/index.js.map +1 -1
  281. package/dist/bridges/input-contract.js.map +1 -1
  282. package/dist/bridges/membership.d.ts +5 -3
  283. package/dist/bridges/membership.d.ts.map +1 -1
  284. package/dist/bridges/membership.js +5 -6
  285. package/dist/bridges/membership.js.map +1 -1
  286. package/dist/bridges/notices.d.ts.map +1 -1
  287. package/dist/bridges/notices.js +5 -5
  288. package/dist/bridges/notices.js.map +1 -1
  289. package/dist/bridges/observations/types.js.map +1 -1
  290. package/dist/bridges/rejected.d.ts +11 -17
  291. package/dist/bridges/rejected.d.ts.map +1 -1
  292. package/dist/bridges/rejected.js +13 -68
  293. package/dist/bridges/rejected.js.map +1 -1
  294. package/dist/bridges/relation-eval.d.ts +6 -7
  295. package/dist/bridges/relation-eval.d.ts.map +1 -1
  296. package/dist/bridges/relation-eval.js +20 -50
  297. package/dist/bridges/relation-eval.js.map +1 -1
  298. package/dist/bridges/rhs-registry.js.map +1 -1
  299. package/dist/bridges/sensitivity.d.ts +11 -3
  300. package/dist/bridges/sensitivity.d.ts.map +1 -1
  301. package/dist/bridges/sensitivity.js +27 -13
  302. package/dist/bridges/sensitivity.js.map +1 -1
  303. package/dist/bridges/tensor-index.js.map +1 -1
  304. package/dist/bridges/types.d.ts +1 -7
  305. package/dist/bridges/types.d.ts.map +1 -1
  306. package/dist/bridges/types.js +1 -4
  307. package/dist/bridges/types.js.map +1 -1
  308. package/dist/bridges/validity.d.ts +33 -0
  309. package/dist/bridges/validity.d.ts.map +1 -0
  310. package/dist/bridges/validity.js +67 -0
  311. package/dist/bridges/validity.js.map +1 -0
  312. package/dist/canonical/canonical-equation.js.map +1 -1
  313. package/dist/canonical/dimensional-fields.js.map +1 -1
  314. package/dist/canonical/entries/_l1-build.js.map +1 -1
  315. package/dist/canonical/entries/atomic.js +1 -3
  316. package/dist/canonical/entries/atomic.js.map +1 -1
  317. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  318. package/dist/canonical/entries/condensed-matter.js +8 -9
  319. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  320. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  321. package/dist/canonical/entries/dimensional-classics.js +5 -6
  322. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  323. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  324. package/dist/canonical/entries/electromagnetism.js +6 -12
  325. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  326. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  327. package/dist/canonical/entries/fluids-waves.js +3 -7
  328. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  329. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  330. package/dist/canonical/entries/mechanics.js +4 -6
  331. package/dist/canonical/entries/mechanics.js.map +1 -1
  332. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  333. package/dist/canonical/entries/nonmonomial.js +38 -39
  334. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  335. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  336. package/dist/canonical/entries/relativity.js +6 -6
  337. package/dist/canonical/entries/relativity.js.map +1 -1
  338. package/dist/canonical/entries/statistical-mechanics.js +5 -5
  339. package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
  340. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  341. package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
  342. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  343. package/dist/canonical/fixed-points.d.ts +94 -0
  344. package/dist/canonical/fixed-points.d.ts.map +1 -0
  345. package/dist/canonical/fixed-points.js +81 -0
  346. package/dist/canonical/fixed-points.js.map +1 -0
  347. package/dist/canonical/linkage.d.ts +29 -4
  348. package/dist/canonical/linkage.d.ts.map +1 -1
  349. package/dist/canonical/linkage.js +47 -64
  350. package/dist/canonical/linkage.js.map +1 -1
  351. package/dist/canonical/normal-form.d.ts +0 -8
  352. package/dist/canonical/normal-form.d.ts.map +1 -1
  353. package/dist/canonical/normal-form.js +22 -23
  354. package/dist/canonical/normal-form.js.map +1 -1
  355. package/dist/canonical/registry.js.map +1 -1
  356. package/dist/canonical/residual.js.map +1 -1
  357. package/dist/canonical/seed-l-layer.d.ts +7 -1
  358. package/dist/canonical/seed-l-layer.d.ts.map +1 -1
  359. package/dist/canonical/seed-l-layer.js +7 -1
  360. package/dist/canonical/seed-l-layer.js.map +1 -1
  361. package/dist/canonical/structural.d.ts +42 -21
  362. package/dist/canonical/structural.d.ts.map +1 -1
  363. package/dist/canonical/structural.js +64 -23
  364. package/dist/canonical/structural.js.map +1 -1
  365. package/dist/cases/brownian-sphere.d.ts +3 -3
  366. package/dist/cases/brownian-sphere.d.ts.map +1 -1
  367. package/dist/cases/brownian-sphere.js +10 -9
  368. package/dist/cases/brownian-sphere.js.map +1 -1
  369. package/dist/cases/damped-resonator.d.ts.map +1 -1
  370. package/dist/cases/damped-resonator.js +8 -11
  371. package/dist/cases/damped-resonator.js.map +1 -1
  372. package/dist/cases/index.js.map +1 -1
  373. package/dist/cases/kepler-rv.d.ts +1 -1
  374. package/dist/cases/kepler-rv.d.ts.map +1 -1
  375. package/dist/cases/kepler-rv.js +3 -2
  376. package/dist/cases/kepler-rv.js.map +1 -1
  377. package/dist/cases/lumped-cooling.d.ts +8 -3
  378. package/dist/cases/lumped-cooling.d.ts.map +1 -1
  379. package/dist/cases/lumped-cooling.js +22 -24
  380. package/dist/cases/lumped-cooling.js.map +1 -1
  381. package/dist/cases/quadrature.d.ts +7 -9
  382. package/dist/cases/quadrature.d.ts.map +1 -1
  383. package/dist/cases/quadrature.js +28 -32
  384. package/dist/cases/quadrature.js.map +1 -1
  385. package/dist/cases/resistor-noise.js +7 -7
  386. package/dist/cases/resistor-noise.js.map +1 -1
  387. package/dist/cases/skin-depth.d.ts +0 -4
  388. package/dist/cases/skin-depth.d.ts.map +1 -1
  389. package/dist/cases/skin-depth.js +3 -7
  390. package/dist/cases/skin-depth.js.map +1 -1
  391. package/dist/cases/types.js.map +1 -1
  392. package/dist/cli/args.d.ts +30 -3
  393. package/dist/cli/args.d.ts.map +1 -1
  394. package/dist/cli/args.js +47 -9
  395. package/dist/cli/args.js.map +1 -1
  396. package/dist/cli/bindings.d.ts +13 -0
  397. package/dist/cli/bindings.d.ts.map +1 -0
  398. package/dist/cli/bindings.js +33 -0
  399. package/dist/cli/bindings.js.map +1 -0
  400. package/dist/cli/closed-form-range.js.map +1 -1
  401. package/dist/cli/command.d.ts +8 -1
  402. package/dist/cli/command.d.ts.map +1 -1
  403. package/dist/cli/command.js.map +1 -1
  404. package/dist/cli/commands/_atlas-map.d.ts +2 -11
  405. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  406. package/dist/cli/commands/_atlas-map.js +50 -35
  407. package/dist/cli/commands/_atlas-map.js.map +1 -1
  408. package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
  409. package/dist/cli/commands/_atlas-route.js +6 -2
  410. package/dist/cli/commands/_atlas-route.js.map +1 -1
  411. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  412. package/dist/cli/commands/_discovery-opts.js +48 -14
  413. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  414. package/dist/cli/commands/atlas.d.ts.map +1 -1
  415. package/dist/cli/commands/atlas.js +9 -8
  416. package/dist/cli/commands/atlas.js.map +1 -1
  417. package/dist/cli/commands/audit.d.ts.map +1 -1
  418. package/dist/cli/commands/audit.js +20 -20
  419. package/dist/cli/commands/audit.js.map +1 -1
  420. package/dist/cli/commands/axes.d.ts.map +1 -1
  421. package/dist/cli/commands/axes.js +20 -1
  422. package/dist/cli/commands/axes.js.map +1 -1
  423. package/dist/cli/commands/candidates.d.ts.map +1 -1
  424. package/dist/cli/commands/candidates.js +16 -8
  425. package/dist/cli/commands/candidates.js.map +1 -1
  426. package/dist/cli/commands/canonical.js.map +1 -1
  427. package/dist/cli/commands/chain.js +1 -1
  428. package/dist/cli/commands/chain.js.map +1 -1
  429. package/dist/cli/commands/confront.d.ts.map +1 -1
  430. package/dist/cli/commands/confront.js +22 -20
  431. package/dist/cli/commands/confront.js.map +1 -1
  432. package/dist/cli/commands/connectors.js.map +1 -1
  433. package/dist/cli/commands/coverage.js.map +1 -1
  434. package/dist/cli/commands/derive.d.ts.map +1 -1
  435. package/dist/cli/commands/derive.js +60 -35
  436. package/dist/cli/commands/derive.js.map +1 -1
  437. package/dist/cli/commands/discover.d.ts.map +1 -1
  438. package/dist/cli/commands/discover.js +20 -10
  439. package/dist/cli/commands/discover.js.map +1 -1
  440. package/dist/cli/commands/eval.d.ts.map +1 -1
  441. package/dist/cli/commands/eval.js +14 -10
  442. package/dist/cli/commands/eval.js.map +1 -1
  443. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  444. package/dist/cli/commands/evaluate.js +108 -58
  445. package/dist/cli/commands/evaluate.js.map +1 -1
  446. package/dist/cli/commands/explain.d.ts.map +1 -1
  447. package/dist/cli/commands/explain.js +16 -8
  448. package/dist/cli/commands/explain.js.map +1 -1
  449. package/dist/cli/commands/frontier.js.map +1 -1
  450. package/dist/cli/commands/ground.d.ts.map +1 -1
  451. package/dist/cli/commands/ground.js +41 -10
  452. package/dist/cli/commands/ground.js.map +1 -1
  453. package/dist/cli/commands/index.js.map +1 -1
  454. package/dist/cli/commands/map.d.ts.map +1 -1
  455. package/dist/cli/commands/map.js +155 -92
  456. package/dist/cli/commands/map.js.map +1 -1
  457. package/dist/cli/commands/metric.d.ts.map +1 -1
  458. package/dist/cli/commands/metric.js +58 -20
  459. package/dist/cli/commands/metric.js.map +1 -1
  460. package/dist/cli/commands/path.d.ts +10 -0
  461. package/dist/cli/commands/path.d.ts.map +1 -1
  462. package/dist/cli/commands/path.js +29 -7
  463. package/dist/cli/commands/path.js.map +1 -1
  464. package/dist/cli/commands/predict.js.map +1 -1
  465. package/dist/cli/commands/priority.js.map +1 -1
  466. package/dist/cli/commands/probe.d.ts.map +1 -1
  467. package/dist/cli/commands/probe.js +105 -38
  468. package/dist/cli/commands/probe.js.map +1 -1
  469. package/dist/cli/commands/recover.js +1 -1
  470. package/dist/cli/commands/recover.js.map +1 -1
  471. package/dist/cli/commands/regime.d.ts +5 -4
  472. package/dist/cli/commands/regime.d.ts.map +1 -1
  473. package/dist/cli/commands/regime.js +25 -26
  474. package/dist/cli/commands/regime.js.map +1 -1
  475. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  476. package/dist/cli/commands/retrieve.js +23 -14
  477. package/dist/cli/commands/retrieve.js.map +1 -1
  478. package/dist/cli/commands/search.d.ts.map +1 -1
  479. package/dist/cli/commands/search.js +9 -4
  480. package/dist/cli/commands/search.js.map +1 -1
  481. package/dist/cli/commands/symbolic.js +31 -36
  482. package/dist/cli/commands/symbolic.js.map +1 -1
  483. package/dist/cli/commands/testplan.d.ts.map +1 -1
  484. package/dist/cli/commands/testplan.js +5 -3
  485. package/dist/cli/commands/testplan.js.map +1 -1
  486. package/dist/cli/conventions.js.map +1 -1
  487. package/dist/cli/determination.js.map +1 -1
  488. package/dist/cli/errors.js.map +1 -1
  489. package/dist/cli/euler-guard.js.map +1 -1
  490. package/dist/cli/eval-numbers.js.map +1 -1
  491. package/dist/cli/expr-print.d.ts +28 -3
  492. package/dist/cli/expr-print.d.ts.map +1 -1
  493. package/dist/cli/expr-print.js +42 -22
  494. package/dist/cli/expr-print.js.map +1 -1
  495. package/dist/cli/flag-help.js.map +1 -1
  496. package/dist/cli/graphs.js.map +1 -1
  497. package/dist/cli/library-defaults.d.ts +19 -0
  498. package/dist/cli/library-defaults.d.ts.map +1 -0
  499. package/dist/cli/library-defaults.js +22 -0
  500. package/dist/cli/library-defaults.js.map +1 -0
  501. package/dist/cli/main.d.ts +7 -0
  502. package/dist/cli/main.d.ts.map +1 -1
  503. package/dist/cli/main.js +25 -6
  504. package/dist/cli/main.js.map +1 -1
  505. package/dist/cli/map-evidence.js.map +1 -1
  506. package/dist/cli/numeric-flag.d.ts +12 -0
  507. package/dist/cli/numeric-flag.d.ts.map +1 -0
  508. package/dist/cli/numeric-flag.js +44 -0
  509. package/dist/cli/numeric-flag.js.map +1 -0
  510. package/dist/cli/output.d.ts +23 -6
  511. package/dist/cli/output.d.ts.map +1 -1
  512. package/dist/cli/output.js +15 -0
  513. package/dist/cli/output.js.map +1 -1
  514. package/dist/cli/published-url.js.map +1 -1
  515. package/dist/cli/record-reach.d.ts +6 -0
  516. package/dist/cli/record-reach.d.ts.map +1 -1
  517. package/dist/cli/record-reach.js +17 -11
  518. package/dist/cli/record-reach.js.map +1 -1
  519. package/dist/cli/record-tables.d.ts.map +1 -1
  520. package/dist/cli/record-tables.js +7 -6
  521. package/dist/cli/record-tables.js.map +1 -1
  522. package/dist/cli/record.d.ts +1 -5
  523. package/dist/cli/record.d.ts.map +1 -1
  524. package/dist/cli/record.js +40 -20
  525. package/dist/cli/record.js.map +1 -1
  526. package/dist/cli/search-index.d.ts +5 -0
  527. package/dist/cli/search-index.d.ts.map +1 -1
  528. package/dist/cli/search-index.js +19 -7
  529. package/dist/cli/search-index.js.map +1 -1
  530. package/dist/cli/statuses.d.ts +0 -2
  531. package/dist/cli/statuses.d.ts.map +1 -1
  532. package/dist/cli/statuses.js +0 -7
  533. package/dist/cli/statuses.js.map +1 -1
  534. package/dist/cli/stored-results.d.ts +7 -0
  535. package/dist/cli/stored-results.d.ts.map +1 -0
  536. package/dist/cli/stored-results.js +23 -0
  537. package/dist/cli/stored-results.js.map +1 -0
  538. package/dist/cli/top-level-help.js.map +1 -1
  539. package/dist/cli/version.d.ts.map +1 -1
  540. package/dist/cli/version.js +7 -5
  541. package/dist/cli/version.js.map +1 -1
  542. package/dist/cli-api.d.ts +49 -14
  543. package/dist/cli-api.d.ts.map +1 -1
  544. package/dist/cli-api.js +42 -17
  545. package/dist/cli-api.js.map +1 -1
  546. package/dist/composition/adjudication.js.map +1 -1
  547. package/dist/composition/algebraic-equivalence.d.ts +43 -0
  548. package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
  549. package/dist/composition/algebraic-equivalence.js +115 -0
  550. package/dist/composition/algebraic-equivalence.js.map +1 -0
  551. package/dist/composition/aliases.js.map +1 -1
  552. package/dist/composition/audit-coverage.d.ts +2 -0
  553. package/dist/composition/audit-coverage.d.ts.map +1 -1
  554. package/dist/composition/audit-coverage.js.map +1 -1
  555. package/dist/composition/axes.d.ts +6 -0
  556. package/dist/composition/axes.d.ts.map +1 -1
  557. package/dist/composition/axes.js +18 -6
  558. package/dist/composition/axes.js.map +1 -1
  559. package/dist/composition/axis-audit.d.ts +47 -20
  560. package/dist/composition/axis-audit.d.ts.map +1 -1
  561. package/dist/composition/axis-audit.js +82 -9
  562. package/dist/composition/axis-audit.js.map +1 -1
  563. package/dist/composition/bridge-analysis.d.ts +14 -15
  564. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  565. package/dist/composition/bridge-analysis.js +148 -91
  566. package/dist/composition/bridge-analysis.js.map +1 -1
  567. package/dist/composition/bridge-prediction.d.ts +5 -1
  568. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  569. package/dist/composition/bridge-prediction.js +12 -16
  570. package/dist/composition/bridge-prediction.js.map +1 -1
  571. package/dist/composition/buckingham-filter.js.map +1 -1
  572. package/dist/composition/canonical-compare.d.ts +40 -0
  573. package/dist/composition/canonical-compare.d.ts.map +1 -1
  574. package/dist/composition/canonical-compare.js +134 -26
  575. package/dist/composition/canonical-compare.js.map +1 -1
  576. package/dist/composition/canonical-graph.d.ts +9 -10
  577. package/dist/composition/canonical-graph.d.ts.map +1 -1
  578. package/dist/composition/canonical-graph.js +33 -102
  579. package/dist/composition/canonical-graph.js.map +1 -1
  580. package/dist/composition/canonical-json.js +2 -2
  581. package/dist/composition/canonical-json.js.map +1 -1
  582. package/dist/composition/canonical-prefactors.js.map +1 -1
  583. package/dist/composition/catalog-graph.d.ts.map +1 -1
  584. package/dist/composition/catalog-graph.js +8 -25
  585. package/dist/composition/catalog-graph.js.map +1 -1
  586. package/dist/composition/chain-candidate.d.ts +10 -0
  587. package/dist/composition/chain-candidate.d.ts.map +1 -1
  588. package/dist/composition/chain-candidate.js +11 -2
  589. package/dist/composition/chain-candidate.js.map +1 -1
  590. package/dist/composition/chain-match.d.ts +6 -3
  591. package/dist/composition/chain-match.d.ts.map +1 -1
  592. package/dist/composition/chain-match.js +4 -1
  593. package/dist/composition/chain-match.js.map +1 -1
  594. package/dist/composition/chain-regime.js.map +1 -1
  595. package/dist/composition/chain-result.d.ts.map +1 -1
  596. package/dist/composition/chain-result.js +2 -14
  597. package/dist/composition/chain-result.js.map +1 -1
  598. package/dist/composition/compose-surface.js.map +1 -1
  599. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  600. package/dist/composition/compose-symbolic.js +3 -2
  601. package/dist/composition/compose-symbolic.js.map +1 -1
  602. package/dist/composition/compose.d.ts.map +1 -1
  603. package/dist/composition/compose.js +166 -41
  604. package/dist/composition/compose.js.map +1 -1
  605. package/dist/composition/composition-recovery.d.ts.map +1 -1
  606. package/dist/composition/composition-recovery.js +4 -7
  607. package/dist/composition/composition-recovery.js.map +1 -1
  608. package/dist/composition/consequence.d.ts.map +1 -1
  609. package/dist/composition/consequence.js +15 -6
  610. package/dist/composition/consequence.js.map +1 -1
  611. package/dist/composition/consistency.js.map +1 -1
  612. package/dist/composition/descriptor.d.ts +1 -1
  613. package/dist/composition/descriptor.d.ts.map +1 -1
  614. package/dist/composition/descriptor.js.map +1 -1
  615. package/dist/composition/dimension-adjacency.js.map +1 -1
  616. package/dist/composition/discovery.d.ts +77 -11
  617. package/dist/composition/discovery.d.ts.map +1 -1
  618. package/dist/composition/discovery.js +194 -80
  619. package/dist/composition/discovery.js.map +1 -1
  620. package/dist/composition/edge.d.ts +40 -10
  621. package/dist/composition/edge.d.ts.map +1 -1
  622. package/dist/composition/edge.js +47 -12
  623. package/dist/composition/edge.js.map +1 -1
  624. package/dist/composition/enumerate.d.ts +2 -2
  625. package/dist/composition/enumerate.d.ts.map +1 -1
  626. package/dist/composition/enumerate.js +18 -3
  627. package/dist/composition/enumerate.js.map +1 -1
  628. package/dist/composition/evaluate-relation.d.ts +35 -11
  629. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  630. package/dist/composition/evaluate-relation.js +60 -39
  631. package/dist/composition/evaluate-relation.js.map +1 -1
  632. package/dist/composition/explain.d.ts +5 -9
  633. package/dist/composition/explain.d.ts.map +1 -1
  634. package/dist/composition/explain.js +38 -18
  635. package/dist/composition/explain.js.map +1 -1
  636. package/dist/composition/expr-eval.d.ts.map +1 -1
  637. package/dist/composition/expr-eval.js +2 -11
  638. package/dist/composition/expr-eval.js.map +1 -1
  639. package/dist/composition/expr-simplify.d.ts +16 -0
  640. package/dist/composition/expr-simplify.d.ts.map +1 -1
  641. package/dist/composition/expr-simplify.js +24 -59
  642. package/dist/composition/expr-simplify.js.map +1 -1
  643. package/dist/composition/expr-subst.js.map +1 -1
  644. package/dist/composition/formula-shape.d.ts +28 -0
  645. package/dist/composition/formula-shape.d.ts.map +1 -1
  646. package/dist/composition/formula-shape.js +96 -2
  647. package/dist/composition/formula-shape.js.map +1 -1
  648. package/dist/composition/frontier-account.d.ts +3 -2
  649. package/dist/composition/frontier-account.d.ts.map +1 -1
  650. package/dist/composition/frontier-account.js +7 -3
  651. package/dist/composition/frontier-account.js.map +1 -1
  652. package/dist/composition/graph-structure.d.ts +98 -0
  653. package/dist/composition/graph-structure.d.ts.map +1 -0
  654. package/dist/composition/graph-structure.js +167 -0
  655. package/dist/composition/graph-structure.js.map +1 -0
  656. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  657. package/dist/composition/graph-viz-svg.js +1 -1
  658. package/dist/composition/graph-viz-svg.js.map +1 -1
  659. package/dist/composition/graph-viz.d.ts.map +1 -1
  660. package/dist/composition/graph-viz.js +8 -37
  661. package/dist/composition/graph-viz.js.map +1 -1
  662. package/dist/composition/grounding.js.map +1 -1
  663. package/dist/composition/identifiability.d.ts +91 -4
  664. package/dist/composition/identifiability.d.ts.map +1 -1
  665. package/dist/composition/identifiability.js +363 -6
  666. package/dist/composition/identifiability.js.map +1 -1
  667. package/dist/composition/index.d.ts +14 -8
  668. package/dist/composition/index.d.ts.map +1 -1
  669. package/dist/composition/index.js +7 -5
  670. package/dist/composition/index.js.map +1 -1
  671. package/dist/composition/mathts-quiet.d.ts +29 -0
  672. package/dist/composition/mathts-quiet.d.ts.map +1 -0
  673. package/dist/composition/mathts-quiet.js +57 -0
  674. package/dist/composition/mathts-quiet.js.map +1 -0
  675. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  676. package/dist/composition/mathts-scalar-symbols.js +20 -35
  677. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  678. package/dist/composition/not-composable-seeds.d.ts +3 -1
  679. package/dist/composition/not-composable-seeds.d.ts.map +1 -1
  680. package/dist/composition/not-composable-seeds.js +2 -0
  681. package/dist/composition/not-composable-seeds.js.map +1 -1
  682. package/dist/composition/probe/backend-protocol.js.map +1 -1
  683. package/dist/composition/probe/candidate-store.js.map +1 -1
  684. package/dist/composition/probe/corpus.d.ts +4 -2
  685. package/dist/composition/probe/corpus.d.ts.map +1 -1
  686. package/dist/composition/probe/corpus.js +20 -9
  687. package/dist/composition/probe/corpus.js.map +1 -1
  688. package/dist/composition/probe/dataset.d.ts +17 -0
  689. package/dist/composition/probe/dataset.d.ts.map +1 -1
  690. package/dist/composition/probe/dataset.js +95 -50
  691. package/dist/composition/probe/dataset.js.map +1 -1
  692. package/dist/composition/probe/experiment-design.d.ts +5 -1
  693. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  694. package/dist/composition/probe/experiment-design.js +44 -24
  695. package/dist/composition/probe/experiment-design.js.map +1 -1
  696. package/dist/composition/probe/expression-gaps.js.map +1 -1
  697. package/dist/composition/probe/falsify.d.ts +14 -3
  698. package/dist/composition/probe/falsify.d.ts.map +1 -1
  699. package/dist/composition/probe/falsify.js +16 -27
  700. package/dist/composition/probe/falsify.js.map +1 -1
  701. package/dist/composition/probe/fingerprint.js.map +1 -1
  702. package/dist/composition/probe/fit.d.ts +7 -1
  703. package/dist/composition/probe/fit.d.ts.map +1 -1
  704. package/dist/composition/probe/fit.js +48 -23
  705. package/dist/composition/probe/fit.js.map +1 -1
  706. package/dist/composition/probe/frontier.d.ts.map +1 -1
  707. package/dist/composition/probe/frontier.js +33 -15
  708. package/dist/composition/probe/frontier.js.map +1 -1
  709. package/dist/composition/probe/generator.d.ts +27 -1
  710. package/dist/composition/probe/generator.d.ts.map +1 -1
  711. package/dist/composition/probe/generator.js +53 -30
  712. package/dist/composition/probe/generator.js.map +1 -1
  713. package/dist/composition/probe/index.d.ts +18 -2
  714. package/dist/composition/probe/index.d.ts.map +1 -1
  715. package/dist/composition/probe/index.js +10 -2
  716. package/dist/composition/probe/index.js.map +1 -1
  717. package/dist/composition/probe/limits.d.ts +24 -1
  718. package/dist/composition/probe/limits.d.ts.map +1 -1
  719. package/dist/composition/probe/limits.js +53 -11
  720. package/dist/composition/probe/limits.js.map +1 -1
  721. package/dist/composition/probe/metadata.js.map +1 -1
  722. package/dist/composition/probe/pipeline.d.ts +5 -0
  723. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  724. package/dist/composition/probe/pipeline.js +22 -9
  725. package/dist/composition/probe/pipeline.js.map +1 -1
  726. package/dist/composition/probe/power-law.d.ts +121 -0
  727. package/dist/composition/probe/power-law.d.ts.map +1 -0
  728. package/dist/composition/probe/power-law.js +255 -0
  729. package/dist/composition/probe/power-law.js.map +1 -0
  730. package/dist/composition/probe/problem.d.ts +12 -1
  731. package/dist/composition/probe/problem.d.ts.map +1 -1
  732. package/dist/composition/probe/problem.js +242 -48
  733. package/dist/composition/probe/problem.js.map +1 -1
  734. package/dist/composition/probe/report.js +1 -1
  735. package/dist/composition/probe/report.js.map +1 -1
  736. package/dist/composition/probe/residual.d.ts +6 -1
  737. package/dist/composition/probe/residual.d.ts.map +1 -1
  738. package/dist/composition/probe/residual.js +9 -7
  739. package/dist/composition/probe/residual.js.map +1 -1
  740. package/dist/composition/probe/run-manifest.js +2 -2
  741. package/dist/composition/probe/run-manifest.js.map +1 -1
  742. package/dist/composition/probe/scoring.d.ts +2 -1
  743. package/dist/composition/probe/scoring.d.ts.map +1 -1
  744. package/dist/composition/probe/scoring.js +21 -7
  745. package/dist/composition/probe/scoring.js.map +1 -1
  746. package/dist/composition/probe/search-budget.js.map +1 -1
  747. package/dist/composition/probe/serialize.js.map +1 -1
  748. package/dist/composition/probe/structure.d.ts +82 -17
  749. package/dist/composition/probe/structure.d.ts.map +1 -1
  750. package/dist/composition/probe/structure.js +129 -55
  751. package/dist/composition/probe/structure.js.map +1 -1
  752. package/dist/composition/probe/study.d.ts +35 -12
  753. package/dist/composition/probe/study.d.ts.map +1 -1
  754. package/dist/composition/probe/study.js +241 -184
  755. package/dist/composition/probe/study.js.map +1 -1
  756. package/dist/composition/probe/t-tail.d.ts +17 -0
  757. package/dist/composition/probe/t-tail.d.ts.map +1 -0
  758. package/dist/composition/probe/t-tail.js +32 -0
  759. package/dist/composition/probe/t-tail.js.map +1 -0
  760. package/dist/composition/probe/types.d.ts +6 -1
  761. package/dist/composition/probe/types.d.ts.map +1 -1
  762. package/dist/composition/probe/types.js +2 -0
  763. package/dist/composition/probe/types.js.map +1 -1
  764. package/dist/composition/proposed-bridges.d.ts +51 -13
  765. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  766. package/dist/composition/proposed-bridges.js +110 -58
  767. package/dist/composition/proposed-bridges.js.map +1 -1
  768. package/dist/composition/quantities.d.ts +0 -4
  769. package/dist/composition/quantities.d.ts.map +1 -1
  770. package/dist/composition/quantities.js +5 -5
  771. package/dist/composition/quantities.js.map +1 -1
  772. package/dist/composition/quantity-clusters.d.ts +48 -0
  773. package/dist/composition/quantity-clusters.d.ts.map +1 -0
  774. package/dist/composition/quantity-clusters.js +98 -0
  775. package/dist/composition/quantity-clusters.js.map +1 -0
  776. package/dist/composition/quantity.d.ts +18 -2
  777. package/dist/composition/quantity.d.ts.map +1 -1
  778. package/dist/composition/quantity.js +35 -6
  779. package/dist/composition/quantity.js.map +1 -1
  780. package/dist/composition/rational-exponent.d.ts +40 -0
  781. package/dist/composition/rational-exponent.d.ts.map +1 -0
  782. package/dist/composition/rational-exponent.js +65 -0
  783. package/dist/composition/rational-exponent.js.map +1 -0
  784. package/dist/composition/representative-values.d.ts +22 -0
  785. package/dist/composition/representative-values.d.ts.map +1 -1
  786. package/dist/composition/representative-values.js +23 -0
  787. package/dist/composition/representative-values.js.map +1 -1
  788. package/dist/composition/retrodiction.d.ts +16 -6
  789. package/dist/composition/retrodiction.d.ts.map +1 -1
  790. package/dist/composition/retrodiction.js +36 -10
  791. package/dist/composition/retrodiction.js.map +1 -1
  792. package/dist/composition/uncertainty.js.map +1 -1
  793. package/dist/composition/user-equation.d.ts.map +1 -1
  794. package/dist/composition/user-equation.js +2 -2
  795. package/dist/composition/user-equation.js.map +1 -1
  796. package/dist/core/assignment.d.ts +19 -0
  797. package/dist/core/assignment.d.ts.map +1 -0
  798. package/dist/core/assignment.js +19 -0
  799. package/dist/core/assignment.js.map +1 -0
  800. package/dist/core/axes-registry.d.ts +8 -5
  801. package/dist/core/axes-registry.d.ts.map +1 -1
  802. package/dist/core/axes-registry.js.map +1 -1
  803. package/dist/core/cell.js.map +1 -1
  804. package/dist/core/compare.d.ts +32 -0
  805. package/dist/core/compare.d.ts.map +1 -0
  806. package/dist/core/compare.js +46 -0
  807. package/dist/core/compare.js.map +1 -0
  808. package/dist/core/constants.d.ts +35 -35
  809. package/dist/core/constants.d.ts.map +1 -1
  810. package/dist/core/constants.js +52 -37
  811. package/dist/core/constants.js.map +1 -1
  812. package/dist/core/data-file.d.ts +7 -0
  813. package/dist/core/data-file.d.ts.map +1 -1
  814. package/dist/core/data-file.js +17 -0
  815. package/dist/core/data-file.js.map +1 -1
  816. package/dist/core/flux-rules.js +1 -1
  817. package/dist/core/flux-rules.js.map +1 -1
  818. package/dist/core/format.d.ts +36 -0
  819. package/dist/core/format.d.ts.map +1 -0
  820. package/dist/core/format.js +39 -0
  821. package/dist/core/format.js.map +1 -0
  822. package/dist/core/hash.d.ts +14 -0
  823. package/dist/core/hash.d.ts.map +1 -0
  824. package/dist/core/hash.js +17 -0
  825. package/dist/core/hash.js.map +1 -0
  826. package/dist/core/json-schema.d.ts +3 -1
  827. package/dist/core/json-schema.d.ts.map +1 -1
  828. package/dist/core/json-schema.js +41 -16
  829. package/dist/core/json-schema.js.map +1 -1
  830. package/dist/core/labeled-tensor.d.ts +6 -1
  831. package/dist/core/labeled-tensor.d.ts.map +1 -1
  832. package/dist/core/labeled-tensor.js +18 -16
  833. package/dist/core/labeled-tensor.js.map +1 -1
  834. package/dist/core/mathts-read.d.ts +25 -0
  835. package/dist/core/mathts-read.d.ts.map +1 -0
  836. package/dist/core/mathts-read.js +51 -0
  837. package/dist/core/mathts-read.js.map +1 -0
  838. package/dist/core/regime-registry.d.ts +6 -2
  839. package/dist/core/regime-registry.d.ts.map +1 -1
  840. package/dist/core/regime-registry.js.map +1 -1
  841. package/dist/core/regime-rule-install.js.map +1 -1
  842. package/dist/core/regimes-builtins.js.map +1 -1
  843. package/dist/core/tensor.d.ts +7 -4
  844. package/dist/core/tensor.d.ts.map +1 -1
  845. package/dist/core/tensor.js +64 -8
  846. package/dist/core/tensor.js.map +1 -1
  847. package/dist/core/types.d.ts +5 -5
  848. package/dist/core/types.js.map +1 -1
  849. package/dist/core/universal-index.js.map +1 -1
  850. package/dist/diff/bridge-ast-gradient.d.ts +4 -5
  851. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  852. package/dist/diff/bridge-ast-gradient.js +10 -6
  853. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  854. package/dist/diff/bridge-gradient.d.ts +43 -86
  855. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  856. package/dist/diff/bridge-gradient.js +40 -109
  857. package/dist/diff/bridge-gradient.js.map +1 -1
  858. package/dist/diff/bridge-specs.d.ts +16 -5
  859. package/dist/diff/bridge-specs.d.ts.map +1 -1
  860. package/dist/diff/bridge-specs.js +19 -4
  861. package/dist/diff/bridge-specs.js.map +1 -1
  862. package/dist/dimensional/algebra.d.ts +18 -0
  863. package/dist/dimensional/algebra.d.ts.map +1 -1
  864. package/dist/dimensional/algebra.js +41 -1
  865. package/dist/dimensional/algebra.js.map +1 -1
  866. package/dist/dimensional/ast-builders.d.ts +12 -4
  867. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  868. package/dist/dimensional/ast-builders.js +17 -5
  869. package/dist/dimensional/ast-builders.js.map +1 -1
  870. package/dist/dimensional/ast-leaves.d.ts +81 -0
  871. package/dist/dimensional/ast-leaves.d.ts.map +1 -0
  872. package/dist/dimensional/ast-leaves.js +146 -0
  873. package/dist/dimensional/ast-leaves.js.map +1 -0
  874. package/dist/dimensional/ast-types.js.map +1 -1
  875. package/dist/dimensional/bridge-check.js.map +1 -1
  876. package/dist/dimensional/buckingham.d.ts.map +1 -1
  877. package/dist/dimensional/buckingham.js +15 -27
  878. package/dist/dimensional/buckingham.js.map +1 -1
  879. package/dist/dimensional/connection-validators.d.ts +2 -1
  880. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  881. package/dist/dimensional/connection-validators.js.map +1 -1
  882. package/dist/dimensional/connection.js.map +1 -1
  883. package/dist/dimensional/constant-rows.d.ts.map +1 -1
  884. package/dist/dimensional/constant-rows.js +17 -13
  885. package/dist/dimensional/constant-rows.js.map +1 -1
  886. package/dist/dimensional/constants.d.ts +5 -6
  887. package/dist/dimensional/constants.d.ts.map +1 -1
  888. package/dist/dimensional/constants.js +5 -6
  889. package/dist/dimensional/constants.js.map +1 -1
  890. package/dist/dimensional/curvature-composite.js.map +1 -1
  891. package/dist/dimensional/curvature-invariants.js.map +1 -1
  892. package/dist/dimensional/curvature.js.map +1 -1
  893. package/dist/dimensional/dimension-inference.d.ts.map +1 -1
  894. package/dist/dimensional/dimension-inference.js +1 -2
  895. package/dist/dimensional/dimension-inference.js.map +1 -1
  896. package/dist/dimensional/dimension-spec.d.ts +13 -7
  897. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  898. package/dist/dimensional/dimension-spec.js +49 -23
  899. package/dist/dimensional/dimension-spec.js.map +1 -1
  900. package/dist/dimensional/einstein-equation.js.map +1 -1
  901. package/dist/dimensional/errors.d.ts +4 -2
  902. package/dist/dimensional/errors.d.ts.map +1 -1
  903. package/dist/dimensional/errors.js +3 -17
  904. package/dist/dimensional/errors.js.map +1 -1
  905. package/dist/dimensional/exact-scale.d.ts +0 -17
  906. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  907. package/dist/dimensional/exact-scale.js +8 -8
  908. package/dist/dimensional/exact-scale.js.map +1 -1
  909. package/dist/dimensional/field-equation-helpers.js.map +1 -1
  910. package/dist/dimensional/formula-names.js.map +1 -1
  911. package/dist/dimensional/fresh-label.js.map +1 -1
  912. package/dist/dimensional/friedmann-equation.d.ts +3 -3
  913. package/dist/dimensional/friedmann-equation.js +3 -3
  914. package/dist/dimensional/friedmann-equation.js.map +1 -1
  915. package/dist/dimensional/gauge-field.d.ts +2 -3
  916. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  917. package/dist/dimensional/gauge-field.js +2 -3
  918. package/dist/dimensional/gauge-field.js.map +1 -1
  919. package/dist/dimensional/hyphen-names.d.ts +12 -2
  920. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  921. package/dist/dimensional/hyphen-names.js +45 -12
  922. package/dist/dimensional/hyphen-names.js.map +1 -1
  923. package/dist/dimensional/killing-validators.js.map +1 -1
  924. package/dist/dimensional/klein-gordon-equation.js.map +1 -1
  925. package/dist/dimensional/metric-validators.d.ts +2 -1
  926. package/dist/dimensional/metric-validators.d.ts.map +1 -1
  927. package/dist/dimensional/metric-validators.js.map +1 -1
  928. package/dist/dimensional/metric.d.ts.map +1 -1
  929. package/dist/dimensional/metric.js +0 -1
  930. package/dist/dimensional/metric.js.map +1 -1
  931. package/dist/dimensional/natural-units.js.map +1 -1
  932. package/dist/dimensional/quantity-registry.d.ts +13 -0
  933. package/dist/dimensional/quantity-registry.d.ts.map +1 -1
  934. package/dist/dimensional/quantity-registry.js +14 -6
  935. package/dist/dimensional/quantity-registry.js.map +1 -1
  936. package/dist/dimensional/rg-flow.js.map +1 -1
  937. package/dist/dimensional/stress-energy-validators.js.map +1 -1
  938. package/dist/dimensional/symbolic-constants.d.ts +9 -0
  939. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  940. package/dist/dimensional/symbolic-constants.js +20 -3
  941. package/dist/dimensional/symbolic-constants.js.map +1 -1
  942. package/dist/dimensional/tensor-trace.js.map +1 -1
  943. package/dist/dimensional/tensor.js.map +1 -1
  944. package/dist/dimensional/types.d.ts +36 -0
  945. package/dist/dimensional/types.d.ts.map +1 -1
  946. package/dist/dimensional/types.js +45 -7
  947. package/dist/dimensional/types.js.map +1 -1
  948. package/dist/dimensional/unit-convention.d.ts +0 -2
  949. package/dist/dimensional/unit-convention.d.ts.map +1 -1
  950. package/dist/dimensional/unit-convention.js +2 -2
  951. package/dist/dimensional/unit-convention.js.map +1 -1
  952. package/dist/dimensional/unit-data.d.ts.map +1 -1
  953. package/dist/dimensional/unit-data.js +11 -7
  954. package/dist/dimensional/unit-data.js.map +1 -1
  955. package/dist/dimensional/units.d.ts.map +1 -1
  956. package/dist/dimensional/units.js +38 -20
  957. package/dist/dimensional/units.js.map +1 -1
  958. package/dist/dimensional/validator-registry.js.map +1 -1
  959. package/dist/dimensional/validator.d.ts +0 -16
  960. package/dist/dimensional/validator.d.ts.map +1 -1
  961. package/dist/dimensional/validator.js +65 -29
  962. package/dist/dimensional/validator.js.map +1 -1
  963. package/dist/dimensional/weyl-validators.js.map +1 -1
  964. package/dist/index.d.ts +59 -8
  965. package/dist/index.d.ts.map +1 -1
  966. package/dist/index.js +22 -24
  967. package/dist/index.js.map +1 -1
  968. package/dist/numerical/bianchi-residual.js.map +1 -1
  969. package/dist/numerical/binding-value.d.ts +11 -6
  970. package/dist/numerical/binding-value.d.ts.map +1 -1
  971. package/dist/numerical/binding-value.js +126 -122
  972. package/dist/numerical/binding-value.js.map +1 -1
  973. package/dist/numerical/christoffel-flat.d.ts.map +1 -1
  974. package/dist/numerical/christoffel-flat.js +3 -2
  975. package/dist/numerical/christoffel-flat.js.map +1 -1
  976. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  977. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  978. package/dist/numerical/covariant-eikonal.js +36 -13
  979. package/dist/numerical/covariant-eikonal.js.map +1 -1
  980. package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
  981. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  982. package/dist/numerical/curvature-lowering-helpers.js +9 -5
  983. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  984. package/dist/numerical/derivative-lowering.js.map +1 -1
  985. package/dist/numerical/einstein-equation.js.map +1 -1
  986. package/dist/numerical/engine-registry.js.map +1 -1
  987. package/dist/numerical/errors.d.ts +7 -3
  988. package/dist/numerical/errors.d.ts.map +1 -1
  989. package/dist/numerical/errors.js +5 -8
  990. package/dist/numerical/errors.js.map +1 -1
  991. package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
  992. package/dist/numerical/evaluator-uncertainty.js +19 -2
  993. package/dist/numerical/evaluator-uncertainty.js.map +1 -1
  994. package/dist/numerical/finite-difference.d.ts +22 -0
  995. package/dist/numerical/finite-difference.d.ts.map +1 -0
  996. package/dist/numerical/finite-difference.js +27 -0
  997. package/dist/numerical/finite-difference.js.map +1 -0
  998. package/dist/numerical/formula-contract.d.ts +63 -7
  999. package/dist/numerical/formula-contract.d.ts.map +1 -1
  1000. package/dist/numerical/formula-contract.js +61 -42
  1001. package/dist/numerical/formula-contract.js.map +1 -1
  1002. package/dist/numerical/formula-dimension.d.ts +8 -7
  1003. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  1004. package/dist/numerical/formula-dimension.js +58 -36
  1005. package/dist/numerical/formula-dimension.js.map +1 -1
  1006. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  1007. package/dist/numerical/formula-mathts.js +5 -2
  1008. package/dist/numerical/formula-mathts.js.map +1 -1
  1009. package/dist/numerical/formula-registry.d.ts +13 -3
  1010. package/dist/numerical/formula-registry.d.ts.map +1 -1
  1011. package/dist/numerical/formula-registry.js +7 -2
  1012. package/dist/numerical/formula-registry.js.map +1 -1
  1013. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  1014. package/dist/numerical/geodesic-integrator.js +22 -14
  1015. package/dist/numerical/geodesic-integrator.js.map +1 -1
  1016. package/dist/numerical/geometrized.d.ts.map +1 -1
  1017. package/dist/numerical/geometrized.js +0 -1
  1018. package/dist/numerical/geometrized.js.map +1 -1
  1019. package/dist/numerical/gl4-integrator.d.ts +28 -27
  1020. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  1021. package/dist/numerical/gl4-integrator.js +41 -42
  1022. package/dist/numerical/gl4-integrator.js.map +1 -1
  1023. package/dist/numerical/grid-field.js.map +1 -1
  1024. package/dist/numerical/index.js.map +1 -1
  1025. package/dist/numerical/input-validation.d.ts +3 -6
  1026. package/dist/numerical/input-validation.d.ts.map +1 -1
  1027. package/dist/numerical/input-validation.js +4 -8
  1028. package/dist/numerical/input-validation.js.map +1 -1
  1029. package/dist/numerical/killing.d.ts +8 -5
  1030. package/dist/numerical/killing.d.ts.map +1 -1
  1031. package/dist/numerical/killing.js.map +1 -1
  1032. package/dist/numerical/klein-gordon.js.map +1 -1
  1033. package/dist/numerical/kretschmann.js.map +1 -1
  1034. package/dist/numerical/lowering-utils.js.map +1 -1
  1035. package/dist/numerical/lowering.d.ts.map +1 -1
  1036. package/dist/numerical/lowering.js +7 -17
  1037. package/dist/numerical/lowering.js.map +1 -1
  1038. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  1039. package/dist/numerical/mathts-engine.js +16 -25
  1040. package/dist/numerical/mathts-engine.js.map +1 -1
  1041. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  1042. package/dist/numerical/metric-inverse.js +83 -46
  1043. package/dist/numerical/metric-inverse.js.map +1 -1
  1044. package/dist/numerical/null-ic.js.map +1 -1
  1045. package/dist/numerical/null-ray-integrator.d.ts +2 -1
  1046. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  1047. package/dist/numerical/null-ray-integrator.js +12 -12
  1048. package/dist/numerical/null-ray-integrator.js.map +1 -1
  1049. package/dist/numerical/painleve-gullstrand-metric.js +2 -2
  1050. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  1051. package/dist/numerical/pderiv.d.ts.map +1 -1
  1052. package/dist/numerical/pderiv.js +9 -2
  1053. package/dist/numerical/pderiv.js.map +1 -1
  1054. package/dist/numerical/perihelion-finder.d.ts +0 -36
  1055. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  1056. package/dist/numerical/perihelion-finder.js +41 -87
  1057. package/dist/numerical/perihelion-finder.js.map +1 -1
  1058. package/dist/numerical/quadrature.d.ts +5 -2
  1059. package/dist/numerical/quadrature.d.ts.map +1 -1
  1060. package/dist/numerical/quadrature.js +19 -4
  1061. package/dist/numerical/quadrature.js.map +1 -1
  1062. package/dist/numerical/rk4-trajectory.d.ts +10 -0
  1063. package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
  1064. package/dist/numerical/rk4-trajectory.js +37 -0
  1065. package/dist/numerical/rk4-trajectory.js.map +1 -0
  1066. package/dist/numerical/schwarzschild.d.ts +14 -0
  1067. package/dist/numerical/schwarzschild.d.ts.map +1 -0
  1068. package/dist/numerical/schwarzschild.js +17 -0
  1069. package/dist/numerical/schwarzschild.js.map +1 -0
  1070. package/dist/numerical/spacetime-metrics.d.ts +25 -19
  1071. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  1072. package/dist/numerical/spacetime-metrics.js +180 -286
  1073. package/dist/numerical/spacetime-metrics.js.map +1 -1
  1074. package/dist/numerical/statistics.d.ts +24 -0
  1075. package/dist/numerical/statistics.d.ts.map +1 -0
  1076. package/dist/numerical/statistics.js +52 -0
  1077. package/dist/numerical/statistics.js.map +1 -0
  1078. package/dist/numerical/strides.js.map +1 -1
  1079. package/dist/numerical/tensor-engine.d.ts +30 -5
  1080. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  1081. package/dist/numerical/tensor-engine.js +12 -0
  1082. package/dist/numerical/tensor-engine.js.map +1 -1
  1083. package/dist/numerical/types.js.map +1 -1
  1084. package/dist/numerical/weyl-lowering.js.map +1 -1
  1085. package/dist/relations/category.js.map +1 -1
  1086. package/dist/relations/composition-table.d.ts +4 -4
  1087. package/dist/relations/composition-table.js +4 -4
  1088. package/dist/relations/composition-table.js.map +1 -1
  1089. package/dist/relations/conventions.js.map +1 -1
  1090. package/dist/relations/domain-regimes.js.map +1 -1
  1091. package/dist/relations/regime-registration.js.map +1 -1
  1092. package/dist/relations/regime-vocabularies.js.map +1 -1
  1093. package/dist/relations/regime.d.ts +28 -8
  1094. package/dist/relations/regime.d.ts.map +1 -1
  1095. package/dist/relations/regime.js +44 -15
  1096. package/dist/relations/regime.js.map +1 -1
  1097. package/dist/relations/types.d.ts +18 -5
  1098. package/dist/relations/types.d.ts.map +1 -1
  1099. package/dist/relations/types.js +5 -3
  1100. package/dist/relations/types.js.map +1 -1
  1101. package/package.json +16 -20
  1102. package/dist/bridges/registry.d.ts +0 -60
  1103. package/dist/bridges/registry.d.ts.map +0 -1
  1104. package/dist/bridges/registry.js +0 -87
  1105. package/dist/bridges/registry.js.map +0 -1
  1106. package/dist/cli/poster-source.d.ts +0 -154
  1107. package/dist/cli/poster-source.d.ts.map +0 -1
  1108. package/dist/cli/poster-source.js +0 -184
  1109. package/dist/cli/poster-source.js.map +0 -1
@@ -12,16 +12,50 @@
12
12
  import type { ExprNode } from '../dimensional/ast-types.js';
13
13
  /** Names a formula may mention: quantities, constants, and formula overlays. */
14
14
  export declare function formulaNames(): ReadonlySet<string>;
15
- /** Numeric scope: constants, formula overlays, and π. Caller inputs overwrite. */
16
- export declare function formulaScope(inputs?: Readonly<Record<string, number>>): Record<string, number>;
15
+ /** π, the registered constants and the formula overlays: names a caller may not bind. */
16
+ export declare function reservedFormulaNames(): ReadonlySet<string>;
17
+ /**
18
+ * Numeric scope: constants, formula overlays, and π, then the caller's inputs.
19
+ * An input whose name is reserved is refused with {@link ConstantInputError}
20
+ * unless `declared` names it: a relation's own source may carry a constant's
21
+ * name as a default the caller overrides (be-63's Lane-Emden ω₃).
22
+ * {@link evaluateFormula} first drops a reserved key its expression does not
23
+ * read; this builder refuses every undeclared one.
24
+ */
25
+ export declare function formulaScope(inputs?: Readonly<Record<string, number>>, declared?: readonly string[]): Record<string, number>;
17
26
  /**
18
27
  * The free variables of a catalog expression, read from the same MathTS parse
19
28
  * {@link evaluateFormula} evaluates: the scope names it reads, a hyphenated
20
29
  * quantity written with underscores.
21
30
  */
22
31
  export declare function formulaVariables(expression: string): readonly string[];
23
- /** Evaluate a catalog expression with MathTS. Inputs are quantity names. */
24
- export declare function evaluateFormula(expression: string, inputs: Readonly<Record<string, number>>): number;
32
+ /**
33
+ * The names a catalog expression mentions, each hyphenated quantity or
34
+ * constant spelling rewritten to its one token first (`truncation-coefficient-b`
35
+ * is `truncation_coefficient_b`, not `b`), π included (MathTS does not list it
36
+ * as a variable). Cached per expression text. `reduced-planck-constant` is
37
+ * `hbar`: the rewrite takes the longest spelling at each segment, so the
38
+ * declared `planck-constant` inside it does not win. The one identifier
39
+ * walk: the notices reader and the condition interpreter read it too.
40
+ * @internal
41
+ */
42
+ export declare function expressionNames(expression: string): ReadonlySet<string>;
43
+ /**
44
+ * `inputs` without the reserved keys that `reads` does not name. A reserved
45
+ * key the formula reads and `declared` does not name is refused: the caller's
46
+ * number would replace the constant. One the formula does not read is not an
47
+ * input of this formula; it is dropped, as any other extra key is on the
48
+ * graph path (a composed edge forwards every input to each component).
49
+ */
50
+ export declare function withoutUnreadConstants(inputs: Readonly<Record<string, number>>, reads: ReadonlySet<string>, declared: readonly string[]): Record<string, number>;
51
+ /**
52
+ * Evaluate a catalog expression with MathTS. Inputs are quantity names.
53
+ * `declared` are the names the caller may bind although they are reserved
54
+ * (the relation's sources); a reserved key the expression reads and
55
+ * `declared` does not name is a {@link ConstantInputError}, and one it does
56
+ * not read is dropped ({@link withoutUnreadConstants}).
57
+ */
58
+ export declare function evaluateFormula(expression: string, inputs: Readonly<Record<string, number>>, declared?: readonly string[]): number;
25
59
  /** Parse a catalog expression into a sign-preserving `ExprNode`, through the one MathTS parser. */
26
60
  export declare function parseCatalogExpression(expression: string): ExprNode;
27
61
  //# sourceMappingURL=expr-parse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expr-parse.d.ts","sourceRoot":"","sources":["../../src/bridges/expr-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,6BAA6B,CAAC;AA+B9E,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,WAAW,CAAC,MAAM,CAAC,CAMlD;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMlG;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEtE;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACvC,MAAM,CAGR;AA+ED,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAGnE"}
1
+ {"version":3,"file":"expr-parse.d.ts","sourceRoot":"","sources":["../../src/bridges/expr-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,6BAA6B,CAAC;AAgC9E,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,WAAW,CAAC,MAAM,CAAC,CAMlD;AAID,yFAAyF;AACzF,wBAAgB,oBAAoB,IAAI,WAAW,CAAC,MAAM,CAAC,CAE1D;AAID;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,MAAM,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,EAC7C,QAAQ,GAAE,SAAS,MAAM,EAAO,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEtE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAOvE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYxB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,QAAQ,GAAE,SAAS,MAAM,EAAO,GAC/B,MAAM,CAUR;AA8FD,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAGnE"}
@@ -10,12 +10,13 @@
10
10
  * @module bridges/expr-parse
11
11
  */
12
12
  import { DIMENSIONLESS } from '../dimensional/types.js';
13
- import { CONSTANTS } from '../dimensional/symbolic-constants.js';
13
+ import { CONSTANTS, isRegisteredConstant } from '../dimensional/symbolic-constants.js';
14
14
  import { FORMULA_NAMED } from '../dimensional/formula-names.js';
15
15
  import { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';
16
16
  import { allQuantityRecords } from '../dimensional/quantity-registry.js';
17
17
  import { parseFormula } from '../numerical/formula-mathts.js';
18
18
  import { parseFormulaPNode } from '../numerical/formula-dimension.js';
19
+ import { ConstantInputError } from './evaluation-errors.js';
19
20
  const TRANSCENDENTAL = new Set([
20
21
  'exp', 'ln', 'log2', 'log10', 'sin', 'cos', 'tan', 'sinh', 'cosh', 'tanh',
21
22
  ]);
@@ -46,15 +47,33 @@ export function formulaNames() {
46
47
  names.add('pi');
47
48
  return names;
48
49
  }
49
- /** Numeric scope: constants, formula overlays, and π. Caller inputs overwrite. */
50
- export function formulaScope(inputs = {}) {
50
+ const RESERVED = new Set(['pi', ...Object.keys(CONSTANTS), ...FORMULA_NAMED.map((named) => named.name)]);
51
+ /** π, the registered constants and the formula overlays: names a caller may not bind. */
52
+ export function reservedFormulaNames() {
53
+ return RESERVED;
54
+ }
55
+ const underscored = (name) => name.replace(/-/g, '_');
56
+ /**
57
+ * Numeric scope: constants, formula overlays, and π, then the caller's inputs.
58
+ * An input whose name is reserved is refused with {@link ConstantInputError}
59
+ * unless `declared` names it: a relation's own source may carry a constant's
60
+ * name as a default the caller overrides (be-63's Lane-Emden ω₃).
61
+ * {@link evaluateFormula} first drops a reserved key its expression does not
62
+ * read; this builder refuses every undeclared one.
63
+ */
64
+ export function formulaScope(inputs = {}, declared = []) {
51
65
  const scope = { pi: Math.PI };
52
66
  for (const [name, constant] of Object.entries(CONSTANTS))
53
67
  scope[name] = constant.value;
54
68
  for (const named of FORMULA_NAMED)
55
69
  scope[named.name] = named.value;
56
- for (const [key, value] of Object.entries(inputs))
57
- scope[key.replace(/-/g, '_')] = value;
70
+ const allowed = new Set(declared.map(underscored));
71
+ for (const [key, value] of Object.entries(inputs)) {
72
+ const name = underscored(key);
73
+ if (RESERVED.has(name) && !allowed.has(name))
74
+ throw new ConstantInputError(key);
75
+ scope[name] = value;
76
+ }
58
77
  return scope;
59
78
  }
60
79
  /**
@@ -65,15 +84,83 @@ export function formulaScope(inputs = {}) {
65
84
  export function formulaVariables(expression) {
66
85
  return parseFormula(rewriteCatalogHyphens(expression, formulaNames())).variables;
67
86
  }
68
- /** Evaluate a catalog expression with MathTS. Inputs are quantity names. */
69
- export function evaluateFormula(expression, inputs) {
87
+ const VARIABLES = new Map();
88
+ const IDENTIFIER = /[A-Za-z_][A-Za-z0-9_]*/g;
89
+ /**
90
+ * The names a catalog expression mentions, each hyphenated quantity or
91
+ * constant spelling rewritten to its one token first (`truncation-coefficient-b`
92
+ * is `truncation_coefficient_b`, not `b`), π included (MathTS does not list it
93
+ * as a variable). Cached per expression text. `reduced-planck-constant` is
94
+ * `hbar`: the rewrite takes the longest spelling at each segment, so the
95
+ * declared `planck-constant` inside it does not win. The one identifier
96
+ * walk: the notices reader and the condition interpreter read it too.
97
+ * @internal
98
+ */
99
+ export function expressionNames(expression) {
100
+ let names = VARIABLES.get(expression);
101
+ if (names === undefined) {
102
+ names = new Set(rewriteCatalogHyphens(expression, formulaNames()).match(IDENTIFIER) ?? []);
103
+ VARIABLES.set(expression, names);
104
+ }
105
+ return names;
106
+ }
107
+ /**
108
+ * `inputs` without the reserved keys that `reads` does not name. A reserved
109
+ * key the formula reads and `declared` does not name is refused: the caller's
110
+ * number would replace the constant. One the formula does not read is not an
111
+ * input of this formula; it is dropped, as any other extra key is on the
112
+ * graph path (a composed edge forwards every input to each component).
113
+ */
114
+ export function withoutUnreadConstants(inputs, reads, declared) {
115
+ const allowed = new Set(declared.map(underscored));
116
+ const kept = {};
117
+ for (const [key, value] of Object.entries(inputs)) {
118
+ const name = underscored(key);
119
+ if (RESERVED.has(name) && !allowed.has(name)) {
120
+ if (reads.has(name))
121
+ throw new ConstantInputError(key);
122
+ continue;
123
+ }
124
+ kept[key] = value;
125
+ }
126
+ return kept;
127
+ }
128
+ /**
129
+ * Evaluate a catalog expression with MathTS. Inputs are quantity names.
130
+ * `declared` are the names the caller may bind although they are reserved
131
+ * (the relation's sources); a reserved key the expression reads and
132
+ * `declared` does not name is a {@link ConstantInputError}, and one it does
133
+ * not read is dropped ({@link withoutUnreadConstants}).
134
+ */
135
+ export function evaluateFormula(expression, inputs, declared = []) {
136
+ // One grammar: the expression must also build a dimensional tree, so a function the tree
137
+ // does not know (`max`) or a call of the wrong arity is refused here too.
138
+ if (!GRAMMAR_CHECKED.has(expression)) {
139
+ parseCatalogExpression(expression);
140
+ GRAMMAR_CHECKED.add(expression);
141
+ }
70
142
  const rewritten = rewriteCatalogHyphens(expression, formulaNames());
71
- return parseFormula(rewritten).evaluate(formulaScope(inputs));
143
+ const scope = formulaScope(withoutUnreadConstants(inputs, expressionNames(expression), declared), declared);
144
+ return parseFormula(rewritten).evaluate(scope);
145
+ }
146
+ const GRAMMAR_CHECKED = new Set();
147
+ /** A literal exponent: a number, or a ratio of two numbers (`1/3`), folded to one literal. */
148
+ function literalExponent(node) {
149
+ if (node.kind === 'num')
150
+ return numberSymbol(String(node.value));
151
+ if (node.kind === 'op' && node.op === '/' && node.args.length === 2) {
152
+ const [p, q] = node.args;
153
+ if (p.kind === 'num' && q.kind === 'num' && q.value !== 0)
154
+ return numberSymbol(String(p.value / q.value));
155
+ }
156
+ return undefined;
72
157
  }
73
158
  /**
74
159
  * The sign-preserving `ExprNode` of a normalized MathTS parse node. Unary minus
75
- * is `-1 ×`, `sqrt` is `^0.5`, and a transcendental keeps its name; a quantity
76
- * name written with underscores is restored to its hyphenated id.
160
+ * is `-1 ×`, `sqrt` is `^0.5`, a literal ratio exponent (`^(1/3)`) is one
161
+ * literal, and a transcendental keeps its name; a quantity name written with
162
+ * underscores is restored to its hyphenated id. A call takes exactly one
163
+ * argument: a second one is refused, never dropped.
77
164
  */
78
165
  function exprOf(node) {
79
166
  switch (node.kind) {
@@ -86,8 +173,10 @@ function exprOf(node) {
86
173
  case 'op':
87
174
  return { kind: 'op', op: node.op, args: node.args.map(exprOf) };
88
175
  case 'pow':
89
- return { kind: 'op', op: '^', args: [exprOf(node.base), exprOf(node.exp)] };
176
+ return { kind: 'op', op: '^', args: [exprOf(node.base), literalExponent(node.exp) ?? exprOf(node.exp)] };
90
177
  case 'call': {
178
+ if (node.args.length !== 1)
179
+ throw new Error(`expression calls '${node.fn}' with ${node.args.length} arguments; one is expected`);
91
180
  const arg = exprOf(node.args[0]);
92
181
  if (node.fn === 'sqrt')
93
182
  return { kind: 'op', op: '^', args: [arg, numberSymbol('0.5')] };
@@ -143,7 +232,7 @@ function foldKnownConstants(node) {
143
232
  right.name === 'pi' &&
144
233
  left.kind === 'symbol' &&
145
234
  /^(?:2|4|8)$/.test(left.name) &&
146
- `${left.name}pi` in CONSTANTS) {
235
+ isRegisteredConstant(`${left.name}pi`)) {
147
236
  merged.push(symbol(`${left.name}pi`));
148
237
  i += 1;
149
238
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"expr-parse.js","sourceRoot":"","sources":["../../src/bridges/expr-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAqB,MAAM,mCAAmC,CAAC;AAEzF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAmB;IAC/C,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAC1E,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAEzE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;AACjD,KAAK,MAAM,GAAG,IAAI,kBAAkB,EAAE;IAAE,WAAW,CAAC,G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,IAAI,CAAC,IAAI,IAAI,CAAC,EACtC,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;YACtC,CAAC,IAAI,CAAC,CAAC;YACP,SAAS;QACX,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAE,CAAC;IAC3C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,MAAM,SAAS,GAAG,qBAAqB,CAAC,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IACpE,OAAO,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/**\n * One expression parser for a catalog formula: MathTS.\n *\n * Numeric evaluation is MathTS `parseFormula` on the hyphen-rewritten string,\n * and the dimensional `ExprNode` is built from the MathTS parse tree of the\n * same string, so the number and the tree can never disagree on precedence.\n * The `ExprNode` keeps hyphenated quantity names and unary minus, so symbolic\n * composition and dimensional checks see the same formula.\n *\n * @module bridges/expr-parse\n */\n\nimport { DIMENSIONLESS, type Dimension } from '../dimensional/types.js';\nimport type { ExprNode, TranscendentalFn } from '../dimensional/ast-types.js';\nimport { CONSTANTS, isRegisteredConstant } from '../dimensional/symbolic-constants.js';\nimport { FORMULA_NAMED } from '../dimensional/formula-names.js';\nimport { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';\nimport { allQuantityRecords } from '../dimensional/quantity-registry.js';\nimport { parseFormula } from '../numerical/formula-mathts.js';\nimport { parseFormulaPNode, type FormulaPNode } from '../numerical/formula-dimension.js';\nimport { ConstantInputError } from './evaluation-errors.js';\n\nconst TRANSCENDENTAL = new Set<TranscendentalFn>([\n 'exp', 'ln', 'log2', 'log10', 'sin', 'cos', 'tan', 'sinh', 'cosh', 'tanh',\n]);\n\nconst quantityNames = new Set(allQuantityRecords().map((row) => row.id));\n\nconst DIM_BY_NAME = new Map<string, Dimension>();\nfor (const row of allQuantityRecords()) DIM_BY_NAME.set(row.id, row.dimension);\nfor (const [name, constant] of Object.entries(CONSTANTS)) DIM_BY_NAME.set(name, constant.dim);\nfor (const named of FORMULA_NAMED) DIM_BY_NAME.set(named.name, named.dim);\n\nfunction dimOf(name: string): Dimension {\n return DIM_BY_NAME.get(name) ?? DIMENSIONLESS;\n}\n\nfunction symbol(name: string): ExprNode {\n return { kind: 'symbol', name, dim: dimOf(name) };\n}\n\nfunction numberSymbol(text: string): ExprNode {\n return { kind: 'symbol', name: text, dim: DIMENSIONLESS };\n}\n\n/** Names a formula may mention: quantities, constants, and formula overlays. */\nexport function formulaNames(): ReadonlySet<string> {\n const names = new Set<string>(quantityNames);\n for (const name of Object.keys(CONSTANTS)) names.add(name);\n for (const named of FORMULA_NAMED) names.add(named.name);\n names.add('pi');\n return names;\n}\n\nconst RESERVED = new Set<string>(['pi', ...Object.keys(CONSTANTS), ...FORMULA_NAMED.map((named) => named.name)]);\n\n/** π, the registered constants and the formula overlays: names a caller may not bind. */\nexport function reservedFormulaNames(): ReadonlySet<string> {\n return RESERVED;\n}\n\nconst underscored = (name: string): string => name.replace(/-/g, '_');\n\n/**\n * Numeric scope: constants, formula overlays, and π, then the caller's inputs.\n * An input whose name is reserved is refused with {@link ConstantInputError}\n * unless `declared` names it: a relation's own source may carry a constant's\n * name as a default the caller overrides (be-63's Lane-Emden ω₃).\n * {@link evaluateFormula} first drops a reserved key its expression does not\n * read; this builder refuses every undeclared one.\n */\nexport function formulaScope(\n inputs: Readonly<Record<string, number>> = {},\n declared: readonly string[] = [],\n): Record<string, number> {\n const scope: Record<string, number> = { pi: Math.PI };\n for (const [name, constant] of Object.entries(CONSTANTS)) scope[name] = constant.value;\n for (const named of FORMULA_NAMED) scope[named.name] = named.value;\n const allowed = new Set(declared.map(underscored));\n for (const [key, value] of Object.entries(inputs)) {\n const name = underscored(key);\n if (RESERVED.has(name) && !allowed.has(name)) throw new ConstantInputError(key);\n scope[name] = value;\n }\n return scope;\n}\n\n/**\n * The free variables of a catalog expression, read from the same MathTS parse\n * {@link evaluateFormula} evaluates: the scope names it reads, a hyphenated\n * quantity written with underscores.\n */\nexport function formulaVariables(expression: string): readonly string[] {\n return parseFormula(rewriteCatalogHyphens(expression, formulaNames())).variables;\n}\n\nconst VARIABLES = new Map<string, ReadonlySet<string>>();\n\nconst IDENTIFIER = /[A-Za-z_][A-Za-z0-9_]*/g;\n\n/**\n * The names a catalog expression mentions, each hyphenated quantity or\n * constant spelling rewritten to its one token first (`truncation-coefficient-b`\n * is `truncation_coefficient_b`, not `b`), π included (MathTS does not list it\n * as a variable). Cached per expression text. `reduced-planck-constant` is\n * `hbar`: the rewrite takes the longest spelling at each segment, so the\n * declared `planck-constant` inside it does not win. The one identifier\n * walk: the notices reader and the condition interpreter read it too.\n * @internal\n */\nexport function expressionNames(expression: string): ReadonlySet<string> {\n let names = VARIABLES.get(expression);\n if (names === undefined) {\n names = new Set(rewriteCatalogHyphens(expression, formulaNames()).match(IDENTIFIER) ?? []);\n VARIABLES.set(expression, names);\n }\n return names;\n}\n\n/**\n * `inputs` without the reserved keys that `reads` does not name. A reserved\n * key the formula reads and `declared` does not name is refused: the caller's\n * number would replace the constant. One the formula does not read is not an\n * input of this formula; it is dropped, as any other extra key is on the\n * graph path (a composed edge forwards every input to each component).\n */\nexport function withoutUnreadConstants(\n inputs: Readonly<Record<string, number>>,\n reads: ReadonlySet<string>,\n declared: readonly string[],\n): Record<string, number> {\n const allowed = new Set(declared.map(underscored));\n const kept: Record<string, number> = {};\n for (const [key, value] of Object.entries(inputs)) {\n const name = underscored(key);\n if (RESERVED.has(name) && !allowed.has(name)) {\n if (reads.has(name)) throw new ConstantInputError(key);\n continue;\n }\n kept[key] = value;\n }\n return kept;\n}\n\n/**\n * Evaluate a catalog expression with MathTS. Inputs are quantity names.\n * `declared` are the names the caller may bind although they are reserved\n * (the relation's sources); a reserved key the expression reads and\n * `declared` does not name is a {@link ConstantInputError}, and one it does\n * not read is dropped ({@link withoutUnreadConstants}).\n */\nexport function evaluateFormula(\n expression: string,\n inputs: Readonly<Record<string, number>>,\n declared: readonly string[] = [],\n): number {\n // One grammar: the expression must also build a dimensional tree, so a function the tree\n // does not know (`max`) or a call of the wrong arity is refused here too.\n if (!GRAMMAR_CHECKED.has(expression)) {\n parseCatalogExpression(expression);\n GRAMMAR_CHECKED.add(expression);\n }\n const rewritten = rewriteCatalogHyphens(expression, formulaNames());\n const scope = formulaScope(withoutUnreadConstants(inputs, expressionNames(expression), declared), declared);\n return parseFormula(rewritten).evaluate(scope);\n}\n\nconst GRAMMAR_CHECKED = new Set<string>();\n\n/** A literal exponent: a number, or a ratio of two numbers (`1/3`), folded to one literal. */\nfunction literalExponent(node: FormulaPNode): ExprNode | undefined {\n if (node.kind === 'num') return numberSymbol(String(node.value));\n if (node.kind === 'op' && node.op === '/' && node.args.length === 2) {\n const [p, q] = node.args;\n if (p!.kind === 'num' && q!.kind === 'num' && q!.value !== 0) return numberSymbol(String(p!.value / q!.value));\n }\n return undefined;\n}\n\n/**\n * The sign-preserving `ExprNode` of a normalized MathTS parse node. Unary minus\n * is `-1 ×`, `sqrt` is `^0.5`, a literal ratio exponent (`^(1/3)`) is one\n * literal, and a transcendental keeps its name; a quantity name written with\n * underscores is restored to its hyphenated id. A call takes exactly one\n * argument: a second one is refused, never dropped.\n */\nfunction exprOf(node: FormulaPNode): ExprNode {\n switch (node.kind) {\n case 'num':\n return numberSymbol(String(node.value));\n case 'sym':\n return symbol(hyphenName(node.name));\n case 'neg':\n return { kind: 'op', op: '*', args: [numberSymbol('-1'), exprOf(node.arg)] };\n case 'op':\n return { kind: 'op', op: node.op, args: node.args.map(exprOf) };\n case 'pow':\n return { kind: 'op', op: '^', args: [exprOf(node.base), literalExponent(node.exp) ?? exprOf(node.exp)] };\n case 'call': {\n if (node.args.length !== 1) throw new Error(`expression calls '${node.fn}' with ${node.args.length} arguments; one is expected`);\n const arg = exprOf(node.args[0]!);\n if (node.fn === 'sqrt') return { kind: 'op', op: '^', args: [arg, numberSymbol('0.5')] };\n if (node.fn === 'abs') return { kind: 'abs', arg };\n if (TRANSCENDENTAL.has(node.fn as TranscendentalFn)) return { kind: 'transcendental', fn: node.fn as TranscendentalFn, arg };\n throw new Error(`expression calls an unknown function '${node.fn}'`);\n }\n }\n}\n\nfunction hyphenName(underscored: string): string {\n const hyphen = underscored.replace(/_/g, '-');\n if (quantityNames.has(hyphen)) return hyphen;\n return underscored;\n}\n\n/**\n * `8*pi` is the constant `8pi`, and `ln(2)` is the constant `ln2`. A product\n * flattens so the tree matches a flat canonical product of the same factors.\n */\nfunction foldKnownConstants(node: ExprNode): ExprNode {\n if (node.kind === 'transcendental') {\n const arg = foldKnownConstants(node.arg);\n if (node.fn === 'ln' && arg.kind === 'symbol' && arg.name === '2') return symbol('ln2');\n return { kind: 'transcendental', fn: node.fn, arg };\n }\n if (node.kind === 'abs') return { kind: 'abs', arg: foldKnownConstants(node.arg) };\n if (node.kind !== 'op') return node;\n const args = node.args.map(foldKnownConstants);\n if (node.op !== '*') return { kind: 'op', op: node.op, args };\n const factors: ExprNode[] = [];\n const push = (factor: ExprNode): void => {\n if (factor.kind === 'op' && factor.op === '*') {\n for (const inner of factor.args) push(inner);\n } else {\n factors.push(factor);\n }\n };\n for (const arg of args) push(arg);\n const merged: ExprNode[] = [];\n for (let i = 0; i < factors.length; i++) {\n const left = factors[i]!;\n const right = factors[i + 1];\n if (\n right?.kind === 'symbol' &&\n right.name === 'pi' &&\n left.kind === 'symbol' &&\n /^(?:2|4|8)$/.test(left.name) &&\n isRegisteredConstant(`${left.name}pi`)\n ) {\n merged.push(symbol(`${left.name}pi`));\n i += 1;\n continue;\n }\n merged.push(left);\n }\n if (merged.length === 1) return merged[0]!;\n return { kind: 'op', op: '*', args: merged };\n}\n\n/** Parse a catalog expression into a sign-preserving `ExprNode`, through the one MathTS parser. */\nexport function parseCatalogExpression(expression: string): ExprNode {\n const rewritten = rewriteCatalogHyphens(expression, formulaNames());\n return foldKnownConstants(exprOf(parseFormulaPNode(rewritten)));\n}\n"]}
@@ -18,9 +18,45 @@ export declare class HoldsError extends Error {
18
18
  constructor(message: string);
19
19
  }
20
20
  /**
21
- * Whether `holds` is true for `values`.
22
- * Hyphenated quantity names are rewritten with `names` before parsing; an
23
- * unbound name, a non-boolean result, and a syntax error are a {@link HoldsError}.
21
+ * One conjunct of a validity condition: the text it is written in (the
22
+ * relation's own names), the names it reads, and its test.
23
+ * @internal
24
24
  */
25
- export declare function holds(source: string, values: Readonly<Record<string, number>>, constants: Readonly<Record<string, number>>, names: readonly string[]): boolean;
25
+ export interface HoldsCondition {
26
+ /** The conjunct as the condition states it, in the relation's names (`swing-kelvin >= 0`). */
27
+ readonly text: string;
28
+ /** The names it reads, in order of first use, as the relation spells them. */
29
+ readonly names: readonly string[];
30
+ /** True when the conjunct holds; a name it cannot bind, or a non-boolean result, throws {@link HoldsError}. */
31
+ test(scope: Readonly<Record<string, number>>): boolean;
32
+ }
33
+ /**
34
+ * The conjuncts of the condition `source`, each testable alone. Their
35
+ * conjunction is the condition, so a caller that tests them all decides
36
+ * exactly what {@link holds} decides, and can say which part failed.
37
+ * Hyphenated names are rewritten with `names` before parsing and restored in
38
+ * each conjunct's `text` and `names`.
39
+ * @internal
40
+ */
41
+ export declare function holdsConditions(source: string, names: readonly string[]): readonly HoldsCondition[];
42
+ /** The names (hyphens written as underscores) the conditions read. @internal */
43
+ export declare function conditionReads(conditions: readonly HoldsCondition[]): ReadonlySet<string>;
44
+ /**
45
+ * A scope for a condition: the constants, then `values` with hyphens written as
46
+ * underscores. A value whose name is a constant that `declared` does not name
47
+ * is a {@link ConstantInputError} when `reads` holds it, and is dropped otherwise.
48
+ * @internal
49
+ */
50
+ export declare function holdsScope(values: Readonly<Record<string, number>>, constants: Readonly<Record<string, number>>, reads: ReadonlySet<string>, declared?: readonly string[]): Record<string, number>;
51
+ /**
52
+ * Whether `holds` is true for `values`: every conjunct of
53
+ * {@link holdsConditions} holds. Hyphenated quantity names are rewritten with
54
+ * `names` before parsing; an unbound name, a non-boolean result, and a syntax
55
+ * error are a {@link HoldsError}.
56
+ * A value whose name is one of `constants` and which the condition reads is
57
+ * a {@link ConstantInputError}, a caller error and not a false condition,
58
+ * unless `declared` names it; one the condition does not read is dropped, as
59
+ * any other extra key is.
60
+ */
61
+ export declare function holds(source: string, values: Readonly<Record<string, number>>, constants: Readonly<Record<string, number>>, names: readonly string[], declared?: readonly string[]): boolean;
26
62
  //# sourceMappingURL=holds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"holds.d.ts","sourceRoot":"","sources":["../../src/bridges/holds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,4GAA4G;AAC5G,qBAAa,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAwHD;;;;GAIG;AACH,wBAAgB,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC3C,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,OAAO,CAOT"}
1
+ {"version":3,"file":"holds.d.ts","sourceRoot":"","sources":["../../src/bridges/holds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,4GAA4G;AAC5G,qBAAa,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAwGD;;;;GAIG;AACH,MAAM,WAAW,cAAc;I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+ import { ConstantInputError } from './evaluation-errors.js';
19
+ import { expressionNames } from './expr-parse.js';
18
20
  /** A condition could not be evaluated: it names an unbound symbol, or its text does not parse. @internal */
19
21
  export class HoldsError extends Error {
20
22
  constructor(message) {
@@ -111,35 +113,142 @@ function compile(node, source) {
111
113
  return arithmetic(node, source);
112
114
  }
113
115
  }
114
- const COMPILED = new Map();
115
- function compiled(rewritten, source) {
116
- const hit = COMPILED.get(rewritten);
116
+ /**
117
+ * The conjuncts of `node`: an `and` splits, `not (not X)` is X, `not (A or B)` is
118
+ * `not A` and `not B`, and `not (x == y)` is `x != y`. Each rewrite is exact, so
119
+ * the conjunction of the parts is the condition. Anything else is one conjunct.
120
+ */
121
+ function conjuncts(node) {
122
+ if (node.type === 'ParenthesisNode')
123
+ return conjuncts(node.content);
124
+ if (node.type === 'OperatorNode' && node.op === 'and')
125
+ return (node.args ?? []).flatMap(conjuncts);
126
+ if (node.type === 'OperatorNode' && node.op === 'not') {
127
+ let inner = node.args[0];
128
+ while (inner.type === 'ParenthesisNode')
129
+ inner = inner.content;
130
+ if (inner.type === 'OperatorNode' && inner.op === 'not')
131
+ return conjuncts(inner.args[0]);
132
+ if (inner.type === 'OperatorNode' && inner.op === 'or')
133
+ return (inner.args ?? []).flatMap((arg) => conjuncts(negation(arg)));
134
+ if (inner.type === 'OperatorNode' && inner.op === '==')
135
+ return [withOperator(inner, '!=')];
136
+ }
137
+ return [node];
138
+ }
139
+ /** `not X` as a node, so the rewrite above can recurse into it. */
140
+ function negation(node) {
141
+ return parseMathTs(`not (${node.toString()})`);
142
+ }
143
+ /** `a op b` with the same operands. */
144
+ function withOperator(node, op) {
145
+ const [a, b] = node.args;
146
+ return parseMathTs(`${a.toString()} ${op} ${b.toString()}`);
147
+ }
148
+ /** The symbol names a node reads, in order, without functions. */
149
+ function symbolNames(node) {
150
+ const out = [];
151
+ const visit = (n) => {
152
+ if (n.type === 'SymbolNode' && n.name !== undefined) {
153
+ if (!out.includes(n.name))
154
+ out.push(n.name);
155
+ return;
156
+ }
157
+ if (n.type === 'ParenthesisNode')
158
+ visit(n.content);
159
+ for (const arg of n.args ?? [])
160
+ visit(arg);
161
+ };
162
+ visit(node);
163
+ return out;
164
+ }
165
+ /**
166
+ * Replace each identifier `text` mentions through `rename`, whole-word, in one
167
+ * pass (a renamed word is never renamed again). The identifiers are the ones
168
+ * `expressionNames` reads (the text is a printed conjunct, already written
169
+ * with underscores, so the rewrite it applies is the identity on it).
170
+ */
171
+ function renameIdentifiers(text, rename) {
172
+ const names = expressionNames(text);
173
+ return text.replace(/[A-Za-z_][A-Za-z0-9_]*/g, (word) => (names.has(word) ? rename(word) : word));
174
+ }
175
+ const CONDITIONS = new Map();
176
+ /**
177
+ * The conjuncts of the condition `source`, each testable alone. Their
178
+ * conjunction is the condition, so a caller that tests them all decides
179
+ * exactly what {@link holds} decides, and can say which part failed.
180
+ * Hyphenated names are rewritten with `names` before parsing and restored in
181
+ * each conjunct's `text` and `names`.
182
+ * @internal
183
+ */
184
+ export function holdsConditions(source, names) {
185
+ const rewritten = rewriteCatalogHyphens(source, names);
186
+ const hit = CONDITIONS.get(rewritten);
117
187
  if (hit !== undefined)
118
188
  return hit;
119
- let node;
189
+ let root;
120
190
  try {
121
- node = parseMathTs(rewritten);
191
+ root = parseMathTs(rewritten);
122
192
  }
123
193
  catch (error) {
124
194
  throw new HoldsError(`${error instanceof Error ? error.message : String(error)} in ${source}`);
125
195
  }
126
- const fn = compile(node, source);
127
- COMPILED.set(rewritten, fn);
128
- return fn;
196
+ const spelled = new Map(names.map((name) => [name.replace(/-/g, '_'), name]));
197
+ const restore = (name) => spelled.get(name) ?? name;
198
+ const parts = conjuncts(root).map((node) => {
199
+ const text = renameIdentifiers(node.toString(), restore);
200
+ const fn = compile(node, text);
201
+ return {
202
+ text,
203
+ names: symbolNames(node).map(restore),
204
+ test: (scope) => {
205
+ const result = fn({ ...scope });
206
+ if (typeof result !== 'boolean')
207
+ throw new HoldsError(`condition is not boolean: ${text}`);
208
+ return result;
209
+ },
210
+ };
211
+ });
212
+ CONDITIONS.set(rewritten, parts);
213
+ return parts;
214
+ }
215
+ /** The names (hyphens written as underscores) the conditions read. @internal */
216
+ export function conditionReads(conditions) {
217
+ return new Set(conditions.flatMap((condition) => condition.names.map((name) => name.replace(/-/g, '_'))));
129
218
  }
130
219
  /**
131
- * Whether `holds` is true for `values`.
132
- * Hyphenated quantity names are rewritten with `names` before parsing; an
133
- * unbound name, a non-boolean result, and a syntax error are a {@link HoldsError}.
220
+ * A scope for a condition: the constants, then `values` with hyphens written as
221
+ * underscores. A value whose name is a constant that `declared` does not name
222
+ * is a {@link ConstantInputError} when `reads` holds it, and is dropped otherwise.
223
+ * @internal
134
224
  */
135
- export function holds(source, values, constants, names) {
136
- const rewritten = rewriteCatalogHyphens(source, names);
225
+ export function holdsScope(values, constants, reads, declared = []) {
137
226
  const scope = { ...constants };
138
- for (const [key, value] of Object.entries(values))
139
- scope[key.replace(/-/g, '_')] = value;
140
- const result = compiled(rewritten, source)(scope);
141
- if (typeof result !== 'boolean')
142
- throw new HoldsError(`condition is not boolean: ${source}`);
143
- return result;
227
+ const allowed = new Set(declared.map((name) => name.replace(/-/g, '_')));
228
+ for (const [key, value] of Object.entries(values)) {
229
+ const name = key.replace(/-/g, '_');
230
+ if (name in constants && !allowed.has(name)) {
231
+ if (reads.has(name))
232
+ throw new ConstantInputError(key);
233
+ continue;
234
+ }
235
+ scope[name] = value;
236
+ }
237
+ return scope;
238
+ }
239
+ /**
240
+ * Whether `holds` is true for `values`: every conjunct of
241
+ * {@link holdsConditions} holds. Hyphenated quantity names are rewritten with
242
+ * `names` before parsing; an unbound name, a non-boolean result, and a syntax
243
+ * error are a {@link HoldsError}.
244
+ * A value whose name is one of `constants` and which the condition reads is
245
+ * a {@link ConstantInputError}, a caller error and not a false condition,
246
+ * unless `declared` names it; one the condition does not read is dropped, as
247
+ * any other extra key is.
248
+ */
249
+ export function holds(source, values, constants, names, declared = []) {
250
+ const conditions = holdsConditions(source, names);
251
+ const scope = holdsScope(values, constants, conditionReads(conditions), declared);
252
+ return conditions.every((condition) => condition.test(scope));
144
253
  }
145
254
  //# sourceMappingURL=holds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"holds.js","sourceRoot":"","sources":["../../src/bridges/holds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,4GAA4G;AAC5G,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AAiBD,MAAM,WAAW,GAAgE;IAC/E,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC;IACtB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;CACxB,CAAC;AAEF,MAAM,UAAU,GAAqD;IACnE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CACtC,CAAC;AAEF,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AO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACzE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACpC,IAAI,IAAI,IAAI,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,MAAM,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAC;YACvD,SAAS;QACX,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,KAAK,CACnB,MAAc,EACd,MAAwC,EACxC,SAA2C,EAC3C,KAAwB,EACxB,QAAQ,GAAsB,EAAE;IAEhC,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;IAClF,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC","sourcesContent":["/**\n * Interpreter for a catalog validity condition.\n *\n * A condition is a boolean expression over quantity names, the registered\n * constants, `isFinite` and `isInteger`, written in MathTS's grammar\n * (`and`, `or`, `not`, `<`, `<=`, `>`, `>=`, `==`, `!=`). MathTS parses it,\n * and MathTS evaluates every arithmetic sub-expression. The comparisons and\n * the logical operators are evaluated here, exactly: MathTS's own comparison\n * operators are tolerance-based (`absTol` 1e-15), so under them `1e-18 > 0`\n * is false, which no condition over SI magnitudes can accept.\n *\n * It is not JavaScript `eval`.\n *\n * @module bridges/holds\n */\n\nimport { parse as parseMathTs } from '@danielsimonjr/mathts-functions';\nimport { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';\nimport { ConstantInputError } from './evaluation-errors.js';\nimport { expressionNames } from './expr-parse.js';\n\n/** A condition could not be evaluated: it names an unbound symbol, or its text does not parse. @internal */\nexport class HoldsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'HoldsError';\n }\n}\n\n/** The MathTS node shape this interpreter reads. */\ninterface MathNode {\n readonly type: string;\n readonly op?: string;\n readonly fn?: string | { readonly name?: string };\n readonly name?: string;\n readonly value?: unknown;\n readonly args?: readonly MathNode[];\n readonly content?: MathNode;\n evaluate(scope: Record<string, unknown>): unknown;\n}\n\ntype Scope = Record<string, number>;\ntype Compiled = (scope: Scope) => boolean | number;\n\nconst COMPARISONS: Readonly<Record<string, (a: number, b: number) => boolean>> = {\n '<': (a, b) => a < b,\n '<=': (a, b) => a <= b,\n '>': (a, b) => a > b,\n '>=': (a, b) => a >= b,\n '==': (a, b) => a === b,\n '!=': (a, b) => a !== b,\n};\n\nconst PREDICATES: Readonly<Record<string, (x: number) => boolean>> = {\n isFinite: (x) => Number.isFinite(x),\n isInteger: (x) => Number.isInteger(x),\n};\n\nfunction functionName(node: MathNode): string {\n return typeof node.fn === 'string' ? node.fn : (node.fn?.name ?? node.name ?? '');\n}\n\n/** Evaluate an arithmetic sub-tree through MathTS; the result must be a number. */\nfunction arithmetic(node: MathNode, source: string): Compiled {\n return (scope) => {\n let v: unknown;\n try {\n v = node.evaluate(scope);\n } catch (error) {\n throw new HoldsError(`${error instanceof Error ? error.message : String(error)} in ${source}`);\n }\n if (typeof v !== 'number') throw new HoldsError(`operand is not a number: ${node.toString()} in ${source}`);\n return v;\n };\n}\n\nfunction compile(node: MathNode, source: string): Compiled {\n switch (node.type) {\n case 'ParenthesisNode':\n return compile(node.content!, source);\n case 'ConstantNode':\n if (typeof node.value === 'boolean') return () => node.value as boolean;\n return arithmetic(node, source);\n case 'OperatorNode': {\n const op = node.op ?? '';\n const args = node.args ?? [];\n if (op === 'and' || op === 'or') {\n const parts = args.map((a) => compile(a, source));\n return (scope) => {\n const values = parts.map((p) => p(scope));\n if (values.some((v) => typeof v !== 'boolean')) throw new HoldsError(`'${op}' of a number in ${source}`);\n return op === 'and' ? values.every(Boolean) : values.some(Boolean);\n };\n }\n if (op === 'not') {\n const inner = compile(args[0]!, source);\n return (scope) => {\n const v = inner(scope);\n if (typeof v !== 'boolean') throw new HoldsError(`'not' of a number in ${source}`);\n return !v;\n };\n }\n const compare = COMPARISONS[op];\n if (compare !== undefined) {\n const [left, right] = args.map((a) => compile(a, source));\n return (scope) => {\n const a = left!(scope);\n const b = right!(scope);\n if (typeof a !== 'number' || typeof b !== 'number') throw new HoldsError(`'${op}' of a boolean in ${source}`);\n return compare(a, b);\n };\n }\n return arithmetic(node, source);\n }\n case 'FunctionNode': {\n const predicate = PREDICATES[functionName(node)];\n if (predicate !== undefined) {\n const arg = compile(node.args![0]!, source);\n return (scope) => {\n const v = arg(scope);\n if (typeof v !== 'number') throw new HoldsError(`${functionName(node)} of a boolean in ${source}`);\n return predicate(v);\n };\n }\n return arithmetic(node, source);\n }\n default:\n return arithmetic(node, source);\n }\n}\n\n/**\n * One conjunct of a validity condition: the text it is written in (the\n * relation's own names), the names it reads, and its test.\n * @internal\n */\nexport interface HoldsCondition {\n /** The conjunct as the condition states it, in the relation's names (`swing-kelvin >= 0`). */\n readonly text: string;\n /** The names it reads, in order of first use, as the relation spells them. */\n readonly names: readonly string[];\n /** True when the conjunct holds; a name it cannot bind, or a non-boolean result, throws {@link HoldsError}. */\n test(scope: Readonly<Record<string, number>>): boolean;\n}\n\n\n/**\n * The conjuncts of `node`: an `and` splits, `not (not X)` is X, `not (A or B)` is\n * `not A` and `not B`, and `not (x == y)` is `x != y`. Each rewrite is exact, so\n * the conjunction of the parts is the condition. Anything else is one conjunct.\n */\nfunction conjuncts(node: MathNode): MathNode[] {\n if (node.type === 'ParenthesisNode') return conjuncts(node.content!);\n if (node.type === 'OperatorNode' && node.op === 'and') return (node.args ?? []).flatMap(conjuncts);\n if (node.type === 'OperatorNode' && node.op === 'not') {\n let inner = node.args![0]!;\n while (inner.type === 'ParenthesisNode') inner = inner.content!;\n if (inner.type === 'OperatorNode' && inner.op === 'not') return conjuncts(inner.args![0]!);\n if (inner.type === 'OperatorNode' && inner.op === 'or') return (inner.args ?? []).flatMap((arg) => conjuncts(negation(arg)));\n if (inner.type === 'OperatorNode' && inner.op === '==') return [withOperator(inner, '!=')];\n }\n return [node];\n}\n\n/** `not X` as a node, so the rewrite above can recurse into it. */\nfunction negation(node: MathNode): MathNode {\n return parseMathTs(`not (${node.toString()})`) as unknown as MathNode;\n}\n\n/** `a op b` with the same operands. */\nfunction withOperator(node: MathNode, op: string): MathNode {\n const [a, b] = node.args!;\n return parseMathTs(`${a!.toString()} ${op} ${b!.toString()}`) as unknown as MathNode;\n}\n\n/** The symbol names a node reads, in order, without functions. */\nfunction symbolNames(node: MathNode): string[] {\n const out: string[] = [];\n const visit = (n: MathNode): void => {\n if (n.type === 'SymbolNode' && n.name !== undefined) {\n if (!out.includes(n.name)) out.push(n.name);\n return;\n }\n if (n.type === 'ParenthesisNode') visit(n.content!);\n for (const arg of n.args ?? []) visit(arg);\n };\n visit(node);\n return out;\n}\n\n/**\n * Replace each identifier `text` mentions through `rename`, whole-word, in one\n * pass (a renamed word is never renamed again). The identifiers are the ones\n * `expressionNames` reads (the text is a printed conjunct, already written\n * with underscores, so the rewrite it applies is the identity on it).\n */\nfunction renameIdentifiers(text: string, rename: (name: string) => string): string {\n const names = expressionNames(text);\n return text.replace(/[A-Za-z_][A-Za-z0-9_]*/g, (word) => (names.has(word) ? rename(word) : word));\n}\n\nconst CONDITIONS = new Map<string, readonly HoldsCondition[]>();\n\n/**\n * The conjuncts of the condition `source`, each testable alone. Their\n * conjunction is the condition, so a caller that tests them all decides\n * exactly what {@link holds} decides, and can say which part failed.\n * Hyphenated names are rewritten with `names` before parsing and restored in\n * each conjunct's `text` and `names`.\n * @internal\n */\nexport function holdsConditions(source: string, names: readonly string[]): readonly HoldsCondition[] {\n const rewritten = rewriteCatalogHyphens(source, names);\n const hit = CONDITIONS.get(rewritten);\n if (hit !== undefined) return hit;\n let root: MathNode;\n try {\n root = parseMathTs(rewritten) as unknown as MathNode;\n } catch (error) {\n throw new HoldsError(`${error instanceof Error ? error.message : String(error)} in ${source}`);\n }\n const spelled = new Map(names.map((name) => [name.replace(/-/g, '_'), name]));\n const restore = (name: string): string => spelled.get(name) ?? name;\n const parts = conjuncts(root).map((node): HoldsCondition => {\n const text = renameIdentifiers(node.toString(), restore);\n const fn = compile(node, text);\n return {\n text,\n names: symbolNames(node).map(restore),\n test: (scope) => {\n const result = fn({ ...scope });\n if (typeof result !== 'boolean') throw new HoldsError(`condition is not boolean: ${text}`);\n return result;\n },\n };\n });\n CONDITIONS.set(rewritten, parts);\n return parts;\n}\n\n/** The names (hyphens written as underscores) the conditions read. @internal */\nexport function conditionReads(conditions: readonly HoldsCondition[]): ReadonlySet<string> {\n return new Set(conditions.flatMap((condition) => condition.names.map((name) => name.replace(/-/g, '_'))));\n}\n\n/**\n * A scope for a condition: the constants, then `values` with hyphens written as\n * underscores. A value whose name is a constant that `declared` does not name\n * is a {@link ConstantInputError} when `reads` holds it, and is dropped otherwise.\n * @internal\n */\nexport function holdsScope(\n values: Readonly<Record<string, number>>,\n constants: Readonly<Record<string, number>>,\n reads: ReadonlySet<string>,\n declared: readonly string[] = [],\n): Record<string, number> {\n const scope: Record<string, number> = { ...constants };\n const allowed = new Set(declared.map((name) => name.replace(/-/g, '_')));\n for (const [key, value] of Object.entries(values)) {\n const name = key.replace(/-/g, '_');\n if (name in constants && !allowed.has(name)) {\n if (reads.has(name)) throw new ConstantInputError(key);\n continue;\n }\n scope[name] = value;\n }\n return scope;\n}\n\n/**\n * Whether `holds` is true for `values`: every conjunct of\n * {@link holdsConditions} holds. Hyphenated quantity names are rewritten with\n * `names` before parsing; an unbound name, a non-boolean result, and a syntax\n * error are a {@link HoldsError}.\n * A value whose name is one of `constants` and which the condition reads is\n * a {@link ConstantInputError}, a caller error and not a false condition,\n * unless `declared` names it; one the condition does not read is dropped, as\n * any other extra key is.\n */\nexport function holds(\n source: string,\n values: Readonly<Record<string, number>>,\n constants: Readonly<Record<string, number>>,\n names: readonly string[],\n declared: readonly string[] = [],\n): boolean {\n const conditions = holdsConditions(source, names);\n const scope = holdsScope(values, constants, conditionReads(conditions), declared);\n return conditions.every((condition) => condition.test(scope));\n}\n"]}
@@ -1,25 +1,26 @@
1
1
  /**
2
- * Bridge catalog projection. Rows, regimes, and the spine are loaded from
2
+ * Bridge catalog projection. The rows are loaded from
3
3
  * `data/bridge-catalog.json`. This module does not declare an equation.
4
4
  *
5
5
  * @module bridges
6
6
  */
7
+ import type { BridgeEquationEntry } from './types.js';
8
+ /** The catalog row and its status, issue and severity unions. */
7
9
  export type { BridgeEquationEntry, BridgeEquationStatus, BridgeIssueFixable, BridgeIssueSeverity, KnownIssue, } from './types.js';
8
- /** An active status is every status except `invalid`. */
9
- export { isActiveStatus } from './types.js';
10
- /** Physical constants the catalog expressions name. */
10
+ /**
11
+ * Derived constants of the catalog's closed forms, re-exported for callers
12
+ * who want the number by name. A catalog expression reads `m_p` and
13
+ * `sigma_T` through the constant registry (`dimensional/constant-rows.ts`),
14
+ * which carries `M_PROTON_SI`, `THOMSON_CROSS_SECTION_SI` and
15
+ * `LANE_EMDEN_OMEGA3`; the von Klitzing, Josephson, Lorenz and BCS-gap
16
+ * values are not read by any expression and are the catalog's documented
17
+ * reference numbers.
18
+ */
11
19
  export { BCS_GAP_RATIO, JOSEPHSON_CONSTANT_SI, LANE_EMDEN_OMEGA3, LORENZ_NUMBER_SI, M_PROTON_SI, THOMSON_CROSS_SECTION_SI, VON_KLITZING_SI, } from '../core/constants.js';
12
20
  /** Thrown when two carrier roles have opposite signs. */
13
21
  export { CarrierSignError } from './carrier-sign.js';
14
- import type { BridgeEquationEntry } from './types.js';
15
- import type { Regime } from '../relations/types.js';
16
- /** Catalog rows in file order. @public */
22
+ /** Thrown when a caller input names a registered constant. */
23
+ export { ConstantInputError } from './evaluation-errors.js';
24
+ /** Catalog rows in id order. @public */
17
25
  export declare const BRIDGE_EQUATIONS: readonly BridgeEquationEntry[];
18
- /** The regime recorded on a catalog row, when the row has one. */
19
- export declare function catalogRegime(id: number): Regime | undefined;
20
- /**
21
- * Dimensionless groups at the points the gravitational confrontations used.
22
- * Keys are catalog ids. Values are group formula → number.
23
- */
24
- export declare const SPINE_CONFRONTATION_POINTS: Readonly<Record<string, Readonly<Record<string, number>>>>;
25
26
  //# sourceMappingURL=index.d.ts.map