@elaraai/east 0.0.1-beta.9 → 1.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 (410) hide show
  1. package/LICENSE.md +15 -666
  2. package/README.md +113 -88
  3. package/dist/src/analyze.d.ts +3 -0
  4. package/dist/src/analyze.d.ts.map +1 -1
  5. package/dist/src/analyze.js +223 -111
  6. package/dist/src/analyze.js.map +1 -1
  7. package/dist/src/analyze.spec.d.ts +2 -0
  8. package/dist/src/analyze.spec.d.ts.map +1 -0
  9. package/dist/src/analyze.spec.js +445 -0
  10. package/dist/src/analyze.spec.js.map +1 -0
  11. package/dist/src/ast.d.ts +54 -35
  12. package/dist/src/ast.d.ts.map +1 -1
  13. package/dist/src/ast_to_ir.coerce_to.spec.d.ts +15 -0
  14. package/dist/src/ast_to_ir.coerce_to.spec.d.ts.map +1 -0
  15. package/dist/src/ast_to_ir.coerce_to.spec.js +420 -0
  16. package/dist/src/ast_to_ir.coerce_to.spec.js.map +1 -0
  17. package/dist/src/ast_to_ir.d.ts +18 -4
  18. package/dist/src/ast_to_ir.d.ts.map +1 -1
  19. package/dist/src/ast_to_ir.js +233 -178
  20. package/dist/src/ast_to_ir.js.map +1 -1
  21. package/dist/src/builtins.d.ts +1 -1
  22. package/dist/src/builtins.d.ts.map +1 -1
  23. package/dist/src/builtins.js +194 -2
  24. package/dist/src/builtins.js.map +1 -1
  25. package/dist/src/comparison.d.ts +2 -2
  26. package/dist/src/comparison.d.ts.map +1 -1
  27. package/dist/src/comparison.js +115 -40
  28. package/dist/src/comparison.js.map +1 -1
  29. package/dist/src/comparison.spec.d.ts +2 -0
  30. package/dist/src/comparison.spec.d.ts.map +1 -0
  31. package/dist/src/comparison.spec.js +1200 -0
  32. package/dist/src/comparison.spec.js.map +1 -0
  33. package/dist/src/compile.d.ts +31 -9
  34. package/dist/src/compile.d.ts.map +1 -1
  35. package/dist/src/compile.js +1048 -548
  36. package/dist/src/compile.js.map +1 -1
  37. package/dist/src/containers/matrix.d.ts +15 -0
  38. package/dist/src/containers/matrix.d.ts.map +1 -0
  39. package/dist/src/containers/matrix.js +15 -0
  40. package/dist/src/containers/matrix.js.map +1 -0
  41. package/dist/src/containers/ref.d.ts.map +1 -1
  42. package/dist/src/containers/ref.js +1 -1
  43. package/dist/src/containers/ref.js.map +1 -1
  44. package/dist/src/containers/sortedmap.spec.d.ts +2 -0
  45. package/dist/src/containers/sortedmap.spec.d.ts.map +1 -0
  46. package/dist/src/containers/sortedmap.spec.js +180 -0
  47. package/dist/src/containers/sortedmap.spec.js.map +1 -0
  48. package/dist/src/containers/sortedset.spec.d.ts +2 -0
  49. package/dist/src/containers/sortedset.spec.d.ts.map +1 -0
  50. package/dist/src/containers/sortedset.spec.js +228 -0
  51. package/dist/src/containers/sortedset.spec.js.map +1 -0
  52. package/dist/src/containers/variant.d.ts.map +1 -1
  53. package/dist/src/containers/variant.js +1 -1
  54. package/dist/src/containers/variant.js.map +1 -1
  55. package/dist/src/containers/variant.spec.d.ts +2 -0
  56. package/dist/src/containers/variant.spec.d.ts.map +1 -0
  57. package/dist/src/containers/variant.spec.js +217 -0
  58. package/dist/src/containers/variant.spec.js.map +1 -0
  59. package/dist/src/datetime_format/parse.spec.d.ts +6 -0
  60. package/dist/src/datetime_format/parse.spec.d.ts.map +1 -0
  61. package/dist/src/datetime_format/parse.spec.js +379 -0
  62. package/dist/src/datetime_format/parse.spec.js.map +1 -0
  63. package/dist/src/datetime_format/print.spec.d.ts +6 -0
  64. package/dist/src/datetime_format/print.spec.d.ts.map +1 -0
  65. package/dist/src/datetime_format/print.spec.js +257 -0
  66. package/dist/src/datetime_format/print.spec.js.map +1 -0
  67. package/dist/src/datetime_format/tokenize.spec.d.ts +2 -0
  68. package/dist/src/datetime_format/tokenize.spec.d.ts.map +1 -0
  69. package/dist/src/datetime_format/tokenize.spec.js +508 -0
  70. package/dist/src/datetime_format/tokenize.spec.js.map +1 -0
  71. package/dist/src/datetime_format/types.d.ts +23 -23
  72. package/dist/src/default.d.ts.map +1 -1
  73. package/dist/src/default.js +33 -0
  74. package/dist/src/default.js.map +1 -1
  75. package/dist/src/default.spec.d.ts +2 -0
  76. package/dist/src/default.spec.d.ts.map +1 -0
  77. package/dist/src/default.spec.js +178 -0
  78. package/dist/src/default.spec.js.map +1 -0
  79. package/dist/src/eastir.d.ts +7 -0
  80. package/dist/src/eastir.d.ts.map +1 -1
  81. package/dist/src/eastir.js +55 -7
  82. package/dist/src/eastir.js.map +1 -1
  83. package/dist/src/error.d.ts +14 -4
  84. package/dist/src/error.d.ts.map +1 -1
  85. package/dist/src/error.js +28 -3
  86. package/dist/src/error.js.map +1 -1
  87. package/dist/src/example.d.ts +87 -0
  88. package/dist/src/example.d.ts.map +1 -0
  89. package/dist/src/example.js +18 -0
  90. package/dist/src/example.js.map +1 -0
  91. package/dist/src/expr/array.d.ts +43 -1
  92. package/dist/src/expr/array.d.ts.map +1 -1
  93. package/dist/src/expr/array.js +103 -53
  94. package/dist/src/expr/array.js.map +1 -1
  95. package/dist/src/expr/ast.d.ts +1 -1
  96. package/dist/src/expr/ast.d.ts.map +1 -1
  97. package/dist/src/expr/ast.js +112 -54
  98. package/dist/src/expr/ast.js.map +1 -1
  99. package/dist/src/expr/asyncfunction.d.ts.map +1 -1
  100. package/dist/src/expr/asyncfunction.js +6 -4
  101. package/dist/src/expr/asyncfunction.js.map +1 -1
  102. package/dist/src/expr/blob.d.ts +48 -0
  103. package/dist/src/expr/blob.d.ts.map +1 -1
  104. package/dist/src/expr/blob.js +63 -8
  105. package/dist/src/expr/blob.js.map +1 -1
  106. package/dist/src/expr/block.d.ts +213 -12
  107. package/dist/src/expr/block.d.ts.map +1 -1
  108. package/dist/src/expr/block.js +796 -293
  109. package/dist/src/expr/block.js.map +1 -1
  110. package/dist/src/expr/boolean.d.ts +44 -0
  111. package/dist/src/expr/boolean.d.ts.map +1 -1
  112. package/dist/src/expr/boolean.js +58 -6
  113. package/dist/src/expr/boolean.js.map +1 -1
  114. package/dist/src/expr/datetime.d.ts +135 -0
  115. package/dist/src/expr/datetime.d.ts.map +1 -1
  116. package/dist/src/expr/datetime.js +184 -34
  117. package/dist/src/expr/datetime.js.map +1 -1
  118. package/dist/src/expr/dict.d.ts +47 -2
  119. package/dist/src/expr/dict.d.ts.map +1 -1
  120. package/dist/src/expr/dict.js +122 -61
  121. package/dist/src/expr/dict.js.map +1 -1
  122. package/dist/src/expr/expr.d.ts +3 -1
  123. package/dist/src/expr/expr.d.ts.map +1 -1
  124. package/dist/src/expr/expr.js +4 -3
  125. package/dist/src/expr/expr.js.map +1 -1
  126. package/dist/src/expr/float.d.ts +153 -0
  127. package/dist/src/expr/float.d.ts.map +1 -1
  128. package/dist/src/expr/float.js +191 -17
  129. package/dist/src/expr/float.js.map +1 -1
  130. package/dist/src/expr/function.d.ts +7 -2
  131. package/dist/src/expr/function.d.ts.map +1 -1
  132. package/dist/src/expr/function.js +6 -4
  133. package/dist/src/expr/function.js.map +1 -1
  134. package/dist/src/expr/index.d.ts +186 -2
  135. package/dist/src/expr/index.d.ts.map +1 -1
  136. package/dist/src/expr/index.js +183 -2
  137. package/dist/src/expr/index.js.map +1 -1
  138. package/dist/src/expr/integer.d.ts +180 -0
  139. package/dist/src/expr/integer.d.ts.map +1 -1
  140. package/dist/src/expr/integer.js +189 -18
  141. package/dist/src/expr/integer.js.map +1 -1
  142. package/dist/src/expr/libs/array.js +3 -3
  143. package/dist/src/expr/libs/array.js.map +1 -1
  144. package/dist/src/expr/libs/blob.js +3 -3
  145. package/dist/src/expr/libs/blob.js.map +1 -1
  146. package/dist/src/expr/libs/dict.js +1 -1
  147. package/dist/src/expr/libs/dict.js.map +1 -1
  148. package/dist/src/expr/libs/matrix.d.ts +17 -0
  149. package/dist/src/expr/libs/matrix.d.ts.map +1 -0
  150. package/dist/src/expr/libs/matrix.js +60 -0
  151. package/dist/src/expr/libs/matrix.js.map +1 -0
  152. package/dist/src/expr/libs/set.js +1 -1
  153. package/dist/src/expr/libs/set.js.map +1 -1
  154. package/dist/src/expr/libs/string.d.ts.map +1 -1
  155. package/dist/src/expr/libs/string.js +2 -1
  156. package/dist/src/expr/libs/string.js.map +1 -1
  157. package/dist/src/expr/libs/vector.d.ts +16 -0
  158. package/dist/src/expr/libs/vector.d.ts.map +1 -0
  159. package/dist/src/expr/libs/vector.js +44 -0
  160. package/dist/src/expr/libs/vector.js.map +1 -0
  161. package/dist/src/expr/matrix.d.ts +109 -0
  162. package/dist/src/expr/matrix.d.ts.map +1 -0
  163. package/dist/src/expr/matrix.js +224 -0
  164. package/dist/src/expr/matrix.js.map +1 -0
  165. package/dist/src/expr/recursive.d.ts +83 -0
  166. package/dist/src/expr/recursive.d.ts.map +1 -0
  167. package/dist/src/expr/recursive.js +99 -0
  168. package/dist/src/expr/recursive.js.map +1 -0
  169. package/dist/src/expr/ref.js +5 -5
  170. package/dist/src/expr/ref.js.map +1 -1
  171. package/dist/src/expr/set.d.ts +44 -2
  172. package/dist/src/expr/set.d.ts.map +1 -1
  173. package/dist/src/expr/set.js +102 -52
  174. package/dist/src/expr/set.js.map +1 -1
  175. package/dist/src/expr/string.d.ts +134 -0
  176. package/dist/src/expr/string.d.ts.map +1 -1
  177. package/dist/src/expr/string.js +173 -23
  178. package/dist/src/expr/string.js.map +1 -1
  179. package/dist/src/expr/struct.d.ts +1 -1
  180. package/dist/src/expr/struct.d.ts.map +1 -1
  181. package/dist/src/expr/struct.js +2 -2
  182. package/dist/src/expr/struct.js.map +1 -1
  183. package/dist/src/expr/types.d.ts +12 -9
  184. package/dist/src/expr/types.d.ts.map +1 -1
  185. package/dist/src/expr/variant.d.ts +108 -11
  186. package/dist/src/expr/variant.d.ts.map +1 -1
  187. package/dist/src/expr/variant.js +76 -38
  188. package/dist/src/expr/variant.js.map +1 -1
  189. package/dist/src/expr/vector.d.ts +102 -0
  190. package/dist/src/expr/vector.d.ts.map +1 -0
  191. package/dist/src/expr/vector.js +202 -0
  192. package/dist/src/expr/vector.js.map +1 -0
  193. package/dist/src/fuzz.d.ts +36 -2
  194. package/dist/src/fuzz.d.ts.map +1 -1
  195. package/dist/src/fuzz.js +409 -77
  196. package/dist/src/fuzz.js.map +1 -1
  197. package/dist/src/index.d.ts +4 -0
  198. package/dist/src/index.d.ts.map +1 -1
  199. package/dist/src/index.js +4 -0
  200. package/dist/src/index.js.map +1 -1
  201. package/dist/src/internal.d.ts +12 -2
  202. package/dist/src/internal.d.ts.map +1 -1
  203. package/dist/src/internal.js +13 -2
  204. package/dist/src/internal.js.map +1 -1
  205. package/dist/src/ir.d.ts +1754 -1484
  206. package/dist/src/ir.d.ts.map +1 -1
  207. package/dist/src/ir.js +51 -34
  208. package/dist/src/ir.js.map +1 -1
  209. package/dist/src/ir.spec.d.ts +2 -0
  210. package/dist/src/ir.spec.d.ts.map +1 -0
  211. package/dist/src/ir.spec.js +35 -0
  212. package/dist/src/ir.spec.js.map +1 -0
  213. package/dist/src/location.d.ts +56 -17
  214. package/dist/src/location.d.ts.map +1 -1
  215. package/dist/src/location.js +226 -29
  216. package/dist/src/location.js.map +1 -1
  217. package/dist/src/location.spec.d.ts +2 -0
  218. package/dist/src/location.spec.d.ts.map +1 -0
  219. package/dist/src/location.spec.js +102 -0
  220. package/dist/src/location.spec.js.map +1 -0
  221. package/dist/src/patch/apply.d.ts +15 -0
  222. package/dist/src/patch/apply.d.ts.map +1 -0
  223. package/dist/src/patch/apply.js +352 -0
  224. package/dist/src/patch/apply.js.map +1 -0
  225. package/dist/src/patch/compose.d.ts +15 -0
  226. package/dist/src/patch/compose.d.ts.map +1 -0
  227. package/dist/src/patch/compose.js +448 -0
  228. package/dist/src/patch/compose.js.map +1 -0
  229. package/dist/src/patch/diff.d.ts +15 -0
  230. package/dist/src/patch/diff.d.ts.map +1 -0
  231. package/dist/src/patch/diff.js +347 -0
  232. package/dist/src/patch/diff.js.map +1 -0
  233. package/dist/src/patch/fuzz.d.ts +73 -0
  234. package/dist/src/patch/fuzz.d.ts.map +1 -0
  235. package/dist/src/patch/fuzz.js +159 -0
  236. package/dist/src/patch/fuzz.js.map +1 -0
  237. package/dist/src/patch/index.d.ts +32 -0
  238. package/dist/src/patch/index.d.ts.map +1 -0
  239. package/dist/src/patch/index.js +48 -0
  240. package/dist/src/patch/index.js.map +1 -0
  241. package/dist/src/patch/invert.d.ts +15 -0
  242. package/dist/src/patch/invert.d.ts.map +1 -0
  243. package/dist/src/patch/invert.js +284 -0
  244. package/dist/src/patch/invert.js.map +1 -0
  245. package/dist/src/patch/merge.d.ts +56 -0
  246. package/dist/src/patch/merge.d.ts.map +1 -0
  247. package/dist/src/patch/merge.js +586 -0
  248. package/dist/src/patch/merge.js.map +1 -0
  249. package/dist/src/patch/merge.spec.d.ts +2 -0
  250. package/dist/src/patch/merge.spec.d.ts.map +1 -0
  251. package/dist/src/patch/merge.spec.js +1139 -0
  252. package/dist/src/patch/merge.spec.js.map +1 -0
  253. package/dist/src/patch/patch.spec.d.ts +2 -0
  254. package/dist/src/patch/patch.spec.d.ts.map +1 -0
  255. package/dist/src/patch/patch.spec.js +452 -0
  256. package/dist/src/patch/patch.spec.js.map +1 -0
  257. package/dist/src/patch/path.d.ts +115 -0
  258. package/dist/src/patch/path.d.ts.map +1 -0
  259. package/dist/src/patch/path.js +192 -0
  260. package/dist/src/patch/path.js.map +1 -0
  261. package/dist/src/patch/path.spec.d.ts +6 -0
  262. package/dist/src/patch/path.spec.d.ts.map +1 -0
  263. package/dist/src/patch/path.spec.js +322 -0
  264. package/dist/src/patch/path.spec.js.map +1 -0
  265. package/dist/src/patch/prune.d.ts +77 -0
  266. package/dist/src/patch/prune.d.ts.map +1 -0
  267. package/dist/src/patch/prune.js +115 -0
  268. package/dist/src/patch/prune.js.map +1 -0
  269. package/dist/src/patch/prune.spec.d.ts +6 -0
  270. package/dist/src/patch/prune.spec.d.ts.map +1 -0
  271. package/dist/src/patch/prune.spec.js +473 -0
  272. package/dist/src/patch/prune.spec.js.map +1 -0
  273. package/dist/src/patch/type_of_patch.d.ts +25 -0
  274. package/dist/src/patch/type_of_patch.d.ts.map +1 -0
  275. package/dist/src/patch/type_of_patch.js +144 -0
  276. package/dist/src/patch/type_of_patch.js.map +1 -0
  277. package/dist/src/patch/types.d.ts +220 -0
  278. package/dist/src/patch/types.d.ts.map +1 -0
  279. package/dist/src/patch/types.js +62 -0
  280. package/dist/src/patch/types.js.map +1 -0
  281. package/dist/src/patch/validate.d.ts +44 -0
  282. package/dist/src/patch/validate.d.ts.map +1 -0
  283. package/dist/src/patch/validate.js +190 -0
  284. package/dist/src/patch/validate.js.map +1 -0
  285. package/dist/src/patch/validate.spec.d.ts +6 -0
  286. package/dist/src/patch/validate.spec.d.ts.map +1 -0
  287. package/dist/src/patch/validate.spec.js +225 -0
  288. package/dist/src/patch/validate.spec.js.map +1 -0
  289. package/dist/src/patch/walk.d.ts +121 -0
  290. package/dist/src/patch/walk.d.ts.map +1 -0
  291. package/dist/src/patch/walk.js +385 -0
  292. package/dist/src/patch/walk.js.map +1 -0
  293. package/dist/src/patch/walk.spec.d.ts +6 -0
  294. package/dist/src/patch/walk.spec.d.ts.map +1 -0
  295. package/dist/src/patch/walk.spec.js +621 -0
  296. package/dist/src/patch/walk.spec.js.map +1 -0
  297. package/dist/src/platform.d.ts +6 -0
  298. package/dist/src/platform.d.ts.map +1 -1
  299. package/dist/src/platform.spec.d.ts +2 -0
  300. package/dist/src/platform.spec.d.ts.map +1 -0
  301. package/dist/src/platform.spec.js +330 -0
  302. package/dist/src/platform.spec.js.map +1 -0
  303. package/dist/src/serialization/beast.d.ts.map +1 -1
  304. package/dist/src/serialization/beast.js +12 -0
  305. package/dist/src/serialization/beast.js.map +1 -1
  306. package/dist/src/serialization/beast.spec.d.ts +6 -0
  307. package/dist/src/serialization/beast.spec.d.ts.map +1 -0
  308. package/dist/src/serialization/beast.spec.js +406 -0
  309. package/dist/src/serialization/beast.spec.js.map +1 -0
  310. package/dist/src/serialization/beast2/index.d.ts +50 -0
  311. package/dist/src/serialization/beast2/index.d.ts.map +1 -0
  312. package/dist/src/serialization/beast2/index.js +756 -0
  313. package/dist/src/serialization/beast2/index.js.map +1 -0
  314. package/dist/src/serialization/beast2/index.spec.d.ts +6 -0
  315. package/dist/src/serialization/beast2/index.spec.d.ts.map +1 -0
  316. package/dist/src/serialization/beast2/index.spec.js +528 -0
  317. package/dist/src/serialization/beast2/index.spec.js.map +1 -0
  318. package/dist/src/serialization/beast2/sourcemap-table.d.ts +29 -0
  319. package/dist/src/serialization/beast2/sourcemap-table.d.ts.map +1 -0
  320. package/dist/src/serialization/beast2/sourcemap-table.js +82 -0
  321. package/dist/src/serialization/beast2/sourcemap-table.js.map +1 -0
  322. package/dist/src/serialization/beast2/string-table.d.ts +16 -0
  323. package/dist/src/serialization/beast2/string-table.d.ts.map +1 -0
  324. package/dist/src/serialization/beast2/string-table.js +38 -0
  325. package/dist/src/serialization/beast2/string-table.js.map +1 -0
  326. package/dist/src/serialization/beast2/type-table.d.ts +86 -0
  327. package/dist/src/serialization/beast2/type-table.d.ts.map +1 -0
  328. package/dist/src/serialization/beast2/type-table.js +618 -0
  329. package/dist/src/serialization/beast2/type-table.js.map +1 -0
  330. package/dist/src/serialization/beast2/value-table.d.ts +40 -0
  331. package/dist/src/serialization/beast2/value-table.d.ts.map +1 -0
  332. package/dist/src/serialization/beast2/value-table.js +157 -0
  333. package/dist/src/serialization/beast2/value-table.js.map +1 -0
  334. package/dist/src/serialization/binary-utils.d.ts +33 -0
  335. package/dist/src/serialization/binary-utils.d.ts.map +1 -1
  336. package/dist/src/serialization/binary-utils.js +157 -0
  337. package/dist/src/serialization/binary-utils.js.map +1 -1
  338. package/dist/src/serialization/csv.d.ts +17 -17
  339. package/dist/src/serialization/csv.d.ts.map +1 -1
  340. package/dist/src/serialization/csv.js +10 -8
  341. package/dist/src/serialization/csv.js.map +1 -1
  342. package/dist/src/serialization/csv.spec.d.ts +2 -0
  343. package/dist/src/serialization/csv.spec.d.ts.map +1 -0
  344. package/dist/src/serialization/csv.spec.js +556 -0
  345. package/dist/src/serialization/csv.spec.js.map +1 -0
  346. package/dist/src/serialization/east-inferred.spec.d.ts +2 -0
  347. package/dist/src/serialization/east-inferred.spec.d.ts.map +1 -0
  348. package/dist/src/serialization/east-inferred.spec.js +322 -0
  349. package/dist/src/serialization/east-inferred.spec.js.map +1 -0
  350. package/dist/src/serialization/east.d.ts +1 -1
  351. package/dist/src/serialization/east.d.ts.map +1 -1
  352. package/dist/src/serialization/east.js +178 -26
  353. package/dist/src/serialization/east.js.map +1 -1
  354. package/dist/src/serialization/east.spec.d.ts +2 -0
  355. package/dist/src/serialization/east.spec.d.ts.map +1 -0
  356. package/dist/src/serialization/east.spec.js +1548 -0
  357. package/dist/src/serialization/east.spec.js.map +1 -0
  358. package/dist/src/serialization/index.d.ts +1 -2
  359. package/dist/src/serialization/index.d.ts.map +1 -1
  360. package/dist/src/serialization/index.js +1 -2
  361. package/dist/src/serialization/index.js.map +1 -1
  362. package/dist/src/serialization/json.d.ts +1 -1
  363. package/dist/src/serialization/json.d.ts.map +1 -1
  364. package/dist/src/serialization/json.js +123 -24
  365. package/dist/src/serialization/json.js.map +1 -1
  366. package/dist/src/serialization/json.spec.d.ts +2 -0
  367. package/dist/src/serialization/json.spec.d.ts.map +1 -0
  368. package/dist/src/serialization/json.spec.js +1297 -0
  369. package/dist/src/serialization/json.spec.js.map +1 -0
  370. package/dist/src/type_of_type.d.ts +72 -35
  371. package/dist/src/type_of_type.d.ts.map +1 -1
  372. package/dist/src/type_of_type.is_data.spec.d.ts +6 -0
  373. package/dist/src/type_of_type.is_data.spec.d.ts.map +1 -0
  374. package/dist/src/type_of_type.is_data.spec.js +221 -0
  375. package/dist/src/type_of_type.is_data.spec.js.map +1 -0
  376. package/dist/src/type_of_type.js +355 -80
  377. package/dist/src/type_of_type.js.map +1 -1
  378. package/dist/src/type_of_type.to_etv.spec.d.ts +6 -0
  379. package/dist/src/type_of_type.to_etv.spec.d.ts.map +1 -0
  380. package/dist/src/type_of_type.to_etv.spec.js +263 -0
  381. package/dist/src/type_of_type.to_etv.spec.js.map +1 -0
  382. package/dist/src/types.d.ts +82 -12
  383. package/dist/src/types.d.ts.map +1 -1
  384. package/dist/src/types.error.spec.d.ts +2 -0
  385. package/dist/src/types.error.spec.d.ts.map +1 -0
  386. package/dist/src/types.error.spec.js +665 -0
  387. package/dist/src/types.error.spec.js.map +1 -0
  388. package/dist/src/types.js +663 -156
  389. package/dist/src/types.js.map +1 -1
  390. package/dist/src/types.spec.d.ts +2 -0
  391. package/dist/src/types.spec.d.ts.map +1 -0
  392. package/dist/src/types.spec.js +946 -0
  393. package/dist/src/types.spec.js.map +1 -0
  394. package/dist/src/walker.d.ts +65 -0
  395. package/dist/src/walker.d.ts.map +1 -0
  396. package/dist/src/walker.js +165 -0
  397. package/dist/src/walker.js.map +1 -0
  398. package/dist/src/walker.spec.d.ts +6 -0
  399. package/dist/src/walker.spec.d.ts.map +1 -0
  400. package/dist/src/walker.spec.js +109 -0
  401. package/dist/src/walker.spec.js.map +1 -0
  402. package/package.json +16 -38
  403. package/dist/src/serialization/beast2-stream.d.ts +0 -38
  404. package/dist/src/serialization/beast2-stream.d.ts.map +0 -1
  405. package/dist/src/serialization/beast2-stream.js +0 -670
  406. package/dist/src/serialization/beast2-stream.js.map +0 -1
  407. package/dist/src/serialization/beast2.d.ts +0 -41
  408. package/dist/src/serialization/beast2.d.ts.map +0 -1
  409. package/dist/src/serialization/beast2.js +0 -495
  410. package/dist/src/serialization/beast2.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dict.js","sourceRoot":"","sources":["../../../../src/expr/libs/dict.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAiB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG7C,kDAAkD;AAClD,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC;QAEhQ,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;YAClC,OAAO,EAAE,cAAc;YACvB,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;YACrC,SAAS,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAC5G,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM;SACtC,CAAC,CAAC;IACL,CAAC;CACF,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { FloatType, IntegerType, ArrayType, VectorType, type EastType } from "../../types.js";
6
+ import { Expr } from "../expr.js";
7
+ import type { SubtypeExprOrValue, TypeOf } from "../types.js";
8
+ import type { MatrixExpr } from "../matrix.js";
9
+ declare const _default: {
10
+ zeros(rows: Expr<typeof IntegerType> | bigint, cols: Expr<typeof IntegerType> | bigint): MatrixExpr<typeof FloatType>;
11
+ ones(rows: Expr<typeof IntegerType> | bigint, cols: Expr<typeof IntegerType> | bigint): MatrixExpr<typeof FloatType>;
12
+ fill<V extends unknown>(rows: Expr<typeof IntegerType> | bigint, cols: Expr<typeof IntegerType> | bigint, value: V): MatrixExpr<TypeOf<V>>;
13
+ fromArray<V extends readonly unknown[] | Expr<ArrayType<EastType>>>(arr: V): MatrixExpr<TypeOf<V> extends ArrayType<ArrayType<infer U>> ? U : EastType>;
14
+ fromRows<V extends Expr<ArrayType<VectorType<EastType>>>>(arr: V): MatrixExpr<TypeOf<V> extends ArrayType<VectorType<infer U>> ? U : EastType>;
15
+ };
16
+ export default _default;
17
+ //# sourceMappingURL=matrix.d.ts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AAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;;AA5ChJ,wBAwDE"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { MatrixType, FloatType, IntegerType, ArrayType, VectorType } from "../../types.js";
6
+ import { AstSymbol, Expr, TypeSymbol } from "../expr.js";
7
+ export default {
8
+ zeros(rows, cols) {
9
+ const r = Expr.from(rows, IntegerType);
10
+ const c = Expr.from(cols, IntegerType);
11
+ return Expr.fromAst({
12
+ ast_type: "Builtin", type: MatrixType(FloatType), builtin: "MatrixZeros",
13
+ type_parameters: [FloatType], arguments: [r[AstSymbol], c[AstSymbol]], loc_id: r[AstSymbol].loc_id,
14
+ });
15
+ },
16
+ ones(rows, cols) {
17
+ const r = Expr.from(rows, IntegerType);
18
+ const c = Expr.from(cols, IntegerType);
19
+ return Expr.fromAst({
20
+ ast_type: "Builtin", type: MatrixType(FloatType), builtin: "MatrixOnes",
21
+ type_parameters: [FloatType], arguments: [r[AstSymbol], c[AstSymbol]], loc_id: r[AstSymbol].loc_id,
22
+ });
23
+ },
24
+ fill(rows, cols, value) {
25
+ const r = Expr.from(rows, IntegerType);
26
+ const c = Expr.from(cols, IntegerType);
27
+ const val = Expr.from(value);
28
+ const elemType = val[TypeSymbol];
29
+ return Expr.fromAst({
30
+ ast_type: "Builtin", type: MatrixType(elemType), builtin: "MatrixFill",
31
+ type_parameters: [elemType], arguments: [r[AstSymbol], c[AstSymbol], val[AstSymbol]], loc_id: r[AstSymbol].loc_id,
32
+ });
33
+ },
34
+ fromArray(arr) {
35
+ const arrExpr = Expr.from(arr);
36
+ const arrAst = Expr.ast(arrExpr);
37
+ const innerType = arrAst.type.value;
38
+ const elemType = innerType.value;
39
+ if (elemType.type !== "Float" && elemType.type !== "Integer" && elemType.type !== "Boolean") {
40
+ throw new Error(`Matrix.fromArray requires Float, Integer, or Boolean element type, got ${elemType.type}`);
41
+ }
42
+ return Expr.fromAst({
43
+ ast_type: "Builtin", type: MatrixType(elemType), builtin: "MatrixFromArray",
44
+ type_parameters: [elemType], arguments: [arrAst], loc_id: arrAst.loc_id,
45
+ });
46
+ },
47
+ fromRows(arr) {
48
+ const arrAst = Expr.ast(arr);
49
+ const vecType = arrAst.type.value;
50
+ const elemType = vecType.element;
51
+ if (elemType.type !== "Float" && elemType.type !== "Integer" && elemType.type !== "Boolean") {
52
+ throw new Error(`Matrix.fromRows requires Float, Integer, or Boolean element type, got ${elemType.type}`);
53
+ }
54
+ return Expr.fromAst({
55
+ ast_type: "Builtin", type: MatrixType(elemType), builtin: "MatrixFromRows",
56
+ type_parameters: [elemType], arguments: [arrAst], loc_id: arrAst.loc_id,
57
+ });
58
+ },
59
+ };
60
+ //# sourceMappingURL=matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.js","sourceRoot":"","sources":["../../../../src/expr/libs/matrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIzD,eAAe;IACb,KAAK,CAAC,IAAuC,EAAE,IAAuC;QACpF,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,aAAa;YACxE,eAAe,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAA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AAI,KAAK,CAAC,yEAAyE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5G,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,gBAAgB;YAC1E,eAAe,EAAE,CAAC,QAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM;SACpF,CAAQ,CAAC;IACZ,CAAC;CACF,CAAC"}
@@ -62,7 +62,7 @@ export default {
62
62
  builtin: "SetGenerate",
63
63
  type_parameters: [keyType],
64
64
  arguments: [length_expr[AstSymbol], generator_expr[AstSymbol], on_conflict_expr[AstSymbol]],
65
- location: length_expr[AstSymbol].location,
65
+ loc_id: length_expr[AstSymbol].loc_id,
66
66
  });
67
67
  },
68
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/expr/libs/set.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAiB,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG7C,0CAA0C;AAC1C,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACH,QAAQ,CAAqB,IAAgC,EAAE,OAAU,EAAE,KAAkE,EAAE,UAAuE;QACpN,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,KAAY,EAAE,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACrF,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,IA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,QAAQ,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC,GAAG,UAAU;IAI3I;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;qBACc,IAAI,GAAG,UAAU;;AAzDpC,wBAmEC"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/expr/libs/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,yCAAyC;;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;wBACiB,UAAU,SAAS,SAAS,CAAC,UAAU,CAAC;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC,GAAG,UAAU;IAI3I;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;qBACc,IAAI,GAAG,UAAU;;AAzDpC,wBAmEC"}
@@ -3,6 +3,7 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  import { StringType } from "../../types.js";
6
+ import { get_location_id } from "../../location.js";
6
7
  import { Expr } from "../expr.js";
7
8
  /** Standard library for string values */
8
9
  export default {
@@ -66,7 +67,7 @@ export default {
66
67
  ast_type: "Builtin",
67
68
  type: StringType,
68
69
  builtin: "StringPrintJSON",
69
- location: { filename: "stdlib", line: 1, column: 1 },
70
+ loc_id: get_location_id(),
70
71
  type_parameters: [Expr.type(value)],
71
72
  arguments: [Expr.ast(value)],
72
73
  });
@@ -1 +1 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../src/expr/libs/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAmB,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAE/E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC,yCAAyC;AACzC,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,UAAU,CAAC,OAAmB,EAAE,KAA8F;QAC5H,OAAO,IAAI,CAAC,GAAG,CAAA,UAAU,OAAO,SAAS,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAA,IAAI,CAAC,KAAK,QAAQ,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnK,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,KAAW;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,iBAAiB;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACpD,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../src/expr/libs/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAmB,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC,yCAAyC;AACzC,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,UAAU,CAAC,OAAmB,EAAE,KAA8F;QAC5H,OAAO,IAAI,CAAC,GAAG,CAAA,UAAU,OAAO,SAAS,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAA,IAAI,CAAC,KAAK,QAAQ,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnK,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,KAAW;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,eAAe,EAAE;YACzB,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { FloatType, IntegerType, type EastType, ArrayType } from "../../types.js";
6
+ import { Expr } from "../expr.js";
7
+ import type { SubtypeExprOrValue, TypeOf } from "../types.js";
8
+ import type { VectorExpr } from "../vector.js";
9
+ declare const _default: {
10
+ zeros(length: Expr<typeof IntegerType> | bigint): VectorExpr<typeof FloatType>;
11
+ ones(length: Expr<typeof IntegerType> | bigint): VectorExpr<typeof FloatType>;
12
+ fill<V extends unknown>(length: Expr<typeof IntegerType> | bigint, value: V): VectorExpr<TypeOf<V>>;
13
+ fromArray<V extends readonly unknown[] | Expr<ArrayType<EastType>>>(arr: V): VectorExpr<TypeOf<V> extends ArrayType<infer U> ? U : EastType>;
14
+ };
15
+ export default _default;
16
+ //# sourceMappingURL=vector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../../../src/expr/libs/vector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAc,SAAS,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAa,IAAI,EAAc,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;;kBAG/B,IAAI,CAAC,OAAO,WAAW,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC;iBAQjE,IAAI,CAAC,OAAO,WAAW,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC;SAQxE,CAAC,0BAA+C,IAAI,CAAC,OAAO,WAAW,CAAC,GAAG,MAAM,SAAS,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;cAU9G,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;;AA3B9I,wBAuCE"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { VectorType, FloatType, IntegerType, ArrayType } from "../../types.js";
6
+ import { AstSymbol, Expr, TypeSymbol } from "../expr.js";
7
+ export default {
8
+ zeros(length) {
9
+ const len = Expr.from(length, IntegerType);
10
+ return Expr.fromAst({
11
+ ast_type: "Builtin", type: VectorType(FloatType), builtin: "VectorZeros",
12
+ type_parameters: [FloatType], arguments: [len[AstSymbol]], loc_id: len[AstSymbol].loc_id,
13
+ });
14
+ },
15
+ ones(length) {
16
+ const len = Expr.from(length, IntegerType);
17
+ return Expr.fromAst({
18
+ ast_type: "Builtin", type: VectorType(FloatType), builtin: "VectorOnes",
19
+ type_parameters: [FloatType], arguments: [len[AstSymbol]], loc_id: len[AstSymbol].loc_id,
20
+ });
21
+ },
22
+ fill(length, value) {
23
+ const len = Expr.from(length, IntegerType);
24
+ const val = Expr.from(value);
25
+ const elemType = val[TypeSymbol];
26
+ return Expr.fromAst({
27
+ ast_type: "Builtin", type: VectorType(elemType), builtin: "VectorFill",
28
+ type_parameters: [elemType], arguments: [len[AstSymbol], val[AstSymbol]], loc_id: len[AstSymbol].loc_id,
29
+ });
30
+ },
31
+ fromArray(arr) {
32
+ const arrExpr = Expr.from(arr);
33
+ const arrAst = Expr.ast(arrExpr);
34
+ const elemType = arrAst.type.value;
35
+ if (elemType.type !== "Float" && elemType.type !== "Integer" && elemType.type !== "Boolean") {
36
+ throw new Error(`Vector.fromArray requires Float, Integer, or Boolean element type, got ${elemType.type}`);
37
+ }
38
+ return Expr.fromAst({
39
+ ast_type: "Builtin", type: VectorType(elemType), builtin: "VectorFromArray",
40
+ type_parameters: [elemType], arguments: [arrAst], loc_id: arrAst.loc_id,
41
+ });
42
+ },
43
+ };
44
+ //# sourceMappingURL=vector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector.js","sourceRoot":"","sources":["../../../../src/expr/libs/vector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAA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,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,YAAY;YACtE,eAAe,EAAE,CAAC,QAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM;SACpH,CAAQ,CAAC;IACZ,CAAC;IAED,SAAS,CAA2D,GAAM;QACxE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,OAAc,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAI,MAAM,CAAC,IAAkB,CAAC,KAAK,CAAC;QAClD,IAAI,QAAQ,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC5F,MAAM,IAAI,KAAK,CAAC,0EAA0E,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7G,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,iBAAiB;YAC3E,eAAe,EAAE,CAAC,QAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM;SACpF,CAAQ,CAAC;IACZ,CAAC;CACF,CAAC"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import type { AST } from "../ast.js";
6
+ import { IntegerType, VectorType, MatrixType, FunctionType, ArrayType, type NeverType } from "../types.js";
7
+ import type { IntegerExpr } from "./integer.js";
8
+ import type { NullExpr } from "./null.js";
9
+ import { Expr, type ToExpr } from "./expr.js";
10
+ import type { SubtypeExprOrValue, ExprType } from "./types.js";
11
+ import type { VectorExpr } from "./vector.js";
12
+ import type { ArrayExpr } from "./array.js";
13
+ import type { BlockBuilder } from "./block.js";
14
+ /**
15
+ * Expression representing mutable matrix (2D typed array) values and operations.
16
+ *
17
+ * MatrixExpr provides methods for matrix manipulation including element access,
18
+ * mutation, row/column access, transpose, and conversion. Matrices are backed by
19
+ * contiguous typed arrays in row-major order for efficient numeric computation
20
+ * and zero-copy interop with ML libraries.
21
+ */
22
+ export declare class MatrixExpr<T extends any> extends Expr<MatrixType<T>> {
23
+ private element_type;
24
+ constructor(element_type: T, ast: AST, createExpr: ToExpr);
25
+ /**
26
+ * Returns the number of rows in the matrix.
27
+ *
28
+ * @returns An IntegerExpr representing the number of rows
29
+ */
30
+ rows(): IntegerExpr;
31
+ /**
32
+ * Returns the number of columns in the matrix.
33
+ *
34
+ * @returns An IntegerExpr representing the number of columns
35
+ */
36
+ cols(): IntegerExpr;
37
+ /**
38
+ * Gets the element at the specified row and column.
39
+ *
40
+ * @param row - The zero-based row index
41
+ * @param col - The zero-based column index
42
+ * @returns An expression of the element type
43
+ *
44
+ * @throws East runtime error if the indices are out of bounds
45
+ */
46
+ get(row: SubtypeExprOrValue<IntegerType>, col: SubtypeExprOrValue<IntegerType>): ExprType<T>;
47
+ /**
48
+ * Sets the element at the specified row and column (mutates the matrix).
49
+ *
50
+ * @param row - The zero-based row index
51
+ * @param col - The zero-based column index
52
+ * @param value - The value to set
53
+ * @returns NullExpr (operation performed for side effect)
54
+ *
55
+ * @throws East runtime error if the indices are out of bounds
56
+ */
57
+ set(row: SubtypeExprOrValue<IntegerType>, col: SubtypeExprOrValue<IntegerType>, value: SubtypeExprOrValue<T>): NullExpr;
58
+ /**
59
+ * Gets a row as a vector (returns a copy).
60
+ *
61
+ * @param row - The zero-based row index
62
+ * @returns A VectorExpr containing the row elements
63
+ *
64
+ * @throws East runtime error if the row index is out of bounds
65
+ */
66
+ getRow(row: SubtypeExprOrValue<IntegerType>): VectorExpr<T>;
67
+ /**
68
+ * Gets a column as a vector (returns a copy).
69
+ *
70
+ * @param col - The zero-based column index
71
+ * @returns A VectorExpr containing the column elements
72
+ *
73
+ * @throws East runtime error if the column index is out of bounds
74
+ */
75
+ getCol(col: SubtypeExprOrValue<IntegerType>): VectorExpr<T>;
76
+ /**
77
+ * Returns the transpose of this matrix.
78
+ *
79
+ * @returns A new MatrixExpr with rows and columns swapped
80
+ */
81
+ transpose(): MatrixExpr<T>;
82
+ /**
83
+ * Flattens this matrix into a vector (row-major order).
84
+ *
85
+ * @returns A VectorExpr containing all matrix elements in row-major order
86
+ */
87
+ toVector(): VectorExpr<T>;
88
+ /**
89
+ * Converts this matrix to a nested Array of Arrays.
90
+ *
91
+ * @returns An ArrayExpr of ArrayExprs containing the matrix elements
92
+ */
93
+ toArray(): ArrayExpr<ArrayType<T>>;
94
+ /**
95
+ * Converts this matrix to an Array of row Vectors.
96
+ *
97
+ * @returns An ArrayExpr of VectorExprs, one per row
98
+ */
99
+ toRows(): ArrayExpr<VectorType<T>>;
100
+ /**
101
+ * Maps a function over each row vector and its index, producing a new matrix.
102
+ *
103
+ * @param fn - Function taking (row_vector, row_index) and returning a new row vector
104
+ * @returns A new MatrixExpr with the mapped row vectors
105
+ */
106
+ mapRows<T2>(fn: Expr<FunctionType<[VectorType<T>, IntegerType], VectorType<T2>>>): MatrixExpr<T2>;
107
+ mapRows<F extends (($: BlockBuilder<NeverType>, row: VectorExpr<T>, idx: ExprType<IntegerType>) => VectorExpr<any>)>(fn: F): MatrixExpr<ReturnType<F> extends VectorExpr<infer U> ? U : never>;
108
+ }
109
+ //# sourceMappingURL=matrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../src/expr/matrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,K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CAAC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAY3D;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAY3D;;;;OAIG;IACH,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC;IAW1B;;;;OAIG;IACH,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC;IAWzB;;;;OAIG;IACH,OAAO,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAWlC;;;;OAIG;IACH,MAAM,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAWlC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;IACjG,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CAgC/L"}
@@ -0,0 +1,224 @@
1
+ import { get_location_id } from "../location.js";
2
+ import { IntegerType, VectorType, MatrixType, NullType, FunctionType, ArrayType, isSubtype, printType, isTypeEqual } from "../types.js";
3
+ import { valueOrExprToAstTyped } from "./ast.js";
4
+ import { AstSymbol, Expr, FactorySymbol, TypeSymbol } from "./expr.js";
5
+ /**
6
+ * Expression representing mutable matrix (2D typed array) values and operations.
7
+ *
8
+ * MatrixExpr provides methods for matrix manipulation including element access,
9
+ * mutation, row/column access, transpose, and conversion. Matrices are backed by
10
+ * contiguous typed arrays in row-major order for efficient numeric computation
11
+ * and zero-copy interop with ML libraries.
12
+ */
13
+ export class MatrixExpr extends Expr {
14
+ element_type;
15
+ constructor(element_type, ast, createExpr) {
16
+ super(ast.type, ast, createExpr);
17
+ this.element_type = element_type;
18
+ }
19
+ /**
20
+ * Returns the number of rows in the matrix.
21
+ *
22
+ * @returns An IntegerExpr representing the number of rows
23
+ */
24
+ rows() {
25
+ return this[FactorySymbol]({
26
+ ast_type: "Builtin",
27
+ type: IntegerType,
28
+ loc_id: get_location_id(),
29
+ builtin: "MatrixRows",
30
+ type_parameters: [this.element_type],
31
+ arguments: [this[AstSymbol]],
32
+ });
33
+ }
34
+ /**
35
+ * Returns the number of columns in the matrix.
36
+ *
37
+ * @returns An IntegerExpr representing the number of columns
38
+ */
39
+ cols() {
40
+ return this[FactorySymbol]({
41
+ ast_type: "Builtin",
42
+ type: IntegerType,
43
+ loc_id: get_location_id(),
44
+ builtin: "MatrixCols",
45
+ type_parameters: [this.element_type],
46
+ arguments: [this[AstSymbol]],
47
+ });
48
+ }
49
+ /**
50
+ * Gets the element at the specified row and column.
51
+ *
52
+ * @param row - The zero-based row index
53
+ * @param col - The zero-based column index
54
+ * @returns An expression of the element type
55
+ *
56
+ * @throws East runtime error if the indices are out of bounds
57
+ */
58
+ get(row, col) {
59
+ const r = valueOrExprToAstTyped(row, IntegerType);
60
+ const c = valueOrExprToAstTyped(col, IntegerType);
61
+ return this[FactorySymbol]({
62
+ ast_type: "Builtin",
63
+ type: this.element_type,
64
+ loc_id: get_location_id(),
65
+ builtin: "MatrixGet",
66
+ type_parameters: [this.element_type],
67
+ arguments: [this[AstSymbol], r, c],
68
+ });
69
+ }
70
+ /**
71
+ * Sets the element at the specified row and column (mutates the matrix).
72
+ *
73
+ * @param row - The zero-based row index
74
+ * @param col - The zero-based column index
75
+ * @param value - The value to set
76
+ * @returns NullExpr (operation performed for side effect)
77
+ *
78
+ * @throws East runtime error if the indices are out of bounds
79
+ */
80
+ set(row, col, value) {
81
+ const r = valueOrExprToAstTyped(row, IntegerType);
82
+ const c = valueOrExprToAstTyped(col, IntegerType);
83
+ const v = valueOrExprToAstTyped(value, this.element_type);
84
+ return this[FactorySymbol]({
85
+ ast_type: "Builtin",
86
+ type: NullType,
87
+ loc_id: get_location_id(),
88
+ builtin: "MatrixSet",
89
+ type_parameters: [this.element_type],
90
+ arguments: [this[AstSymbol], r, c, v],
91
+ });
92
+ }
93
+ /**
94
+ * Gets a row as a vector (returns a copy).
95
+ *
96
+ * @param row - The zero-based row index
97
+ * @returns A VectorExpr containing the row elements
98
+ *
99
+ * @throws East runtime error if the row index is out of bounds
100
+ */
101
+ getRow(row) {
102
+ const r = valueOrExprToAstTyped(row, IntegerType);
103
+ return this[FactorySymbol]({
104
+ ast_type: "Builtin",
105
+ type: VectorType(this.element_type),
106
+ loc_id: get_location_id(),
107
+ builtin: "MatrixGetRow",
108
+ type_parameters: [this.element_type],
109
+ arguments: [this[AstSymbol], r],
110
+ });
111
+ }
112
+ /**
113
+ * Gets a column as a vector (returns a copy).
114
+ *
115
+ * @param col - The zero-based column index
116
+ * @returns A VectorExpr containing the column elements
117
+ *
118
+ * @throws East runtime error if the column index is out of bounds
119
+ */
120
+ getCol(col) {
121
+ const c = valueOrExprToAstTyped(col, IntegerType);
122
+ return this[FactorySymbol]({
123
+ ast_type: "Builtin",
124
+ type: VectorType(this.element_type),
125
+ loc_id: get_location_id(),
126
+ builtin: "MatrixGetCol",
127
+ type_parameters: [this.element_type],
128
+ arguments: [this[AstSymbol], c],
129
+ });
130
+ }
131
+ /**
132
+ * Returns the transpose of this matrix.
133
+ *
134
+ * @returns A new MatrixExpr with rows and columns swapped
135
+ */
136
+ transpose() {
137
+ return this[FactorySymbol]({
138
+ ast_type: "Builtin",
139
+ type: MatrixType(this.element_type),
140
+ loc_id: get_location_id(),
141
+ builtin: "MatrixTranspose",
142
+ type_parameters: [this.element_type],
143
+ arguments: [this[AstSymbol]],
144
+ });
145
+ }
146
+ /**
147
+ * Flattens this matrix into a vector (row-major order).
148
+ *
149
+ * @returns A VectorExpr containing all matrix elements in row-major order
150
+ */
151
+ toVector() {
152
+ return this[FactorySymbol]({
153
+ ast_type: "Builtin",
154
+ type: VectorType(this.element_type),
155
+ loc_id: get_location_id(),
156
+ builtin: "MatrixToVector",
157
+ type_parameters: [this.element_type],
158
+ arguments: [this[AstSymbol]],
159
+ });
160
+ }
161
+ /**
162
+ * Converts this matrix to a nested Array of Arrays.
163
+ *
164
+ * @returns An ArrayExpr of ArrayExprs containing the matrix elements
165
+ */
166
+ toArray() {
167
+ return this[FactorySymbol]({
168
+ ast_type: "Builtin",
169
+ type: ArrayType(ArrayType(this.element_type)),
170
+ loc_id: get_location_id(),
171
+ builtin: "MatrixToArray",
172
+ type_parameters: [this.element_type],
173
+ arguments: [this[AstSymbol]],
174
+ });
175
+ }
176
+ /**
177
+ * Converts this matrix to an Array of row Vectors.
178
+ *
179
+ * @returns An ArrayExpr of VectorExprs, one per row
180
+ */
181
+ toRows() {
182
+ return this[FactorySymbol]({
183
+ ast_type: "Builtin",
184
+ type: ArrayType(VectorType(this.element_type)),
185
+ loc_id: get_location_id(),
186
+ builtin: "MatrixToRows",
187
+ type_parameters: [this.element_type],
188
+ arguments: [this[AstSymbol]],
189
+ });
190
+ }
191
+ mapRows(fn) {
192
+ if (fn instanceof Expr) {
193
+ if (!(fn[TypeSymbol] && fn[TypeSymbol].type === "Function")) {
194
+ throw new Error("Expected a Function expression");
195
+ }
196
+ const fnType = fn[TypeSymbol];
197
+ const output_type = fnType.output;
198
+ if (fnType.inputs.length !== 2) {
199
+ throw new Error(`Expected Function to have 2 inputs, got ${fnType.inputs.length} inputs`);
200
+ }
201
+ if (!isSubtype(VectorType(this.element_type), fnType.inputs[0])) {
202
+ throw new Error(`Expected Function first input to be ${printType(VectorType(this.element_type))}, got ${printType(fnType.inputs[0])}`);
203
+ }
204
+ if (!isTypeEqual(IntegerType, fnType.inputs[1])) {
205
+ throw new Error(`Expected Function second input to be ${printType(IntegerType)}, got ${printType(fnType.inputs[1])}`);
206
+ }
207
+ // output_type is VectorType<T2>, extract T2 for the result MatrixType
208
+ const result_elem_type = output_type.element;
209
+ return this[FactorySymbol]({
210
+ ast_type: "Builtin",
211
+ type: MatrixType(result_elem_type),
212
+ loc_id: get_location_id(),
213
+ builtin: "MatrixMapRows",
214
+ type_parameters: [this.element_type, result_elem_type],
215
+ arguments: [this[AstSymbol], fn[AstSymbol]],
216
+ });
217
+ }
218
+ else {
219
+ const functionExpr = Expr.function([VectorType(this.element_type), IntegerType], undefined, fn);
220
+ return this.mapRows(functionExpr);
221
+ }
222
+ }
223
+ }
224
+ //# sourceMappingURL=matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.js","sourceRoot":"","sources":["../../../src/expr/matrix.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAiC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvK,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAe,MAAM,WAAW,CAAC;AAMpF;;;;;;;GAOG;AACH,MAAM,OAAO,UAA0B,SAAQ,IAAmB;IAC5C;IAApB,YAAoB,YAAe,EAAE,GAAQ,EAAE,UAAkB;QAC/D,KAAK,CAAC,GAAG,CAAC,IAAqB,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;QADhC,iBAAY,GAAZ,YAAY,CAAG;IAEnC,CAAC;IAED;;;;OAIG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,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