@eagleoutice/flowr 2.14.0 → 2.14.2

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 (461) hide show
  1. package/README.md +169 -91
  2. package/abstract-interpretation/absint-visitor.d.ts +91 -25
  3. package/abstract-interpretation/absint-visitor.js +235 -74
  4. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
  5. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  6. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
  7. package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
  8. package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
  9. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
  10. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
  11. package/abstract-interpretation/data-frame/resolve-args.js +6 -4
  12. package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
  13. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
  14. package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
  15. package/abstract-interpretation/domains/partial-product-domain.js +1 -1
  16. package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
  17. package/abstract-interpretation/domains/set-range-domain.js +3 -2
  18. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
  19. package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
  20. package/benchmark/calibration.d.ts +18 -11
  21. package/benchmark/calibration.js +37 -27
  22. package/benchmark/slicer.d.ts +9 -2
  23. package/benchmark/slicer.js +44 -37
  24. package/benchmark/stats/count-comments.d.ts +16 -0
  25. package/benchmark/stats/count-comments.js +30 -0
  26. package/benchmark/stats/print.js +2 -0
  27. package/benchmark/stats/size-of.d.ts +7 -3
  28. package/benchmark/stats/size-of.js +7 -3
  29. package/benchmark/stats/stats.d.ts +7 -0
  30. package/benchmark/summarizer/first-phase/process.js +2 -19
  31. package/benchmark/summarizer/second-phase/graph.js +13 -3
  32. package/benchmark/summarizer/second-phase/process.js +2 -0
  33. package/cli/benchmark-app.js +4 -1
  34. package/cli/benchmark-helper-app.d.ts +1 -0
  35. package/cli/benchmark-helper-app.js +2 -2
  36. package/cli/common/options.d.ts +5 -0
  37. package/cli/common/options.js +1 -0
  38. package/cli/common/scripts-info.d.ts +5 -0
  39. package/cli/repl/commands/repl-dataflow.js +70 -27
  40. package/cli/repl/core.d.ts +1 -1
  41. package/cli/repl/core.js +1 -1
  42. package/cli/repl/execute.d.ts +2 -2
  43. package/cli/repl/execute.js +2 -2
  44. package/cli/repl/parser/slice-query-parser.js +2 -1
  45. package/cli/repl/server/connection.d.ts +4 -0
  46. package/cli/repl/server/connection.js +19 -16
  47. package/cli/repl/server/messages/message-analysis.d.ts +1 -1
  48. package/config.d.ts +6 -0
  49. package/config.js +12 -9
  50. package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
  51. package/control-flow/basic-cfg-guided-visitor.js +37 -24
  52. package/control-flow/cfg-dead-code.js +44 -33
  53. package/control-flow/cfg-properties.js +2 -2
  54. package/control-flow/cfg-simplification.js +6 -5
  55. package/control-flow/cfg-to-basic-blocks.js +11 -13
  56. package/control-flow/control-flow-graph.d.ts +179 -189
  57. package/control-flow/control-flow-graph.js +400 -263
  58. package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
  59. package/control-flow/dfg-cfg-guided-visitor.js +17 -13
  60. package/control-flow/diff-cfg.js +6 -14
  61. package/control-flow/happens-before.js +5 -4
  62. package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
  63. package/control-flow/semantic-cfg-guided-visitor.js +6 -26
  64. package/control-flow/simple-visitor.js +14 -15
  65. package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
  66. package/control-flow/useless-loop.js +18 -14
  67. package/core/steps/all/core/20-dataflow.d.ts +1 -3
  68. package/core/steps/pipeline/default-pipelines.d.ts +141 -157
  69. package/dataflow/cluster.js +7 -0
  70. package/dataflow/environments/apply-kill.d.ts +6 -0
  71. package/dataflow/environments/apply-kill.js +64 -32
  72. package/dataflow/environments/built-in-props.d.ts +10 -2
  73. package/dataflow/environments/built-in-props.js +9 -1
  74. package/dataflow/environments/built-in.d.ts +6 -3
  75. package/dataflow/environments/built-in.js +8 -5
  76. package/dataflow/environments/clone.d.ts +3 -3
  77. package/dataflow/environments/clone.js +5 -5
  78. package/dataflow/environments/default-builtin-config.d.ts +188 -8
  79. package/dataflow/environments/default-builtin-config.js +112 -39
  80. package/dataflow/environments/environment.d.ts +9 -1
  81. package/dataflow/environments/environment.js +25 -7
  82. package/dataflow/environments/identifier.d.ts +12 -1
  83. package/dataflow/environments/identifier.js +4 -1
  84. package/dataflow/environments/query-fn-props.d.ts +6 -0
  85. package/dataflow/environments/query-fn-props.js +20 -0
  86. package/dataflow/environments/resolve-by-name.d.ts +7 -0
  87. package/dataflow/environments/resolve-by-name.js +26 -2
  88. package/dataflow/environments/resolve-helper.d.ts +3 -1
  89. package/dataflow/environments/resolve-helper.js +2 -0
  90. package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
  91. package/dataflow/eval/resolve/alias-tracking.js +2 -2
  92. package/dataflow/eval/resolve/match-arguments.js +7 -5
  93. package/dataflow/eval/resolve/node-value.d.ts +3 -1
  94. package/dataflow/eval/resolve/node-value.js +12 -0
  95. package/dataflow/eval/resolve/resolve-argument.js +5 -4
  96. package/dataflow/eval/resolve/resolve-operators.js +10 -7
  97. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  98. package/dataflow/eval/resolve/resolve-working-directory.d.ts +1 -1
  99. package/dataflow/eval/resolve/resolve-working-directory.js +5 -5
  100. package/dataflow/eval/resolve/resolve.js +3 -2
  101. package/dataflow/eval/values/general.js +8 -5
  102. package/dataflow/extractor.d.ts +1 -4
  103. package/dataflow/extractor.js +11 -10
  104. package/dataflow/fn/exceptions-of-function.d.ts +6 -2
  105. package/dataflow/fn/exceptions-of-function.js +85 -38
  106. package/dataflow/fn/strict-function.d.ts +40 -0
  107. package/dataflow/fn/strict-function.js +339 -0
  108. package/dataflow/graph/call-graph.js +2 -2
  109. package/dataflow/graph/df-helper.d.ts +17 -2
  110. package/dataflow/graph/df-helper.js +19 -3
  111. package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
  112. package/dataflow/graph/diff-dataflow-graph.js +19 -2
  113. package/dataflow/graph/edge.d.ts +38 -2
  114. package/dataflow/graph/edge.js +32 -2
  115. package/dataflow/graph/graph.d.ts +32 -5
  116. package/dataflow/graph/graph.js +65 -4
  117. package/dataflow/graph/match-args.d.ts +69 -0
  118. package/dataflow/graph/match-args.js +167 -0
  119. package/dataflow/info.d.ts +40 -0
  120. package/dataflow/info.js +28 -1
  121. package/dataflow/internal/control-flow.d.ts +102 -0
  122. package/dataflow/internal/control-flow.js +200 -0
  123. package/dataflow/internal/linker.d.ts +6 -31
  124. package/dataflow/internal/linker.js +24 -81
  125. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
  126. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
  127. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
  128. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
  129. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  130. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
  131. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
  132. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
  133. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  134. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
  135. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
  137. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
  138. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  139. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
  140. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +8 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -0
  142. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
  143. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +27 -20
  144. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
  145. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  146. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +35 -6
  147. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
  148. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
  149. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
  150. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +6 -4
  151. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
  152. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +8 -3
  153. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
  154. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
  155. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
  156. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
  157. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
  158. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
  160. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +2 -2
  161. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
  162. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
  163. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
  164. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
  165. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
  166. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
  167. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +3 -2
  168. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +97 -33
  169. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
  170. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +12 -13
  171. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
  172. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +15 -12
  173. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
  174. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
  175. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
  176. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
  177. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
  178. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
  179. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
  180. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +45 -10
  181. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
  182. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +19 -3
  183. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
  184. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +29 -8
  185. package/dataflow/internal/process/functions/call/common.js +5 -6
  186. package/dataflow/internal/process/functions/call/deferred.js +2 -2
  187. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
  188. package/dataflow/internal/process/functions/call/known-call-handling.js +23 -1
  189. package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
  190. package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
  191. package/dataflow/internal/process/functions/call/nse.js +6 -1
  192. package/dataflow/internal/process/functions/call/quoted.js +2 -2
  193. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
  194. package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
  195. package/dataflow/internal/process/functions/process-argument.js +12 -4
  196. package/dataflow/internal/process/functions/process-parameter.js +13 -0
  197. package/dataflow/internal/process/process-named-call.d.ts +2 -2
  198. package/dataflow/internal/process/process-named-call.js +9 -7
  199. package/documentation/data/server/doc-data-server-messages.js +4 -4
  200. package/documentation/doc-readme.js +45 -0
  201. package/documentation/doc-util/doc-cfg.d.ts +8 -7
  202. package/documentation/doc-util/doc-cfg.js +10 -10
  203. package/documentation/doc-util/doc-playground.d.ts +12 -0
  204. package/documentation/doc-util/doc-playground.js +21 -0
  205. package/documentation/doc-util/doc-query.d.ts +4 -1
  206. package/documentation/doc-util/doc-query.js +4 -2
  207. package/documentation/wiki-absint.d.ts +3 -4
  208. package/documentation/wiki-absint.js +12 -5
  209. package/documentation/wiki-analyzer.js +2 -2
  210. package/documentation/wiki-cfg.js +101 -106
  211. package/documentation/wiki-core.js +1 -1
  212. package/documentation/wiki-dataflow-graph.js +85 -53
  213. package/documentation/wiki-linter.js +16 -1
  214. package/documentation/wiki-linting-and-testing.js +1 -16
  215. package/documentation/wiki-mk/doc-maker.js +6 -4
  216. package/documentation/wiki-query.js +67 -4
  217. package/documentation/wiki-signature-database.js +28 -2
  218. package/linter/linter-fix.d.ts +16 -0
  219. package/linter/linter-fix.js +104 -0
  220. package/linter/linter-format.d.ts +18 -1
  221. package/linter/linter-format.js +31 -1
  222. package/linter/linter-output.js +47 -11
  223. package/linter/linter-rules.d.ts +64 -9
  224. package/linter/linter-rules.js +5 -1
  225. package/linter/rules/absolute-path.js +4 -2
  226. package/linter/rules/dataframe-access-validation.js +6 -7
  227. package/linter/rules/deprecated-functions.d.ts +107 -10
  228. package/linter/rules/deprecated-functions.js +309 -23
  229. package/linter/rules/file-path-validity.js +5 -4
  230. package/linter/rules/function-finder-util.d.ts +6 -0
  231. package/linter/rules/function-finder-util.js +21 -13
  232. package/linter/rules/naming-convention.js +1 -1
  233. package/linter/rules/network-functions.d.ts +3 -3
  234. package/linter/rules/stop-with-call-arg.js +2 -2
  235. package/linter/rules/unclosed-connection.d.ts +44 -0
  236. package/linter/rules/unclosed-connection.js +200 -0
  237. package/linter/rules/undefined-symbol-util.js +6 -4
  238. package/linter/rules/undefined-symbol.js +2 -2
  239. package/linter/rules/unused-definition.js +8 -4
  240. package/linter/rules/unused-import.d.ts +60 -0
  241. package/linter/rules/unused-import.js +179 -0
  242. package/package.json +5 -8
  243. package/project/attached-packages.js +2 -1
  244. package/project/cache/flowr-analyzer-cache.d.ts +2 -5
  245. package/project/cache/flowr-analyzer-cache.js +4 -7
  246. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
  247. package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
  248. package/project/cache/flowr-cache.d.ts +9 -0
  249. package/project/cache/flowr-cache.js +19 -0
  250. package/project/context/flowr-analyzer-context.d.ts +7 -3
  251. package/project/context/flowr-analyzer-context.js +15 -9
  252. package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
  253. package/project/context/flowr-analyzer-dependencies-context.js +9 -14
  254. package/project/context/flowr-analyzer-files-context.js +15 -17
  255. package/project/context/flowr-analyzer-meta-context.js +2 -12
  256. package/project/dependency-version-space.d.ts +3 -10
  257. package/project/dependency-version-space.js +10 -9
  258. package/project/flowr-analyzer.d.ts +4 -6
  259. package/project/flowr-analyzer.js +4 -5
  260. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
  261. package/project/plugins/file-plugins/files/flowr-description-file.js +1 -1
  262. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
  263. package/project/plugins/file-plugins/files/flowr-namespace-file.js +23 -35
  264. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +1 -1
  265. package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
  266. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
  267. package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
  268. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
  269. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
  270. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
  271. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
  272. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
  273. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
  274. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
  275. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
  276. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
  277. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
  278. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
  279. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
  280. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
  281. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
  282. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
  283. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
  284. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
  285. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
  286. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
  287. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
  288. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
  289. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
  290. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
  291. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
  292. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
  293. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
  294. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
  295. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
  296. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
  297. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
  298. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
  299. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
  300. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
  301. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +5 -5
  302. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +33 -6
  303. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  304. package/project/sigdb/build.d.ts +2 -2
  305. package/project/sigdb/decode.d.ts +0 -5
  306. package/project/sigdb/decode.js +0 -8
  307. package/project/sigdb/index-format.d.ts +4 -4
  308. package/project/sigdb/manifest.d.ts +5 -3
  309. package/project/sigdb/manifest.js +50 -9
  310. package/project/sigdb/reader.d.ts +48 -13
  311. package/project/sigdb/reader.js +3 -2
  312. package/project/sigdb/schema.d.ts +5 -3
  313. package/project/sigdb/schema.js +2 -2
  314. package/project/sigdb/signature-db.d.ts +69 -0
  315. package/project/sigdb/signature-db.js +54 -0
  316. package/project/sigdb/signature-match.d.ts +10 -5
  317. package/project/sigdb/signature-match.js +13 -8
  318. package/queries/catalog/absint-query/absint-query-executor.js +1 -2
  319. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
  320. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
  321. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
  322. package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
  323. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  324. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
  325. package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
  326. package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
  327. package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
  328. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
  329. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
  330. package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
  331. package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
  332. package/queries/catalog/dependencies-query/link-devices.js +2 -8
  333. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
  334. package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
  335. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -1
  336. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  337. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -0
  338. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +6 -0
  339. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +25 -0
  340. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +31 -0
  341. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +56 -0
  342. package/queries/catalog/signature-query/signature-query-executor.js +4 -3
  343. package/queries/catalog/slice-query-options.d.ts +1 -1
  344. package/queries/catalog/slice-query-options.js +1 -1
  345. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  346. package/queries/query-function-filter.d.ts +8 -2
  347. package/queries/query-function-filter.js +11 -1
  348. package/queries/query.d.ts +11 -1
  349. package/queries/query.js +2 -0
  350. package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
  351. package/r-bridge/lang-4.x/ast/model/model.js +4 -4
  352. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
  353. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
  354. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  355. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
  356. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
  357. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
  358. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  359. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
  360. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  361. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
  362. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  363. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
  364. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  365. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
  366. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  367. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
  368. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
  369. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
  370. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  371. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
  372. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  373. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
  374. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  375. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
  376. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  377. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
  378. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  379. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
  380. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
  381. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -0
  382. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  383. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
  384. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  385. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
  386. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
  387. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +1 -0
  388. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  389. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
  390. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  391. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -0
  392. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  393. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
  394. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  395. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
  396. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  397. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
  398. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  399. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
  400. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
  401. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
  402. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
  403. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
  404. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
  405. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
  406. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
  407. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
  408. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
  409. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
  410. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
  411. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
  412. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  413. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
  414. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
  415. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
  416. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
  417. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
  418. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
  419. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
  420. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
  421. package/reconstruct/inline/source-inline-map.js +3 -3
  422. package/reconstruct/reconstruct.js +6 -4
  423. package/search/flowr-search-builder.d.ts +8 -8
  424. package/search/flowr-search-builder.js +4 -4
  425. package/search/flowr-search-filters.d.ts +2 -2
  426. package/search/flowr-search-filters.js +4 -15
  427. package/search/search-executor/search-enrichers.d.ts +6 -4
  428. package/search/search-executor/search-enrichers.js +44 -5
  429. package/slicing/criterion/filters/all-variables.js +2 -1
  430. package/slicing/criterion/parse.d.ts +2 -2
  431. package/slicing/criterion/parse.js +10 -8
  432. package/slicing/static/fingerprint.js +1 -1
  433. package/slicing/static/slice-call.js +2 -2
  434. package/util/arg-matching.d.ts +3 -0
  435. package/util/arg-matching.js +12 -1
  436. package/util/collections/arrays.d.ts +0 -4
  437. package/util/collections/arrays.js +4 -26
  438. package/util/diff-graph.d.ts +1 -1
  439. package/util/diff-graph.js +17 -3
  440. package/util/diff.d.ts +6 -0
  441. package/util/mermaid/ast.d.ts +1 -1
  442. package/util/mermaid/ast.js +5 -4
  443. package/util/mermaid/cfg.js +130 -24
  444. package/util/mermaid/dfg.js +31 -10
  445. package/util/mermaid/mermaid.js +2 -0
  446. package/util/objects.d.ts +21 -0
  447. package/util/objects.js +60 -0
  448. package/util/prefix.d.ts +1 -1
  449. package/util/simple-df/dfg-ascii.js +14 -3
  450. package/util/text/name-rank.d.ts +1 -1
  451. package/util/text/name-rank.js +1 -1
  452. package/util/text/playground-link.d.ts +131 -0
  453. package/util/text/playground-link.js +214 -0
  454. package/util/text/strings.js +7 -3
  455. package/util/version.js +1 -1
  456. package/control-flow/cfg-builder.d.ts +0 -30
  457. package/control-flow/cfg-builder.js +0 -79
  458. package/control-flow/extract-cfg.d.ts +0 -36
  459. package/control-flow/extract-cfg.js +0 -693
  460. package/project/cfg-kind.d.ts +0 -21
  461. package/project/cfg-kind.js +0 -26
@@ -233,13 +233,6 @@ exports.RGroupGenerics = {
233
233
  Summary: ['any', 'sum', 'prod', 'min', 'max', 'range'],
234
234
  Complex: ['Re', 'Im', 'Mod', 'Arg', 'Conj']
235
235
  };
236
- /**
237
- * Every R generic flowR states a built-in for: the {@link RGroupGenerics} members, the `.S3PrimitiveGenerics` and
238
- * internal generics (which have no R body, so {@link fnInfoFromSignature} could never see them), and the
239
- * `UseMethod` closures flowR models itself, as its own definition hides the one in the signature database.
240
- * The `<-` forms are left out, one replacement definition covers many names.
241
- * `npm run check:generic-labels` (part of `checkup`) compares this against a synced database.
242
- */
243
236
  /**
244
237
  * The internal generics: they dispatch in C rather than through `UseMethod`, so no signature can state it and
245
238
  * the list has to be written down. Everything that dispatches from R is generated, see {@link RBasePackageStore}.
@@ -251,7 +244,14 @@ const InternalGenerics = [
251
244
  'as.character', 'as.integer', 'as.double', 'as.logical', 'as.complex', 'as.numeric', 'as.raw',
252
245
  'is.na', 'is.nan', 'is.finite', 'is.infinite', 'is.matrix', 'is.numeric', 'cbind', 'rbind'
253
246
  ];
254
- /** Every name R dispatches on: the generated closure generics plus the {@link InternalGenerics}. */
247
+ /**
248
+ * Every name R dispatches on: the generated closure generics plus the {@link InternalGenerics}, i.e. the
249
+ * {@link RGroupGenerics} members, the `.S3PrimitiveGenerics` and internal generics (which have no R body, so
250
+ * {@link fnInfoFromSignature} could never see them), and the `UseMethod` closures flowR models itself, as its
251
+ * own definition hides the one in the signature database.
252
+ * The `<-` forms are left out, one replacement definition covers many names.
253
+ * `npm run check:generic-labels` (part of `checkup`) compares this against a synced database.
254
+ */
255
255
  const RGenerics = new Set([...r_base_packages_generated_1.RBasePackageStore.generics, ...InternalGenerics]);
256
256
  /** Label every {@link RGenerics} {@link CallProp.Generic}, splitting an entry that mixes them with names that do not dispatch (`&` does, `&&` does not). */
257
257
  function markGenerics(definitions) {
@@ -288,6 +288,23 @@ function markGenerics(definitions) {
288
288
  * Contains the built-in definitions recognized by flowR, as they are written down: {@link DefaultBuiltinConfig}
289
289
  * is what {@link markGenerics} makes of them, and a test checks that this is all it changes.
290
290
  */
291
+ /** what creating a plot does; restated by the deprecated plot creators, which do the same but should not be used */
292
+ const PlotCreateConfig = {
293
+ forceArgs: 'all',
294
+ hasUnknownSideEffects: {
295
+ type: 'link-to-last-call',
296
+ ignoreIf: (source, graph) => {
297
+ const sourceVertex = graph.getVertex(source);
298
+ /* map with add = true appends to an existing plot */
299
+ return (exports.PlotFunctionsWithAddParam.has(identifier_1.Identifier.getName(sourceVertex.name)) && (0, identify_link_to_last_call_relation_1.getValueOfArgument)(graph, sourceVertex, {
300
+ index: -1,
301
+ name: 'add'
302
+ }, [type_1.RType.Logical])?.content === true);
303
+ },
304
+ callName: toRegex(GraphicDeviceOpen)
305
+ },
306
+ props: built_in_props_1.CallProp.Graphics
307
+ };
291
308
  exports.WrittenBuiltinDefinitions = [
292
309
  { type: 'constant', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['NULL', 'NA', 'NA_integer_', 'NA_real_', 'NA_complex_', 'NA_character_']), value: null, assumePrimitive: true },
293
310
  { type: 'constant', names: [identifier_1.Identifier.from(['NaN', "base" /* PkgName.Base */])], value: NaN, assumePrimitive: true },
@@ -470,6 +487,28 @@ exports.WrittenBuiltinDefinitions = [
470
487
  config: { props: built_in_props_1.CallProp.Pure },
471
488
  assumePrimitive: true
472
489
  },
490
+ /* the hypothesis tests: they compute a test statistic and hand it back visibly, which is the output a reader sees */
491
+ {
492
+ type: 'function',
493
+ names: [
494
+ ...identifier_1.Identifier.fromAll("stats" /* PkgName.Stats */, [
495
+ 'anova', 'ansari.test', 'aov', 'bartlett.test', 'binom.test', 'Box.test', 'chisq.test', 'cor.test',
496
+ 'fisher.test', 'fligner.test', 'friedman.test', 'kruskal.test', 'ks.test', 'manova', 'mantelhaen.test',
497
+ 'mauchly.test', 'mcnemar.test', 'mood.test', 'oneway.test', 'pairwise.prop.test', 'pairwise.t.test',
498
+ 'pairwise.wilcox.test', 'poisson.test', 'PP.test', 'prop.test', 'prop.trend.test', 'quade.test',
499
+ 'shapiro.test', 't.test', 'TukeyHSD', 'var.test', 'wilcox.test'
500
+ ]),
501
+ ...identifier_1.Identifier.fromAll("car" /* PkgName.Car */, ['Anova', 'durbinWatsonTest', 'leveneTest', 'linearHypothesis', 'ncvTest', 'outlierTest']),
502
+ ...identifier_1.Identifier.fromAll("lmtest" /* PkgName.LmTest */, ['bgtest', 'bptest', 'coeftest', 'dwtest', 'gqtest', 'lrtest', 'raintest', 'resettest', 'waldtest']),
503
+ ...identifier_1.Identifier.fromAll("nortest" /* PkgName.NorTest */, ['ad.test', 'cvm.test', 'lillie.test', 'pearson.test', 'sf.test']),
504
+ ...identifier_1.Identifier.fromAll("tseries" /* PkgName.Tseries */, ['adf.test', 'jarque.bera.test', 'kpss.test', 'pp.test', 'runs.test', 'white.test']),
505
+ ...identifier_1.Identifier.fromAll("rstatix" /* PkgName.Rstatix */, ['anova_test', 'chisq_test', 'cor_test', 'kruskal_test', 'shapiro_test', 't_test', 'wilcox_test']),
506
+ identifier_1.Identifier.from(['glht', "multcomp" /* PkgName.Multcomp */])
507
+ ],
508
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
509
+ config: { props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Statistics },
510
+ assumePrimitive: false
511
+ },
473
512
  /* indices and index sequences: bounded by the shape of what they are handed, never by its contents */
474
513
  { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['which', 'which.max', 'which.min', 'seq_len', 'seq_along']),
475
514
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Narrows }, assumePrimitive: true },
@@ -492,13 +531,36 @@ exports.WrittenBuiltinDefinitions = [
492
531
  /* the connections and the calls that move data through them, so anything reaching them inherits it */
493
532
  { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['file', 'gzfile', 'bzfile', 'xzfile', 'unz', 'fifo']),
494
533
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
495
- config: { props: built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads | built_in_props_1.CallProp.Writes, sig: [['description', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
534
+ config: { props: built_in_props_1.CallProp.Opens | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads | built_in_props_1.CallProp.Writes, sig: [['description', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
496
535
  { type: 'function', names: [identifier_1.Identifier.from(['url', "base" /* PkgName.Base */])],
497
536
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
498
- config: { props: built_in_props_1.CallProp.Network | built_in_props_1.CallProp.Reads, sig: [['description', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
499
- { type: 'function', names: [identifier_1.Identifier.from(['socketConnection', "base" /* PkgName.Base */])],
537
+ config: { props: built_in_props_1.CallProp.Opens | built_in_props_1.CallProp.Network | built_in_props_1.CallProp.Reads, sig: [['description', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
538
+ { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['socketConnection', 'serverSocket']),
539
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
540
+ config: { props: built_in_props_1.CallProp.Opens | built_in_props_1.CallProp.Network | built_in_props_1.CallProp.Reads, sig: [['host', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
541
+ { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['textConnection', 'rawConnection']),
542
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
543
+ config: { props: built_in_props_1.CallProp.Opens, sig: [['object', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
544
+ { type: 'function', names: [identifier_1.Identifier.from(['dbConnect', "DBI" /* PkgName.Dbi */])],
500
545
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
501
- config: { props: built_in_props_1.CallProp.Network | built_in_props_1.CallProp.Reads, sig: [['host', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
546
+ config: { libFn: true, props: built_in_props_1.CallProp.Opens | built_in_props_1.CallProp.Database }, assumePrimitive: false },
547
+ /* the calls ending what an opener started, each stating the argument holding the handle */
548
+ { type: 'function', names: [identifier_1.Identifier.from(['close', "base" /* PkgName.Base */])],
549
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
550
+ config: { props: built_in_props_1.CallProp.Closes | built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, sig: [['con', built_in_props_1.ArgProp.Handle], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
551
+ { type: 'function', names: [identifier_1.Identifier.from(['closeAllConnections', "base" /* PkgName.Base */])],
552
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
553
+ config: { props: built_in_props_1.CallProp.Closes | built_in_props_1.CallProp.Invisible }, assumePrimitive: false },
554
+ { type: 'function', names: [identifier_1.Identifier.from(['dbDisconnect', "DBI" /* PkgName.Dbi */])],
555
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
556
+ config: { libFn: true, props: built_in_props_1.CallProp.Closes | built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Database, sig: [['conn', built_in_props_1.ArgProp.Handle], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
557
+ /* withr closes the connection it is handed when the scope it is called in ends */
558
+ { type: 'function', names: [identifier_1.Identifier.from(['local_connection', "withr" /* PkgName.Withr */])],
559
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
560
+ config: { libFn: true, props: built_in_props_1.CallProp.Closes, sig: [['con', built_in_props_1.ArgProp.Handle], ['.local_envir', built_in_props_1.ArgProp.Written]] }, assumePrimitive: false },
561
+ { type: 'function', names: [identifier_1.Identifier.from(['with_connection', "withr" /* PkgName.Withr */])],
562
+ processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
563
+ config: { libFn: true, props: built_in_props_1.CallProp.Closes | built_in_props_1.CallProp.MayPure, sig: [['con', built_in_props_1.ArgProp.Handle], ['code', built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Forced]] }, assumePrimitive: false },
502
564
  { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['readLines', 'readBin', 'readChar']),
503
565
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
504
566
  config: { props: built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads, sig: [['con', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
@@ -596,22 +658,12 @@ exports.WrittenBuiltinDefinitions = [
596
658
  // graphics base
597
659
  { type: 'function', names: namespacePlotFunctions(exports.PlotCreate),
598
660
  processor: built_in_proc_name_1.BuiltInProcName.Default,
599
- config: {
600
- forceArgs: 'all',
601
- hasUnknownSideEffects: {
602
- type: 'link-to-last-call',
603
- ignoreIf: (source, graph) => {
604
- const sourceVertex = graph.getVertex(source);
605
- /* map with add = true appends to an existing plot */
606
- return (exports.PlotFunctionsWithAddParam.has(identifier_1.Identifier.getName(sourceVertex.name)) && (0, identify_link_to_last_call_relation_1.getValueOfArgument)(graph, sourceVertex, {
607
- index: -1,
608
- name: 'add'
609
- }, [type_1.RType.Logical])?.content === true);
610
- },
611
- callName: toRegex(GraphicDeviceOpen)
612
- },
613
- props: built_in_props_1.CallProp.Graphics
614
- }, assumePrimitive: true },
661
+ config: PlotCreateConfig, assumePrimitive: true },
662
+ /* `qplot` creates a plot like the ones above and is deprecated on top of it; registered after them so this
663
+ definition is the one that sticks */
664
+ { type: 'function', names: [identifier_1.Identifier.from(['qplot', "ggplot2" /* PkgName.GgPlot2 */])],
665
+ processor: built_in_proc_name_1.BuiltInProcName.Default,
666
+ config: { ...PlotCreateConfig, props: built_in_props_1.CallProp.Graphics | built_in_props_1.CallProp.Deprecated }, assumePrimitive: true },
615
667
  // graphics addons
616
668
  { type: 'function', names: namespacePlotFunctions(PlotAddons),
617
669
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: {
@@ -727,7 +779,7 @@ exports.WrittenBuiltinDefinitions = [
727
779
  { type: 'function', names: [identifier_1.Identifier.from(['cat', "base" /* PkgName.Base */])],
728
780
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', hasUnknownSideEffects: { type: 'link-to-last-call', callName: /^sink$/ }, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes | built_in_props_1.CallProp.Prints, sig: [['...', built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Forced], ['file', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
729
781
  { type: 'function', names: [identifier_1.Identifier.from(['switch', "base" /* PkgName.Base */])],
730
- processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: [true], useAsProcessor: built_in_proc_name_1.BuiltInProcName.Switch, props: built_in_props_1.CallProp.Pure }, assumePrimitive: false },
782
+ processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: [true], alternativeArgsFrom: 1, useAsProcessor: built_in_proc_name_1.BuiltInProcName.Switch, props: built_in_props_1.CallProp.Pure }, assumePrimitive: false },
731
783
  { type: 'function', names: ['return'],
732
784
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: { cfg: 1 /* ExitPointType.Return */, keepArgumentOut: true, useAsProcessor: built_in_proc_name_1.BuiltInProcName.Return, props: built_in_props_1.CallProp.Pure, sig: [['value', built_in_props_1.ArgProp.Alias]] }, assumePrimitive: true },
733
785
  {
@@ -755,7 +807,8 @@ exports.WrittenBuiltinDefinitions = [
755
807
  { type: 'function', names: ['{'],
756
808
  processor: built_in_proc_name_1.BuiltInProcName.ExpressionList, config: {}, assumePrimitive: true },
757
809
  { type: 'function', names: [identifier_1.Identifier.from(['source', "base" /* PkgName.Base */])],
758
- processor: built_in_proc_name_1.BuiltInProcName.Source, config: { includeFunctionCall: true, forceFollow: false }, assumePrimitive: false },
810
+ /* it hands back what it evaluated invisibly, so a top-level `source()` prints nothing of its own */
811
+ processor: built_in_proc_name_1.BuiltInProcName.Source, config: { includeFunctionCall: true, forceFollow: false, props: built_in_props_1.CallProp.Invisible }, assumePrimitive: false },
759
812
  { type: 'function', names: ['['],
760
813
  processor: built_in_proc_name_1.BuiltInProcName.Access, config: { treatIndicesAsString: false, props: built_in_props_1.CallProp.Pure }, assumePrimitive: true },
761
814
  { type: 'function', names: ['[['],
@@ -813,11 +866,12 @@ exports.WrittenBuiltinDefinitions = [
813
866
  processor: built_in_proc_name_1.BuiltInProcName.SpecialBinOp, config: { lazy: true, evalRhsWhen: false, props: built_in_props_1.CallProp.Pure }, assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.Logical },
814
867
  { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['&', '|']),
815
868
  processor: built_in_proc_name_1.BuiltInProcName.SpecialBinOp, config: { lazy: false, props: built_in_props_1.CallProp.Pure }, assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.Logical },
869
+ /* a pipe hands back what the side it feeds hands back, which `Alias` is what states */
816
870
  { type: 'function', names: ['|>'],
817
- processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '_', assignLhs: false, returnLhs: false }, assumePrimitive: true },
818
- { type: 'function', names: [identifier_1.Identifier.from(['%>%', "magrittr" /* PkgName.Magrittr */]), '%!>%'], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: false, returnLhs: false, rhsMightBeSymbol: true }, assumePrimitive: true },
819
- { type: 'function', names: [identifier_1.Identifier.from(['%<>%', "magrittr" /* PkgName.Magrittr */])], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: true, returnLhs: false, rhsMightBeSymbol: true }, assumePrimitive: true },
820
- { type: 'function', names: [identifier_1.Identifier.from(['%T>%', "magrittr" /* PkgName.Magrittr */])], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: false, returnLhs: true, rhsMightBeSymbol: true }, assumePrimitive: true },
871
+ processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '_', assignLhs: false, returnLhs: false, sig: [['lhs', built_in_props_1.ArgProp.Value], ['rhs', built_in_props_1.ArgProp.Alias]] }, assumePrimitive: true },
872
+ { type: 'function', names: [identifier_1.Identifier.from(['%>%', "magrittr" /* PkgName.Magrittr */]), '%!>%'], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: false, returnLhs: false, rhsMightBeSymbol: true, sig: [['lhs', built_in_props_1.ArgProp.Value], ['rhs', built_in_props_1.ArgProp.Alias]] }, assumePrimitive: true },
873
+ { type: 'function', names: [identifier_1.Identifier.from(['%<>%', "magrittr" /* PkgName.Magrittr */])], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: true, returnLhs: false, rhsMightBeSymbol: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope }, assumePrimitive: true },
874
+ { type: 'function', names: [identifier_1.Identifier.from(['%T>%', "magrittr" /* PkgName.Magrittr */])], processor: built_in_proc_name_1.BuiltInProcName.Pipe, config: { pipePlaceholderName: '.', assignLhs: false, returnLhs: true, rhsMightBeSymbol: true, sig: [['lhs', built_in_props_1.ArgProp.Alias], ['rhs', built_in_props_1.ArgProp.Value]] }, assumePrimitive: true },
821
875
  { type: 'function', names: identifier_1.Identifier.fromAll("purrr" /* PkgName.Purrr */, ['map', 'map_lgl', 'map_int', 'map_dbl', 'map_chr']), processor: built_in_proc_name_1.BuiltInProcName.PurrrFormula, config: {
822
876
  args: {
823
877
  '.x': { index: 0, name: '.x' }
@@ -970,7 +1024,7 @@ exports.WrittenBuiltinDefinitions = [
970
1024
  { type: 'function', names: [identifier_1.Identifier.from(['exec', "rlang" /* PkgName.Rlang */])],
971
1025
  processor: built_in_proc_name_1.BuiltInProcName.Apply, config: { indexOfFunction: 0, nameOfFunctionArgument: '.fn', unquoteFunction: true, hasUnknownSideEffects: true, libFn: true, props: built_in_props_1.CallProp.MayPure, sig: [['.fn', built_in_props_1.ArgProp.Callee], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
972
1026
  { type: 'function', names: identifier_1.Identifier.fromAll("purrr" /* PkgName.Purrr */, ['invoke', 'invoke_map']),
973
- processor: built_in_proc_name_1.BuiltInProcName.Apply, config: { indexOfFunction: 0, nameOfFunctionArgument: '.f', unquoteFunction: true, hasUnknownSideEffects: true, libFn: true, props: built_in_props_1.CallProp.MayPure, sig: [['.f', built_in_props_1.ArgProp.Callee], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1027
+ processor: built_in_proc_name_1.BuiltInProcName.Apply, config: { indexOfFunction: 0, nameOfFunctionArgument: '.f', unquoteFunction: true, hasUnknownSideEffects: true, libFn: true, props: built_in_props_1.CallProp.MayPure | built_in_props_1.CallProp.Deprecated, sig: [['.f', built_in_props_1.ArgProp.Callee], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
974
1028
  /* the `{...}` of a template holds R code, evaluated where the call is; `cli_abort` stays with the other
975
1029
  * error exits, as terminating a branch matters more than interpolating its message */
976
1030
  { type: 'function', names: [...identifier_1.Identifier.fromAll("glue" /* PkgName.Glue */, ['glue', 'glue_safe', 'glue_collapse']), identifier_1.Identifier.from(['str_glue', "stringr" /* PkgName.Stringr */])],
@@ -980,7 +1034,7 @@ exports.WrittenBuiltinDefinitions = [
980
1034
  'format_inline', 'cli_verbatim']),
981
1035
  processor: built_in_proc_name_1.BuiltInProcName.StringTemplate, config: { markup: true, props: built_in_props_1.CallProp.MayPure }, assumePrimitive: false },
982
1036
  { type: 'function', names: [identifier_1.Identifier.from(['str_interp', "stringr" /* PkgName.Stringr */])],
983
- processor: built_in_proc_name_1.BuiltInProcName.StringTemplate, config: { open: '${', props: built_in_props_1.CallProp.MayPure }, assumePrimitive: false },
1037
+ processor: built_in_proc_name_1.BuiltInProcName.StringTemplate, config: { open: '${', props: built_in_props_1.CallProp.MayPure | built_in_props_1.CallProp.Deprecated }, assumePrimitive: false },
984
1038
  { type: 'function', names: [identifier_1.Identifier.from(['local', "base" /* PkgName.Base */])],
985
1039
  processor: built_in_proc_name_1.BuiltInProcName.Local, config: { args: { env: 'envir', expr: 'expr' } }, assumePrimitive: false },
986
1040
  { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['with', 'within']),
@@ -1178,8 +1232,10 @@ exports.WrittenBuiltinDefinitions = [
1178
1232
  { type: 'function', names: [identifier_1.Identifier.from(['commandArgs', "base" /* PkgName.Base */])],
1179
1233
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.CommandLine }, assumePrimitive: false },
1180
1234
  /* system commands */
1181
- { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['system', 'system2', 'pipe', 'shell', 'shell.exec']),
1235
+ { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['system', 'system2', 'shell', 'shell.exec']),
1182
1236
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Process }, assumePrimitive: false },
1237
+ { type: 'function', names: [identifier_1.Identifier.from(['pipe', "base" /* PkgName.Base */])],
1238
+ processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Opens | built_in_props_1.CallProp.Process, sig: [['description', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
1183
1239
  { type: 'function', names: [identifier_1.Identifier.from(['runjs', "shinyjs" /* PkgName.ShinyJs */])],
1184
1240
  processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', libFn: true, props: built_in_props_1.CallProp.Process }, assumePrimitive: false },
1185
1241
  /* whatever the user types, picks, or sends along with a request */
@@ -1287,9 +1343,13 @@ exports.WrittenBuiltinDefinitions = [
1287
1343
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Pure, sig: [['data', built_in_props_1.ArgProp.Value], ['nrow', built_in_props_1.ArgProp.Value], ['ncol', built_in_props_1.ArgProp.Value], ['byrow', built_in_props_1.ArgProp.Flag], ['dimnames', built_in_props_1.ArgProp.Value]] }, assumePrimitive: true },
1288
1344
  /* the tidyverse verbs, under the names R declares them with. They keep the data mask the group above
1289
1345
  gives them; what this adds is which argument is the data and what the further ones are called */
1290
- { type: 'function', names: identifier_1.Identifier.fromAll("dplyr" /* PkgName.Dplyr */, ['mutate', 'transmute', 'select', 'rename']),
1346
+ { type: 'function', names: identifier_1.Identifier.fromAll("dplyr" /* PkgName.Dplyr */, ['mutate', 'select', 'rename']),
1291
1347
  processor: built_in_proc_name_1.BuiltInProcName.Default,
1292
1348
  config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure, sig: SigDataDots }, assumePrimitive: false },
1349
+ /* `transmute` is one of them and deprecated on top of it */
1350
+ { type: 'function', names: [identifier_1.Identifier.from(['transmute', "dplyr" /* PkgName.Dplyr */])],
1351
+ processor: built_in_proc_name_1.BuiltInProcName.Default,
1352
+ config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Deprecated, sig: SigDataDots }, assumePrimitive: false },
1293
1353
  { type: 'function', names: [identifier_1.Identifier.from(['filter', "dplyr" /* PkgName.Dplyr */]), identifier_1.Identifier.from(['slice', "dplyr" /* PkgName.Dplyr */])],
1294
1354
  processor: built_in_proc_name_1.BuiltInProcName.Default,
1295
1355
  config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure,
@@ -1339,7 +1399,7 @@ exports.WrittenBuiltinDefinitions = [
1339
1399
  sig: [['data', built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Value], ['names_from', built_in_props_1.ArgProp.Value], ['values_from', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1340
1400
  { type: 'function', names: [identifier_1.Identifier.from(['separate', "tidyr" /* PkgName.TidyR */])],
1341
1401
  processor: built_in_proc_name_1.BuiltInProcName.Default,
1342
- config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure,
1402
+ config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Deprecated,
1343
1403
  sig: [['data', built_in_props_1.ArgProp.Value], ['col', built_in_props_1.ArgProp.Value], ['into', built_in_props_1.ArgProp.Value], ['sep', built_in_props_1.ArgProp.Value], ['remove', built_in_props_1.ArgProp.Flag], ['convert', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1344
1404
  { type: 'function', names: [identifier_1.Identifier.from(['unite', "tidyr" /* PkgName.TidyR */])],
1345
1405
  processor: built_in_proc_name_1.BuiltInProcName.Default,
@@ -1387,6 +1447,19 @@ exports.WrittenBuiltinDefinitions = [
1387
1447
  { type: 'function', names: [identifier_1.Identifier.from(['download.file', "utils" /* PkgName.Utils */])],
1388
1448
  processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
1389
1449
  config: { props: built_in_props_1.CallProp.Network | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes, sig: [['url', built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Resource], ['method', built_in_props_1.ArgProp.Value], ['quiet', built_in_props_1.ArgProp.Flag], ['mode', built_in_props_1.ArgProp.Value], ['cacheOK', built_in_props_1.ArgProp.Flag], ['extra', built_in_props_1.ArgProp.Value], ['headers', built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1450
+ /** Deprecated Functions */
1451
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("dplyr" /* PkgName.Dplyr */, ['id', 'top_n', 'sample_n', 'recode', 'progress_estimated', 'group_nest', 'add_rownames', 'tbl_df', 'src_local', 'summarise_each', 'summarize_', 'summarise_', 'slice_', 'select_vars_', 'select_', 'rename_vars_', 'rename_', 'transmute_', 'tally_', 'mutate_', 'group_indices_', 'group_by_', 'funs_', 'filter_', 'do_', 'distinct_', 'count_', 'arrange_', 'add_tally_', 'add_count_', 'funs', 'do', 'combine', 'changes', 'location', 'eval_tbls2', 'eval_tbls', 'compare_tbls2', 'compare_tbls', 'bench_tbls', 'current_vars', 'select_var', 'rename_vars', 'select_vars', 'failwith', 'all_vars', 'vars', 'select_all', 'mutate_all', 'summarise_all', 'group_by_all', 'filter_all', 'all_equal', 'arrange_all', 'distinct_all']) },
1452
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: [identifier_1.Identifier.make('fct_explicit_na', "forcats" /* PkgName.Forecats */)] },
1453
+ /* deprecated, but still data-masking: restating the mask keeps the column names out of the variable resolution */
1454
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.Default, config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Deprecated },
1455
+ names: [...identifier_1.Identifier.fromAll("dplyr" /* PkgName.Dplyr */, ['nest_by', 'with_groups', 'group_split']), ...identifier_1.Identifier.fromAll("tidyr" /* PkgName.TidyR */, ['spread', 'separate_rows', 'gather', 'extract'])] },
1456
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("ggplot2" /* PkgName.GgPlot2 */, ['gg_dep', 'is.theme', 'is.ggplot', 'guide_train', 'is.ggproto', 'fortify', 'is.facet', 'coord_map', 'coord_flip', 'is.Coord', 'annotation_logticks', 'aes_auto', 'aes_']) },
1457
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("plyr" /* PkgName.Plyr */, ['liply', 'isplit2']) },
1458
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("purrr" /* PkgName.Purrr */, ['transpose', 'as_vector', 'map_dfr', 'flatten', 'reduce_right', 'accumulate', 'map_raw', 'update_list', 'when', 'rdunif', 'rbernoulli', 'splice', 'rerun', 'prepend', 'at_depth', 'cross', 'list_along']) },
1459
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: ['`%@%`'] },
1460
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("readr" /* PkgName.Readr */, ['read_table2', 'melt_table', 'melt_fwf', 'melt_delim']) },
1461
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("tibble" /* PkgName.Tibble */, ['repair_names', 'set_tidy_names', 'tidy_names', 'is.tibble', 'trunc_mat', 'frame_data', 'as.tibble', 'as_data_frame', 'lst_', 'data_frame_', 'tibble_', 'data_frame', 'as_tibble']) },
1462
+ { type: 'function', processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Deprecated }, names: identifier_1.Identifier.fromAll("tidyr" /* PkgName.TidyR */, ['nest_legacy', 'unnest_', 'unite_', 'spread_', 'separate_', 'separate_rows_', 'nest_', 'gather_', 'fill_', 'extract_', 'nesting_', 'crossing_', 'expand_', 'drop_na_', 'complete_', 'extract_numeric']) },
1390
1463
  ];
1391
1464
  /**
1392
1465
  * Contains the built-in definitions recognized by flowR
@@ -48,9 +48,11 @@ export declare class Environment implements IEnvironment {
48
48
  builtInEnv?: true;
49
49
  /** {@link memory} is shared with a clone; writing needs {@link writableMemory} to unshare it first */
50
50
  private sharedMemory?;
51
+ /** {@link parent} is shared with the environment this was cloned from; writing through it needs {@link writableParent} */
52
+ private sharedParent?;
51
53
  /** marks the global environment (`.GlobalEnv`); attached packages (see {@link EnvType}) live below it */
52
54
  globalEnv?: true;
53
- constructor(parent: Environment, isBuiltInDefault?: true | undefined);
55
+ constructor(parent: Environment, isBuiltInDefault?: true | undefined, memory?: BuiltInMemory);
54
56
  /** Marks this as an attached-package layer (see {@link EnvType}) for package `name`. */
55
57
  asLibrary(name: string, type: EnvType): this;
56
58
  /** Marks this as the global environment (`.GlobalEnv`); see {@link globalEnv}. */
@@ -59,6 +61,12 @@ export declare class Environment implements IEnvironment {
59
61
  setClosureNodeId(nodeId: NodeId): void;
60
62
  /** Provides the closure linked to this environment. */
61
63
  get closure(): NodeId | undefined;
64
+ /**
65
+ * The parent, unshared first when a write is about to go through it. A `clone(true)` hands out the original
66
+ * chain and lets it materialize one frame at a time here, because a removal usually reaches a frame or two,
67
+ * not the ~20 an attached-package search path is deep.
68
+ */
69
+ get writableParent(): Environment;
62
70
  /**
63
71
  * This environment's {@link memory}, ready to be written to. Every in-place write must go through this
64
72
  * rather than through {@link memory} directly, as {@link clone} hands the map itself to the clone and only
@@ -42,12 +42,15 @@ class Environment {
42
42
  builtInEnv;
43
43
  /** {@link memory} is shared with a clone; writing needs {@link writableMemory} to unshare it first */
44
44
  sharedMemory;
45
+ /** {@link parent} is shared with the environment this was cloned from; writing through it needs {@link writableParent} */
46
+ sharedParent;
45
47
  /** marks the global environment (`.GlobalEnv`); attached packages (see {@link EnvType}) live below it */
46
48
  globalEnv;
47
- constructor(parent, isBuiltInDefault = undefined) {
49
+ constructor(parent, isBuiltInDefault = undefined, memory) {
48
50
  this.id = isBuiltInDefault ? 0 : environmentIdCounter++;
49
51
  this.parent = parent;
50
- this.memory = new Map();
52
+ /* a clone hands its own (then shared) memory in, so the fresh map a new frame needs is not allocated to be dropped */
53
+ this.memory = memory ?? new Map();
51
54
  // do not store if not needed!
52
55
  if (isBuiltInDefault) {
53
56
  this.builtInEnv = isBuiltInDefault;
@@ -72,6 +75,20 @@ class Environment {
72
75
  get closure() {
73
76
  return this.c;
74
77
  }
78
+ /**
79
+ * The parent, unshared first when a write is about to go through it. A `clone(true)` hands out the original
80
+ * chain and lets it materialize one frame at a time here, because a removal usually reaches a frame or two,
81
+ * not the ~20 an attached-package search path is deep.
82
+ */
83
+ get writableParent() {
84
+ if (this.sharedParent) {
85
+ const parent = this.parent.clone(false);
86
+ parent.sharedParent = true;
87
+ this.parent = parent;
88
+ this.sharedParent = undefined;
89
+ }
90
+ return this.parent;
91
+ }
75
92
  /**
76
93
  * This environment's {@link memory}, ready to be written to. Every in-place write must go through this
77
94
  * rather than through {@link memory} directly, as {@link clone} hands the map itself to the clone and only
@@ -96,14 +113,15 @@ class Environment {
96
113
  if (this.builtInEnv) {
97
114
  return this; // do not clone the built-in environment
98
115
  }
99
- const parent = recurseParents ? this.parent.clone(recurseParents) : this.parent;
100
- const clone = new Environment(parent, this.builtInEnv);
116
+ const clone = new Environment(this.parent, this.builtInEnv, this.memory);
101
117
  clone.c = this.c;
102
118
  clone.n = this.n;
103
119
  clone.t = this.t;
104
120
  clone.globalEnv = this.globalEnv;
105
- clone.memory = this.memory;
106
121
  clone.sharedMemory = this.sharedMemory = true;
122
+ if (recurseParents && !this.parent.builtInEnv) {
123
+ clone.sharedParent = true;
124
+ }
107
125
  return clone;
108
126
  }
109
127
  /**
@@ -380,7 +398,7 @@ class Environment {
380
398
  }
381
399
  const [name, ns] = identifier_1.Identifier.toArray(id);
382
400
  if (ns !== undefined && this.n !== ns) {
383
- this.parent.remove(id);
401
+ this.writableParent.remove(id);
384
402
  return this;
385
403
  }
386
404
  const definition = this.memory.get(name);
@@ -391,7 +409,7 @@ class Environment {
391
409
  cont = !definition.every(d => (0, info_1.happensInEveryBranch)(d.cds));
392
410
  }
393
411
  if (cont) {
394
- this.parent.remove(name);
412
+ this.writableParent.remove(name);
395
413
  }
396
414
  return this;
397
415
  }
@@ -133,6 +133,8 @@ export declare const Identifier: {
133
133
  * a user definition, so a local `sd()` stays bare.
134
134
  *
135
135
  * Returns `undefined` when none apply. Steps 2 and 3 need the call's `name`.
136
+ * @param origins - the origins of the call to qualify
137
+ * @param name - the name the call was written with, needed by steps 2 and 3
136
138
  * @param qualifyBaseR - whether to also qualify a bare base-R call from its exporting package (default `true`)
137
139
  * @see {@link Dataflow.qualify} - the compact form, if you have the call's id and its graph
138
140
  */
@@ -152,9 +154,11 @@ export declare const enum PkgName {
152
154
  Utils = "utils",
153
155
  AssertThat = "assertthat",
154
156
  Box = "box",
157
+ Car = "car",
155
158
  Cli = "cli",
156
159
  CohortBuilder = "cohortBuilder",
157
160
  DataTable = "data.table",
161
+ Dbi = "DBI",
158
162
  Devtools = "devtools",
159
163
  Dplyr = "dplyr",
160
164
  Fs = "fs",
@@ -166,9 +170,12 @@ export declare const enum PkgName {
166
170
  Inferference = "inferference",
167
171
  Janitor = "janitor",
168
172
  Lattice = "lattice",
173
+ LmTest = "lmtest",
169
174
  Magick = "magick",
170
175
  Magrittr = "magrittr",
171
176
  Msgr = "msgr",
177
+ Multcomp = "multcomp",
178
+ NorTest = "nortest",
172
179
  PkgLoad = "pkgload",
173
180
  Plyr = "plyr",
174
181
  Purrr = "purrr",
@@ -180,6 +187,7 @@ export declare const enum PkgName {
180
187
  Rlang = "rlang",
181
188
  RmethodsS3 = "R.methodsS3",
182
189
  Roo = "R.oo",
190
+ Rstatix = "rstatix",
183
191
  RstudioApi = "rstudioapi",
184
192
  Rutils = "R.utils",
185
193
  S7 = "S7",
@@ -197,7 +205,10 @@ export declare const enum PkgName {
197
205
  Stringr = "stringr",
198
206
  TinyPlot = "tinyplot",
199
207
  TryCatchLog = "tryCatchLog",
200
- Withr = "withr"
208
+ Tseries = "tseries",
209
+ Withr = "withr",
210
+ Forecats = "forcats",
211
+ Readr = "readr"
201
212
  }
202
213
  /**
203
214
  * Each reference has exactly one reference type, stored as the respective number.
@@ -5,6 +5,7 @@ exports.isReferenceType = isReferenceType;
5
5
  const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
6
6
  const strings_1 = require("../../util/text/strings");
7
7
  const r_base_packages_1 = require("../../util/r-base-packages");
8
+ const objects_1 = require("../../util/objects");
8
9
  const dotDotDotAccess = /^\.\.\d+$/;
9
10
  /**
10
11
  * Helper functions to work with {@link Identifier|identifiers}.
@@ -222,6 +223,8 @@ exports.Identifier = {
222
223
  * a user definition, so a local `sd()` stays bare.
223
224
  *
224
225
  * Returns `undefined` when none apply. Steps 2 and 3 need the call's `name`.
226
+ * @param origins - the origins of the call to qualify
227
+ * @param name - the name the call was written with, needed by steps 2 and 3
225
228
  * @param qualifyBaseR - whether to also qualify a bare base-R call from its exporting package (default `true`)
226
229
  * @see {@link Dataflow.qualify} - the compact form, if you have the call's id and its graph
227
230
  */
@@ -311,7 +314,7 @@ var ReferenceType;
311
314
  ReferenceType[ReferenceType["NonFunction"] = 1024] = "NonFunction";
312
315
  })(ReferenceType || (exports.ReferenceType = ReferenceType = {}));
313
316
  /** Reverse mapping of the reference types so you can get the name from the bitmask (useful for debugging) */
314
- exports.ReferenceTypeReverseMapping = new Map(Object.entries(ReferenceType).map(([k, v]) => [v, k]));
317
+ exports.ReferenceTypeReverseMapping = new Map((0, objects_1.enumMembers)(ReferenceType).map(([name, value]) => [value, name]));
315
318
  /**
316
319
  * Check if the reference types have an overlapping type!
317
320
  */
@@ -3,7 +3,9 @@ import type { BuiltIns } from './built-in';
3
3
  import type { BuiltInDefinition, BuiltInDefinitions } from './built-in-config';
4
4
  import type { REnvironmentInformation } from './environment';
5
5
  import { Identifier } from './identifier';
6
+ import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
7
  import type { PackageSignatureSource } from '../../project/sigdb/reader';
8
+ import type { DataflowInformation } from '../info';
7
9
  /**
8
10
  * Where to look up what flowR knows about a function, in that order:
9
11
  * the name as it resolves here, the built-in definitions, and the signature database for the rest.
@@ -25,6 +27,10 @@ export interface FnPropsSource {
25
27
  * in the analyzed code, which shadows any built-in.
26
28
  */
27
29
  export declare function queryFnProps(name: Identifier, { environment, builtIns, signatures, version }: FnPropsSource): BuiltInFnInfo | undefined;
30
+ /** What flowR states about the call `id` makes, together with the name the call resolved to. */
31
+ export declare function callFnProps(id: NodeId, { graph, environment }: Pick<DataflowInformation, 'graph' | 'environment'>): (BuiltInFnInfo & {
32
+ name: Identifier;
33
+ }) | undefined;
28
34
  /**
29
35
  * What the signature database implies for a package function: what its own entry states
30
36
  * (see {@link fnInfoFromSignature}) plus the {@link PropagatedProps} of everything it calls, transitively.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BuiltInIndex = void 0;
4
4
  exports.queryFnProps = queryFnProps;
5
+ exports.callFnProps = callFnProps;
5
6
  exports.inferFnProps = inferFnProps;
6
7
  exports.builtInNames = builtInNames;
7
8
  const built_in_props_1 = require("./built-in-props");
@@ -10,6 +11,8 @@ const environment_1 = require("./environment");
10
11
  const identifier_1 = require("./identifier");
11
12
  const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
12
13
  const resolve_helper_1 = require("./resolve-helper");
14
+ const vertex_1 = require("../graph/vertex");
15
+ const df_helper_1 = require("../graph/df-helper");
13
16
  /**
14
17
  * What flowR states about the package export `definition` binds, `undefined` if it binds none or if flowR
15
18
  * states nothing about it. `library(pkg)` binds every export itself, and that binding hides the built-in layer.
@@ -80,6 +83,23 @@ function queryFnProps(name, { environment, builtIns, signatures, version }) {
80
83
  }
81
84
  return { sig: info?.sig ?? known.sig, props: (info?.props ?? 0) | (known.props ?? 0) };
82
85
  }
86
+ /** What flowR states about the call `id` makes, together with the name the call resolved to. */
87
+ function callFnProps(id, { graph, environment }) {
88
+ const vertex = graph.getVertex(id);
89
+ if (!vertex_1.FunctionCallVertex.is(vertex)) {
90
+ return undefined;
91
+ }
92
+ /* what the call resolved to decides, as a definition in the analyzed code shadows the built-in; a call
93
+ * flowR settled on the built-ins keeps no environment, and a later redefinition must not speak for it */
94
+ const known = vertex.environment ?? environment;
95
+ const name = df_helper_1.Dataflow.qualify(id, graph, false) ?? vertex.name;
96
+ return {
97
+ name,
98
+ ...queryFnProps(name, {
99
+ environment: vertex.onlyBuiltin ? { level: 0, current: environment_1.REnvironment.findBuiltIn(known.current) } : known
100
+ })
101
+ };
102
+ }
83
103
  /**
84
104
  * What the signature database implies for a package function: what its own entry states
85
105
  * (see {@link fnInfoFromSignature}) plus the {@link PropagatedProps} of everything it calls, transitively.
@@ -17,6 +17,13 @@ export declare function resolveByName(id: Identifier, environment: REnvironmentI
17
17
  * @useInstead {@link Resolve.byName}
18
18
  */
19
19
  export declare function resolveByNameAnyType(id: Identifier, environment: REnvironmentInformation): IdentifierDefinition[] | undefined;
20
+ /**
21
+ * Whether every definition `name` may refer to is the built-in one (or there is none), i.e., the name is not
22
+ * shadowed by a user definition. Pass the {@link ReferenceType} the use site wants: `Function` for a call like
23
+ * `ls()`, `Constant` for a name like `.GlobalEnv`.
24
+ * @useInstead {@link Resolve.isBuiltIn}
25
+ */
26
+ export declare function resolvesToBuiltIn(name: Identifier, environment: REnvironmentInformation, target: ReferenceType.Function | ReferenceType.Constant): boolean;
20
27
  /**
21
28
  * Checks whether the given identifier name resolves to a built-in constant with the given value.
22
29
  * @param name - The name of the identifier to resolve
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveByName = resolveByName;
4
4
  exports.resolveByNameAnyType = resolveByNameAnyType;
5
+ exports.resolvesToBuiltIn = resolvesToBuiltIn;
5
6
  exports.resolvesToBuiltInConstant = resolvesToBuiltInConstant;
6
7
  const environment_1 = require("./environment");
7
8
  const logic_1 = require("../../util/logic");
@@ -103,8 +104,20 @@ function resolveByTargetType(id, environment, target) {
103
104
  }
104
105
  if (definition !== undefined && definition.length > 0) {
105
106
  /* ask before filtering: the common case wants all of them and needs no copy */
106
- const allWanted = definition.every(wantedType);
107
- if (allWanted && (target !== identifier_1.ReferenceType.Function || definition.every(notAParameter)) && definition.every(inEveryBranch)) {
107
+ let allWanted = true;
108
+ let allOk = true;
109
+ const checkParameters = target === identifier_1.ReferenceType.Function;
110
+ for (const def of definition) {
111
+ if (!wantedType(def)) {
112
+ allWanted = false;
113
+ allOk = false;
114
+ break;
115
+ }
116
+ if (allOk && ((checkParameters && !notAParameter(def)) || !inEveryBranch(def))) {
117
+ allOk = false;
118
+ }
119
+ }
120
+ if (allOk) {
108
121
  return definition;
109
122
  }
110
123
  /* never alias the environment's own array, it is appended to below */
@@ -198,6 +211,17 @@ function resolveByNameAnyType(id, environment) {
198
211
  }
199
212
  return ret;
200
213
  }
214
+ /**
215
+ * Whether every definition `name` may refer to is the built-in one (or there is none), i.e., the name is not
216
+ * shadowed by a user definition. Pass the {@link ReferenceType} the use site wants: `Function` for a call like
217
+ * `ls()`, `Constant` for a name like `.GlobalEnv`.
218
+ * @useInstead {@link Resolve.isBuiltIn}
219
+ */
220
+ function resolvesToBuiltIn(name, environment, target) {
221
+ const defs = resolveByName(name, environment, target);
222
+ const builtIn = target === identifier_1.ReferenceType.Function ? identifier_1.ReferenceType.BuiltInFunction : identifier_1.ReferenceType.BuiltInConstant;
223
+ return defs === undefined || defs.every(d => (0, identifier_1.isReferenceType)(d.type, builtIn));
224
+ }
201
225
  /**
202
226
  * Checks whether the given identifier name resolves to a built-in constant with the given value.
203
227
  * @param name - The name of the identifier to resolve
@@ -1,4 +1,4 @@
1
- import { resolveByName, resolveByNameAnyType, resolvesToBuiltInConstant } from './resolve-by-name';
1
+ import { resolveByName, resolveByNameAnyType, resolvesToBuiltIn, resolvesToBuiltInConstant } from './resolve-by-name';
2
2
  import { resolveIdToValue, resolveIdToSingleString, resolveToConstants } from '../eval/resolve/alias-tracking';
3
3
  import { resolveIdToArgName, resolveIdToArgStringVector, resolveIdToArgValue, resolveIdToArgValueSymbolName, resolveIdToArgVectorLength } from '../../abstract-interpretation/data-frame/resolve-args';
4
4
  /**
@@ -27,6 +27,8 @@ export declare const Resolve: {
27
27
  readonly byNameAndType: typeof resolveByName;
28
28
  /** Whether the name always, never, or maybe refers to a built-in constant of the given value. */
29
29
  readonly toBuiltIn: typeof resolvesToBuiltInConstant;
30
+ /** Whether the name is not shadowed by a user definition, so it still refers to the built-in. */
31
+ readonly isBuiltIn: typeof resolvesToBuiltIn;
30
32
  /** The constant values the name resolves to. */
31
33
  readonly toConstants: typeof resolveToConstants;
32
34
  /** The value(s) the node may hold, tracking aliases as the configuration allows. */
@@ -30,6 +30,8 @@ exports.Resolve = {
30
30
  byNameAndType: resolve_by_name_1.resolveByName,
31
31
  /** Whether the name always, never, or maybe refers to a built-in constant of the given value. */
32
32
  toBuiltIn: resolve_by_name_1.resolvesToBuiltInConstant,
33
+ /** Whether the name is not shadowed by a user definition, so it still refers to the built-in. */
34
+ isBuiltIn: resolve_by_name_1.resolvesToBuiltIn,
33
35
  /** The constant values the name resolves to. */
34
36
  toConstants: alias_tracking_1.resolveToConstants,
35
37
  /** The value(s) the node may hold, tracking aliases as the configuration allows. */