@eagleoutice/flowr 2.17.5 → 2.17.6

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 (357) hide show
  1. package/README.md +13 -51
  2. package/abstract-interpretation/absint-inference.d.ts +4 -4
  3. package/abstract-interpretation/absint-inference.js +11 -11
  4. package/abstract-interpretation/abstract-semantics.d.ts +2 -1
  5. package/abstract-interpretation/branch-paths-interpreter.d.ts +1 -0
  6. package/abstract-interpretation/branch-paths-interpreter.js +60 -0
  7. package/abstract-interpretation/branch-paths.d.ts +60 -0
  8. package/abstract-interpretation/branch-paths.js +120 -0
  9. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +6 -1
  10. package/abstract-interpretation/data-frame/dataframe-semantics.js +60 -1
  11. package/abstract-interpretation/data-frame/semantics.js +4 -10
  12. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
  13. package/cli/repl/core.js +51 -0
  14. package/control-flow/cfg-dead-code.js +12 -7
  15. package/data/packed.d.ts +10 -0
  16. package/data/packed.js +33 -0
  17. package/data/r-base-guards.generated.d.ts +7 -0
  18. package/data/r-base-guards.generated.js +12 -0
  19. package/data/r-datasets.generated.d.ts +4 -0
  20. package/data/r-datasets.generated.js +10 -0
  21. package/data/r-formals.generated.d.ts +4 -0
  22. package/data/r-formals.generated.js +10 -0
  23. package/data/r-group-method-guards.generated.d.ts +3 -0
  24. package/data/r-group-method-guards.generated.js +8 -0
  25. package/dataflow/environments/ambient-effect.d.ts +1000 -0
  26. package/dataflow/environments/ambient-effect.js +234 -0
  27. package/dataflow/environments/ambient-state-name.d.ts +45 -2
  28. package/dataflow/environments/ambient-state-name.js +61 -3
  29. package/dataflow/environments/apply-kill.js +11 -4
  30. package/dataflow/environments/built-in-kinds.d.ts +4 -46
  31. package/dataflow/environments/built-in-kinds.js +6 -2
  32. package/dataflow/environments/built-in-props.d.ts +16 -4
  33. package/dataflow/environments/built-in-props.js +11 -3
  34. package/dataflow/environments/built-in.d.ts +6 -1
  35. package/dataflow/environments/built-in.js +13 -36
  36. package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
  37. package/dataflow/environments/default-builtin-config/base-functions.js +110 -52
  38. package/dataflow/environments/default-builtin-config/base-language.d.ts +1 -1
  39. package/dataflow/environments/default-builtin-config/base-language.js +11 -8
  40. package/dataflow/environments/default-builtin-config/dev-tooling.js +1 -1
  41. package/dataflow/environments/default-builtin-config/file-io.js +6 -4
  42. package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +1 -1
  43. package/dataflow/environments/default-builtin-config/graphics-devices.js +24 -14
  44. package/dataflow/environments/default-builtin-config/guard-builders.d.ts +16 -0
  45. package/dataflow/environments/default-builtin-config/guard-builders.js +29 -0
  46. package/dataflow/environments/default-builtin-config/guards-primitive-lang.d.ts +15 -0
  47. package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +228 -0
  48. package/dataflow/environments/default-builtin-config/guards-primitive-ops.d.ts +11 -0
  49. package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +154 -0
  50. package/dataflow/environments/default-builtin-config/guards.d.ts +9 -0
  51. package/dataflow/environments/default-builtin-config/guards.js +211 -0
  52. package/dataflow/environments/default-builtin-config/index.d.ts +3 -3
  53. package/dataflow/environments/default-builtin-config/index.js +22 -7
  54. package/dataflow/environments/default-builtin-config/media-formats.js +4 -4
  55. package/dataflow/environments/default-builtin-config/package-spatial.js +2 -1
  56. package/dataflow/environments/default-builtin-config/package-tidyverse.js +3 -2
  57. package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
  58. package/dataflow/environments/default-builtin-config/package-utils.js +5 -2
  59. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
  60. package/dataflow/environments/default-builtin-config/parallel-execution.js +3 -1
  61. package/dataflow/environments/default-builtin-config/r-formals.d.ts +13 -0
  62. package/dataflow/environments/default-builtin-config/r-formals.js +110 -0
  63. package/dataflow/environments/default-builtin-config/shared-configs.d.ts +138 -77
  64. package/dataflow/environments/default-builtin-config/shared-configs.js +52 -88
  65. package/dataflow/environments/default-builtin-config/statistics.d.ts +1 -1
  66. package/dataflow/environments/default-builtin-config/statistics.js +4 -1
  67. package/dataflow/environments/diff.js +5 -2
  68. package/dataflow/environments/environment.d.ts +20 -0
  69. package/dataflow/environments/environment.js +39 -4
  70. package/dataflow/environments/group-generics.d.ts +5 -1
  71. package/dataflow/environments/group-generics.js +13 -3
  72. package/dataflow/environments/guard-facts.d.ts +169 -0
  73. package/dataflow/environments/guard-facts.js +26 -0
  74. package/dataflow/environments/identifier.d.ts +9 -1
  75. package/dataflow/environments/identifier.js +5 -0
  76. package/dataflow/environments/pkg-name.d.ts +1 -0
  77. package/dataflow/environments/query-fn-props.d.ts +3 -5
  78. package/dataflow/environments/query-fn-props.js +44 -21
  79. package/dataflow/environments/removal-marker.d.ts +2 -0
  80. package/dataflow/environments/removal-marker.js +5 -0
  81. package/dataflow/eval/resolve/resolve-strings.d.ts +2 -5
  82. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  83. package/dataflow/extractor.js +24 -15
  84. package/dataflow/fn/condition-handlers.d.ts +2 -0
  85. package/dataflow/fn/condition-handlers.js +3 -1
  86. package/dataflow/fn/frame-reflection.d.ts +4 -2
  87. package/dataflow/fn/frame-reflection.js +16 -0
  88. package/dataflow/fn/function-props.js +15 -22
  89. package/dataflow/fn/function-semantics.d.ts +31 -1
  90. package/dataflow/fn/function-semantics.js +15 -0
  91. package/dataflow/fn/guards/built-in-guards.d.ts +112 -0
  92. package/dataflow/fn/guards/built-in-guards.js +199 -0
  93. package/dataflow/fn/guards/call-contracts.d.ts +97 -0
  94. package/dataflow/fn/guards/call-contracts.js +331 -0
  95. package/dataflow/fn/guards/condition-grouping.d.ts +20 -0
  96. package/dataflow/fn/guards/condition-grouping.js +135 -0
  97. package/dataflow/fn/guards/function-guards.d.ts +112 -0
  98. package/dataflow/fn/guards/function-guards.js +1549 -0
  99. package/dataflow/fn/guards/group-method-guards.d.ts +28 -0
  100. package/dataflow/fn/guards/group-method-guards.js +56 -0
  101. package/dataflow/fn/guards/guard-claims.d.ts +125 -0
  102. package/dataflow/fn/guards/guard-claims.js +678 -0
  103. package/dataflow/fn/guards/guard-knowledge.d.ts +41 -0
  104. package/dataflow/fn/guards/guard-knowledge.js +180 -0
  105. package/dataflow/fn/guards/guard-term-syntax.d.ts +9 -0
  106. package/dataflow/fn/guards/guard-term-syntax.js +210 -0
  107. package/dataflow/fn/guards/guard-term.d.ts +136 -0
  108. package/dataflow/fn/guards/guard-term.js +550 -0
  109. package/dataflow/fn/guards/stated-guards.d.ts +13 -0
  110. package/dataflow/fn/guards/stated-guards.js +35 -0
  111. package/dataflow/fn/higher-order-function.d.ts +2 -0
  112. package/dataflow/fn/higher-order-function.js +1 -0
  113. package/dataflow/fn/strict-function.d.ts +4 -0
  114. package/dataflow/fn/strict-function.js +66 -17
  115. package/dataflow/graph/ambient-access.d.ts +4 -1
  116. package/dataflow/graph/ambient-access.js +8 -2
  117. package/dataflow/graph/closure-frames.js +1 -1
  118. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  119. package/dataflow/graph/dataflowgraph-builder.js +2 -2
  120. package/dataflow/graph/df-helper.d.ts +6 -0
  121. package/dataflow/graph/df-helper.js +15 -0
  122. package/dataflow/graph/graph.d.ts +12 -6
  123. package/dataflow/graph/graph.js +21 -28
  124. package/dataflow/info.d.ts +2 -1
  125. package/dataflow/info.js +3 -1
  126. package/dataflow/internal/dispatch-linking.d.ts +3 -1
  127. package/dataflow/internal/dispatch-linking.js +1 -0
  128. package/dataflow/internal/linker.d.ts +2 -0
  129. package/dataflow/internal/linker.js +115 -6
  130. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
  131. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +5 -2
  132. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +2 -1
  133. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -57
  134. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +471 -295
  135. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +13 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
  137. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +106 -19
  138. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  139. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +24 -3
  140. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +1 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +33 -11
  142. package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +4 -0
  143. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +4 -4
  144. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +23 -7
  145. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  146. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +19 -2
  147. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +347 -46
  148. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
  149. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -0
  150. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +110 -16
  151. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -0
  152. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +9 -2
  153. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  154. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -2
  155. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -0
  156. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +28 -0
  157. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +16 -6
  158. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +6 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +37 -2
  160. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +4 -0
  161. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -1
  162. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  163. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +55 -11
  164. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
  165. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -10
  166. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  167. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -0
  168. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +64 -7
  169. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -1
  170. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +160 -20
  171. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
  172. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +6 -0
  173. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +142 -4
  174. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
  175. package/dataflow/internal/process/functions/call/quoted.js +23 -4
  176. package/dataflow/processor.d.ts +2 -0
  177. package/documentation/data/dfg/doc-ambient.d.ts +4 -0
  178. package/documentation/data/dfg/doc-ambient.js +74 -0
  179. package/documentation/wiki-dataflow-graph.js +10 -4
  180. package/documentation/wiki-linter.js +12 -0
  181. package/documentation/wiki-query.js +112 -1
  182. package/linter/linter-rules.d.ts +41 -1
  183. package/linter/linter-rules.js +5 -1
  184. package/linter/rules/call-contracts.d.ts +40 -0
  185. package/linter/rules/call-contracts.js +56 -0
  186. package/linter/rules/cmd-check/bogus-return.js +1 -1
  187. package/linter/rules/cmd-check/call-arguments.js +5 -6
  188. package/linter/rules/cmd-check/cmd-check-util.d.ts +0 -6
  189. package/linter/rules/cmd-check/cmd-check-util.js +0 -28
  190. package/linter/rules/cmd-check/package-hooks.js +2 -1
  191. package/linter/rules/cmd-check/s-three-method-consistency.js +1 -1
  192. package/linter/rules/interactive-functions.d.ts +30 -0
  193. package/linter/rules/interactive-functions.js +87 -0
  194. package/linter/rules/process-state-in-session.js +1 -1
  195. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  196. package/linter/rules/undefined-symbol-util.js +8 -2
  197. package/linter/rules/undefined-symbol.js +18 -7
  198. package/linter/rules/useless-loop.d.ts +1 -1
  199. package/package.json +1 -1
  200. package/project/context/flowr-analyzer-dependencies-context.js +2 -1
  201. package/project/flowr-analyzer.d.ts +1 -0
  202. package/project/flowr-analyzer.js +5 -5
  203. package/project/sigdb/build.js +14 -4
  204. package/project/sigdb/decode.d.ts +3 -0
  205. package/project/sigdb/decode.js +10 -1
  206. package/project/sigdb/guarded-source.d.ts +6 -0
  207. package/project/sigdb/guarded-source.js +29 -0
  208. package/project/sigdb/reader.d.ts +5 -0
  209. package/project/sigdb/reader.js +27 -1
  210. package/project/sigdb/schema.d.ts +24 -2
  211. package/queries/catalog/absint-query/absint-query-format.d.ts +6 -3
  212. package/queries/catalog/absint-query/absint-query-format.js +57 -2
  213. package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +6 -2
  214. package/queries/catalog/ambient-access-query/ambient-access-query-format.js +48 -3
  215. package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -2
  216. package/queries/catalog/cluster-query/cluster-query-format.js +19 -2
  217. package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +5 -2
  218. package/queries/catalog/code-clones-query/code-clones-query-format.js +34 -2
  219. package/queries/catalog/config-query/config-query-format.d.ts +5 -2
  220. package/queries/catalog/config-query/config-query-format.js +41 -2
  221. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +5 -2
  222. package/queries/catalog/control-flow-query/control-flow-query-format.js +19 -2
  223. package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +72 -0
  224. package/queries/catalog/data-columns-query/data-columns-query-format.js +215 -0
  225. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +5 -2
  226. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +38 -2
  227. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -2
  228. package/queries/catalog/dataflow-query/dataflow-query-format.js +18 -2
  229. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  230. package/queries/catalog/dependencies-query/dependencies-query-format.js +8 -3
  231. package/queries/catalog/dependencies-query/function-info/other-path-functions.js +1 -1
  232. package/queries/catalog/dependencies-query/function-info/tagged-functions.d.ts +11 -0
  233. package/queries/catalog/dependencies-query/function-info/tagged-functions.js +18 -0
  234. package/queries/catalog/dice-query/dice-query-format.d.ts +7 -2
  235. package/queries/catalog/dice-query/dice-query-format.js +34 -2
  236. package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -4
  237. package/queries/catalog/does-call-query/does-call-query-format.js +114 -2
  238. package/queries/catalog/files-query/files-query-format.d.ts +5 -2
  239. package/queries/catalog/files-query/files-query-format.js +45 -2
  240. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +6 -3
  241. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +303 -2
  242. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +8 -4
  243. package/queries/catalog/happens-before-query/happens-before-query-format.js +37 -2
  244. package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -2
  245. package/queries/catalog/id-map-query/id-map-query-format.js +18 -2
  246. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +5 -2
  247. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +29 -2
  248. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +37 -0
  249. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +125 -0
  250. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -2
  251. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +54 -2
  252. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -2
  253. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +23 -2
  254. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -2
  255. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +15 -2
  256. package/queries/catalog/linter-query/linter-query-format.d.ts +8 -2
  257. package/queries/catalog/linter-query/linter-query-format.js +69 -4
  258. package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -3
  259. package/queries/catalog/location-map-query/location-map-query-format.js +70 -2
  260. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -2
  261. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +18 -2
  262. package/queries/catalog/origin-query/origin-query-format.d.ts +6 -3
  263. package/queries/catalog/origin-query/origin-query-format.js +29 -2
  264. package/queries/catalog/project-query/project-query-format.d.ts +6 -3
  265. package/queries/catalog/project-query/project-query-format.js +98 -2
  266. package/queries/catalog/provenance-query/provenance-query-format.d.ts +6 -3
  267. package/queries/catalog/provenance-query/provenance-query-format.js +30 -2
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +9 -2
  269. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +38 -2
  270. package/queries/catalog/search-query/search-query-format.d.ts +5 -2
  271. package/queries/catalog/search-query/search-query-format.js +23 -2
  272. package/queries/catalog/signature-query/signature-query-executor.js +3 -1
  273. package/queries/catalog/signature-query/signature-query-format.d.ts +3 -0
  274. package/queries/catalog/signature-query/signature-query-render.js +23 -0
  275. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +13 -2
  276. package/queries/catalog/static-slice-query/static-slice-query-format.js +55 -2
  277. package/queries/catalog/taint-query/taint-query-format.d.ts +6 -3
  278. package/queries/catalog/taint-query/taint-query-format.js +28 -2
  279. package/queries/query.d.ts +48 -27
  280. package/queries/query.js +6 -4
  281. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -0
  282. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -0
  283. package/r-bridge/shell.js +7 -2
  284. package/reconstruct/reconstruct.js +18 -3
  285. package/slicing/static/removal-slice.js +4 -3
  286. package/slicing/static/slice-call.d.ts +11 -0
  287. package/slicing/static/slice-call.js +43 -2
  288. package/slicing/static/static-slicer.d.ts +2 -0
  289. package/slicing/static/static-slicer.js +137 -21
  290. package/slicing/static/visiting-queue.d.ts +2 -0
  291. package/slicing/static/visiting-queue.js +4 -0
  292. package/util/flowr-version.d.ts +1 -1
  293. package/util/flowr-version.js +2 -2
  294. package/util/objects.d.ts +2 -0
  295. package/util/objects.js +5 -0
  296. package/util/r-datasets.d.ts +27 -0
  297. package/util/r-datasets.js +45 -0
  298. package/util/text/playground-link.d.ts +2 -0
  299. package/util/text/playground-link.js +2 -0
  300. package/queries/catalog/absint-query/absint-query-executor.d.ts +0 -6
  301. package/queries/catalog/absint-query/absint-query-executor.js +0 -61
  302. package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +0 -6
  303. package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +0 -50
  304. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +0 -6
  305. package/queries/catalog/cluster-query/cluster-query-executor.js +0 -21
  306. package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +0 -6
  307. package/queries/catalog/code-clones-query/code-clones-query-executor.js +0 -38
  308. package/queries/catalog/config-query/config-query-executor.d.ts +0 -6
  309. package/queries/catalog/config-query/config-query-executor.js +0 -45
  310. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +0 -6
  311. package/queries/catalog/control-flow-query/control-flow-query-executor.js +0 -21
  312. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +0 -6
  313. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +0 -40
  314. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +0 -6
  315. package/queries/catalog/dataflow-query/dataflow-query-executor.js +0 -20
  316. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +0 -9
  317. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +0 -18
  318. package/queries/catalog/dice-query/dice-query-executor.d.ts +0 -8
  319. package/queries/catalog/dice-query/dice-query-executor.js +0 -37
  320. package/queries/catalog/does-call-query/does-call-query-executor.d.ts +0 -6
  321. package/queries/catalog/does-call-query/does-call-query-executor.js +0 -116
  322. package/queries/catalog/files-query/files-query-executor.d.ts +0 -6
  323. package/queries/catalog/files-query/files-query-executor.js +0 -47
  324. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +0 -6
  325. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +0 -307
  326. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +0 -7
  327. package/queries/catalog/happens-before-query/happens-before-query-executor.js +0 -40
  328. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +0 -6
  329. package/queries/catalog/id-map-query/id-map-query-executor.js +0 -20
  330. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -6
  331. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +0 -31
  332. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +0 -4
  333. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +0 -58
  334. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +0 -7
  335. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +0 -25
  336. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +0 -7
  337. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +0 -17
  338. package/queries/catalog/linter-query/linter-query-executor.d.ts +0 -9
  339. package/queries/catalog/linter-query/linter-query-executor.js +0 -62
  340. package/queries/catalog/location-map-query/location-map-query-executor.d.ts +0 -7
  341. package/queries/catalog/location-map-query/location-map-query-executor.js +0 -73
  342. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +0 -6
  343. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +0 -20
  344. package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -6
  345. package/queries/catalog/origin-query/origin-query-executor.js +0 -31
  346. package/queries/catalog/project-query/project-query-executor.d.ts +0 -6
  347. package/queries/catalog/project-query/project-query-executor.js +0 -103
  348. package/queries/catalog/provenance-query/provenance-query-executor.d.ts +0 -6
  349. package/queries/catalog/provenance-query/provenance-query-executor.js +0 -33
  350. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +0 -10
  351. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +0 -40
  352. package/queries/catalog/search-query/search-query-executor.d.ts +0 -6
  353. package/queries/catalog/search-query/search-query-executor.js +0 -25
  354. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +0 -14
  355. package/queries/catalog/static-slice-query/static-slice-query-executor.js +0 -59
  356. package/queries/catalog/taint-query/taint-query-executor.d.ts +0 -7
  357. package/queries/catalog/taint-query/taint-query-executor.js +0 -30
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataFrameShapeSemantics = exports.DataFrameFunctions = void 0;
4
4
  const config_1 = require("../../config");
5
5
  const built_in_proc_name_1 = require("../../dataflow/environments/built-in-proc-name");
6
+ const identifier_1 = require("../../dataflow/environments/identifier");
7
+ const df_helper_1 = require("../../dataflow/graph/df-helper");
8
+ const r_datasets_1 = require("../../util/r-datasets");
6
9
  const resolve_helper_1 = require("../../dataflow/environments/resolve-helper");
7
10
  const vertex_1 = require("../../dataflow/graph/vertex");
8
11
  const make_argument_1 = require("../../dataflow/internal/process/functions/call/argument/make-argument");
@@ -23,6 +26,8 @@ const arguments_1 = require("./arguments");
23
26
  const dataframe_domain_1 = require("./dataframe-domain");
24
27
  const resolve_args_1 = require("./resolve-args");
25
28
  const semantics_1 = require("./semantics");
29
+ /** see `scripts/gen-r-datasets.ts`, which keeps at most this many columns of a data set */
30
+ const MaxDatasetColumns = 200;
26
31
  /**
27
32
  * Represents the different types of data frames in R
28
33
  */
@@ -436,6 +441,23 @@ class DataFrameShapeSemantics extends value_semantics_1.ValueSemantics {
436
441
  getAbstractOperations(id) {
437
442
  return id !== undefined ? this.operations?.get(id) : undefined;
438
443
  }
444
+ /**
445
+ * A symbol without a definition in the program that names a data set R finds as lazy data, such as `penguins`
446
+ * (from `datasets`), `starwars` once `dplyr` is loaded, or `dplyr::starwars`, has the shape of that data set.
447
+ */
448
+ handleVariableUse(state, vertex, ctx) {
449
+ const node = ctx.getAstNode(vertex.id);
450
+ if (!r_symbol_1.RSymbol.is(node) || node.info.role === "call-name" /* RoleInParent.FunctionCallName */ || df_helper_1.Dataflow.origin(ctx.dfg, vertex.id)?.some(origin => origin.type === 0 /* OriginType.ReadVariableOrigin */)) {
451
+ return;
452
+ }
453
+ const loaded = loadedPackages(ctx);
454
+ const shape = (0, r_datasets_1.datasetShape)(identifier_1.Identifier.getName(node.content), identifier_1.Identifier.getNamespace(node.content), pkg => loaded.has(String(pkg)) || ctx.context.deps.getDependency(pkg) !== undefined);
455
+ if (shape !== undefined) {
456
+ /* the table keeps at most the first columns of a very wide data set, which then are not all its names */
457
+ const colnames = shape.columns.length < MaxDatasetColumns ? [...shape.columns] : undefined;
458
+ applyDataFrameExpression(state, node, [{ operation: 'read', operand: undefined, source: `${shape.pkg}::${shape.name}`, colnames, rows: shape.rows }], ctx, this.operations);
459
+ }
460
+ }
439
461
  /**
440
462
  * Applies the abstract semantics defined for the called replacement function, or over-approximates
441
463
  * the modified data frame operand of any other replacement function by the `unknown` abstract operation.
@@ -450,6 +472,32 @@ class DataFrameShapeSemantics extends value_semantics_1.ValueSemantics {
450
472
  }
451
473
  }
452
474
  exports.DataFrameShapeSemantics = DataFrameShapeSemantics;
475
+ /** the packages the program names in a `library` call or the like, per dataflow graph */
476
+ const loadedOf = new WeakMap();
477
+ /** The packages the program loads by name, whose data sets R then finds as well (whether or not flowR knows anything else of them). */
478
+ function loadedPackages(ctx) {
479
+ let loaded = loadedOf.get(ctx.dfg);
480
+ if (loaded === undefined) {
481
+ const names = new Set();
482
+ for (const [, vertex] of ctx.dfg.vertices(true)) {
483
+ if (vertex_1.DfgVertex.isFunctionCall(vertex) && vertex_1.DfgVertex.hasOrigin(vertex, built_in_proc_name_1.BuiltInProcName.Library)) {
484
+ for (const arg of vertex.args) {
485
+ const value = arg === r_function_call_1.EmptyArgument ? undefined : ctx.getAstNode(arg.nodeId);
486
+ const named = r_argument_1.RArgument.is(value) ? value.value : value;
487
+ if (r_symbol_1.RSymbol.is(named)) {
488
+ names.add(String(identifier_1.Identifier.getName(named.content)));
489
+ }
490
+ else if (r_string_1.RString.is(named)) {
491
+ names.add(named.content.str);
492
+ }
493
+ }
494
+ }
495
+ }
496
+ loaded = names;
497
+ loadedOf.set(ctx.dfg, loaded);
498
+ }
499
+ return loaded;
500
+ }
453
501
  /**
454
502
  * Creates the declarative definition of the abstract semantics of the data frame domain (see {@link DataFrameSemantics}).
455
503
  * @param operations - An optional map to store the abstract data frame operations the expressions are mapped to
@@ -1145,6 +1193,11 @@ function mapDataFrameJoin(args, params, ctx, info) {
1145
1193
  byCols = byValue;
1146
1194
  }
1147
1195
  }
1196
+ /* `by = c(k1 = "k2")` and `join_by(k1 == k2)` pair different columns, of which the result keeps only one of the two */
1197
+ const byNode = byArg === undefined || byArg === r_function_call_1.EmptyArgument ? undefined : byArg.value;
1198
+ if (r_function_call_1.RFunctionCall.isNamed(byNode) && (byNode.arguments.some(a => a !== r_function_call_1.EmptyArgument && a.name !== undefined) || identifier_1.Identifier.getName(byNode.functionName.content) === 'join_by')) {
1199
+ byCols = undefined;
1200
+ }
1148
1201
  if (byCols?.some(isColName)) {
1149
1202
  result.push({
1150
1203
  operation: 'accessCols',
@@ -1239,6 +1292,10 @@ function maxAbs(indices) {
1239
1292
  }
1240
1293
  return max;
1241
1294
  }
1295
+ /** whether the shape pins the number of columns down to exactly one */
1296
+ function isSingleColumn(shape) {
1297
+ return shape !== undefined && shape.cols.isValue() && shape.cols.lower === 1 && shape.cols.upper === 1;
1298
+ }
1242
1299
  /**
1243
1300
  * Maps an index-based access of the rows and columns of a data frame, such as `df[1, ]` or `df[["id"]]`, to abstract data frame operations.
1244
1301
  */
@@ -1292,10 +1349,12 @@ function mapDataFrameIndexColRowAccess(access, ctx, info) {
1292
1349
  columns: columns?.every(isIndex) ? columns.map(Math.abs) : columns
1293
1350
  });
1294
1351
  }
1352
+ // A selection of rows from a data frame with exactly one column drops it to a vector, as `drop` defaults to `TRUE` there
1353
+ const singleColumn = args.length === 2 && rowArg !== undefined && r_argument_1.RArgument.isNotEmpty(rowArg) && (colArg === undefined || r_argument_1.RArgument.isEmpty(colArg)) && isSingleColumn(ctx.getAbstractValue(dataFrame));
1295
1354
  // The data frame extent is dropped if the operator `[[` is used, the argument `drop` is true, or only one column is accessed
1296
1355
  const dropExtent = access.operator === '[[' ? true :
1297
1356
  args.length === 2 && typeof drop === 'boolean' ? drop :
1298
- rowArg !== undefined && columns?.length === 1 && (isColName(columns[0]) || columns[0] > 0);
1357
+ singleColumn || rowArg !== undefined && columns?.length === 1 && (isColName(columns[0]) || columns[0] > 0);
1299
1358
  if (!dropExtent) {
1300
1359
  const rowSubset = rows === undefined || rows.every(row => row >= 0);
1301
1360
  const colSubset = columns === undefined || columns.every(col => isColName(col) || col >= 0);
@@ -309,37 +309,30 @@ function applyJoinSemantics(value, { other, by }, options) {
309
309
  }
310
310
  return interval1.bottom();
311
311
  };
312
- // Creating the Cartesian product of two intervals by keeping the lower bound and multiplying the upper bounds
312
+ // Creating the Cartesian product of two intervals by keeping the lower bound and multiplying the upper bounds (but never below the upper bound of the rows kept anyway)
313
313
  const productInterval = (lower, interval1, interval2) => {
314
314
  if (lower.isValue() && interval1.isValue() && interval2.isValue()) {
315
- return new positive_interval_domain_1.PosIntervalDomain([lower.lower, interval1.upper * interval2.upper]);
315
+ return new positive_interval_domain_1.PosIntervalDomain([lower.lower, Math.max(lower.upper, interval1.upper * interval2.upper)]);
316
316
  }
317
317
  return lower.bottom();
318
318
  };
319
319
  let duplicateCols; // columns that may be renamed due to occurring in both data frames
320
- let productRows; // whether the resulting rows may be a Cartesian product of the rows of the data frames
321
320
  if (options?.natural) {
322
- const commonCols = value.colnames.intersect(other.colnames).upper();
323
321
  duplicateCols = [];
324
- productRows = commonCols !== lattice_1.Bottom && commonCols !== lattice_1.Top && commonCols.size === 0;
325
322
  }
326
323
  else if (by === undefined) {
327
324
  duplicateCols = undefined;
328
- productRows = true;
329
325
  }
330
326
  else if (by.length === 0) {
331
327
  const commonCols = value.colnames.intersect(other.colnames).upper();
332
328
  duplicateCols = commonCols !== lattice_1.Bottom ? commonCols !== lattice_1.Top ? [...commonCols] : undefined : [];
333
- productRows = true;
334
329
  }
335
330
  else if (by.every(assert_1.isNotUndefined)) {
336
331
  const remainingCols = value.colnames.intersect(other.colnames).subtract(setRange(by)).upper();
337
332
  duplicateCols = remainingCols !== lattice_1.Bottom ? remainingCols !== lattice_1.Top ? [...remainingCols] : undefined : [];
338
- productRows = false;
339
333
  }
340
334
  else {
341
335
  duplicateCols = undefined;
342
- productRows = false;
343
336
  }
344
337
  const joinType = options?.join ?? JoinType.Inner;
345
338
  let rows;
@@ -362,7 +355,8 @@ function applyJoinSemantics(value, { other, by }, options) {
362
355
  return value.create({
363
356
  colnames: duplicateCols === undefined ? value.colnames.top() : duplicateCols.length > 0 ? value.colnames.union(other.colnames).subtract(setRange(duplicateCols)).widenUp() : value.colnames.union(other.colnames),
364
357
  cols: by !== undefined ? value.cols.add(other.cols).subtract([by.length, by.length]) : mergeInterval(value.cols, other.cols),
365
- rows: productRows ? productInterval(rows, value.rows, other.rows) : rows
358
+ // the keys need not be unique, so every row of one may match every row of the other
359
+ rows: productInterval(rows, value.rows, other.rows)
366
360
  });
367
361
  }
368
362
  function applyIdentitySemantics(value, _args) {
@@ -11,7 +11,7 @@ type BoundedSetTop = typeof Top;
11
11
  /** The type of the Bottom element of the bounded set domain as empty set */
12
12
  type BoundedSetBottom = typeof SetBottom;
13
13
  /** The type of the abstract values of the bounded set domain that are Top, Bottom, or actual values */
14
- type BoundedSetLift<T> = BoundedSetValue<T> | BoundedSetTop | BoundedSetBottom;
14
+ export type BoundedSetLift<T> = BoundedSetValue<T> | BoundedSetTop | BoundedSetBottom;
15
15
  /**
16
16
  * The bounded set abstract domain as sets of possible values bounded by a `limit` indicating the maximum number of inferred values.
17
17
  * The Bottom element is defined as the empty set and the Top element is defined as {@link Top} symbol.
package/cli/repl/core.js CHANGED
@@ -72,6 +72,9 @@ const repl_signature_1 = require("./commands/repl-signature");
72
72
  const strings_1 = require("../../util/text/strings");
73
73
  const instrument_dataflow_count_1 = require("../../dataflow/instrument/instrument-dataflow-count");
74
74
  const proc_1 = require("../../util/proc");
75
+ const default_builtin_config_1 = require("../../dataflow/environments/default-builtin-config");
76
+ const identifier_1 = require("../../dataflow/environments/identifier");
77
+ const r_datasets_1 = require("../../util/r-datasets");
75
78
  let _replCompleterKeywords = undefined;
76
79
  function replCompleterKeywords() {
77
80
  if (_replCompleterKeywords === undefined) {
@@ -134,9 +137,57 @@ function computeCompletions(line, config) {
134
137
  return [preFiltered ? completions : (0, strings_1.matchByPrefixOrSubsequence)(completions, currentArg), currentArg, labels, hints?.filter(h => h.startsWith(currentArg))];
135
138
  }
136
139
  }
140
+ /* a plain R line, which runs in R: the name typed last completes to what R finds without the script binding it */
141
+ if (line.trim().length > 0 && !line.trimStart().startsWith(':')) {
142
+ return completeRName(line);
143
+ }
137
144
  // if no command is already typed, just return all commands that match
138
145
  return [replCompleterKeywords().filter(k => k.startsWith(line)).map(k => `${k} `), line];
139
146
  }
147
+ /** the most names a plain R line is offered, the first ones in order */
148
+ const MaxRNames = 40;
149
+ /** the functions flowR knows and the data sets R always finds (`penguins`), by name, with the packages they come from */
150
+ let rNames;
151
+ /** whether the end of `line` is within a string or a comment, where nothing names an R object */
152
+ function endsInText(line) {
153
+ let quote;
154
+ for (let at = 0; at < line.length; at++) {
155
+ const c = line[at];
156
+ if (quote !== undefined) {
157
+ quote = c === '\\' ? (at++, quote) : c === quote ? undefined : quote;
158
+ }
159
+ else if (c === '"' || c === "'" || c === '`') {
160
+ quote = c;
161
+ }
162
+ else if (c === '#') {
163
+ return true;
164
+ }
165
+ }
166
+ return quote !== undefined;
167
+ }
168
+ /**
169
+ * Completes the name `line` ends in, as `Vi` to `View`, from {@link rNames}, only from the package named in
170
+ * `base::pri`. Nothing after `$` or `@`, which name a column or slot, within a number, a string, or a comment.
171
+ */
172
+ function completeRName(line) {
173
+ rNames ??= (() => {
174
+ const found = new Map();
175
+ const add = (name, pkg) => found.set(name, [...found.get(name) ?? [], pkg]);
176
+ (0, r_datasets_1.datasetsOf)('datasets').forEach(name => add(String(name), 'datasets'));
177
+ default_builtin_config_1.DefaultBuiltinConfig.forEach(d => d.names.forEach(id => add(String(identifier_1.Identifier.getName(id)), String(identifier_1.Identifier.getNamespace(id) ?? ''))));
178
+ return found;
179
+ })();
180
+ const typed = /(?:([A-Za-z][\w.]*):::?)?((?<![\w.$@])[A-Za-z.][\w.]*)$/.exec(line);
181
+ if (typed === null || endsInText(line) || /^\.\d/.test(typed[2])) {
182
+ return [[], '', new Map()];
183
+ }
184
+ const [, pkg, fragment] = typed;
185
+ const known = rNames;
186
+ const found = [...known.keys()].filter(name => name.startsWith(fragment) && name !== fragment && (pkg === undefined || known.get(name)?.includes(pkg)))
187
+ .sort((a, b) => a.length - b.length || a.localeCompare(b)).slice(0, MaxRNames);
188
+ const what = (name) => known.get(name)?.includes('datasets') ? 'data set of datasets' : 'flowR built-in';
189
+ return [found, fragment, new Map(found.map(name => [name, `${name} ${what(name)}`]))];
190
+ }
140
191
  /**
141
192
  * Used by the repl to provide automatic completions for a given (partial) input line. Returns every matching
142
193
  * option, so Tab shows the full menu and only completes when a single option remains (standard readline behavior).
@@ -23,7 +23,7 @@ class CfgConditionalDeadCodeRemoval extends semantic_cfg_guided_visitor_1.Semant
23
23
  cachedStatements = new Map();
24
24
  cachedSwitch = new Map();
25
25
  caught = new Map();
26
- forcing;
26
+ raises;
27
27
  getValue(id) {
28
28
  const has = this.cachedConditions.get(id);
29
29
  if (has) {
@@ -33,7 +33,8 @@ class CfgConditionalDeadCodeRemoval extends semantic_cfg_guided_visitor_1.Semant
33
33
  return this.cachedConditions.get(id) ?? logic_1.Ternary.Maybe;
34
34
  }
35
35
  isUnconditionalJump(id) {
36
- if (this.isCaught(id)) {
36
+ /* a `stop()` in a promise of `delayedAssign("x", stop())` does not run where it is written */
37
+ if (this.isCaught(id) || this.config.dfg.isQuoted(id)) {
37
38
  return false;
38
39
  }
39
40
  const has = this.cachedStatements.get(id);
@@ -134,18 +135,19 @@ class CfgConditionalDeadCodeRemoval extends semantic_cfg_guided_visitor_1.Semant
134
135
  this.cachedStatements.set(data.call.id, !arg);
135
136
  }
136
137
  }
137
- /** whether the call is in an argument that may never be evaluated: `stop("x")` in `f(1, stop("x"))` only runs if `f` uses it */
138
+ /** whether the call is in an argument that may never be evaluated or is caught where it is forced: `stop("x")` in `f(1, stop("x"))` only runs if `f` uses it */
138
139
  mayStayUnforced(id) {
139
140
  const promised = this.config.dfg.getVertex(id)?.cds?.filter(cd => cd.byPromise === true) ?? [];
140
141
  if (promised.length === 0) {
141
142
  return false;
142
143
  }
143
- this.forcing ??= function_semantics_1.FunctionSemantics.promiseForcing(this.config.dfg, { ctx: this.config.ctx });
144
- return promised.some(cd => this.forcing?.(cd.id, id) !== logic_1.Ternary.Always);
144
+ this.raises ??= function_semantics_1.FunctionSemantics.promiseRaises(this.config.dfg, { ctx: this.config.ctx });
145
+ return promised.some(cd => this.raises?.(cd.id, id) !== true);
145
146
  }
146
147
  /**
147
148
  * Whether an error raised here is caught before it can cut the flow, which is what `try` and `tryCatch`
148
- * do to a `stop()` nested in them. The enclosing calls come from the AST: in the control flow graph a
149
+ * do to a `stop()` nested in them, or not raised here at all, as in `quote(stop())`, whose code an `eval` may
150
+ * run elsewhere (which links it in place). The enclosing calls come from the AST: in the control flow graph a
149
151
  * construct is where its parts join again, so there is no edge that would delimit it on its own.
150
152
  */
151
153
  isCaught(id) {
@@ -154,7 +156,10 @@ class CfgConditionalDeadCodeRemoval extends semantic_cfg_guided_visitor_1.Semant
154
156
  return cached;
155
157
  }
156
158
  const result = model_1.RNode.iterateParents(this.getNormalizedAst(id), this.config.normalizedAst.idMap)
157
- .some(node => vertex_1.DfgVertex.hasOrigin(this.getDataflowGraph(node.info.id), built_in_proc_name_1.BuiltInProcName.Try));
159
+ .some(node => {
160
+ const vertex = this.getDataflowGraph(node.info.id);
161
+ return vertex_1.DfgVertex.hasOrigin(vertex, built_in_proc_name_1.BuiltInProcName.Try) || vertex_1.DfgVertex.hasOrigin(vertex, built_in_proc_name_1.BuiltInProcName.Quote);
162
+ });
158
163
  this.caught.set(id, result);
159
164
  return result;
160
165
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A value packed by `scripts/pack-generated.ts`: a table of nodes in which every distinct string, number, array and object is
3
+ * stored once, the last node being the value. An array node lists the indices of its elements, an object node starts with
4
+ * `-1 - i` for the node `i` listing its keys, followed by the indices of their values. Any other node is the plain value.
5
+ */
6
+ export type Packed = readonly (string | number | boolean | null | readonly number[])[];
7
+ /** The value of a {@link Packed} table. Equal parts are shared, do not change them. */
8
+ export declare function unpack<T>(nodes: Packed): T;
9
+ /** Decompresses generated data on the first call. The data is the JSON of a {@link Packed} table (prefix `p`) or of the value (prefix `r`). */
10
+ export declare function unpacked<T>(data: string): () => T;
package/data/packed.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unpack = unpack;
4
+ exports.unpacked = unpacked;
5
+ const lz_string_1 = require("lz-string");
6
+ /** The value of a {@link Packed} table. Equal parts are shared, do not change them. */
7
+ function unpack(nodes) {
8
+ const done = [];
9
+ const at = (i) => i in done ? done[i] : (done[i] = build(nodes[i]));
10
+ const build = (node) => {
11
+ if (!Array.isArray(node)) {
12
+ return node;
13
+ }
14
+ else if (node.length === 0 || node[0] >= 0) {
15
+ return node.map(at);
16
+ }
17
+ const keys = at(-1 - node[0]);
18
+ return Object.fromEntries(keys.map((k, j) => [k, at(node[j + 1])]));
19
+ };
20
+ return at(nodes.length - 1);
21
+ }
22
+ /** Decompresses generated data on the first call. The data is the JSON of a {@link Packed} table (prefix `p`) or of the value (prefix `r`). */
23
+ function unpacked(data) {
24
+ let value;
25
+ return () => {
26
+ if (value === undefined) {
27
+ const json = JSON.parse((0, lz_string_1.decompressFromBase64)(data.slice(1)));
28
+ value = data[0] === 'p' ? unpack(json) : json;
29
+ }
30
+ return value;
31
+ };
32
+ }
33
+ //# sourceMappingURL=packed.js.map
@@ -0,0 +1,7 @@
1
+ import type { BaseGuards } from '../dataflow/fn/guards/built-in-guards';
2
+ /** What the closures of the base packages ask of their arguments, as `package -> name -> guards`. */
3
+ export declare const RBaseGuards: () => BaseGuards;
4
+ /** The R version {@link RBaseGuards} was read off. */
5
+ export declare const RBaseGuardsVersion: string;
6
+ /** The day {@link RBaseGuards} was read off, as an ISO date. */
7
+ export declare const RBaseGuardsDate: string;