numbl 0.4.19 → 0.4.22

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 (314) hide show
  1. package/binding.gyp +12 -6
  2. package/dist-browser/browser/index.d.ts +1 -1
  3. package/dist-browser/browser/mip.d.ts +7 -0
  4. package/dist-browser/browser/protocol.d.ts +1 -1
  5. package/dist-browser/browser.js +1 -1
  6. package/dist-browser/db/operations.d.ts +0 -1
  7. package/dist-browser/gpuHelper.d.ts +29 -0
  8. package/dist-browser/hooks/projectFilesState.d.ts +37 -0
  9. package/dist-browser/numbl-core/execSession.d.ts +39 -0
  10. package/dist-browser/numbl-core/executeCode.d.ts +10 -1
  11. package/dist-browser/numbl-core/executors/classification.d.ts +2 -10
  12. package/dist-browser/numbl-core/executors/jit/backend.d.ts +65 -0
  13. package/dist-browser/numbl-core/executors/jit/cBackend.d.ts +22 -0
  14. package/dist-browser/numbl-core/executors/jit/callExecutor.d.ts +13 -44
  15. package/dist-browser/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
  16. package/dist-browser/numbl-core/executors/jit/jsBackend.d.ts +15 -0
  17. package/dist-browser/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
  18. package/dist-browser/numbl-core/executors/jit/session.d.ts +1 -1
  19. package/dist-browser/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
  20. package/dist-browser/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
  21. package/dist-browser/numbl-core/executors/lowering.d.ts +38 -96
  22. package/dist-browser/numbl-core/executors/plugins.d.ts +14 -28
  23. package/dist-browser/numbl-core/executors/registry.d.ts +32 -133
  24. package/dist-browser/numbl-core/executors/types.d.ts +30 -92
  25. package/dist-browser/numbl-core/functionResolve.d.ts +3 -13
  26. package/dist-browser/numbl-core/helpers/check-helpers.d.ts +0 -5
  27. package/dist-browser/numbl-core/helpers/glob.d.ts +14 -0
  28. package/dist-browser/numbl-core/helpers/linsolve.d.ts +3 -13
  29. package/dist-browser/numbl-core/helpers/reduction-helpers.d.ts +2 -4
  30. package/dist-browser/numbl-core/helpers/shape-utils.d.ts +10 -0
  31. package/dist-browser/numbl-core/helpers/sparse-direct.d.ts +107 -0
  32. package/dist-browser/numbl-core/helpers/warn.d.ts +9 -0
  33. package/dist-browser/numbl-core/interpreter/builtins/index.d.ts +4 -1
  34. package/dist-browser/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
  35. package/dist-browser/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  36. package/dist-browser/numbl-core/interpreter/builtins/types.d.ts +7 -7
  37. package/dist-browser/numbl-core/interpreter/interpreter.d.ts +6 -6
  38. package/dist-browser/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  39. package/dist-browser/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  40. package/dist-browser/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  41. package/dist-browser/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  42. package/dist-browser/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  43. package/dist-browser/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  44. package/dist-browser/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  45. package/dist-browser/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  46. package/dist-browser/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  47. package/dist-browser/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  48. package/dist-browser/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  49. package/dist-browser/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  50. package/dist-browser/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  51. package/dist-browser/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  52. package/dist-browser/numbl-core/jit/builtins/registry.d.ts +15 -30
  53. package/dist-browser/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  54. package/dist-browser/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  55. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  56. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  57. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  58. package/dist-browser/numbl-core/jit/codegen/emit.d.ts +9 -30
  59. package/dist-browser/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  60. package/dist-browser/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  61. package/dist-browser/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  62. package/dist-browser/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  63. package/dist-browser/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  64. package/dist-browser/numbl-core/jit/codegen/runtime.d.ts +7 -28
  65. package/dist-browser/numbl-core/jit/compileSpec.d.ts +3 -6
  66. package/dist-browser/numbl-core/jit/compileSpecC.d.ts +5 -0
  67. package/dist-browser/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  68. package/dist-browser/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  69. package/dist-browser/numbl-core/jit/lowering/errors.d.ts +3 -15
  70. package/dist-browser/numbl-core/jit/lowering/ir.d.ts +0 -2
  71. package/dist-browser/numbl-core/jit/lowering/lower.d.ts +4 -12
  72. package/dist-browser/numbl-core/jit/lowering/types.d.ts +2 -7
  73. package/dist-browser/numbl-core/jit/numbl/index.d.ts +5 -14
  74. package/dist-browser/numbl-core/jit/parser/index.d.ts +4 -9
  75. package/dist-browser/numbl-core/jit/workspace/workspace.d.ts +32 -136
  76. package/dist-browser/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  77. package/dist-browser/numbl-core/jsUserFunctions.d.ts +10 -12
  78. package/dist-browser/numbl-core/lowering/classInfo.d.ts +4 -1
  79. package/dist-browser/numbl-core/lowering/loweringContext.d.ts +15 -23
  80. package/dist-browser/numbl-core/native/lapack-bridge.d.ts +137 -128
  81. package/dist-browser/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  82. package/dist-browser/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  83. package/dist-browser/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
  84. package/dist-browser/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  85. package/dist-browser/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  86. package/dist-browser/numbl-core/ops/dispatch.d.ts +4 -5
  87. package/dist-browser/numbl-core/parser/types.d.ts +1 -21
  88. package/{dist-lib/numbl-core/runtime → dist-browser/numbl-core/plotting}/axisCommand.d.ts +2 -2
  89. package/dist-browser/{graphics → numbl-core/plotting}/axisLimits.d.ts +14 -2
  90. package/dist-browser/numbl-core/plotting/builtins.d.ts +8 -0
  91. package/dist-browser/numbl-core/plotting/colormaps.d.ts +10 -0
  92. package/dist-browser/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  93. package/dist-browser/numbl-core/plotting/imagescExtent.d.ts +19 -0
  94. package/dist-browser/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  95. package/dist-browser/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  96. package/dist-browser/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  97. package/dist-browser/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  98. package/dist-browser/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  99. package/dist-browser/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  100. package/dist-browser/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  101. package/dist-browser/numbl-core/plotting/streamline.d.ts +16 -0
  102. package/{dist-graphics/graphics → dist-browser/numbl-core/plotting}/types.d.ts +9 -7
  103. package/dist-browser/numbl-core/runtime/cow.d.ts +0 -8
  104. package/dist-browser/numbl-core/runtime/refcount.d.ts +0 -3
  105. package/dist-browser/numbl-core/runtime/registerSpecial.d.ts +15 -0
  106. package/dist-browser/numbl-core/runtime/runtime.d.ts +11 -35
  107. package/dist-browser/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  108. package/dist-browser/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  109. package/dist-browser/numbl-core/runtime/types.d.ts +12 -0
  110. package/dist-browser/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  111. package/dist-browser/numbl-core/runtime/utils.d.ts +4 -1
  112. package/dist-browser/numbl-core/version.d.ts +1 -1
  113. package/dist-browser/numbl-core/workspace/workspace.d.ts +64 -0
  114. package/dist-browser/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
  115. package/dist-browser/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
  116. package/dist-browser/ts-lapack/src/SRC/dlae2.d.ts +4 -0
  117. package/dist-browser/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
  118. package/dist-browser/ts-lapack/src/SRC/dlanst.d.ts +1 -0
  119. package/dist-browser/ts-lapack/src/SRC/dlansy.d.ts +1 -0
  120. package/dist-browser/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
  121. package/dist-browser/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
  122. package/dist-browser/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
  123. package/dist-browser/ts-lapack/src/SRC/dsyev.d.ts +1 -0
  124. package/dist-browser/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
  125. package/dist-browser/vfs/syncVfsChanges.d.ts +2 -2
  126. package/dist-cli/cli.js +74241 -77271
  127. package/dist-graphics/graphics/FigureView.d.ts +1 -1
  128. package/dist-graphics/graphics/SurfView.d.ts +3 -2
  129. package/dist-graphics/graphics/drawPlot.d.ts +1 -1
  130. package/dist-graphics/graphics/exportFigureHdf5.d.ts +1 -1
  131. package/dist-graphics/graphics/figureHashTransport.d.ts +1 -1
  132. package/dist-graphics/graphics/figureUpload.d.ts +1 -1
  133. package/dist-graphics/graphics/importFigureHdf5.d.ts +1 -1
  134. package/dist-graphics/graphics/openInFigureViewer.d.ts +1 -1
  135. package/dist-graphics/graphics/plotHelpers.d.ts +1 -1
  136. package/dist-graphics/graphics/plotLegend.d.ts +1 -1
  137. package/dist-graphics/graphics/plotMarkers.d.ts +1 -1
  138. package/dist-graphics/graphics/restoreNaNs.d.ts +1 -1
  139. package/dist-graphics/graphics/uihtmlRelay.d.ts +16 -0
  140. package/dist-graphics/graphics-lib.d.ts +3 -3
  141. package/dist-graphics/index.js +294 -328
  142. package/{dist-lib/graphics → dist-graphics/numbl-core/plotting}/axisLimits.d.ts +14 -2
  143. package/dist-graphics/numbl-core/plotting/colormaps.d.ts +10 -0
  144. package/dist-graphics/numbl-core/plotting/imagescExtent.d.ts +19 -0
  145. package/{dist-browser/graphics → dist-graphics/numbl-core/plotting}/types.d.ts +9 -7
  146. package/dist-lib/browser/mip.d.ts +17 -0
  147. package/dist-lib/cli-scan.d.ts +8 -1
  148. package/dist-lib/lib.d.ts +1 -1
  149. package/dist-lib/lib.js +37081 -39889
  150. package/dist-lib/node.js +22 -14
  151. package/dist-lib/numbl-core/execSession.d.ts +39 -0
  152. package/dist-lib/numbl-core/executeCode.d.ts +10 -1
  153. package/dist-lib/numbl-core/executors/classification.d.ts +2 -10
  154. package/dist-lib/numbl-core/executors/jit/backend.d.ts +65 -0
  155. package/dist-lib/numbl-core/executors/jit/cBackend.d.ts +22 -0
  156. package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +13 -44
  157. package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
  158. package/dist-lib/numbl-core/executors/jit/jsBackend.d.ts +15 -0
  159. package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
  160. package/dist-lib/numbl-core/executors/jit/session.d.ts +1 -1
  161. package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
  162. package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
  163. package/dist-lib/numbl-core/executors/lowering.d.ts +38 -96
  164. package/dist-lib/numbl-core/executors/plugins.d.ts +14 -28
  165. package/dist-lib/numbl-core/executors/registry.d.ts +32 -133
  166. package/dist-lib/numbl-core/executors/types.d.ts +30 -92
  167. package/dist-lib/numbl-core/functionResolve.d.ts +3 -13
  168. package/dist-lib/numbl-core/helpers/check-helpers.d.ts +0 -5
  169. package/dist-lib/numbl-core/helpers/glob.d.ts +14 -0
  170. package/dist-lib/numbl-core/helpers/linsolve.d.ts +3 -13
  171. package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +2 -4
  172. package/dist-lib/numbl-core/helpers/shape-utils.d.ts +10 -0
  173. package/dist-lib/numbl-core/helpers/sparse-direct.d.ts +107 -0
  174. package/dist-lib/numbl-core/helpers/warn.d.ts +9 -0
  175. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +4 -1
  176. package/dist-lib/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
  177. package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  178. package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +7 -7
  179. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +6 -6
  180. package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  181. package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  182. package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  183. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  184. package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  185. package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  186. package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  187. package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  188. package/dist-lib/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  189. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  190. package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  191. package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  192. package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  193. package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  194. package/dist-lib/numbl-core/jit/builtins/registry.d.ts +15 -30
  195. package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  196. package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  197. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  198. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  199. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  200. package/dist-lib/numbl-core/jit/codegen/emit.d.ts +9 -30
  201. package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  202. package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  203. package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  204. package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  205. package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  206. package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +7 -28
  207. package/dist-lib/numbl-core/jit/compileSpec.d.ts +3 -6
  208. package/dist-lib/numbl-core/jit/compileSpecC.d.ts +5 -0
  209. package/dist-lib/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  210. package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  211. package/dist-lib/numbl-core/jit/lowering/errors.d.ts +3 -15
  212. package/dist-lib/numbl-core/jit/lowering/ir.d.ts +0 -2
  213. package/dist-lib/numbl-core/jit/lowering/lower.d.ts +4 -12
  214. package/dist-lib/numbl-core/jit/lowering/types.d.ts +2 -7
  215. package/dist-lib/numbl-core/jit/numbl/index.d.ts +5 -14
  216. package/dist-lib/numbl-core/jit/parser/index.d.ts +4 -9
  217. package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +32 -136
  218. package/dist-lib/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  219. package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -12
  220. package/dist-lib/numbl-core/lowering/classInfo.d.ts +4 -1
  221. package/dist-lib/numbl-core/lowering/loweringContext.d.ts +15 -23
  222. package/dist-lib/numbl-core/native/lapack-bridge.d.ts +137 -128
  223. package/dist-lib/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  224. package/dist-lib/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  225. package/dist-lib/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
  226. package/dist-lib/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  227. package/dist-lib/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  228. package/dist-lib/numbl-core/ops/dispatch.d.ts +4 -5
  229. package/dist-lib/numbl-core/parser/types.d.ts +1 -21
  230. package/{dist-browser/numbl-core/runtime → dist-lib/numbl-core/plotting}/axisCommand.d.ts +2 -2
  231. package/{dist-graphics/graphics → dist-lib/numbl-core/plotting}/axisLimits.d.ts +14 -2
  232. package/dist-lib/numbl-core/plotting/builtins.d.ts +8 -0
  233. package/dist-lib/numbl-core/plotting/colormaps.d.ts +10 -0
  234. package/dist-lib/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  235. package/dist-lib/numbl-core/plotting/imagescExtent.d.ts +19 -0
  236. package/dist-lib/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  237. package/dist-lib/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  238. package/dist-lib/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  239. package/dist-lib/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  240. package/dist-lib/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  241. package/dist-lib/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  242. package/dist-lib/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  243. package/dist-lib/numbl-core/plotting/streamline.d.ts +16 -0
  244. package/dist-lib/{graphics → numbl-core/plotting}/types.d.ts +9 -7
  245. package/dist-lib/numbl-core/runtime/cow.d.ts +0 -8
  246. package/dist-lib/numbl-core/runtime/refcount.d.ts +0 -3
  247. package/dist-lib/numbl-core/runtime/registerSpecial.d.ts +15 -0
  248. package/dist-lib/numbl-core/runtime/runtime.d.ts +11 -35
  249. package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  250. package/dist-lib/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  251. package/dist-lib/numbl-core/runtime/types.d.ts +12 -0
  252. package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  253. package/dist-lib/numbl-core/runtime/utils.d.ts +4 -1
  254. package/dist-lib/numbl-core/version.d.ts +1 -1
  255. package/dist-lib/numbl-core/workspace/workspace.d.ts +64 -0
  256. package/dist-lib/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
  257. package/dist-lib/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
  258. package/dist-lib/ts-lapack/src/SRC/dlae2.d.ts +4 -0
  259. package/dist-lib/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
  260. package/dist-lib/ts-lapack/src/SRC/dlanst.d.ts +1 -0
  261. package/dist-lib/ts-lapack/src/SRC/dlansy.d.ts +1 -0
  262. package/dist-lib/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
  263. package/dist-lib/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
  264. package/dist-lib/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
  265. package/dist-lib/ts-lapack/src/SRC/dsyev.d.ts +1 -0
  266. package/dist-lib/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
  267. package/dist-lib/vfs/unzipToFiles.d.ts +7 -0
  268. package/dist-plot-viewer/assets/index-C0fIevlp.js +4504 -0
  269. package/dist-plot-viewer/index.html +1 -1
  270. package/dist-site-viewer/assets/index-BDaviCH6.js +4832 -0
  271. package/dist-site-viewer/assets/numbl-worker-D6m4K2PP.js +5691 -0
  272. package/dist-site-viewer/index.html +2 -2
  273. package/native/lapack_eig.cpp +156 -0
  274. package/native/numbl_addon.cpp +8 -12
  275. package/native/numbl_addon_common.h +14 -5
  276. package/package.json +6 -5
  277. package/dist-browser/hooks/useProjectFiles.d.ts +0 -45
  278. package/dist-browser/numbl-core/executors/context.d.ts +0 -76
  279. package/dist-browser/numbl-core/executors/index.d.ts +0 -14
  280. package/dist-browser/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  281. package/dist-browser/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  282. package/dist-browser/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  283. package/dist-browser/numbl-core/helpers/dummy.d.ts +0 -5
  284. package/dist-browser/numbl-core/jit/runtime/context.d.ts +0 -23
  285. package/dist-browser/numbl-core/jit/runtime/inferType.d.ts +0 -10
  286. package/dist-browser/numbl-core/jit/runtime/value.d.ts +0 -101
  287. package/dist-browser/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  288. package/dist-browser/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  289. package/dist-browser/numbl-core/native/bridge-resolve.d.ts +0 -14
  290. package/dist-browser/numbl-core/runtime/plotUtils.d.ts +0 -336
  291. package/dist-browser/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  292. package/dist-graphics/graphics/surfColormap.d.ts +0 -2
  293. package/dist-lib/numbl-core/executors/context.d.ts +0 -76
  294. package/dist-lib/numbl-core/executors/index.d.ts +0 -14
  295. package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  296. package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  297. package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  298. package/dist-lib/numbl-core/helpers/dummy.d.ts +0 -5
  299. package/dist-lib/numbl-core/jit/runtime/context.d.ts +0 -23
  300. package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +0 -10
  301. package/dist-lib/numbl-core/jit/runtime/value.d.ts +0 -101
  302. package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  303. package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  304. package/dist-lib/numbl-core/native/bridge-resolve.d.ts +0 -14
  305. package/dist-lib/numbl-core/runtime/plotUtils.d.ts +0 -336
  306. package/dist-lib/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  307. package/dist-plot-viewer/assets/index-YeXWXIxH.js +0 -4504
  308. package/dist-site-viewer/assets/index-B5Y5557F.js +0 -4831
  309. package/dist-site-viewer/assets/numbl-worker-CtoT7C0f.js +0 -5355
  310. package/native/elemwise.cpp +0 -360
  311. package/native/unary_elemwise.cpp +0 -67
  312. /package/dist-browser/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  313. /package/dist-graphics/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  314. /package/dist-lib/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
@@ -1,35 +0,0 @@
1
- /**
2
- * cjit-call — C-backed JIT executor for user-function calls.
3
- *
4
- * Mirrors `callExecutor.ts` (the JS-emit sibling) but routes the
5
- * specialization's emitted code through `compileSpecC` →
6
- * `cc -shared -fPIC -O3` → `dlopen` via koffi instead of
7
- * `new Function(source)`. The dispatch, gating, and caching
8
- * conventions are otherwise identical, so a sibling executor can
9
- * register alongside the JS path at the same opt level without any
10
- * arbitration in the dispatcher beyond cost-based selection.
11
- *
12
- * Declines when:
13
- * - `nativeBridge` / `koffi` are not available (browser).
14
- * - Any param or output type fails the C-FFI feasibility check
15
- * (`compilerTypeToCDecl` returns null).
16
- * - mtoc2 throws `UnsupportedConstruct` / `JitTypeError` at lowering.
17
- */
18
- import type { Executor } from "../types.js";
19
- import { type JitType } from "../../jitTypes.js";
20
- import type { FunctionDef } from "../../interpreter/types.js";
21
- import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
22
- import { type CompiledC } from "./compileC.js";
23
- interface CJitCallData {
24
- readonly fn: FunctionDef;
25
- readonly nargout: number;
26
- readonly argTypes: readonly JitType[];
27
- readonly compilerArgTypes: readonly CompilerType[];
28
- readonly args: readonly unknown[];
29
- }
30
- interface CompiledArtifact {
31
- readonly compiled: CompiledC;
32
- readonly signature: SpecCSignature;
33
- }
34
- export declare const cJitCallExecutor: Executor<CJitCallData, CompiledArtifact | null>;
35
- export {};
@@ -1,31 +0,0 @@
1
- /**
2
- * cjit-loop — C-backed JIT executor for outermost For/While
3
- * loops. Mirrors `loopExecutor.ts` (JS-emit sibling) but routes
4
- * through `compileSpecC` → `cc -shared` → `koffi`. See
5
- * `cJitCallExecutor.ts` for the marshaling protocol; this file just
6
- * adapts the loop-shape `data` to the same C-side pipeline.
7
- */
8
- import type { Executor } from "../types.js";
9
- import { type JitType } from "../../jitTypes.js";
10
- import type { Stmt } from "../../parser/index.js";
11
- import type { ConstHandle } from "../classification.js";
12
- import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
13
- import { type CompiledC } from "./compileC.js";
14
- interface CJitLoopData {
15
- readonly loopStmt: Stmt & {
16
- type: "For" | "While";
17
- };
18
- readonly inputs: readonly string[];
19
- readonly outputs: readonly string[];
20
- readonly inputTypes: readonly JitType[];
21
- readonly compilerInputTypes: readonly CompilerType[];
22
- readonly constHandles: readonly ConstHandle[];
23
- readonly currentFile: string;
24
- readonly cacheKey: string;
25
- }
26
- interface CompiledArtifact {
27
- readonly compiled: CompiledC;
28
- readonly signature: SpecCSignature;
29
- }
30
- export declare const cJitLoopExecutor: Executor<CJitLoopData, CompiledArtifact | null>;
31
- export {};
@@ -1,29 +0,0 @@
1
- /**
2
- * cjit-top-level — C-backed JIT executor for whole-script bodies.
3
- *
4
- * Mirrors `topLevelExecutor.ts` (JS-emit sibling) but routes through
5
- * `compileSpecC` → `cc -shared` → `koffi`. See `cJitCallExecutor.ts`
6
- * for the marshaling protocol. Same `isAllSuppressed` gate as the JS
7
- * sibling so `displayAssign`/`displayResult` semantics stay on the
8
- * interpreter path.
9
- */
10
- import type { Executor } from "../types.js";
11
- import { type JitType } from "../../jitTypes.js";
12
- import type { Stmt } from "../../parser/index.js";
13
- import { type Type as CompilerType, type SpecCSignature } from "../../jit/index.js";
14
- import { type CompiledC } from "./compileC.js";
15
- interface CJitTopLevelData {
16
- readonly stmts: readonly Stmt[];
17
- readonly inputs: readonly string[];
18
- readonly outputs: readonly string[];
19
- readonly inputTypes: readonly JitType[];
20
- readonly compilerInputTypes: readonly CompilerType[];
21
- readonly currentFile: string;
22
- readonly cacheKey: string;
23
- }
24
- interface CompiledArtifact {
25
- readonly compiled: CompiledC;
26
- readonly signature: SpecCSignature;
27
- }
28
- export declare const cJitTopLevelExecutor: Executor<CJitTopLevelData, CompiledArtifact | null>;
29
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Dummy no-op built-in function names.
3
- * Used as placeholders for unsupported functionality.
4
- */
5
- export declare function getDummyBuiltinNames(): string[];
@@ -1,23 +0,0 @@
1
- /**
2
- * Host bag passed to `Builtin.call` for the interpreter backend.
3
- *
4
- * Mirrors nexl's `RuntimeContext`. Side-effecty builtins (`disp`,
5
- * `fprintf`, `error`, plot dispatch, …) consult `helpers.write` to
6
- * emit text. Pure builtins ignore the bag.
7
- *
8
- * `write` is the JS analogue of C's `printf`. The CLI provides one
9
- * backed by `process.stdout.write`; the browser provides one that
10
- * pushes lines to the console panel; future test runners provide
11
- * one that captures into a buffer for byte-for-byte comparison.
12
- *
13
- * As the interpreter grows, additional hooks (`time`, `plot`,
14
- * `error`, …) will join this bag. Adding a hook here is the
15
- * single source of truth — every host supplies it.
16
- */
17
- export interface RuntimeHelpers {
18
- /** Append text to stdout. No implicit newline. */
19
- write(s: string): void;
20
- }
21
- export interface RuntimeContext {
22
- helpers: RuntimeHelpers;
23
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Map a runtime value back into a Type. Used by the interpreter to
3
- * feed `argTypes` into a builtin's `transfer` (for validation) and
4
- * `call` (for type-dispatched implementations) — so that the three
5
- * hooks (`emitC`, `emitJs`, `call`) all branch on the same `argTypes`
6
- * shape rather than reinventing dispatch per-backend.
7
- */
8
- import { type Type } from "../lowering/types.js";
9
- import { type RuntimeValue } from "./value.js";
10
- export declare function inferTypeFromValue(v: RuntimeValue): Type;
@@ -1,101 +0,0 @@
1
- /**
2
- * Runtime value carrier for the interpreter backend. Mirrors nexl's
3
- * `RuntimeValue` design: a discriminated-via-typeof union for the
4
- * common cases plus tagged-object wrappers for the kinds JS can't
5
- * distinguish natively.
6
- *
7
- * MVP scope (Phase 3): real-double scalars, booleans (logical),
8
- * strings (double-quoted), chars (single-quoted), real-double tensors.
9
- * Complex / structs / classes / handles / void / cells follow as the
10
- * type lattice and interpreter coverage expand.
11
- *
12
- * Builtin `call` implementations narrow via `typeof` / `isTensor` /
13
- * `isChar` and dispatch through the same `argTypes` shape that
14
- * `emitC` / `emitJs` consume — keeping the three backends parallel.
15
- */
16
- export type RuntimeValue = number | boolean | string | RuntimeTensor | RuntimeChar | RuntimeComplex | RuntimeStruct | RuntimeHandle;
17
- /** Function handle. Named handles (`@foo`) keep the source name and
18
- * dispatch via the interpreter's normal call-site resolution at the
19
- * call point. Anonymous handles (`@(p1, ...) body`) capture every
20
- * visible binding by value at the @-site and run `body` in a fresh
21
- * env when invoked. */
22
- export type RuntimeHandle = {
23
- readonly mtoc2Handle: true;
24
- readonly kind: "named";
25
- readonly name: string;
26
- } | {
27
- readonly mtoc2Handle: true;
28
- readonly kind: "anon";
29
- readonly params: ReadonlyArray<string>;
30
- readonly body: unknown;
31
- readonly captures: Readonly<Record<string, RuntimeValue>>;
32
- };
33
- /** Narrow a RuntimeValue to a function handle. */
34
- export declare function isHandleValue(v: RuntimeValue): v is RuntimeHandle;
35
- /** Struct/object — plain JS object whose keys are field names. The
36
- * c-aot path emits a typedef'd C struct; the JS path just uses a
37
- * bare object. Recurses through field values that may themselves be
38
- * any RuntimeValue (including nested structs). */
39
- export type RuntimeStruct = {
40
- readonly [field: string]: RuntimeValue;
41
- };
42
- /** Real or complex double tensor. `data` is the real lane,
43
- * column-major to match numbl's `RuntimeTensor.data`. `imag` is the
44
- * imaginary lane (same length and orientation as `data`); absent for
45
- * real-only tensors. Mirrors the C representation's split-buffer
46
- * layout — codegen / interpreter dispatch on `imag !== undefined`
47
- * the way the C side dispatches on `imag != NULL`. The shape array
48
- * is owned by the value; do not mutate.
49
- *
50
- * `isLogical` flags this tensor as the result of a logical operation
51
- * (`~`, `<`, `==`, `&&`, …) so downstream index-slot resolution can
52
- * treat it as a mask instead of an IndexVec — same role as numbl's
53
- * `_isLogical` on its RuntimeTensor. The flag is one-way (once set,
54
- * stays set across copies via the helper) and absent on numeric
55
- * tensors; helper sites that don't care leave it undefined. */
56
- export interface RuntimeTensor {
57
- readonly mtoc2Tag: "tensor";
58
- readonly shape: number[];
59
- readonly data: Float64Array;
60
- readonly imag?: Float64Array;
61
- readonly isLogical?: boolean;
62
- }
63
- /** Single-quoted char-array (`'foo'`). Distinct from `"foo"` strings
64
- * because numbl treats them differently: `length('foo') === 3` but
65
- * `length("foo") === 1`. */
66
- export interface RuntimeChar {
67
- readonly mtoc2Tag: "char";
68
- readonly value: string;
69
- }
70
- /** Scalar complex value — JS-side analogue of the `mtoc2_complex_t`
71
- * struct in `cscalar.h`. The cscalar runtime helpers
72
- * (`mtoc2_cmake`, `mtoc2_creal`, etc.) consume and produce this
73
- * shape. We DON'T tag it the way tensor / char are tagged because
74
- * emitJs literals (`{re: 0, im: 1}`) and runtime calls produce the
75
- * bare object form — adding a tag would force every helper to
76
- * re-wrap. Use `isComplexValue` for narrowing. */
77
- export interface RuntimeComplex {
78
- readonly re: number;
79
- readonly im: number;
80
- }
81
- /** Narrow a RuntimeValue to a complex scalar. Matches the cscalar
82
- * helpers' `{re, im}` shape. */
83
- export declare function isComplexValue(v: RuntimeValue): v is RuntimeComplex;
84
- export declare function makeTensor(shape: number[], data: Float64Array): RuntimeTensor;
85
- /** Complex tensor with both lanes. `data` is the real lane, `imag`
86
- * the imaginary lane; both must have the same length and match the
87
- * product of `shape`. */
88
- export declare function makeComplexTensor(shape: number[], data: Float64Array, imag: Float64Array): RuntimeTensor;
89
- /** True iff this tensor carries an imaginary lane. */
90
- export declare function isComplexTensor(v: RuntimeTensor): boolean;
91
- export declare function makeChar(value: string): RuntimeChar;
92
- export declare function isTensor(v: RuntimeValue): v is RuntimeTensor;
93
- export declare function isChar(v: RuntimeValue): v is RuntimeChar;
94
- /** Materialize a scalar value as a plain JS number. Used by builtins
95
- * that need to treat scalar tensors and scalar numbers uniformly. */
96
- export declare function toScalarNumber(v: RuntimeValue): number;
97
- /** MATLAB-style truthiness — for `if` / `while` / `&&` / `||`.
98
- * Scalar non-zero, all-elements-non-zero for tensors, nonempty
99
- * text. The interpreter uses this; codegen relies on the matching
100
- * C-side `__nonzero` helpers. */
101
- export declare function isTruthy(v: RuntimeValue): boolean;
@@ -1,59 +0,0 @@
1
- /**
2
- * Driver-script prologue extractor.
3
- *
4
- * mtoc2 accepts `addpath(<literal>, ...)` only as a leading sequence
5
- * of top-level statements in the driver script. Each call is parsed
6
- * into a list of directory arguments (literal strings only) plus an
7
- * optional trailing `-begin` / `-end` flag.
8
- *
9
- * Two call sites:
10
- * - The CLI invokes the extractor before scanning the filesystem so
11
- * it knows which directories to fold into the workspace search
12
- * path.
13
- * - `translateProject` / the interpreter run path invoke it purely
14
- * to drop the prologue statements from the driver AST before
15
- * lowering / execution begins. The dirs are ignored there.
16
- *
17
- * The two calls are idempotent: same input AST → same dirs and
18
- * remaining body, so it doesn't matter that they parse twice.
19
- *
20
- * Any `addpath` left in the AST (anywhere outside the leading prefix)
21
- * still hits the `addpath` builtin's `transfer`, which errors with a
22
- * span-attributed message. `rmpath` / `savepath` are always rejected
23
- * by their own `transfer` hooks; the extractor never accepts them.
24
- *
25
- * Function-file auto-invoke: a driver whose body (after the prologue)
26
- * contains only function/classdef definitions and no top-level
27
- * statements is a "function file" — running it means calling its
28
- * first function with zero arguments. The extractor appends a
29
- * synthesized 0-arg call so every execution path (interpreter,
30
- * js-aot, c-aot) treats it the same way. Mirrors numbl's
31
- * `Interpreter.run` (interpreter.ts).
32
- */
33
- import type { AbstractSyntaxTree, Stmt, Span } from "../parser/index.js";
34
- export interface AddPathDir {
35
- /** Directory string as the user wrote it. Relative paths are NOT
36
- * resolved here; callers resolve against `process.cwd()`. */
37
- dir: string;
38
- /** Whether the directory inserts at the front of the addpath block
39
- * (default / `-begin`) or after the CLI `--path` dirs at the end
40
- * (`-end`). */
41
- position: "begin" | "end";
42
- /** Span of the originating `addpath(...)` call. */
43
- span: Span;
44
- }
45
- export interface DriverPrologueOpts {
46
- /** Set to `true` when a filesystem is available to resolve dirs
47
- * against (CLI). When `false` or omitted (web IDE, in-memory
48
- * translate, vitest), any leading `addpath` call is itself an
49
- * `UnsupportedConstruct`. */
50
- allowAddpath?: boolean;
51
- }
52
- export interface DriverPrologueResult {
53
- addpaths: AddPathDir[];
54
- /** Top-level statements after the prologue. Suitable for direct
55
- * use with `Lowerer.lowerProgram` (via a shallow AST copy with
56
- * this `body`) or `Interpreter.runProgram`. */
57
- remainingBody: Stmt[];
58
- }
59
- export declare function extractDriverPrologue(ast: AbstractSyntaxTree, opts?: DriverPrologueOpts): DriverPrologueResult;
@@ -1,62 +0,0 @@
1
- /**
2
- * Loader for `.mtoc2.js` user functions.
3
- *
4
- * A `.mtoc2.js` file is plain JavaScript with no mtoc2 dependency.
5
- * The loader evaluates it as a CommonJS-style module (`exports` and
6
- * `module.exports` are the only injected names) and reads four
7
- * exports to assemble a workspace-scoped `Builtin`:
8
- *
9
- * exports.name — string, must match the file's basename.
10
- * exports.transfer — (argTypes, nargout) -> Type[]. Raw mtoc2 Type
11
- * objects in, raw Type objects out. Throws
12
- * `Error` on bad input.
13
- * exports.emit — ({argsC, prefix, ...}) -> string. C expression
14
- * for the call. Use `prefix` to name any private
15
- * C helpers (kept collision-free across files).
16
- * exports.cBody — ({prefix}) -> string. C source (helper
17
- * function definitions) injected once per
18
- * translation unit. Use the same `prefix` as
19
- * `emit`.
20
- * exports.cHeaders? — string[] of additional `#include` lines to
21
- * activate (optional).
22
- *
23
- * Prefix shape: `mtoc2_user_<safe_funcname>__<8hex>__` where the hex
24
- * is the FNV-1a hash of the workspace-relative file path. Including
25
- * the path in the hash makes the prefix unique across all `.mtoc2.js`
26
- * files in the workspace, even if two files happen to define
27
- * functions with overlapping internal names.
28
- */
29
- import type { Builtin } from "../builtins/registry.js";
30
- /** Resolved sibling file: the relative path (used by the build to
31
- * pick a unique on-disk name) plus the file's text. */
32
- export interface ResolvedCSource {
33
- /** Path as written by the user in `exports.cSources` (e.g.
34
- * `"impl.c"` or `"sub/helpers.h"`). */
35
- relPath: string;
36
- /** File text the build will write to disk. */
37
- source: string;
38
- }
39
- /** Loader output: the assembled `Builtin` plus the user-supplied C
40
- * sibling files the framework needs to thread through to the build
41
- * pipeline. */
42
- export interface LoadedUserFunction {
43
- builtin: Builtin;
44
- cSources: ResolvedCSource[];
45
- }
46
- /** Evaluate a `.mtoc2.js` file and return its assembled `Builtin`
47
- * plus the user-supplied sibling C files (`cSources`).
48
- *
49
- * - `fileName` — the .mtoc2.js's full path (used for diagnostics and
50
- * to resolve sibling paths).
51
- * - `expectedName` — what numbl's workspace registered the file
52
- * under (derived from the file's basename / package path); we
53
- * validate the user's `exports.name` matches so a typo / rename
54
- * surfaces here rather than at the first call site.
55
- * - `relPath` — workspace-relative path used for the prefix hash.
56
- * - `readSibling(p)` — given a path-key relative to the .mtoc2.js's
57
- * directory, return the sibling file's source text. Used to pull
58
- * `cSources` entries out of the workspace's file map (which is
59
- * the same regardless of CLI vs web IDE). Returns `undefined` if
60
- * the file is not in the workspace; the loader throws a clear
61
- * error pointing at the missing path. */
62
- export declare function loadMtoc2UserFunction(fileName: string, source: string, expectedName: string, relPath: string, readSibling: (siblingRelPath: string) => string | undefined): LoadedUserFunction;
@@ -1,14 +0,0 @@
1
- /**
2
- * Centralized LAPACK bridge resolution with fallback and one-time logging.
3
- *
4
- * Tries the native bridge first; falls back to ts-lapack (pure TypeScript).
5
- */
6
- import { type LapackBridge } from "./lapack-bridge.js";
7
- /**
8
- * Get the effective LAPACK bridge for a given operation.
9
- *
10
- * @param opName Operation name for logging (e.g. "inv", "qr")
11
- * @param method Optional method to check on native bridge. If native bridge
12
- * lacks this method, falls back to ts-lapack.
13
- */
14
- export declare function getEffectiveBridge(opName: string, method?: keyof LapackBridge): LapackBridge;