@eagleoutice/flowr 2.6.2 → 2.6.3

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 (349) hide show
  1. package/README.md +36 -34
  2. package/abstract-interpretation/data-frame/absint-visitor.js +3 -3
  3. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
  4. package/abstract-interpretation/data-frame/mappers/function-mapper.js +20 -16
  5. package/abstract-interpretation/data-frame/semantics.js +8 -0
  6. package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
  7. package/abstract-interpretation/data-frame/shape-inference.js +3 -3
  8. package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
  9. package/benchmark/slicer.d.ts +1 -0
  10. package/benchmark/slicer.js +13 -12
  11. package/benchmark/summarizer/first-phase/process.js +1 -1
  12. package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
  13. package/benchmark/summarizer/second-phase/graph.js +3 -1
  14. package/cli/export-quads-app.js +1 -1
  15. package/cli/repl/commands/repl-dataflow.js +2 -1
  16. package/cli/repl/commands/repl-parse.js +16 -4
  17. package/cli/repl/commands/repl-query.js +1 -1
  18. package/cli/repl/core.js +16 -13
  19. package/cli/repl/server/connection.js +2 -1
  20. package/cli/script-core/statistics-helper-core.js +2 -1
  21. package/cli/slicer-app.js +3 -4
  22. package/cli/wiki.d.ts +4 -0
  23. package/cli/wiki.js +165 -0
  24. package/config.d.ts +4 -0
  25. package/config.js +6 -0
  26. package/control-flow/cfg-dead-code.js +13 -3
  27. package/control-flow/cfg-simplification.d.ts +5 -2
  28. package/control-flow/cfg-simplification.js +3 -0
  29. package/control-flow/extract-cfg.d.ts +9 -3
  30. package/control-flow/extract-cfg.js +44 -4
  31. package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -2
  32. package/control-flow/simple-visitor.js +2 -2
  33. package/control-flow/useless-loop.d.ts +3 -3
  34. package/control-flow/useless-loop.js +14 -5
  35. package/core/pipeline-executor.d.ts +3 -6
  36. package/core/pipeline-executor.js +4 -7
  37. package/core/print/normalize-printer.d.ts +1 -1
  38. package/core/print/normalize-printer.js +2 -2
  39. package/core/steps/all/core/00-parse.d.ts +1 -1
  40. package/core/steps/all/core/00-parse.js +1 -1
  41. package/core/steps/all/core/10-normalize.d.ts +3 -9
  42. package/core/steps/all/core/10-normalize.js +1 -16
  43. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -3
  44. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -3
  45. package/core/steps/all/core/20-dataflow.d.ts +3 -4
  46. package/core/steps/all/core/20-dataflow.js +2 -2
  47. package/core/steps/all/static-slicing/00-slice.d.ts +1 -2
  48. package/core/steps/all/static-slicing/00-slice.js +1 -1
  49. package/core/steps/all/static-slicing/10-reconstruct.d.ts +8 -0
  50. package/core/steps/all/static-slicing/10-reconstruct.js +4 -1
  51. package/core/steps/pipeline/default-pipelines.d.ts +55 -56
  52. package/core/steps/pipeline/default-pipelines.js +8 -8
  53. package/dataflow/environments/clone.d.ts +0 -1
  54. package/dataflow/environments/clone.js +12 -2
  55. package/dataflow/environments/diff.js +2 -2
  56. package/dataflow/environments/overwrite.d.ts +1 -5
  57. package/dataflow/environments/overwrite.js +3 -19
  58. package/dataflow/environments/scoping.d.ts +6 -2
  59. package/dataflow/environments/scoping.js +6 -2
  60. package/dataflow/eval/resolve/resolve-argument.js +2 -2
  61. package/dataflow/eval/values/string/string-constants.d.ts +9 -3
  62. package/dataflow/eval/values/string/string-constants.js +9 -3
  63. package/dataflow/extractor.d.ts +2 -3
  64. package/dataflow/extractor.js +25 -22
  65. package/dataflow/graph/graph.d.ts +3 -9
  66. package/dataflow/graph/graph.js +0 -13
  67. package/dataflow/graph/unknown-replacement.d.ts +4 -2
  68. package/dataflow/graph/unknown-replacement.js +4 -2
  69. package/dataflow/info.d.ts +7 -0
  70. package/dataflow/info.js +21 -0
  71. package/dataflow/internal/linker.js +7 -4
  72. package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -2
  73. package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -3
  74. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
  75. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +4 -4
  76. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  77. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +4 -4
  78. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +6 -6
  79. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +1 -1
  80. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
  81. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +1 -1
  82. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  86. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +3 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +6 -1
  88. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +6 -1
  89. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -2
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +15 -10
  91. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +78 -75
  92. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -1
  93. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  94. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  95. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  96. package/dataflow/internal/process/functions/call/common.d.ts +1 -1
  97. package/dataflow/internal/process/functions/call/common.js +4 -4
  98. package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -1
  99. package/dataflow/internal/process/functions/call/default-call-handling.js +3 -1
  100. package/dataflow/internal/process/functions/call/known-call-handling.js +3 -3
  101. package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
  102. package/dataflow/internal/process/functions/process-parameter.js +4 -4
  103. package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -1
  104. package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
  105. package/dataflow/processor.d.ts +6 -11
  106. package/documentation/data/dfg/doc-data-dfg-util.d.ts +0 -2
  107. package/documentation/data/faq/faqs.js +27 -18
  108. package/documentation/data/faq/recommended-configs.d.ts +36 -0
  109. package/documentation/data/faq/recommended-configs.js +40 -0
  110. package/documentation/data/faq/wiki-faq-store.d.ts +1 -0
  111. package/documentation/data/faq/wiki-faq-store.js +10 -2
  112. package/documentation/data/server/doc-data-server-messages.js +1 -1
  113. package/documentation/doc-capabilities.d.ts +9 -0
  114. package/documentation/{print-capabilities-markdown.js → doc-capabilities.js} +18 -21
  115. package/documentation/doc-readme.d.ts +9 -0
  116. package/documentation/{print-readme.js → doc-readme.js} +31 -35
  117. package/documentation/doc-util/doc-benchmarks.d.ts +6 -4
  118. package/documentation/doc-util/doc-benchmarks.js +6 -4
  119. package/documentation/doc-util/doc-cfg.js +5 -8
  120. package/documentation/doc-util/doc-dfg.d.ts +7 -7
  121. package/documentation/doc-util/doc-dfg.js +13 -13
  122. package/documentation/doc-util/doc-escape.d.ts +6 -0
  123. package/documentation/doc-util/doc-escape.js +11 -0
  124. package/documentation/doc-util/doc-general.d.ts +22 -2
  125. package/documentation/doc-util/doc-general.js +22 -2
  126. package/documentation/doc-util/doc-normalized-ast.d.ts +10 -5
  127. package/documentation/doc-util/doc-normalized-ast.js +12 -9
  128. package/documentation/doc-util/doc-query.d.ts +12 -4
  129. package/documentation/doc-util/doc-query.js +18 -11
  130. package/documentation/doc-util/doc-search.d.ts +0 -30
  131. package/documentation/doc-util/doc-search.js +2 -73
  132. package/documentation/doc-util/doc-server-message.d.ts +5 -5
  133. package/documentation/doc-util/doc-server-message.js +4 -4
  134. package/documentation/doc-util/doc-types.d.ts +69 -32
  135. package/documentation/doc-util/doc-types.js +108 -61
  136. package/documentation/index.d.ts +9 -9
  137. package/documentation/index.js +9 -9
  138. package/documentation/issue-linting-rule.d.ts +9 -0
  139. package/documentation/{print-linter-issue.js → issue-linting-rule.js} +20 -23
  140. package/documentation/wiki-analyzer.d.ts +9 -0
  141. package/documentation/wiki-analyzer.js +412 -0
  142. package/documentation/wiki-cfg.d.ts +9 -0
  143. package/documentation/{print-cfg-wiki.js → wiki-cfg.js} +144 -160
  144. package/documentation/wiki-core.d.ts +14 -0
  145. package/documentation/{print-core-wiki.js → wiki-core.js} +164 -175
  146. package/documentation/wiki-dataflow-graph.d.ts +9 -0
  147. package/documentation/{print-dataflow-graph-wiki.js → wiki-dataflow-graph.js} +142 -172
  148. package/documentation/wiki-engine.d.ts +9 -0
  149. package/documentation/{print-engines-wiki.js → wiki-engine.js} +27 -42
  150. package/documentation/wiki-faq.d.ts +8 -0
  151. package/documentation/wiki-faq.js +22 -0
  152. package/documentation/wiki-interface.d.ts +9 -0
  153. package/documentation/{print-interface-wiki.js → wiki-interface.js} +59 -56
  154. package/documentation/wiki-linter.d.ts +9 -0
  155. package/documentation/{print-linter-wiki.js → wiki-linter.js} +52 -48
  156. package/documentation/wiki-linting-and-testing.d.ts +9 -0
  157. package/documentation/{print-linting-and-testing-wiki.js → wiki-linting-and-testing.js} +25 -32
  158. package/documentation/wiki-mk/doc-context.d.ts +186 -0
  159. package/documentation/wiki-mk/doc-context.js +84 -0
  160. package/documentation/wiki-mk/doc-maker.d.ts +95 -0
  161. package/documentation/wiki-mk/doc-maker.js +133 -0
  162. package/documentation/wiki-normalized-ast.d.ts +9 -0
  163. package/documentation/{print-normalized-ast-wiki.js → wiki-normalized-ast.js} +64 -47
  164. package/documentation/wiki-onboarding.d.ts +8 -0
  165. package/documentation/{print-onboarding-wiki.js → wiki-onboarding.js} +18 -15
  166. package/documentation/wiki-query.d.ts +9 -0
  167. package/documentation/{print-query-wiki.js → wiki-query.js} +62 -47
  168. package/documentation/wiki-search.d.ts +9 -0
  169. package/documentation/wiki-search.js +61 -0
  170. package/linter/linter-executor.js +3 -2
  171. package/linter/linter-format.d.ts +2 -2
  172. package/linter/linter-rules.d.ts +13 -17
  173. package/linter/rules/absolute-path.d.ts +1 -2
  174. package/linter/rules/absolute-path.js +2 -2
  175. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  176. package/linter/rules/dataframe-access-validation.js +12 -8
  177. package/linter/rules/dead-code.d.ts +1 -1
  178. package/linter/rules/deprecated-functions.d.ts +1 -5
  179. package/linter/rules/file-path-validity.d.ts +1 -1
  180. package/linter/rules/file-path-validity.js +4 -4
  181. package/linter/rules/function-finder-util.d.ts +1 -5
  182. package/linter/rules/naming-convention.d.ts +2 -2
  183. package/linter/rules/naming-convention.js +1 -1
  184. package/linter/rules/network-functions.d.ts +1 -1
  185. package/linter/rules/network-functions.js +1 -1
  186. package/linter/rules/seeded-randomness.d.ts +3 -2
  187. package/linter/rules/seeded-randomness.js +33 -13
  188. package/linter/rules/unused-definition.d.ts +1 -1
  189. package/linter/rules/useless-loop.d.ts +2 -2
  190. package/linter/rules/useless-loop.js +2 -2
  191. package/package.json +6 -17
  192. package/project/cache/flowr-analyzer-cache.d.ts +7 -10
  193. package/project/cache/flowr-analyzer-cache.js +17 -38
  194. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +34 -0
  195. package/project/cache/flowr-analyzer-controlflow-cache.js +79 -0
  196. package/project/context/flowr-analyzer-context.d.ts +30 -5
  197. package/project/context/flowr-analyzer-context.js +48 -4
  198. package/project/context/flowr-analyzer-files-context.d.ts +63 -13
  199. package/project/context/flowr-analyzer-files-context.js +110 -39
  200. package/project/context/flowr-file.d.ts +32 -10
  201. package/project/context/flowr-file.js +30 -9
  202. package/project/flowr-analyzer-builder.d.ts +22 -28
  203. package/project/flowr-analyzer-builder.js +32 -70
  204. package/project/flowr-analyzer.d.ts +55 -14
  205. package/project/flowr-analyzer.js +53 -8
  206. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +7 -1
  207. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +13 -5
  208. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +3 -3
  209. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +11 -5
  210. package/project/plugins/file-plugins/flowr-description-file.d.ts +3 -3
  211. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +22 -0
  212. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +33 -0
  213. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +22 -0
  214. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +33 -0
  215. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +22 -0
  216. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +33 -0
  217. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.d.ts +20 -0
  218. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.js +42 -0
  219. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.d.ts +59 -0
  220. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.js +132 -0
  221. package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
  222. package/project/plugins/file-plugins/notebooks/notebook.js +2 -0
  223. package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +5 -0
  224. package/project/plugins/flowr-analyzer-plugin-defaults.js +23 -0
  225. package/project/plugins/flowr-analyzer-plugin.d.ts +2 -0
  226. package/project/plugins/flowr-analyzer-plugin.js +2 -0
  227. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  228. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  229. package/project/plugins/plugin-registry.d.ts +34 -0
  230. package/project/plugins/plugin-registry.js +62 -0
  231. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
  232. package/queries/catalog/call-context-query/call-context-query-executor.js +4 -2
  233. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -2
  234. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +25 -18
  235. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  236. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  237. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  238. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  239. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
  240. package/queries/catalog/dependencies-query/dependencies-query-executor.js +1 -1
  241. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  242. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  243. package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
  244. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +2 -2
  245. package/queries/catalog/df-shape-query/df-shape-query-format.js +6 -5
  246. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +2 -1
  247. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  248. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  249. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  250. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +1 -1
  251. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -1
  252. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
  253. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  254. package/queries/catalog/linter-query/linter-query-format.js +13 -2
  255. package/queries/catalog/location-map-query/location-map-query-executor.js +2 -1
  256. package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
  257. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  258. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  259. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  260. package/queries/catalog/project-query/project-query-executor.js +3 -1
  261. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  262. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +2 -2
  263. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  264. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  265. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  266. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  267. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  268. package/queries/catalog/static-slice-query/static-slice-query-format.js +13 -1
  269. package/queries/query.d.ts +26 -18
  270. package/queries/query.js +21 -1
  271. package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -1
  272. package/r-bridge/lang-4.x/ast/model/collect.js +4 -0
  273. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +29 -0
  274. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +15 -0
  275. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +5 -7
  276. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +24 -11
  277. package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
  278. package/r-bridge/lang-4.x/ast/model/type.js +2 -0
  279. package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
  280. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +9 -8
  281. package/r-bridge/lang-4.x/ast/parser/json/parser.js +11 -10
  282. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +4 -3
  283. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +20 -11
  284. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -3
  285. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +5 -4
  286. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -2
  287. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +14 -5
  288. package/r-bridge/parser.d.ts +15 -5
  289. package/r-bridge/parser.js +27 -13
  290. package/r-bridge/retriever.d.ts +9 -15
  291. package/r-bridge/retriever.js +14 -5
  292. package/r-bridge/shell.d.ts +1 -1
  293. package/r-bridge/shell.js +1 -1
  294. package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
  295. package/reconstruct/auto-select/magic-comments.js +1 -1
  296. package/reconstruct/reconstruct.d.ts +17 -9
  297. package/reconstruct/reconstruct.js +19 -8
  298. package/search/flowr-search.d.ts +12 -0
  299. package/search/search-executor/search-enrichers.d.ts +9 -2
  300. package/search/search-executor/search-enrichers.js +1 -3
  301. package/search/search-executor/search-generators.d.ts +1 -1
  302. package/search/search-executor/search-generators.js +9 -4
  303. package/slicing/criterion/collect-all.d.ts +3 -2
  304. package/slicing/criterion/collect-all.js +1 -1
  305. package/slicing/criterion/parse.js +4 -4
  306. package/statistics/features/supported/assignments/assignments.js +1 -1
  307. package/statistics/features/supported/control-flow/control-flow.js +1 -1
  308. package/statistics/features/supported/data-access/data-access.js +1 -1
  309. package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
  310. package/statistics/features/supported/expression-list/statistics-expression-list.js +1 -1
  311. package/statistics/features/supported/loops/loops.js +1 -1
  312. package/statistics/features/supported/used-functions/used-functions.js +1 -1
  313. package/statistics/features/supported/variables/variables.js +1 -1
  314. package/statistics/statistics.js +3 -2
  315. package/util/assert.d.ts +4 -0
  316. package/util/assert.js +4 -0
  317. package/util/files.d.ts +1 -1
  318. package/util/files.js +1 -1
  319. package/util/mermaid/ast.d.ts +4 -3
  320. package/util/mermaid/ast.js +36 -8
  321. package/util/mermaid/cfg.js +1 -1
  322. package/util/version.js +1 -1
  323. package/documentation/print-analyzer-wiki.d.ts +0 -1
  324. package/documentation/print-analyzer-wiki.js +0 -141
  325. package/documentation/print-capabilities-markdown.d.ts +0 -1
  326. package/documentation/print-cfg-wiki.d.ts +0 -1
  327. package/documentation/print-core-wiki.d.ts +0 -5
  328. package/documentation/print-dataflow-graph-wiki.d.ts +0 -1
  329. package/documentation/print-engines-wiki.d.ts +0 -1
  330. package/documentation/print-faq-wiki.d.ts +0 -1
  331. package/documentation/print-faq-wiki.js +0 -18
  332. package/documentation/print-interface-wiki.d.ts +0 -1
  333. package/documentation/print-linter-issue.d.ts +0 -1
  334. package/documentation/print-linter-wiki.d.ts +0 -1
  335. package/documentation/print-linting-and-testing-wiki.d.ts +0 -1
  336. package/documentation/print-normalized-ast-wiki.d.ts +0 -1
  337. package/documentation/print-onboarding-wiki.d.ts +0 -1
  338. package/documentation/print-query-wiki.d.ts +0 -1
  339. package/documentation/print-readme.d.ts +0 -1
  340. package/documentation/print-search-wiki.d.ts +0 -1
  341. package/documentation/print-search-wiki.js +0 -74
  342. package/util/formats/adapter-format.d.ts +0 -6
  343. package/util/formats/adapter-format.js +0 -3
  344. package/util/formats/adapter.d.ts +0 -27
  345. package/util/formats/adapter.js +0 -58
  346. package/util/formats/adapters/r-adapter.d.ts +0 -4
  347. package/util/formats/adapters/r-adapter.js +0 -7
  348. package/util/formats/adapters/rmd-adapter.d.ts +0 -35
  349. package/util/formats/adapters/rmd-adapter.js +0 -100
package/README.md CHANGED
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
24
24
 
25
25
  ```shell
26
26
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
27
- flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
27
+ flowR repl using flowR v2.6.2, R grammar v14 (tree-sitter engine)
28
28
  R> :query @linter "read.csv(\"/root/x.txt\")"
29
29
  ```
30
30
 
@@ -33,19 +33,19 @@ It offers a wide variety of features, for example:
33
33
 
34
34
 
35
35
  ```text
36
- Query: linter (6 ms)
36
+ Query: linter (3 ms)
37
37
  ╰ **Deprecated Functions** (deprecated-functions):
38
- ╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":3,"processTimeMs":0}</code>
38
+ ╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":1,"processTimeMs":0}</code>
39
39
  ╰ **File Path Validity** (file-path-validity):
40
40
  ╰ certain:
41
41
  ╰ Path `/root/x.txt` at 1.1-23
42
- ╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":1,"processTimeMs":0}</code>
42
+ ╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":0,"processTimeMs":1}</code>
43
43
  ╰ **Seeded Randomness** (seeded-randomness):
44
- ╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>
44
+ ╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"callsWithOtherBranchProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>
45
45
  ╰ **Absolute Paths** (absolute-file-paths):
46
46
  ╰ certain:
47
47
  ╰ Path `/root/x.txt` at 1.1-23
48
- ╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":1,"processTimeMs":0}</code>
48
+ ╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":0,"processTimeMs":0}</code>
49
49
  ╰ **Unused Definitions** (unused-definitions):
50
50
  ╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>
51
51
  ╰ **Naming Convention** (naming-convention):
@@ -58,7 +58,7 @@ It offers a wide variety of features, for example:
58
58
  ╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>
59
59
  ╰ **Useless Loops** (useless-loop):
60
60
  ╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>
61
- All queries together required ≈6 ms (1ms accuracy, total 9 ms)
61
+ All queries together required ≈3 ms (1ms accuracy, total 3 ms)
62
62
  ```
63
63
 
64
64
 
@@ -80,36 +80,36 @@ It offers a wide variety of features, for example:
80
80
 
81
81
  _Results (prettified and summarized):_
82
82
 
83
- Query: **linter** (212 ms)\
83
+ Query: **linter** (3 ms)\
84
84
  &nbsp;&nbsp;&nbsp;╰ **Deprecated Functions** (deprecated-functions):\
85
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":198,"processTimeMs":0}</code>\
85
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":1,"processTimeMs":0}</code>\
86
86
  &nbsp;&nbsp;&nbsp;╰ **File Path Validity** (file-path-validity):\
87
87
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
88
88
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ Path `/root/x.txt` at 1.1-23\
89
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":5,"processTimeMs":1}</code>\
89
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":1,"processTimeMs":0}</code>\
90
90
  &nbsp;&nbsp;&nbsp;╰ **Seeded Randomness** (seeded-randomness):\
91
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>\
91
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"callsWithOtherBranchProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>\
92
92
  &nbsp;&nbsp;&nbsp;╰ **Absolute Paths** (absolute-file-paths):\
93
93
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
94
94
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ Path `/root/x.txt` at 1.1-23\
95
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":2,"processTimeMs":1}</code>\
95
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":1,"processTimeMs":0}</code>\
96
96
  &nbsp;&nbsp;&nbsp;╰ **Unused Definitions** (unused-definitions):\
97
97
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>\
98
98
  &nbsp;&nbsp;&nbsp;╰ **Naming Convention** (naming-convention):\
99
99
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>\
100
100
  &nbsp;&nbsp;&nbsp;╰ **Network Functions** (network-functions):\
101
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":1}</code>\
101
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>\
102
102
  &nbsp;&nbsp;&nbsp;╰ **Dataframe Access Validation** (dataframe-access-validation):\
103
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":2}</code>\
103
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":0}</code>\
104
104
  &nbsp;&nbsp;&nbsp;╰ **Dead Code** (dead-code):\
105
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":1}</code>\
105
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>\
106
106
  &nbsp;&nbsp;&nbsp;╰ **Useless Loops** (useless-loop):\
107
107
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>\
108
- _All queries together required ≈213 ms (1ms accuracy, total 213 ms)_
108
+ _All queries together required ≈3 ms (1ms accuracy, total 4 ms)_
109
109
 
110
110
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
111
111
 
112
- The analysis required _213.3 ms_ (including parsing and normalization and the query) within the generation environment.
112
+ The analysis required _3.7 ms_ (including parsing and normalization and the query) within the generation environment.
113
113
 
114
114
  In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
115
115
  Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
@@ -126,7 +126,7 @@ It offers a wide variety of features, for example:
126
126
  ".meta": {
127
127
  "totalCalls": 0,
128
128
  "totalFunctionDefinitions": 0,
129
- "searchTimeMs": 198,
129
+ "searchTimeMs": 1,
130
130
  "processTimeMs": 0
131
131
  }
132
132
  },
@@ -148,8 +148,8 @@ It offers a wide variety of features, for example:
148
148
  "totalUnknown": 0,
149
149
  "totalWritesBeforeAlways": 0,
150
150
  "totalValid": 0,
151
- "searchTimeMs": 5,
152
- "processTimeMs": 1
151
+ "searchTimeMs": 1,
152
+ "processTimeMs": 0
153
153
  }
154
154
  },
155
155
  "seeded-randomness": {
@@ -159,6 +159,7 @@ It offers a wide variety of features, for example:
159
159
  "callsWithFunctionProducers": 0,
160
160
  "callsWithAssignmentProducers": 0,
161
161
  "callsWithNonConstantProducers": 0,
162
+ "callsWithOtherBranchProducers": 0,
162
163
  "searchTimeMs": 0,
163
164
  "processTimeMs": 0
164
165
  }
@@ -179,8 +180,8 @@ It offers a wide variety of features, for example:
179
180
  ".meta": {
180
181
  "totalConsidered": 1,
181
182
  "totalUnknown": 0,
182
- "searchTimeMs": 2,
183
- "processTimeMs": 1
183
+ "searchTimeMs": 1,
184
+ "processTimeMs": 0
184
185
  }
185
186
  },
186
187
  "unused-definitions": {
@@ -206,7 +207,7 @@ It offers a wide variety of features, for example:
206
207
  "totalCalls": 0,
207
208
  "totalFunctionDefinitions": 0,
208
209
  "searchTimeMs": 0,
209
- "processTimeMs": 1
210
+ "processTimeMs": 0
210
211
  }
211
212
  },
212
213
  "dataframe-access-validation": {
@@ -216,7 +217,7 @@ It offers a wide variety of features, for example:
216
217
  "numAccesses": 0,
217
218
  "totalAccessed": 0,
218
219
  "searchTimeMs": 0,
219
- "processTimeMs": 2
220
+ "processTimeMs": 0
220
221
  }
221
222
  },
222
223
  "dead-code": {
@@ -224,7 +225,7 @@ It offers a wide variety of features, for example:
224
225
  ".meta": {
225
226
  "consideredNodes": 5,
226
227
  "searchTimeMs": 0,
227
- "processTimeMs": 1
228
+ "processTimeMs": 0
228
229
  }
229
230
  },
230
231
  "useless-loop": {
@@ -237,11 +238,11 @@ It offers a wide variety of features, for example:
237
238
  }
238
239
  },
239
240
  ".meta": {
240
- "timing": 212
241
+ "timing": 3
241
242
  }
242
243
  },
243
244
  ".meta": {
244
- "timing": 213
245
+ "timing": 3
245
246
  }
246
247
  }
247
248
  ```
@@ -306,8 +307,8 @@ It offers a wide variety of features, for example:
306
307
 
307
308
  ```shell
308
309
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
309
- flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
310
- R> :slicer test/testfiles/example.R --criterion "11@sum"
310
+ flowR repl using flowR v2.6.2, R grammar v14 (tree-sitter engine)
311
+ R> :query @static-slice (11@sum) file://test/testfiles/example.R
311
312
  ```
312
313
 
313
314
  <details>
@@ -320,6 +321,7 @@ It offers a wide variety of features, for example:
320
321
  N <- 10
321
322
  for(i in 1:(N-1)) sum <- sum + i + w
322
323
  sum
324
+ All queries together required ≈3 ms (1ms accuracy, total 4 ms)
323
325
  ```
324
326
 
325
327
 
@@ -353,7 +355,7 @@ It offers a wide variety of features, for example:
353
355
 
354
356
 
355
357
  * 🚀 **fast data- and control-flow graphs**\
356
- Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">137.6 ms</span></i> (as of Oct 21, 2025),
358
+ Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">138.7 ms</span></i> (as of Nov 9, 2025),
357
359
  _flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
358
360
  and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
359
361
 
@@ -389,7 +391,7 @@ It offers a wide variety of features, for example:
389
391
 
390
392
  ```shell
391
393
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
392
- flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
394
+ flowR repl using flowR v2.6.2, R grammar v14 (tree-sitter engine)
393
395
  R> :dataflow* test/testfiles/example.R
394
396
  ```
395
397
 
@@ -694,7 +696,7 @@ It offers a wide variety of features, for example:
694
696
  ```
695
697
 
696
698
 
697
- (The analysis required _14.2 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
699
+ (The analysis required _2.3 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
698
700
 
699
701
 
700
702
 
@@ -873,6 +875,6 @@ It is partially supported by the German Research Foundation (DFG) under the gran
873
875
 
874
876
  ### Generation Notice
875
877
 
876
- Please notice that this file was generated automatically using the file [src/documentation/print-readme.ts](https://github.com/flowr-analysis/flowr/tree/main//src/documentation/print-readme.ts) as a source.\
878
+ Please notice that this file was generated automatically using the file [src/documentation/doc-readme.ts](https://github.com/flowr-analysis/flowr/tree/main//src/documentation/doc-readme.ts) as a source.\
877
879
  If you want to make changes please edit the source file (the CI will take care of the rest).
878
- In fact, many files in the [wiki](https://github.com/flowr-analysis/flowr/wiki) are generated, so make sure to check for the source file if you want to make changes.
880
+ In fact, many files in the [wiki](https://github.com/flowr-analysis/flowr/wiki) are generated, so make sure to check for the source file if you want to make changes.
@@ -87,7 +87,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
87
87
  onDefaultFunctionCall({ call }) {
88
88
  const node = this.getNormalizedAst(call.id);
89
89
  if (node !== undefined) {
90
- node.info.dataFrame = (0, function_mapper_1.mapDataFrameFunctionCall)(node, this.config.dfg, this.config.flowrConfig);
90
+ node.info.dataFrame = (0, function_mapper_1.mapDataFrameFunctionCall)(node, this.config.dfg, this.config.ctx);
91
91
  this.applyDataFrameExpression(node);
92
92
  }
93
93
  }
@@ -119,7 +119,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
119
119
  if (!(0, absint_info_1.hasDataFrameExpressionInfo)(node)) {
120
120
  return;
121
121
  }
122
- const maxColNames = this.config.flowrConfig.abstractInterpretation.dataFrame.maxColNames;
122
+ const maxColNames = this.config.ctx.config.abstractInterpretation.dataFrame.maxColNames;
123
123
  let value = dataframe_domain_1.DataFrameDomain.top(maxColNames);
124
124
  for (const { operation, operand, type, options, ...args } of node.info.dataFrame.operations) {
125
125
  const operandValue = operand !== undefined ? (0, shape_inference_1.resolveIdToDataFrameShape)(operand, this.config.dfg, this.newDomain) : value;
@@ -159,7 +159,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
159
159
  .toArray() ?? [];
160
160
  }
161
161
  shouldWiden(vertex) {
162
- return (this.visited.get(vertex.id) ?? 0) >= this.config.flowrConfig.abstractInterpretation.dataFrame.wideningThreshold;
162
+ return (this.visited.get(vertex.id) ?? 0) >= this.config.ctx.config.abstractInterpretation.dataFrame.wideningThreshold;
163
163
  }
164
164
  clearUnassignedInfo(node) {
165
165
  if ((0, absint_info_1.hasDataFrameInfoMarker)(node, absint_info_1.DataFrameInfoMarker.Unassigned)) {
@@ -1,4 +1,3 @@
1
- import { type FlowrConfigOptions } from '../../../config';
2
1
  import { type ResolveInfo } from '../../../dataflow/eval/resolve/alias-tracking';
3
2
  import type { DataflowGraph } from '../../../dataflow/graph/graph';
4
3
  import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model';
@@ -6,6 +5,7 @@ import { type RFunctionArgument } from '../../../r-bridge/lang-4.x/ast/model/nod
6
5
  import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
6
  import type { DataFrameExpressionInfo, DataFrameOperation } from '../absint-info';
8
7
  import { type FunctionParameterLocation } from './arguments';
8
+ import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
9
9
  /**
10
10
  * Represents the different types of data frames in R
11
11
  */
@@ -179,12 +179,12 @@ declare const DataFrameFunctionMapper: {
179
179
  type DataFrameFunction = keyof typeof DataFrameFunctionMapper;
180
180
  /**
181
181
  * Maps a concrete data frame function call to abstract data frame operations.
182
- * @param node - The R node of the function call
183
- * @param dfg - The data flow graph for resolving the arguments
184
- * @param config - The flowR configuration to use
182
+ * @param node - The R node of the function call
183
+ * @param dfg - The data flow graph for resolving the arguments
184
+ * @param ctx - The current flowR analyzer context
185
185
  * @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame function call
186
186
  */
187
- export declare function mapDataFrameFunctionCall<Name extends DataFrameFunction>(node: RNode<ParentInformation>, dfg: DataflowGraph, config: FlowrConfigOptions): DataFrameExpressionInfo | undefined;
187
+ export declare function mapDataFrameFunctionCall<Name extends DataFrameFunction>(node: RNode<ParentInformation>, dfg: DataflowGraph, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameExpressionInfo | undefined;
188
188
  declare function mapDataFrameCreate(args: readonly RFunctionArgument<ParentInformation>[], params: {
189
189
  checkNames: FunctionParameterLocation<boolean>;
190
190
  noDupNames: FunctionParameterLocation<boolean>;
@@ -204,7 +204,7 @@ declare function mapDataFrameRead(args: readonly RFunctionArgument<ParentInforma
204
204
  checkNames: FunctionParameterLocation<boolean>;
205
205
  noDupNames: FunctionParameterLocation<boolean>;
206
206
  noEmptyNames?: boolean;
207
- }, info: ResolveInfo, config: FlowrConfigOptions): DataFrameOperation[];
207
+ }, info: ResolveInfo, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperation[];
208
208
  declare function mapDataFrameColBind(args: readonly RFunctionArgument<ParentInformation>[], params: {
209
209
  special: string[];
210
210
  }, info: ResolveInfo): DataFrameOperation[] | undefined;
@@ -251,7 +251,7 @@ declare function mapDataFrameJoin(args: readonly RFunctionArgument<ParentInforma
251
251
  joinAll: FunctionParameterLocation<boolean>;
252
252
  joinLeft: FunctionParameterLocation<boolean>;
253
253
  joinRight: FunctionParameterLocation<boolean>;
254
- }, info: ResolveInfo, config: FlowrConfigOptions): DataFrameOperation[] | undefined;
254
+ }, info: ResolveInfo, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperation[] | undefined;
255
255
  declare function mapDataFrameIdentity(args: readonly RFunctionArgument<ParentInformation>[], params: {
256
256
  dataFrame: FunctionParameterLocation;
257
257
  special: string[];
@@ -519,12 +519,12 @@ const DataFrameFunctionParamsMapper = {
519
519
  };
520
520
  /**
521
521
  * Maps a concrete data frame function call to abstract data frame operations.
522
- * @param node - The R node of the function call
523
- * @param dfg - The data flow graph for resolving the arguments
524
- * @param config - The flowR configuration to use
522
+ * @param node - The R node of the function call
523
+ * @param dfg - The data flow graph for resolving the arguments
524
+ * @param ctx - The current flowR analyzer context
525
525
  * @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame function call
526
526
  */
527
- function mapDataFrameFunctionCall(node, dfg, config) {
527
+ function mapDataFrameFunctionCall(node, dfg, ctx) {
528
528
  if (node.type !== type_1.RType.FunctionCall || !node.named) {
529
529
  return;
530
530
  }
@@ -539,7 +539,7 @@ function mapDataFrameFunctionCall(node, dfg, config) {
539
539
  operations = [{ operation: 'unknown', operand: undefined }];
540
540
  }
541
541
  else {
542
- operations = mapper(args, params, resolveInfo, config);
542
+ operations = mapper(args, params, resolveInfo, ctx);
543
543
  }
544
544
  }
545
545
  else {
@@ -605,10 +605,10 @@ function mapDataFrameConvert(args, params, info) {
605
605
  operand: dataFrame.value.info.id
606
606
  }];
607
607
  }
608
- function mapDataFrameRead(args, params, info, config) {
608
+ function mapDataFrameRead(args, params, info, ctx) {
609
609
  const fileNameArg = (0, arguments_1.getFunctionArgument)(args, params.fileName, info);
610
610
  const textArg = params.text ? (0, arguments_1.getFunctionArgument)(args, params.text, info) : undefined;
611
- const { source, request } = getRequestFromRead(fileNameArg, textArg, params, info, config);
611
+ const { source, request } = getRequestFromRead(fileNameArg, textArg, params, info, ctx);
612
612
  const header = (0, arguments_1.getArgumentValue)(args, params.header, info);
613
613
  const separator = (0, arguments_1.getArgumentValue)(args, params.separator, info);
614
614
  const quote = (0, arguments_1.getArgumentValue)(args, params.quote, info);
@@ -618,7 +618,7 @@ function mapDataFrameRead(args, params, info, config) {
618
618
  const noDupNames = (0, arguments_1.getArgumentValue)(args, params.noDupNames, info);
619
619
  const validArguments = typeof header === 'boolean' && typeof separator === 'string' && typeof quote === 'string' && typeof comment === 'string' &&
620
620
  typeof skipLines === 'number' && typeof checkNames === 'boolean' && typeof noDupNames === 'boolean';
621
- if (request === undefined || !config.abstractInterpretation.dataFrame.readLoadedData.readExternalFiles || !validArguments) {
621
+ if (request === undefined || !ctx.config.abstractInterpretation.dataFrame.readLoadedData.readExternalFiles || !validArguments) {
622
622
  return [{
623
623
  operation: 'read',
624
624
  operand: undefined,
@@ -643,7 +643,7 @@ function mapDataFrameRead(args, params, info, config) {
643
643
  }
644
644
  }
645
645
  };
646
- const allLines = parseRequestContent(request, parseLine, config.abstractInterpretation.dataFrame.readLoadedData.maxReadLines);
646
+ const allLines = parseRequestContent(request, parseLine, ctx.config.abstractInterpretation.dataFrame.readLoadedData.maxReadLines);
647
647
  let colnames;
648
648
  if (header) {
649
649
  colnames = (0, arguments_1.filterValidNames)(firstLine, checkNames, noDupNames, params.noEmptyNames);
@@ -1002,8 +1002,11 @@ function mapDataFrameSummarize(args, params, info) {
1002
1002
  }
1003
1003
  const result = [];
1004
1004
  const summarizeArgs = args.filter(arg => arg !== dataFrame);
1005
- const accessedNames = summarizeArgs.flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph));
1006
1005
  const summarizedCols = summarizeArgs.map(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info));
1006
+ // only column names that are not created by summarize are preconditions on the operand
1007
+ const accessedNames = summarizeArgs
1008
+ .flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph))
1009
+ .filter(arg => !summarizedCols.includes(arg));
1007
1010
  if (accessedNames.length > 0) {
1008
1011
  result.push({
1009
1012
  operation: 'accessCols',
@@ -1018,7 +1021,7 @@ function mapDataFrameSummarize(args, params, info) {
1018
1021
  });
1019
1022
  return result;
1020
1023
  }
1021
- function mapDataFrameJoin(args, params, info, config) {
1024
+ function mapDataFrameJoin(args, params, info, ctx) {
1022
1025
  const dataFrame = (0, arguments_1.getFunctionArgument)(args, params.dataFrame, info);
1023
1026
  const joinAll = (0, arguments_1.getArgumentValue)(args, params.joinAll, info);
1024
1027
  const joinLeft = (0, arguments_1.getArgumentValue)(args, params.joinLeft, info);
@@ -1035,7 +1038,7 @@ function mapDataFrameJoin(args, params, info, config) {
1035
1038
  const result = [];
1036
1039
  const otherArg = (0, arguments_1.getFunctionArgument)(args, params.otherDataFrame, info);
1037
1040
  const byArg = (0, arguments_1.getFunctionArgument)(args, params.by, info);
1038
- const otherDataFrame = (0, shape_inference_1.resolveIdToDataFrameShape)(otherArg, info.graph) ?? dataframe_domain_1.DataFrameDomain.top(config.abstractInterpretation.dataFrame.maxColNames);
1041
+ const otherDataFrame = (0, shape_inference_1.resolveIdToDataFrameShape)(otherArg, info.graph) ?? dataframe_domain_1.DataFrameDomain.top(ctx.config.abstractInterpretation.dataFrame.maxColNames);
1039
1042
  let byCols;
1040
1043
  const joinType = getJoinType(joinAll, joinLeft, joinRight);
1041
1044
  if (byArg !== undefined) {
@@ -1101,19 +1104,19 @@ function mapDataFrameUnknown(args, params, info) {
1101
1104
  ...(params.constraintType !== undefined ? { type: params.constraintType } : {})
1102
1105
  }];
1103
1106
  }
1104
- function getRequestFromRead(fileNameArg, textArg, params, info, config) {
1107
+ function getRequestFromRead(fileNameArg, textArg, params, info, ctx) {
1105
1108
  let source;
1106
1109
  let request;
1107
1110
  if (fileNameArg !== undefined && fileNameArg !== r_function_call_1.EmptyArgument) {
1108
1111
  const fileName = (0, resolve_args_1.resolveIdToArgValue)(fileNameArg, info);
1109
1112
  if (typeof fileName === 'string') {
1110
1113
  source = fileName;
1111
- const referenceChain = fileNameArg.info.file ? [(0, retriever_1.requestFromInput)(`file://${fileNameArg.info.file}`)] : [];
1112
- const sources = (0, built_in_source_1.findSource)(config.solver.resolveSource, fileName, { referenceChain });
1114
+ const referenceChain = fileNameArg.info.file ? [fileNameArg.info.file] : [];
1115
+ const sources = (0, built_in_source_1.findSource)(ctx.config.solver.resolveSource, fileName, { referenceChain, ctx });
1113
1116
  if (sources?.length === 1) {
1114
1117
  source = sources[0];
1115
1118
  // create request from resolved source file path
1116
- request = (0, built_in_source_1.getSourceProvider)().createRequest(source);
1119
+ request = { request: 'file', content: sources[0] };
1117
1120
  }
1118
1121
  else if (params.text === undefined && (0, resolve_args_1.unescapeSpecialChars)(fileName).includes('\n')) {
1119
1122
  // create request from string if file name argument contains newline
@@ -1128,6 +1131,7 @@ function getRequestFromRead(fileNameArg, textArg, params, info, config) {
1128
1131
  request = (0, retriever_1.requestFromInput)((0, resolve_args_1.unescapeSpecialChars)(text));
1129
1132
  }
1130
1133
  }
1134
+ request = request ? ctx.files.resolveRequest(request).r : undefined;
1131
1135
  return { source, request };
1132
1136
  }
1133
1137
  function parseRequestContent(request, parser, maxLines) {
@@ -168,6 +168,14 @@ function applyAddColsSemantics(value, { colnames }) {
168
168
  });
169
169
  }
170
170
  function applyAddRowsSemantics(value, { rows }) {
171
+ if (value.cols.value !== lattice_1.Bottom && value.cols.value[0] === 0) {
172
+ return new dataframe_domain_1.DataFrameDomain({
173
+ ...value,
174
+ colnames: value.colnames.top(),
175
+ cols: rows !== undefined ? value.cols.add([1, 1]) : value.cols.top(),
176
+ rows: rows !== undefined ? value.rows.add([rows, rows]) : value.rows.extendUp()
177
+ });
178
+ }
171
179
  return new dataframe_domain_1.DataFrameDomain({
172
180
  colnames: value.colnames,
173
181
  cols: value.cols,
@@ -1,4 +1,3 @@
1
- import type { FlowrConfigOptions } from '../../config';
2
1
  import { type ControlFlowInformation } from '../../control-flow/control-flow-graph';
3
2
  import type { DataflowGraph } from '../../dataflow/graph/graph';
4
3
  import type { RNode } from '../../r-bridge/lang-4.x/ast/model/model';
@@ -6,17 +5,18 @@ import type { NormalizedAst, ParentInformation } from '../../r-bridge/lang-4.x/a
6
5
  import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
7
6
  import { type AbstractInterpretationInfo } from './absint-info';
8
7
  import { type DataFrameDomain, DataFrameStateDomain } from './dataframe-domain';
8
+ import type { ReadOnlyFlowrAnalyzerContext } from '../../project/context/flowr-analyzer-context';
9
9
  /**
10
10
  * Infers the shape of data frames by performing abstract interpretation using the control flow graph of a program.
11
11
  * This directly attaches the inferred data frames shapes to the AST (see {@link AbstractInterpretationInfo}).
12
12
  * @param cfinfo - The control flow information containing the control flow graph
13
13
  * @param dfg - The data flow graph to resolve variable origins and function arguments
14
14
  * @param ast - The abstract syntax tree to resolve node IDs to AST nodes
15
- * @param config - The flowR configuration to use for the shape inference
15
+ * @param ctx - The current flowr analyzer context
16
16
  * @returns The abstract data frame state at the exit node of the control flow graph (see {@link DataFrameStateDomain}).
17
17
  * The abstract data frame states for all other nodes are attached to the AST.
18
18
  */
19
- export declare function inferDataFrameShapes(cfinfo: ControlFlowInformation, dfg: DataflowGraph, ast: NormalizedAst<ParentInformation & AbstractInterpretationInfo>, config: FlowrConfigOptions): DataFrameStateDomain;
19
+ export declare function inferDataFrameShapes(cfinfo: ControlFlowInformation, dfg: DataflowGraph, ast: NormalizedAst<ParentInformation & AbstractInterpretationInfo>, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameStateDomain;
20
20
  /**
21
21
  * Resolves the abstract data frame shape of a node in the AST.
22
22
  * This requires that the data frame shape inference has been executed before using {@link inferDataFrameShapes}.
@@ -19,12 +19,12 @@ const dataframe_domain_1 = require("./dataframe-domain");
19
19
  * @param cfinfo - The control flow information containing the control flow graph
20
20
  * @param dfg - The data flow graph to resolve variable origins and function arguments
21
21
  * @param ast - The abstract syntax tree to resolve node IDs to AST nodes
22
- * @param config - The flowR configuration to use for the shape inference
22
+ * @param ctx - The current flowr analyzer context
23
23
  * @returns The abstract data frame state at the exit node of the control flow graph (see {@link DataFrameStateDomain}).
24
24
  * The abstract data frame states for all other nodes are attached to the AST.
25
25
  */
26
- function inferDataFrameShapes(cfinfo, dfg, ast, config) {
27
- const visitor = new absint_visitor_1.DataFrameShapeInferenceVisitor({ controlFlow: cfinfo, dfg: dfg, normalizedAst: ast, flowrConfig: config });
26
+ function inferDataFrameShapes(cfinfo, dfg, ast, ctx) {
27
+ const visitor = new absint_visitor_1.DataFrameShapeInferenceVisitor({ controlFlow: cfinfo, dfg: dfg, normalizedAst: ast, ctx });
28
28
  visitor.start();
29
29
  const exitPoints = cfinfo.exitPoints.map(id => cfinfo.graph.getVertex(id)).filter(assert_1.isNotUndefined);
30
30
  const exitNodes = exitPoints.map(vertex => ast.idMap.get((0, control_flow_graph_1.getVertexRootId)(vertex))).filter(assert_1.isNotUndefined);
@@ -25,7 +25,7 @@ type FoldOfType<T extends RType, Returns = void, Info = NoInfo> = (node: Extract
25
25
  type: T;
26
26
  }>) => Returns;
27
27
  /** explicitly excludes types that are not visitable */
28
- export type FoldableRType = Exclude<RType, RType.Delimiter>;
28
+ export type FoldableRType = Exclude<RType, RType.Delimiter | RType.Project>;
29
29
  /**
30
30
  * Describes the fold functions for each node type.
31
31
  */
@@ -58,6 +58,7 @@ export declare class BenchmarkSlicer {
58
58
  private readonly deltas;
59
59
  private readonly parserName;
60
60
  private config;
61
+ private context;
61
62
  private stats;
62
63
  private loadedXml;
63
64
  private dataflow;
@@ -29,6 +29,7 @@ const extract_cfg_1 = require("../control-flow/extract-cfg");
29
29
  const absint_info_1 = require("../abstract-interpretation/data-frame/absint-info");
30
30
  const shape_inference_1 = require("../abstract-interpretation/data-frame/shape-inference");
31
31
  const fs_1 = __importDefault(require("fs"));
32
+ const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-context");
32
33
  /**
33
34
  * The logger to be used for benchmarking as a global object.
34
35
  */
@@ -40,6 +41,7 @@ class BenchmarkSlicer {
40
41
  deltas = new Map();
41
42
  parserName;
42
43
  config;
44
+ context;
43
45
  stats;
44
46
  loadedXml;
45
47
  dataflow;
@@ -71,13 +73,14 @@ class BenchmarkSlicer {
71
73
  return new tree_sitter_executor_1.TreeSitterExecutor();
72
74
  }
73
75
  });
76
+ this.context = (0, flowr_analyzer_context_1.contextFromInput)({ ...request }, config);
74
77
  this.executor = (0, default_pipelines_1.createSlicePipeline)(this.parser, {
75
- request: { ...request },
78
+ context: this.context,
76
79
  criterion: [],
77
80
  autoSelectIf,
78
81
  threshold,
79
- }, config);
80
- this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).parsed;
82
+ });
83
+ this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).files.map(p => p.parsed);
81
84
  this.normalizedAst = await this.measureCommonStep('normalize', 'normalize R AST');
82
85
  this.dataflow = await this.measureCommonStep('dataflow', 'produce dataflow information');
83
86
  this.executor.switchToRequestStage();
@@ -100,9 +103,9 @@ class BenchmarkSlicer {
100
103
  }
101
104
  return ret;
102
105
  };
103
- const root = this.loadedXml.rootNode;
104
- numberOfRTokens = countChildren(root);
105
- numberOfRTokensNoComments = countChildren(root, true);
106
+ const root = this.loadedXml.map(t => t.rootNode);
107
+ numberOfRTokens = root.map(r => countChildren(r)).reduce((a, b) => a + b, 0);
108
+ numberOfRTokensNoComments = root.map(r => countChildren(r, true)).reduce((a, b) => a + b, 0);
106
109
  }
107
110
  (0, assert_1.guard)(this.normalizedAst !== undefined, 'normalizedAst should be defined after initialization');
108
111
  (0, assert_1.guard)(this.dataflow !== undefined, 'dataflow should be defined after initialization');
@@ -125,7 +128,7 @@ class BenchmarkSlicer {
125
128
  let nodesNoComments = 0;
126
129
  let commentChars = 0;
127
130
  let commentCharsNoWhitespace = 0;
128
- (0, visitor_1.visitAst)(this.normalizedAst.ast, t => {
131
+ (0, visitor_1.visitAst)(this.normalizedAst.ast.files.map(f => f.root), t => {
129
132
  nodes++;
130
133
  const comments = t.info.additionalTokens?.filter(t => t.type === type_1.RType.Comment);
131
134
  if (comments && comments.length > 0) {
@@ -274,8 +277,7 @@ class BenchmarkSlicer {
274
277
  (0, assert_1.guard)(this.config !== undefined, 'config should be defined for control flow extraction');
275
278
  const ast = this.normalizedAst;
276
279
  const dfg = this.dataflow.graph;
277
- const config = this.config;
278
- this.controlFlow = this.measureSimpleStep('extract control flow graph', () => (0, extract_cfg_1.extractCfg)(ast, config, dfg));
280
+ this.controlFlow = this.measureSimpleStep('extract control flow graph', () => (0, extract_cfg_1.extractCfg)(ast, this.context, dfg));
279
281
  }
280
282
  /**
281
283
  * Infer the shape of data frames using abstract interpretation with {@link inferDataFrameShapes}
@@ -291,7 +293,6 @@ class BenchmarkSlicer {
291
293
  const ast = this.normalizedAst;
292
294
  const dfg = this.dataflow.graph;
293
295
  const cfinfo = this.controlFlow;
294
- const config = this.config;
295
296
  const stats = {
296
297
  numberOfDataFrameFiles: 0,
297
298
  numberOfNonDataFrameFiles: 0,
@@ -305,7 +306,7 @@ class BenchmarkSlicer {
305
306
  sizeOfInfo: 0,
306
307
  perNodeStats: new Map()
307
308
  };
308
- const result = this.measureSimpleStep('infer data frame shapes', () => (0, shape_inference_1.inferDataFrameShapes)(cfinfo, dfg, ast, config));
309
+ const result = this.measureSimpleStep('infer data frame shapes', () => (0, shape_inference_1.inferDataFrameShapes)(cfinfo, dfg, ast, this.context));
309
310
  stats.numberOfResultConstraints = result.value.size;
310
311
  for (const value of result.value.values()) {
311
312
  if (value.isTop()) {
@@ -318,7 +319,7 @@ class BenchmarkSlicer {
318
319
  stats.numberOfResultingValues++;
319
320
  }
320
321
  }
321
- (0, visitor_1.visitAst)(this.normalizedAst.ast, (node) => {
322
+ (0, visitor_1.visitAst)(this.normalizedAst.ast.files.map(f => f.root), (node) => {
322
323
  if (node.info.dataFrame === undefined) {
323
324
  return;
324
325
  }
@@ -159,7 +159,7 @@ async function summarizeSlicerStats(stats, report = () => {
159
159
  let numberOfNormalizedTokensNoComments = 0;
160
160
  let commentChars = 0;
161
161
  let commentCharsNoWhitespace = 0;
162
- (0, visitor_1.visitAst)(reParsed.ast, t => {
162
+ (0, visitor_1.visitAst)(reParsed.ast.files.map(f => f.root), t => {
163
163
  numberOfNormalizedTokens++;
164
164
  const comments = t.info.additionalTokens?.filter(t => t.type === type_1.RType.Comment);
165
165
  if (comments && comments.length > 0) {
@@ -1,5 +1,7 @@
1
1
  import type { UltimateSlicerStats } from '../data';
2
2
  /**
3
- *
3
+ * Write the graph output for the ultimate slicer stats to a file
4
+ * @param ultimate - The ultimate slicer stats
5
+ * @param outputGraphPath - The path to write the graph output to
4
6
  */
5
7
  export declare function writeGraphOutput(ultimate: UltimateSlicerStats, outputGraphPath: string): void;
@@ -7,7 +7,9 @@ exports.writeGraphOutput = writeGraphOutput;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const json_1 = require("../../../util/json");
9
9
  /**
10
- *
10
+ * Write the graph output for the ultimate slicer stats to a file
11
+ * @param ultimate - The ultimate slicer stats
12
+ * @param outputGraphPath - The path to write the graph output to
11
13
  */
12
14
  function writeGraphOutput(ultimate, outputGraphPath) {
13
15
  console.log(`Producing benchmark graph data (${outputGraphPath})...`);
@@ -21,7 +21,7 @@ const options = (0, script_1.processCommandLineArgs)('export-quads', [], {
21
21
  const shell = new shell_1.RShell((0, config_1.getEngineConfig)((0, config_1.getConfig)(), 'r-shell'));
22
22
  async function writeQuadForSingleFile(request, output) {
23
23
  const normalized = await (0, retriever_1.retrieveNormalizedAstFromRCode)(request, shell);
24
- const serialized = (0, quads_1.serialize2quads)(normalized.ast, { context: request.content });
24
+ const serialized = (0, quads_1.serialize2quads)(normalized.ast.files[0].root, { context: request.content });
25
25
  log_1.log.info(`Appending quads to ${output}`);
26
26
  fs_1.default.appendFileSync(output, serialized);
27
27
  }