@eagleoutice/flowr 2.16.5 → 2.16.7

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 (316) hide show
  1. package/README.md +21 -15
  2. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +2 -0
  3. package/abstract-interpretation/data-frame/dataframe-semantics.js +3 -1
  4. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -7
  5. package/abstract-interpretation/data-frame/resolve-args.js +2 -11
  6. package/cli/repl/commands/repl-cfg.js +5 -19
  7. package/cli/repl/commands/repl-code-command.d.ts +10 -0
  8. package/cli/repl/commands/repl-code-command.js +18 -0
  9. package/cli/repl/commands/repl-dataflow.js +34 -59
  10. package/cli/repl/commands/repl-normalize.js +24 -41
  11. package/cli/repl/commands/repl-query.js +10 -17
  12. package/config.js +3 -3
  13. package/control-flow/cfg-dead-code.js +15 -2
  14. package/control-flow/useless-loop.js +1 -2
  15. package/data/r-base-packages.generated.d.ts +1 -1
  16. package/data/r-base-packages.generated.js +3 -3
  17. package/dataflow/environments/ambient-state-name.d.ts +80 -0
  18. package/dataflow/environments/ambient-state-name.js +113 -0
  19. package/dataflow/environments/built-in-eval-name.d.ts +3 -1
  20. package/dataflow/environments/built-in-eval-name.js +2 -0
  21. package/dataflow/environments/built-in-props.d.ts +27 -7
  22. package/dataflow/environments/built-in-props.js +59 -44
  23. package/dataflow/environments/built-in.d.ts +5 -2
  24. package/dataflow/environments/built-in.js +22 -5
  25. package/dataflow/environments/default-builtin-config.d.ts +538 -14
  26. package/dataflow/environments/default-builtin-config.js +189 -123
  27. package/dataflow/environments/environment.d.ts +7 -1
  28. package/dataflow/environments/environment.js +19 -1
  29. package/dataflow/environments/identifier.d.ts +11 -0
  30. package/dataflow/eval/resolve/alias-tracking.d.ts +13 -3
  31. package/dataflow/eval/resolve/alias-tracking.js +66 -37
  32. package/dataflow/eval/resolve/resolve-argument.d.ts +4 -2
  33. package/dataflow/eval/resolve/resolve-argument.js +23 -11
  34. package/dataflow/eval/resolve/resolve.d.ts +5 -0
  35. package/dataflow/eval/resolve/resolve.js +25 -3
  36. package/dataflow/eval/values/r-value.d.ts +4 -2
  37. package/dataflow/eval/values/r-value.js +3 -1
  38. package/dataflow/eval/values/string/string-constants.d.ts +7 -1
  39. package/dataflow/eval/values/string/string-constants.js +38 -36
  40. package/dataflow/extractor.js +105 -2
  41. package/dataflow/fn/argument-roles.js +22 -8
  42. package/dataflow/fn/function-semantics.d.ts +3 -2
  43. package/dataflow/fn/strict-function.js +13 -2
  44. package/dataflow/graph/df-helper.d.ts +14 -1
  45. package/dataflow/graph/df-helper.js +37 -4
  46. package/dataflow/graph/graph.d.ts +6 -0
  47. package/dataflow/graph/graph.js +6 -0
  48. package/dataflow/internal/linker.d.ts +4 -1
  49. package/dataflow/internal/linker.js +11 -7
  50. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +41 -0
  51. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +88 -0
  52. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -44
  53. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +125 -158
  54. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +6 -1
  55. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +35 -9
  56. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +10 -1
  57. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +4 -1
  58. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +6 -1
  59. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +1 -1
  60. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -2
  61. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +7 -0
  62. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +21 -12
  63. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  64. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +8 -1
  65. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +3 -0
  66. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +5 -0
  67. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +5 -2
  68. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +11 -12
  69. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -1
  70. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +6 -0
  71. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +1 -1
  72. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -0
  73. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +42 -0
  74. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +11 -0
  75. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +29 -4
  76. package/dataflow/internal/process/functions/call/common.js +3 -4
  77. package/dataflow/internal/process/functions/call/deferred.d.ts +3 -2
  78. package/dataflow/internal/process/functions/call/deferred.js +17 -9
  79. package/dataflow/internal/process/functions/call/quoted.js +1 -1
  80. package/documentation/doc-capabilities.js +3 -2
  81. package/documentation/doc-readme.js +1 -2
  82. package/documentation/doc-util/doc-dfg.js +2 -2
  83. package/documentation/doc-util/doc-query.d.ts +3 -1
  84. package/documentation/doc-util/doc-query.js +4 -4
  85. package/documentation/wiki-create-linting-rules.js +1 -1
  86. package/documentation/wiki-linter.js +16 -206
  87. package/documentation/wiki-linting-and-testing.js +31 -64
  88. package/documentation/wiki-query.js +41 -0
  89. package/index.d.ts +1 -0
  90. package/index.js +5 -1
  91. package/linter/linter-format.d.ts +6 -0
  92. package/linter/linter-format.js +10 -0
  93. package/linter/linter-rules.d.ts +155 -103
  94. package/linter/linter-rules.js +2 -0
  95. package/linter/linter-util.d.ts +23 -0
  96. package/linter/linter-util.js +58 -0
  97. package/linter/rules/absolute-path.d.ts +2 -2
  98. package/linter/rules/absolute-path.js +1 -4
  99. package/linter/rules/cmd-check/bogus-return.d.ts +2 -2
  100. package/linter/rules/cmd-check/bogus-return.js +3 -7
  101. package/linter/rules/cmd-check/call-arguments.d.ts +2 -2
  102. package/linter/rules/cmd-check/class-string-comparison.d.ts +2 -2
  103. package/linter/rules/cmd-check/class-string-comparison.js +3 -7
  104. package/linter/rules/cmd-check/cmd-check-util.d.ts +8 -9
  105. package/linter/rules/cmd-check/cmd-check-util.js +14 -26
  106. package/linter/rules/cmd-check/compiled-code.d.ts +8 -3
  107. package/linter/rules/cmd-check/compiled-code.js +3 -13
  108. package/linter/rules/cmd-check/dependency-declaration.d.ts +2 -2
  109. package/linter/rules/cmd-check/dependency-declaration.js +6 -7
  110. package/linter/rules/cmd-check/description-metadata.d.ts +4 -4
  111. package/linter/rules/cmd-check/documentation-mismatch.d.ts +2 -2
  112. package/linter/rules/cmd-check/documentation-mismatch.js +4 -11
  113. package/linter/rules/cmd-check/file-checks.d.ts +19 -6
  114. package/linter/rules/cmd-check/file-checks.js +13 -5
  115. package/linter/rules/cmd-check/foreign-function-calls.d.ts +2 -2
  116. package/linter/rules/cmd-check/global-environment-modification.d.ts +2 -2
  117. package/linter/rules/cmd-check/global-environment-modification.js +3 -2
  118. package/linter/rules/cmd-check/namespace-tampering.d.ts +2 -2
  119. package/linter/rules/cmd-check/namespace-tampering.js +9 -9
  120. package/linter/rules/cmd-check/non-ascii-code.d.ts +2 -2
  121. package/linter/rules/cmd-check/package-data.d.ts +11 -5
  122. package/linter/rules/cmd-check/package-data.js +5 -12
  123. package/linter/rules/cmd-check/package-files.js +4 -10
  124. package/linter/rules/cmd-check/package-hooks.d.ts +2 -2
  125. package/linter/rules/cmd-check/package-hooks.js +10 -8
  126. package/linter/rules/cmd-check/package-metafiles.d.ts +8 -3
  127. package/linter/rules/cmd-check/package-metafiles.js +3 -12
  128. package/linter/rules/cmd-check/package-runtime.d.ts +18 -5
  129. package/linter/rules/cmd-check/package-runtime.js +64 -20
  130. package/linter/rules/cmd-check/package-structure.d.ts +11 -5
  131. package/linter/rules/cmd-check/package-structure.js +4 -12
  132. package/linter/rules/cmd-check/rd-files.d.ts +8 -3
  133. package/linter/rules/cmd-check/rd-files.js +4 -14
  134. package/linter/rules/cmd-check/s-three-method-consistency.d.ts +2 -2
  135. package/linter/rules/cmd-check/s-three-method-consistency.js +3 -4
  136. package/linter/rules/cmd-check/true-false-abbreviation.d.ts +2 -2
  137. package/linter/rules/dataframe-access-validation.d.ts +2 -2
  138. package/linter/rules/dataframe-access-validation.js +5 -8
  139. package/linter/rules/dead-code.d.ts +5 -4
  140. package/linter/rules/dead-code.js +25 -14
  141. package/linter/rules/deprecated-functions.d.ts +3 -3
  142. package/linter/rules/deprecated-functions.js +16 -23
  143. package/linter/rules/file-path-validity.d.ts +2 -2
  144. package/linter/rules/file-path-validity.js +3 -6
  145. package/linter/rules/function-finder-util.d.ts +3 -3
  146. package/linter/rules/function-finder-util.js +7 -14
  147. package/linter/rules/namespace-access.d.ts +2 -2
  148. package/linter/rules/namespace-access.js +6 -9
  149. package/linter/rules/naming-convention.d.ts +2 -2
  150. package/linter/rules/naming-convention.js +1 -4
  151. package/linter/rules/network-functions.d.ts +3 -3
  152. package/linter/rules/no-leaked-credentials.d.ts +2 -2
  153. package/linter/rules/no-leaked-credentials.js +1 -4
  154. package/linter/rules/overwritten-file.d.ts +38 -0
  155. package/linter/rules/overwritten-file.js +102 -0
  156. package/linter/rules/problematic-inputs.d.ts +16 -6
  157. package/linter/rules/problematic-inputs.js +78 -34
  158. package/linter/rules/roxygen-arguments.d.ts +2 -2
  159. package/linter/rules/roxygen-arguments.js +1 -4
  160. package/linter/rules/seeded-randomness.d.ts +3 -3
  161. package/linter/rules/seeded-randomness.js +6 -23
  162. package/linter/rules/software-has-license.d.ts +2 -2
  163. package/linter/rules/software-has-license.js +1 -4
  164. package/linter/rules/software-has-tests.d.ts +2 -2
  165. package/linter/rules/software-has-tests.js +1 -4
  166. package/linter/rules/stop-with-call-arg.d.ts +2 -2
  167. package/linter/rules/stop-with-call-arg.js +4 -11
  168. package/linter/rules/syntactically-valid.d.ts +4 -2
  169. package/linter/rules/syntactically-valid.js +29 -10
  170. package/linter/rules/unclosed-connection.d.ts +2 -2
  171. package/linter/rules/unclosed-connection.js +1 -4
  172. package/linter/rules/undefined-symbol.d.ts +2 -2
  173. package/linter/rules/undefined-symbol.js +25 -22
  174. package/linter/rules/unescaped-arguments.d.ts +2 -2
  175. package/linter/rules/unescaped-arguments.js +1 -4
  176. package/linter/rules/unused-definition.d.ts +2 -2
  177. package/linter/rules/unused-definition.js +37 -25
  178. package/linter/rules/unused-import.d.ts +2 -2
  179. package/linter/rules/unused-import.js +9 -14
  180. package/linter/rules/useless-loop.d.ts +7 -6
  181. package/linter/rules/useless-loop.js +4 -8
  182. package/package.json +5 -3
  183. package/project/cache/flowr-analyzer-cache.d.ts +2 -0
  184. package/project/cache/flowr-analyzer-cache.js +15 -11
  185. package/project/context/flowr-analyzer-files-context.d.ts +3 -0
  186. package/project/context/flowr-analyzer-files-context.js +6 -0
  187. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +6 -1
  188. package/project/plugins/file-plugins/files/flowr-jupyter-file.js +35 -0
  189. package/project/plugins/file-plugins/files/flowr-namespace-file.js +2 -1
  190. package/project/plugins/file-plugins/files/flowr-rsession-file.d.ts +26 -0
  191. package/project/plugins/file-plugins/files/flowr-rsession-file.js +44 -0
  192. package/project/plugins/file-plugins/files/r-session.d.ts +20 -0
  193. package/project/plugins/file-plugins/files/r-session.js +58 -0
  194. package/project/plugins/file-plugins/files/recorded-runs.d.ts +18 -0
  195. package/project/plugins/file-plugins/files/recorded-runs.js +8 -0
  196. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rsession-file-plugin.d.ts +20 -0
  197. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rsession-file-plugin.js +28 -0
  198. package/project/plugins/plugin-registry.d.ts +2 -1
  199. package/project/plugins/plugin-registry.js +2 -0
  200. package/project/sigdb/spec-query.d.ts +73 -0
  201. package/project/sigdb/spec-query.js +339 -0
  202. package/queries/base-query-format.d.ts +1 -1
  203. package/queries/base-query-format.js +2 -2
  204. package/queries/catalog/absint-query/absint-query-executor.js +3 -6
  205. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -0
  206. package/queries/catalog/call-context-query/call-context-query-executor.js +113 -73
  207. package/queries/catalog/call-graph-query/call-graph-query-executor.js +2 -3
  208. package/queries/catalog/cluster-query/cluster-query-executor.js +2 -3
  209. package/queries/catalog/config-query/config-query-format.d.ts +0 -1
  210. package/queries/catalog/config-query/config-query-format.js +1 -2
  211. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -3
  212. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +2 -4
  213. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +0 -1
  214. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -2
  215. package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -3
  216. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +7 -0
  217. package/queries/catalog/dependencies-query/dependencies-query-executor.js +72 -42
  218. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +24 -6
  219. package/queries/catalog/dependencies-query/dependencies-query-format.js +108 -3
  220. package/queries/catalog/dependencies-query/function-info/function-info.d.ts +6 -1
  221. package/queries/catalog/dependencies-query/function-info/read-functions.js +6 -6
  222. package/queries/catalog/dependencies-query/function-info/write-functions.js +13 -7
  223. package/queries/catalog/dependencies-query/implicit-echo.js +21 -7
  224. package/queries/catalog/dice-query/dice-query-executor.js +2 -3
  225. package/queries/catalog/does-call-query/does-call-query-executor.js +2 -3
  226. package/queries/catalog/files-query/files-query-executor.js +2 -3
  227. package/queries/catalog/function-info-query/function-info-query-executor.js +2 -1
  228. package/queries/catalog/function-info-query/function-info-query-format.d.ts +0 -2
  229. package/queries/catalog/function-info-query/function-info-query-format.js +1 -2
  230. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +3 -2
  231. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +0 -2
  232. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +1 -2
  233. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -3
  234. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +0 -1
  235. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -2
  236. package/queries/catalog/id-map-query/id-map-query-executor.js +2 -3
  237. package/queries/catalog/id-map-query/id-map-query-format.d.ts +0 -1
  238. package/queries/catalog/id-map-query/id-map-query-format.js +1 -2
  239. package/queries/catalog/input-sources-query/input-sources-query-executor.js +3 -4
  240. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +2 -1
  241. package/queries/catalog/input-sources-query/simple-input-classifier.js +60 -13
  242. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -3
  243. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +2 -3
  244. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +2 -1
  245. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +3 -2
  246. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -7
  247. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -9
  248. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +8 -33
  249. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +3 -2
  250. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +1 -7
  251. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -7
  252. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +8 -31
  253. package/queries/catalog/linter-query/linter-query-executor.js +2 -3
  254. package/queries/catalog/location-map-query/location-map-query-executor.js +2 -3
  255. package/queries/catalog/location-map-query/location-map-query-format.d.ts +0 -1
  256. package/queries/catalog/location-map-query/location-map-query-format.js +1 -2
  257. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +2 -3
  258. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +0 -1
  259. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -2
  260. package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -5
  261. package/queries/catalog/origin-query/origin-query-executor.js +3 -11
  262. package/queries/catalog/project-query/project-query-executor.js +23 -7
  263. package/queries/catalog/project-query/project-query-format.d.ts +5 -0
  264. package/queries/catalog/project-query/project-query-format.js +20 -2
  265. package/queries/catalog/provenance-query/provenance-query-executor.js +2 -3
  266. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -3
  267. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +0 -1
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -2
  269. package/queries/catalog/search-query/search-query-executor.js +2 -3
  270. package/queries/catalog/signature-query/signature-query-executor.js +39 -0
  271. package/queries/catalog/signature-query/signature-query-format.d.ts +7 -1
  272. package/queries/catalog/signature-query/signature-query-format.js +15 -1
  273. package/queries/catalog/signature-query/signature-query-render.js +2 -1
  274. package/queries/catalog/static-slice-query/static-slice-query-executor.js +2 -3
  275. package/queries/query-function-property.d.ts +28 -0
  276. package/queries/query-function-property.js +48 -0
  277. package/queries/query-meta.d.ts +3 -0
  278. package/queries/query-meta.js +8 -0
  279. package/queries/query.d.ts +13 -18
  280. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +2 -2
  281. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -3
  282. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +6 -0
  283. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +9 -0
  284. package/r-bridge/lang-4.x/ast/model/syntax-version.d.ts +8 -0
  285. package/r-bridge/lang-4.x/ast/model/syntax-version.js +49 -0
  286. package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
  287. package/r-bridge/lang-4.x/ast/model/type.js +3 -0
  288. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +4 -1
  289. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.js +1 -0
  290. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +1 -1
  291. package/reconstruct/reconstruct.js +35 -1
  292. package/search/search-executor/search-generators.js +1 -1
  293. package/slicing/static/fingerprint.js +7 -3
  294. package/slicing/static/removal-slice.js +4 -2
  295. package/slicing/static/static-slicer.js +6 -0
  296. package/util/assert.js +2 -2
  297. package/util/collections/arrays.d.ts +4 -0
  298. package/util/collections/arrays.js +11 -0
  299. package/util/collections/defaultmap.d.ts +5 -1
  300. package/util/collections/defaultmap.js +6 -1
  301. package/util/files.js +26 -5
  302. package/util/flowr-version.d.ts +10 -0
  303. package/util/flowr-version.js +20 -0
  304. package/util/glob.js +6 -4
  305. package/util/r-regex.d.ts +6 -0
  306. package/util/r-regex.js +17 -0
  307. package/util/text/args.d.ts +5 -0
  308. package/util/text/args.js +28 -22
  309. package/util/text/name-rank.d.ts +2 -0
  310. package/util/text/name-rank.js +3 -1
  311. package/util/text/regex.d.ts +10 -0
  312. package/util/text/regex.js +29 -0
  313. package/util/version.d.ts +1 -6
  314. package/util/version.js +6 -14
  315. package/documentation/doc-util/doc-functions.d.ts +0 -24
  316. package/documentation/doc-util/doc-functions.js +0 -65
@@ -10,7 +10,10 @@ export declare enum ArgProp {
10
10
  Forced = 1,
11
11
  /** declared without a default value, like `x` in `nchar(x, type)`; says nothing about whether a call must supply it */
12
12
  NoDefault = 2,
13
- /** the result is this argument, handed back unchanged, like `x` in `identity(x)`; this is what draws the `Returns` edge */
13
+ /**
14
+ * the result is this argument, handed back unchanged, like `x` in `identity(x)`; this is what draws the `Returns` edge.
15
+ * On `...` it is the last argument that is handed back, like in `{`.
16
+ */
14
17
  Alias = 4,
15
18
  /** the result is computed from the argument's value, like `x` in `sum(x)` */
16
19
  Value = 8,
@@ -46,7 +49,12 @@ export declare enum ArgProp {
46
49
  * open to injection, so a call handing it unescaped data is a finding: system commands, R expressions,
47
50
  * database queries, HTML, or JavaScript.
48
51
  */
49
- Injectable = 32768
52
+ Injectable = 32768,
53
+ /**
54
+ * besides its value, the expression as written names a part of the result, like `a` in `data.frame(a)`,
55
+ * which becomes the column `a`; passing `identity(a)` instead changes the name
56
+ */
57
+ Deparsed = 65536
50
58
  }
51
59
  /**
52
60
  * The properties of the behavior of a call, as a bitmask.
@@ -161,7 +169,11 @@ export declare enum SemanticCallTag {
161
169
  /** puts a package's exports on the search path, so their bare names resolve, like `library` or `attachNamespace` */
162
170
  AttachesPackage = "attaches-package",
163
171
  /** answers whether a package is available, like `require`, `requireNamespace`, or `find.package` */
164
- ChecksPackage = "checks-package"
172
+ ChecksPackage = "checks-package",
173
+ /** registers a class, generic, method, or global name without computing anything else, like `setClass` or `utils::globalVariables` */
174
+ Declares = "declares",
175
+ /** reads which environment it runs in, like `environment()` or `parent.frame()`, so moving the call into another frame changes its result */
176
+ Frames = "reflects-frame"
165
177
  }
166
178
  /** a bitfield of {@link ArgProp} */
167
179
  export type ArgProps = number;
@@ -229,6 +241,12 @@ export declare const PropagatedProps: PropMask;
229
241
  declare function isCallProp(this: void, selector: PropSelector): selector is CallProp | CallProps;
230
242
  /** Checks whether a {@link PropSelector} is a {@link SemanticCallTag} */
231
243
  declare function isSemanticTag(this: void, selector: PropSelector): selector is SemanticCallTag;
244
+ /** How a property reads: the word for it, the short form a signature shows where there is one, and what it means. */
245
+ export interface PropWord {
246
+ readonly word: string;
247
+ readonly short?: string;
248
+ readonly about: string;
249
+ }
232
250
  /**
233
251
  * Helper functions to work with {@link CallProp}s and {@link SemanticCallTag}s of calls.
234
252
  * All helpers use {@link PropSelector}s to identify call properties.
@@ -254,9 +272,11 @@ export declare const CallProps: {
254
272
  readonly key: (this: void, selector: PropSelector) => string;
255
273
  /** Gets the property names for a property selector. */
256
274
  readonly names: (this: void, selector: PropSelector) => string[];
257
- /** Gets the string labels for stated properties {@link CallPropLabels}. */
275
+ /** the {@link CallProp} bits as words, in the order they are declared */
276
+ readonly vocabulary: Readonly<Record<CallProp, PropWord>>;
277
+ /** Gets the string labels for stated properties, see {@link CallPropWords}. */
258
278
  readonly labels: (this: void, stated: StatedProps | undefined) => string[];
259
- /** The {@link CallPropLabels} words for a bare {@link CallProps} bitfield, as inferred functions carry one. */
279
+ /** The {@link CallPropWords} for a bare {@link CallProps} bitfield, as inferred functions carry one. */
260
280
  readonly words: (this: void, props: CallProps | undefined) => string[];
261
281
  /** The {@link PropMask} the given {@link CallProp}/{@link SemanticCallTag} member names stand for, unknown ones ignored. */
262
282
  readonly mask: (this: void, names: readonly string[]) => PropMask;
@@ -294,8 +314,8 @@ export declare const FnSig: {
294
314
  * Utility functions for {@link ArgProps|argument property bitfields}.
295
315
  */
296
316
  export declare const ArgProps: {
297
- /** the {@link ArgProp} bit to its name, in ascending bit order */
298
- readonly names: Readonly<Record<ArgProp, string>>;
317
+ /** the {@link ArgProp} bits as words, in ascending bit order */
318
+ readonly vocabulary: Readonly<Record<ArgProp, PropWord>>;
299
319
  /** What an argument is used for, as words; see {@link wordsOf}. */
300
320
  readonly words: (props: ArgProps | undefined) => string[];
301
321
  /** The mask the given {@link ArgProp} member names stand for; see {@link maskOfNames}. */
@@ -16,7 +16,10 @@ var ArgProp;
16
16
  ArgProp[ArgProp["Forced"] = 1] = "Forced";
17
17
  /** declared without a default value, like `x` in `nchar(x, type)`; says nothing about whether a call must supply it */
18
18
  ArgProp[ArgProp["NoDefault"] = 2] = "NoDefault";
19
- /** the result is this argument, handed back unchanged, like `x` in `identity(x)`; this is what draws the `Returns` edge */
19
+ /**
20
+ * the result is this argument, handed back unchanged, like `x` in `identity(x)`; this is what draws the `Returns` edge.
21
+ * On `...` it is the last argument that is handed back, like in `{`.
22
+ */
20
23
  ArgProp[ArgProp["Alias"] = 4] = "Alias";
21
24
  /** the result is computed from the argument's value, like `x` in `sum(x)` */
22
25
  ArgProp[ArgProp["Value"] = 8] = "Value";
@@ -53,6 +56,11 @@ var ArgProp;
53
56
  * database queries, HTML, or JavaScript.
54
57
  */
55
58
  ArgProp[ArgProp["Injectable"] = 32768] = "Injectable";
59
+ /**
60
+ * besides its value, the expression as written names a part of the result, like `a` in `data.frame(a)`,
61
+ * which becomes the column `a`; passing `identity(a)` instead changes the name
62
+ */
63
+ ArgProp[ArgProp["Deparsed"] = 65536] = "Deparsed";
56
64
  })(ArgProp || (exports.ArgProp = ArgProp = {}));
57
65
  /**
58
66
  * The properties of the behavior of a call, as a bitmask.
@@ -170,6 +178,10 @@ var SemanticCallTag;
170
178
  SemanticCallTag["AttachesPackage"] = "attaches-package";
171
179
  /** answers whether a package is available, like `require`, `requireNamespace`, or `find.package` */
172
180
  SemanticCallTag["ChecksPackage"] = "checks-package";
181
+ /** registers a class, generic, method, or global name without computing anything else, like `setClass` or `utils::globalVariables` */
182
+ SemanticCallTag["Declares"] = "declares";
183
+ /** reads which environment it runs in, like `environment()` or `parent.frame()`, so moving the call into another frame changes its result */
184
+ SemanticCallTag["Frames"] = "reflects-frame";
173
185
  })(SemanticCallTag || (exports.SemanticCallTag = SemanticCallTag = {}));
174
186
  /**
175
187
  * The properties that say where a definition comes from rather than what it does. A bare
@@ -262,6 +274,24 @@ function getPropMask(selector) {
262
274
  }
263
275
  return { props, tags };
264
276
  }
277
+ /** the {@link CallProp} bits as words, in the order they are declared */
278
+ const CallPropWords = {
279
+ [CallProp.Pure]: { word: 'pure', about: 'computes a result, nothing else' },
280
+ [CallProp.MayPure]: { word: 'maybe pure', short: 'maypure', about: 'pure if what it calls is' },
281
+ [CallProp.Throws]: { word: 'can throw', short: 'throws', about: 'may raise an error' },
282
+ [CallProp.Invisible]: { word: 'invisible', short: 'invis', about: 'the result is not printed' },
283
+ [CallProp.Generic]: { word: 'generic', about: 'dispatches on its argument' },
284
+ [CallProp.Method]: { word: 's3 method', short: 's3', about: 'a method of a generic' },
285
+ [CallProp.Scope]: { word: 'changes scope', short: 'scope', about: 'defines or removes variables' },
286
+ [CallProp.NonDet]: { word: 'non deterministic', short: 'nondet', about: 'may differ between runs' },
287
+ [CallProp.Ambient]: { word: 'ambient state', short: 'ambient', about: 'reads state outside its arguments' },
288
+ [CallProp.Configures]: { word: 'sets ambient state', short: 'configures', about: 'changes options or devices' },
289
+ [CallProp.Ffi]: { word: 'calls native code', short: 'ffi', about: 'uses C, C++ or Fortran' },
290
+ [CallProp.Lang]: { word: 'produces language object', short: 'lang', about: 'returns code as data' },
291
+ [CallProp.Strict]: { word: 'strict', about: 'evaluates every argument' },
292
+ [CallProp.Concurrent]: { word: 'concurrent', short: 'async', about: 'runs in parallel' },
293
+ [CallProp.Primitive]: { word: 'primitive', about: 'implemented in the R core' }
294
+ };
265
295
  /**
266
296
  * Helper functions to work with {@link CallProp}s and {@link SemanticCallTag}s of calls.
267
297
  * All helpers use {@link PropSelector}s to identify call properties.
@@ -316,11 +346,13 @@ exports.CallProps = {
316
346
  ...record_1.Record.entries(SemanticCallTag).filter(([, prop]) => mask.tags.has(prop)).map(([name]) => name)
317
347
  ];
318
348
  },
319
- /** Gets the string labels for stated properties {@link CallPropLabels}. */
349
+ /** the {@link CallProp} bits as words, in the order they are declared */
350
+ vocabulary: CallPropWords,
351
+ /** Gets the string labels for stated properties, see {@link CallPropWords}. */
320
352
  labels(stated) {
321
353
  return [...exports.CallProps.words(stated?.props), ...stated?.tags ?? []];
322
354
  },
323
- /** The {@link CallPropLabels} words for a bare {@link CallProps} bitfield, as inferred functions carry one. */
355
+ /** The {@link CallPropWords} for a bare {@link CallProps} bitfield, as inferred functions carry one. */
324
356
  words(props) {
325
357
  return wordsOf(CallPropEntries, props);
326
358
  },
@@ -366,24 +398,25 @@ exports.FnSig = {
366
398
  /** A signature saying only that the call evaluates one argument; see {@link forcingOnly}. */
367
399
  only: forcingOnly
368
400
  };
369
- /** the {@link ArgProp} bit to its name; integer keys iterate in ascending bit order */
370
- const ArgPropNames = {
371
- [ArgProp.Forced]: 'forced',
372
- [ArgProp.NoDefault]: 'no default',
373
- [ArgProp.Alias]: 'alias',
374
- [ArgProp.Value]: 'value',
375
- [ArgProp.Shape]: 'shape',
376
- [ArgProp.Flag]: 'flag',
377
- [ArgProp.Resource]: 'resource',
378
- [ArgProp.Written]: 'written',
379
- [ArgProp.Nse]: 'nse',
380
- [ArgProp.Callee]: 'callee',
381
- [ArgProp.Presence]: 'presence',
382
- [ArgProp.Bounds]: 'bounds',
383
- [ArgProp.Atomic]: 'atomic',
384
- [ArgProp.Handle]: 'handle',
385
- [ArgProp.Lazy]: 'lazy',
386
- [ArgProp.Injectable]: 'injectable'
401
+ /** the {@link ArgProp} bits as words; integer keys iterate in ascending bit order */
402
+ const ArgPropWords = {
403
+ [ArgProp.Forced]: { word: 'forced', short: 'F', about: 'always evaluated' },
404
+ [ArgProp.NoDefault]: { word: 'no default', short: 'R', about: 'declared without a default' },
405
+ [ArgProp.Alias]: { word: 'alias', about: 'handed back as the result' },
406
+ [ArgProp.Value]: { word: 'value', short: 'val', about: 'its value feeds the result' },
407
+ [ArgProp.Shape]: { word: 'shape', about: 'only length or attributes used' },
408
+ [ArgProp.Flag]: { word: 'flag', about: 'selects a behavior' },
409
+ [ArgProp.Resource]: { word: 'resource', short: 'res', about: 'names a file or connection' },
410
+ [ArgProp.Written]: { word: 'written', short: 'out', about: 'may be modified' },
411
+ [ArgProp.Nse]: { word: 'nse', about: 'quoted, not evaluated' },
412
+ [ArgProp.Callee]: { word: 'callee', short: 'fn', about: 'called as a function' },
413
+ [ArgProp.Presence]: { word: 'presence', short: 'seen', about: 'only whether it was given matters' },
414
+ [ArgProp.Bounds]: { word: 'bounds', about: 'the result is one of its values' },
415
+ [ArgProp.Atomic]: { word: 'atomic', about: 'plain data only' },
416
+ [ArgProp.Handle]: { word: 'handle', about: 'an open connection' },
417
+ [ArgProp.Lazy]: { word: 'lazy', short: 'L', about: 'never evaluated' },
418
+ [ArgProp.Injectable]: { word: 'injectable', about: 'open to injection' },
419
+ [ArgProp.Deparsed]: { word: 'deparsed', about: 'its expression names part of the result' }
387
420
  };
388
421
  /** The bitfield the given {@link ArgProp}/{@link CallProp} member names stand for, unknown ones ignored. */
389
422
  function maskOfNames(of, names) {
@@ -394,40 +427,22 @@ function maskOfNames(of, names) {
394
427
  }
395
428
  return mask;
396
429
  }
397
- /** the properties as the words a reader wants, in the order they are declared */
398
- const CallPropLabels = {
399
- [CallProp.Pure]: 'pure',
400
- [CallProp.MayPure]: 'maybe pure',
401
- [CallProp.Throws]: 'can throw',
402
- [CallProp.Invisible]: 'invisible',
403
- [CallProp.Generic]: 'generic',
404
- [CallProp.Method]: 's3 method',
405
- [CallProp.Scope]: 'changes scope',
406
- [CallProp.NonDet]: 'non deterministic',
407
- [CallProp.Ambient]: 'ambient state',
408
- [CallProp.Configures]: 'sets ambient state',
409
- [CallProp.Ffi]: 'calls native code',
410
- [CallProp.Lang]: 'produces language object',
411
- [CallProp.Strict]: 'strict',
412
- [CallProp.Concurrent]: 'concurrent',
413
- [CallProp.Primitive]: 'primitive'
414
- };
415
430
  /** The words for whichever of `mask`'s bits appear in `entries`, shared by {@link ArgProps.words} and {@link CallProps.words}. */
416
431
  function wordsOf(entries, mask) {
417
432
  return mask === undefined ? [] : entries.filter(([bit]) => (mask & bit) !== 0).map(([, word]) => word);
418
433
  }
419
434
  /** A bit-keyed word table as `[bit, word]` pairs in ascending bit order, for {@link wordsOf}; shared by {@link ArgProps} and {@link CallProps}. */
420
435
  function bitEntries(byBit) {
421
- return Object.entries(byBit).map(([bit, word]) => [Number(bit), word]);
436
+ return Object.entries(byBit).map(([bit, { word }]) => [Number(bit), word]);
422
437
  }
423
- const ArgPropEntries = bitEntries(ArgPropNames);
424
- const CallPropEntries = bitEntries(CallPropLabels);
438
+ const ArgPropEntries = bitEntries(ArgPropWords);
439
+ const CallPropEntries = bitEntries(CallPropWords);
425
440
  /**
426
441
  * Utility functions for {@link ArgProps|argument property bitfields}.
427
442
  */
428
443
  exports.ArgProps = {
429
- /** the {@link ArgProp} bit to its name, in ascending bit order */
430
- names: ArgPropNames,
444
+ /** the {@link ArgProp} bits as words, in ascending bit order */
445
+ vocabulary: ArgPropWords,
431
446
  /** What an argument is used for, as words; see {@link wordsOf}. */
432
447
  words: (props) => wordsOf(ArgPropEntries, props),
433
448
  /** The mask the given {@link ArgProp} member names stand for; see {@link maskOfNames}. */
@@ -31,7 +31,7 @@ import { processEvalCall } from '../internal/process/functions/call/built-in/bui
31
31
  import { type AmbientScope, type AmbientStateAccess } from '../internal/process/functions/call/built-in/built-in-ambient-state';
32
32
  import type { Value } from '../eval/values/r-value';
33
33
  import type { ResolveInfo } from '../eval/resolve/alias-tracking';
34
- import { resolveAsSeq, resolveAsVector } from '../eval/resolve/resolve';
34
+ import { resolveAsElement, resolveAsSeq, resolveAsVector } from '../eval/resolve/resolve';
35
35
  import { resolveAsComparison, resolveAsGroup, resolveAsLogical } from '../eval/resolve/resolve-operators';
36
36
  import { resolveAsGet } from '../eval/resolve/resolve-get';
37
37
  import type { VariableResolve } from '../../config';
@@ -88,6 +88,8 @@ export interface DefaultBuiltInProcessorConfiguration extends BuiltInFnInfo {
88
88
  */
89
89
  readonly keepArgumentOut?: boolean;
90
90
  readonly hasUnknownSideEffects?: boolean | LinkTo<RegExp | string>;
91
+ /** without arguments, the result is the frame the call runs in, like `environment()`, so within a function it reads every binding of the frame */
92
+ readonly readsFrame?: boolean;
91
93
  /** how the call reads or writes global state like the graphics parameters or the options, see {@link AmbientStateAccess} */
92
94
  readonly ambient?: AmbientStateAccess | readonly AmbientStateAccess[];
93
95
  /** the call changes that state for a scope only, see {@link AmbientScope} */
@@ -113,7 +115,7 @@ export interface BuiltInEvalHandlerArgs extends ResolveInfo {
113
115
  node: RNodeWithParent;
114
116
  }
115
117
  export type BuiltInEvalHandler = (args: BuiltInEvalHandlerArgs) => Value;
116
- declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, readAllArguments, cfg, alternativeArgsFrom, hasUnknownSideEffects, ambient, scope, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
118
+ declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, readAllArguments, cfg, alternativeArgsFrom, hasUnknownSideEffects, ambient, scope, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig, readsFrame }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
117
119
  declare function defaultBuiltInProcessorReadallArgs<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, markArgsAsNSE: nse, markArgsAsMasked: masked, sig, ambient }: Pick<DefaultBuiltInProcessorConfiguration, 'useAsProcessor' | 'markArgsAsNSE' | 'markArgsAsMasked' | 'sig' | 'ambient'>): DataflowInformation;
118
120
  export declare const BuiltInProcessorMapper: {
119
121
  readonly "builtin:acc": typeof processAccess;
@@ -176,6 +178,7 @@ export declare const BuiltInEvalHandlerMapper: {
176
178
  readonly "eval:string-fn": (this: void, args: BuiltInEvalHandlerArgs) => Value;
177
179
  readonly "eval:group": typeof resolveAsGroup;
178
180
  readonly "eval:get": typeof resolveAsGet;
181
+ readonly "eval:element": typeof resolveAsElement;
179
182
  };
180
183
  export type ConfigOfBuiltInMappingName<N extends keyof typeof BuiltInProcessorMapper> = Parameters<typeof BuiltInProcessorMapper[N]>[4];
181
184
  export type BuiltInMemory = Map<BrandedIdentifier, IdentifierDefinition[]>;
@@ -92,7 +92,7 @@ function dataArgumentSymbols(args, sig) {
92
92
  }
93
93
  return symbols;
94
94
  }
95
- function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, readAllArguments, cfg, alternativeArgsFrom, hasUnknownSideEffects, ambient, scope, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig }) {
95
+ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, readAllArguments, cfg, alternativeArgsFrom, hasUnknownSideEffects, ambient, scope, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig, readsFrame }) {
96
96
  if (scope !== undefined) {
97
97
  return (0, built_in_ambient_state_1.processAmbientScope)(name, args, rootId, data, scope);
98
98
  }
@@ -106,7 +106,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
106
106
  let lastEnv = data.environment;
107
107
  /* `evalq(expr)` runs `expr` right here, in the frame it is called from */
108
108
  const inPlace = args.length === 1 && identifier_1.Identifier.getName(name.content) === 'evalq';
109
- const { information: res, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({
109
+ const { information: processed, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({
110
110
  name, args, rootId, data, sig, alternativeArgsFrom,
111
111
  keepArgumentGraphs: nse !== undefined || masked !== undefined,
112
112
  origin: useAsProcessor,
@@ -120,6 +120,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
120
120
  return { ...d, environment: lastEnv };
121
121
  }
122
122
  });
123
+ let res = processed;
123
124
  if (nsePositions !== undefined) {
124
125
  dropQuotedReferences(res, processedArguments, nsePositions, lastEnv);
125
126
  }
@@ -128,7 +129,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
128
129
  if (keepArgumentOut) {
129
130
  res.out = [...res.out, ...processedArguments.flatMap(arg => arg?.out ?? [])];
130
131
  }
131
- const alias = layout !== undefined && layout.alias >= 0 ? processedArguments[layout.alias] : undefined;
132
+ const alias = layout !== undefined && layout.alias >= 0 ? processedArguments[layout.alias === layout.rest ? processedArguments.length - 1 : layout.alias] : undefined;
132
133
  if (alias !== undefined) {
133
134
  res.graph.addEdge(rootId, alias.entryPoint, edge_1.EdgeType.Returns);
134
135
  }
@@ -139,6 +140,21 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
139
140
  const valuePositions = function_semantics_1.FunctionSemantics.call.signature.posWith(layout, processedArguments.length, built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Shape);
140
141
  readArguments(res.graph, rootId, valuePositions.map(i => processedArguments[i]));
141
142
  }
143
+ /* a function's frame handed out outlives the call, the global one stays reachable through the names anyway */
144
+ if (readsFrame && args.length === 0 && data.environment.level > 0) {
145
+ /* the parameters it holds are what {@link BuiltInFnInfo#frame} states, as reading one must not force it */
146
+ for (const definitions of data.environment.current.memory.values()) {
147
+ for (const definition of definitions) {
148
+ if (!node_id_1.NodeId.isBuiltIn(definition.nodeId) && definition.type !== identifier_1.ReferenceType.Parameter) {
149
+ res.graph.addEdge(rootId, definition.nodeId, edge_1.EdgeType.Reads);
150
+ }
151
+ }
152
+ }
153
+ }
154
+ /* before the unknown side effect, which forgets the values of the variables the ambient state is named by */
155
+ if (ambient !== undefined) {
156
+ res = (0, built_in_ambient_state_1.applyAmbientStateAccess)(res, args, rootId, data, ambient);
157
+ }
142
158
  if (hasUnknownSideEffects) {
143
159
  (0, unknown_side_effect_1.handleUnknownSideEffect)(res.graph, res.environment, rootId, hasUnknownSideEffects === true ? undefined : hasUnknownSideEffects);
144
160
  }
@@ -163,7 +179,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
163
179
  const exitPoints = res.exitPoints.filter(e => e.type !== 0 /* ExitPointType.Default */ || e.nodeId !== rootId);
164
180
  res.exitPoints = [...exitPoints, { type: cfg, nodeId: rootId, cds: data.cds }];
165
181
  }
166
- return ambient === undefined ? res : (0, built_in_ambient_state_1.applyAmbientStateAccess)(res, args, rootId, data, ambient);
182
+ return res;
167
183
  }
168
184
  function readArguments(graph, rootId, args) {
169
185
  for (const arg of args) {
@@ -274,7 +290,8 @@ exports.BuiltInEvalHandlerMapper = {
274
290
  [built_in_eval_name_1.BuiltInEvalName.Logical]: resolve_operators_1.resolveAsLogical,
275
291
  [built_in_eval_name_1.BuiltInEvalName.StringFn]: resolve_strings_1.StringFold.call,
276
292
  [built_in_eval_name_1.BuiltInEvalName.Group]: resolve_operators_1.resolveAsGroup,
277
- [built_in_eval_name_1.BuiltInEvalName.Get]: resolve_get_1.resolveAsGet
293
+ [built_in_eval_name_1.BuiltInEvalName.Get]: resolve_get_1.resolveAsGet,
294
+ [built_in_eval_name_1.BuiltInEvalName.Element]: resolve_1.resolveAsElement
278
295
  };
279
296
  /**
280
297
  * Whether a definition registered under `namespace` belongs in the always-on built-in environment: only base