@eagleoutice/flowr 2.6.2 → 2.7.0

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 (435) hide show
  1. package/README.md +36 -34
  2. package/abstract-interpretation/data-frame/absint-visitor.d.ts +1 -1
  3. package/abstract-interpretation/data-frame/absint-visitor.js +6 -6
  4. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +4 -7
  5. package/abstract-interpretation/data-frame/dataframe-domain.js +5 -11
  6. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +3 -1
  7. package/abstract-interpretation/data-frame/mappers/access-mapper.js +3 -2
  8. package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
  9. package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +3 -1
  10. package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +3 -2
  11. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
  12. package/abstract-interpretation/data-frame/mappers/function-mapper.js +28 -24
  13. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +3 -1
  14. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +3 -2
  15. package/abstract-interpretation/data-frame/semantics.js +54 -41
  16. package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
  17. package/abstract-interpretation/data-frame/shape-inference.js +3 -3
  18. package/abstract-interpretation/domains/abstract-domain.d.ts +1 -0
  19. package/abstract-interpretation/domains/abstract-domain.js +3 -2
  20. package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
  21. package/abstract-interpretation/domains/interval-domain.d.ts +2 -2
  22. package/abstract-interpretation/domains/interval-domain.js +3 -6
  23. package/abstract-interpretation/domains/lattice.d.ts +2 -0
  24. package/abstract-interpretation/domains/lattice.js +3 -1
  25. package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -1
  26. package/abstract-interpretation/domains/positive-interval-domain.js +1 -1
  27. package/abstract-interpretation/domains/satisfiable-domain.d.ts +2 -2
  28. package/abstract-interpretation/domains/satisfiable-domain.js +2 -2
  29. package/abstract-interpretation/domains/set-range-domain.d.ts +98 -0
  30. package/abstract-interpretation/domains/set-range-domain.js +400 -0
  31. package/abstract-interpretation/domains/set-upper-bound-domain.js +2 -2
  32. package/abstract-interpretation/domains/singleton-domain.js +2 -2
  33. package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
  34. package/benchmark/slicer.d.ts +3 -1
  35. package/benchmark/slicer.js +50 -27
  36. package/benchmark/stats/print.js +8 -5
  37. package/benchmark/stats/stats.d.ts +3 -2
  38. package/benchmark/summarizer/data.d.ts +11 -8
  39. package/benchmark/summarizer/first-phase/process.js +12 -9
  40. package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
  41. package/benchmark/summarizer/second-phase/graph.js +3 -1
  42. package/benchmark/summarizer/second-phase/process.js +24 -18
  43. package/cli/export-quads-app.js +1 -1
  44. package/cli/repl/commands/repl-dataflow.js +2 -1
  45. package/cli/repl/commands/repl-parse.js +16 -4
  46. package/cli/repl/commands/repl-query.js +1 -1
  47. package/cli/repl/core.js +16 -13
  48. package/cli/repl/server/connection.js +2 -1
  49. package/cli/script-core/statistics-helper-core.js +2 -1
  50. package/cli/slicer-app.js +3 -4
  51. package/cli/wiki.d.ts +4 -0
  52. package/cli/wiki.js +165 -0
  53. package/config.d.ts +4 -0
  54. package/config.js +6 -0
  55. package/control-flow/cfg-dead-code.js +14 -3
  56. package/control-flow/cfg-simplification.d.ts +5 -2
  57. package/control-flow/cfg-simplification.js +3 -0
  58. package/control-flow/extract-cfg.d.ts +9 -3
  59. package/control-flow/extract-cfg.js +44 -4
  60. package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -2
  61. package/control-flow/simple-visitor.js +2 -2
  62. package/control-flow/useless-loop.d.ts +3 -3
  63. package/control-flow/useless-loop.js +16 -5
  64. package/core/pipeline-executor.d.ts +3 -6
  65. package/core/pipeline-executor.js +4 -7
  66. package/core/print/normalize-printer.d.ts +1 -1
  67. package/core/print/normalize-printer.js +2 -2
  68. package/core/steps/all/core/00-parse.d.ts +1 -1
  69. package/core/steps/all/core/00-parse.js +1 -1
  70. package/core/steps/all/core/10-normalize.d.ts +3 -9
  71. package/core/steps/all/core/10-normalize.js +1 -16
  72. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -3
  73. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -3
  74. package/core/steps/all/core/20-dataflow.d.ts +3 -4
  75. package/core/steps/all/core/20-dataflow.js +2 -2
  76. package/core/steps/all/static-slicing/00-slice.d.ts +4 -2
  77. package/core/steps/all/static-slicing/00-slice.js +3 -2
  78. package/core/steps/all/static-slicing/10-reconstruct.d.ts +8 -0
  79. package/core/steps/all/static-slicing/10-reconstruct.js +4 -1
  80. package/core/steps/pipeline/default-pipelines.d.ts +94 -95
  81. package/core/steps/pipeline/default-pipelines.js +8 -8
  82. package/dataflow/cluster.js +2 -2
  83. package/dataflow/environments/append.d.ts +5 -0
  84. package/dataflow/environments/append.js +6 -20
  85. package/dataflow/environments/built-in.d.ts +2 -1
  86. package/dataflow/environments/clone.d.ts +1 -2
  87. package/dataflow/environments/clone.js +3 -17
  88. package/dataflow/environments/define.d.ts +7 -3
  89. package/dataflow/environments/define.js +9 -56
  90. package/dataflow/environments/diff.js +3 -3
  91. package/dataflow/environments/environment.d.ts +48 -28
  92. package/dataflow/environments/environment.js +187 -62
  93. package/dataflow/environments/overwrite.d.ts +1 -5
  94. package/dataflow/environments/overwrite.js +2 -61
  95. package/dataflow/environments/reference-to-maybe.d.ts +13 -0
  96. package/dataflow/environments/reference-to-maybe.js +54 -0
  97. package/dataflow/environments/resolve-by-name.d.ts +6 -1
  98. package/dataflow/environments/resolve-by-name.js +56 -4
  99. package/dataflow/environments/scoping.d.ts +8 -4
  100. package/dataflow/environments/scoping.js +13 -9
  101. package/dataflow/eval/resolve/alias-tracking.d.ts +10 -4
  102. package/dataflow/eval/resolve/alias-tracking.js +15 -13
  103. package/dataflow/eval/resolve/resolve-argument.d.ts +2 -1
  104. package/dataflow/eval/resolve/resolve-argument.js +10 -10
  105. package/dataflow/eval/resolve/resolve.d.ts +13 -11
  106. package/dataflow/eval/resolve/resolve.js +16 -15
  107. package/dataflow/eval/values/string/string-constants.d.ts +9 -3
  108. package/dataflow/eval/values/string/string-constants.js +9 -3
  109. package/dataflow/extractor.d.ts +2 -3
  110. package/dataflow/extractor.js +25 -28
  111. package/dataflow/fn/higher-order-function.d.ts +2 -1
  112. package/dataflow/fn/higher-order-function.js +4 -4
  113. package/dataflow/graph/dataflowgraph-builder.d.ts +9 -5
  114. package/dataflow/graph/dataflowgraph-builder.js +21 -11
  115. package/dataflow/graph/diff-dataflow-graph.js +2 -2
  116. package/dataflow/graph/graph.d.ts +13 -11
  117. package/dataflow/graph/graph.js +40 -24
  118. package/dataflow/graph/invert-dfg.d.ts +3 -2
  119. package/dataflow/graph/invert-dfg.js +3 -3
  120. package/dataflow/graph/resolve-graph.d.ts +2 -1
  121. package/dataflow/graph/resolve-graph.js +2 -2
  122. package/dataflow/graph/unknown-replacement.d.ts +4 -2
  123. package/dataflow/graph/unknown-replacement.js +4 -2
  124. package/dataflow/graph/vertex.d.ts +3 -3
  125. package/dataflow/graph/vertex.js +3 -3
  126. package/dataflow/info.d.ts +8 -1
  127. package/dataflow/info.js +21 -0
  128. package/dataflow/internal/linker.js +10 -11
  129. package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -2
  130. package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -3
  131. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +7 -1
  132. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +12 -3
  133. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
  134. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -7
  135. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +2 -2
  136. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +3 -1
  137. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -6
  138. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -14
  139. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +10 -8
  140. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -4
  141. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
  142. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +10 -14
  143. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  144. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -2
  145. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +3 -1
  146. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +8 -6
  147. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +1 -1
  148. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  149. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +4 -4
  150. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +6 -1
  151. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +7 -2
  152. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -5
  153. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +6 -4
  154. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +15 -10
  155. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +78 -75
  156. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -1
  157. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  158. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  159. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -5
  160. package/dataflow/internal/process/functions/call/common.d.ts +1 -1
  161. package/dataflow/internal/process/functions/call/common.js +6 -7
  162. package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -1
  163. package/dataflow/internal/process/functions/call/default-call-handling.js +3 -1
  164. package/dataflow/internal/process/functions/call/known-call-handling.js +4 -4
  165. package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
  166. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +1 -1
  167. package/dataflow/internal/process/functions/process-argument.js +1 -1
  168. package/dataflow/internal/process/functions/process-parameter.js +4 -4
  169. package/dataflow/internal/process/process-symbol.js +1 -1
  170. package/dataflow/internal/process/process-value.d.ts +1 -1
  171. package/dataflow/internal/process/process-value.js +7 -7
  172. package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -1
  173. package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
  174. package/dataflow/processor.d.ts +7 -16
  175. package/documentation/data/dfg/doc-data-dfg-util.d.ts +0 -2
  176. package/documentation/data/faq/faqs.js +27 -18
  177. package/documentation/data/faq/recommended-configs.d.ts +36 -0
  178. package/documentation/data/faq/recommended-configs.js +40 -0
  179. package/documentation/data/faq/wiki-faq-store.d.ts +1 -0
  180. package/documentation/data/faq/wiki-faq-store.js +10 -2
  181. package/documentation/data/server/doc-data-server-messages.js +1 -1
  182. package/documentation/doc-capabilities.d.ts +9 -0
  183. package/documentation/{print-capabilities-markdown.js → doc-capabilities.js} +18 -21
  184. package/documentation/doc-readme.d.ts +9 -0
  185. package/documentation/{print-readme.js → doc-readme.js} +31 -35
  186. package/documentation/doc-util/doc-benchmarks.d.ts +6 -4
  187. package/documentation/doc-util/doc-benchmarks.js +6 -4
  188. package/documentation/doc-util/doc-cfg.js +5 -8
  189. package/documentation/doc-util/doc-dfg.d.ts +7 -7
  190. package/documentation/doc-util/doc-dfg.js +15 -14
  191. package/documentation/doc-util/doc-escape.d.ts +6 -0
  192. package/documentation/doc-util/doc-escape.js +11 -0
  193. package/documentation/doc-util/doc-general.d.ts +22 -2
  194. package/documentation/doc-util/doc-general.js +22 -2
  195. package/documentation/doc-util/doc-normalized-ast.d.ts +10 -5
  196. package/documentation/doc-util/doc-normalized-ast.js +14 -10
  197. package/documentation/doc-util/doc-query.d.ts +12 -4
  198. package/documentation/doc-util/doc-query.js +18 -11
  199. package/documentation/doc-util/doc-search.d.ts +0 -30
  200. package/documentation/doc-util/doc-search.js +2 -73
  201. package/documentation/doc-util/doc-server-message.d.ts +5 -5
  202. package/documentation/doc-util/doc-server-message.js +4 -4
  203. package/documentation/doc-util/doc-types.d.ts +69 -32
  204. package/documentation/doc-util/doc-types.js +109 -62
  205. package/documentation/index.d.ts +9 -9
  206. package/documentation/index.js +9 -9
  207. package/documentation/issue-linting-rule.d.ts +9 -0
  208. package/documentation/{print-linter-issue.js → issue-linting-rule.js} +20 -23
  209. package/documentation/wiki-analyzer.d.ts +9 -0
  210. package/documentation/wiki-analyzer.js +425 -0
  211. package/documentation/wiki-cfg.d.ts +9 -0
  212. package/documentation/{print-cfg-wiki.js → wiki-cfg.js} +144 -160
  213. package/documentation/wiki-core.d.ts +14 -0
  214. package/documentation/{print-core-wiki.js → wiki-core.js} +164 -175
  215. package/documentation/wiki-dataflow-graph.d.ts +9 -0
  216. package/documentation/{print-dataflow-graph-wiki.js → wiki-dataflow-graph.js} +146 -177
  217. package/documentation/wiki-engine.d.ts +9 -0
  218. package/documentation/{print-engines-wiki.js → wiki-engine.js} +27 -42
  219. package/documentation/wiki-faq.d.ts +8 -0
  220. package/documentation/wiki-faq.js +21 -0
  221. package/documentation/wiki-interface.d.ts +9 -0
  222. package/documentation/{print-interface-wiki.js → wiki-interface.js} +59 -56
  223. package/documentation/wiki-linter.d.ts +9 -0
  224. package/documentation/{print-linter-wiki.js → wiki-linter.js} +52 -48
  225. package/documentation/wiki-linting-and-testing.d.ts +9 -0
  226. package/documentation/{print-linting-and-testing-wiki.js → wiki-linting-and-testing.js} +25 -32
  227. package/documentation/wiki-mk/doc-context.d.ts +186 -0
  228. package/documentation/wiki-mk/doc-context.js +84 -0
  229. package/documentation/wiki-mk/doc-maker.d.ts +95 -0
  230. package/documentation/wiki-mk/doc-maker.js +134 -0
  231. package/documentation/wiki-normalized-ast.d.ts +9 -0
  232. package/documentation/{print-normalized-ast-wiki.js → wiki-normalized-ast.js} +64 -47
  233. package/documentation/wiki-onboarding.d.ts +8 -0
  234. package/documentation/{print-onboarding-wiki.js → wiki-onboarding.js} +18 -15
  235. package/documentation/wiki-query.d.ts +9 -0
  236. package/documentation/{print-query-wiki.js → wiki-query.js} +62 -47
  237. package/documentation/wiki-search.d.ts +9 -0
  238. package/documentation/wiki-search.js +61 -0
  239. package/linter/linter-executor.js +3 -2
  240. package/linter/linter-format.d.ts +2 -2
  241. package/linter/linter-rules.d.ts +15 -19
  242. package/linter/rules/absolute-path.d.ts +1 -2
  243. package/linter/rules/absolute-path.js +5 -5
  244. package/linter/rules/dataframe-access-validation.d.ts +2 -2
  245. package/linter/rules/dataframe-access-validation.js +13 -9
  246. package/linter/rules/dead-code.d.ts +1 -1
  247. package/linter/rules/deprecated-functions.d.ts +1 -5
  248. package/linter/rules/file-path-validity.d.ts +1 -1
  249. package/linter/rules/file-path-validity.js +4 -4
  250. package/linter/rules/function-finder-util.d.ts +3 -7
  251. package/linter/rules/function-finder-util.js +1 -1
  252. package/linter/rules/naming-convention.d.ts +2 -2
  253. package/linter/rules/naming-convention.js +1 -1
  254. package/linter/rules/network-functions.d.ts +1 -1
  255. package/linter/rules/network-functions.js +1 -1
  256. package/linter/rules/seeded-randomness.d.ts +4 -3
  257. package/linter/rules/seeded-randomness.js +38 -18
  258. package/linter/rules/unused-definition.d.ts +1 -1
  259. package/linter/rules/useless-loop.d.ts +2 -2
  260. package/linter/rules/useless-loop.js +2 -2
  261. package/package.json +5 -17
  262. package/project/cache/flowr-analyzer-cache.d.ts +7 -10
  263. package/project/cache/flowr-analyzer-cache.js +17 -38
  264. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +34 -0
  265. package/project/cache/flowr-analyzer-controlflow-cache.js +79 -0
  266. package/project/context/flowr-analyzer-context.d.ts +37 -5
  267. package/project/context/flowr-analyzer-context.js +51 -4
  268. package/project/context/flowr-analyzer-environment-context.d.ts +47 -0
  269. package/project/context/flowr-analyzer-environment-context.js +50 -0
  270. package/project/context/flowr-analyzer-files-context.d.ts +63 -13
  271. package/project/context/flowr-analyzer-files-context.js +110 -39
  272. package/project/context/flowr-file.d.ts +32 -10
  273. package/project/context/flowr-file.js +30 -9
  274. package/project/flowr-analyzer-builder.d.ts +22 -28
  275. package/project/flowr-analyzer-builder.js +32 -70
  276. package/project/flowr-analyzer.d.ts +55 -14
  277. package/project/flowr-analyzer.js +53 -8
  278. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +7 -1
  279. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +13 -5
  280. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +3 -3
  281. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +11 -5
  282. package/project/plugins/file-plugins/flowr-description-file.d.ts +3 -3
  283. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +22 -0
  284. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +33 -0
  285. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +22 -0
  286. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +33 -0
  287. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +22 -0
  288. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +33 -0
  289. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.d.ts +20 -0
  290. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.js +42 -0
  291. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.d.ts +59 -0
  292. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.js +132 -0
  293. package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
  294. package/project/plugins/file-plugins/notebooks/notebook.js +2 -0
  295. package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +5 -0
  296. package/project/plugins/flowr-analyzer-plugin-defaults.js +23 -0
  297. package/project/plugins/flowr-analyzer-plugin.d.ts +2 -0
  298. package/project/plugins/flowr-analyzer-plugin.js +2 -0
  299. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  300. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  301. package/project/plugins/plugin-registry.d.ts +34 -0
  302. package/project/plugins/plugin-registry.js +62 -0
  303. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
  304. package/queries/catalog/call-context-query/call-context-query-executor.js +5 -6
  305. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -2
  306. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +25 -18
  307. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  308. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  309. package/queries/catalog/control-flow-query/control-flow-query-format.js +3 -2
  310. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
  311. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  312. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  313. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
  314. package/queries/catalog/dependencies-query/dependencies-query-executor.js +5 -5
  315. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  316. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  317. package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +1 -1
  318. package/queries/catalog/df-shape-query/df-shape-query-executor.js +2 -2
  319. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +6 -6
  320. package/queries/catalog/df-shape-query/df-shape-query-format.js +8 -7
  321. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +2 -1
  322. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  323. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  324. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  325. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +1 -1
  326. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +4 -4
  327. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
  328. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  329. package/queries/catalog/linter-query/linter-query-format.js +13 -2
  330. package/queries/catalog/location-map-query/location-map-query-executor.js +2 -1
  331. package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
  332. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  333. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  334. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  335. package/queries/catalog/project-query/project-query-executor.js +3 -1
  336. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  337. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +2 -2
  338. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +3 -3
  339. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  340. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  341. package/queries/catalog/static-slice-query/static-slice-query-executor.js +2 -2
  342. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  343. package/queries/catalog/static-slice-query/static-slice-query-format.js +13 -1
  344. package/queries/query.d.ts +26 -18
  345. package/queries/query.js +21 -1
  346. package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -1
  347. package/r-bridge/lang-4.x/ast/model/collect.js +4 -0
  348. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +29 -0
  349. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +15 -0
  350. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +5 -7
  351. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +24 -11
  352. package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
  353. package/r-bridge/lang-4.x/ast/model/type.js +2 -0
  354. package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
  355. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +9 -8
  356. package/r-bridge/lang-4.x/ast/parser/json/parser.js +11 -10
  357. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +4 -3
  358. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +20 -11
  359. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -3
  360. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +5 -4
  361. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -2
  362. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +14 -5
  363. package/r-bridge/parser.d.ts +15 -5
  364. package/r-bridge/parser.js +27 -13
  365. package/r-bridge/retriever.d.ts +9 -15
  366. package/r-bridge/retriever.js +14 -5
  367. package/r-bridge/shell.d.ts +1 -1
  368. package/r-bridge/shell.js +1 -1
  369. package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
  370. package/reconstruct/auto-select/magic-comments.js +1 -1
  371. package/reconstruct/reconstruct.d.ts +17 -9
  372. package/reconstruct/reconstruct.js +19 -8
  373. package/search/flowr-search.d.ts +12 -0
  374. package/search/search-executor/search-enrichers.d.ts +9 -2
  375. package/search/search-executor/search-enrichers.js +1 -3
  376. package/search/search-executor/search-generators.d.ts +1 -1
  377. package/search/search-executor/search-generators.js +9 -4
  378. package/slicing/criterion/collect-all.d.ts +3 -2
  379. package/slicing/criterion/collect-all.js +1 -1
  380. package/slicing/criterion/parse.js +4 -4
  381. package/slicing/static/slice-call.d.ts +3 -2
  382. package/slicing/static/slice-call.js +4 -4
  383. package/slicing/static/static-slicer.d.ts +3 -1
  384. package/slicing/static/static-slicer.js +6 -7
  385. package/statistics/features/supported/assignments/assignments.js +1 -1
  386. package/statistics/features/supported/control-flow/control-flow.js +2 -2
  387. package/statistics/features/supported/data-access/data-access.js +1 -1
  388. package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
  389. package/statistics/features/supported/expression-list/statistics-expression-list.js +1 -1
  390. package/statistics/features/supported/loops/loops.js +1 -1
  391. package/statistics/features/supported/used-functions/used-functions.js +2 -2
  392. package/statistics/features/supported/variables/variables.js +3 -2
  393. package/statistics/statistics.js +3 -2
  394. package/util/assert.d.ts +4 -0
  395. package/util/assert.js +4 -0
  396. package/util/containers.js +1 -1
  397. package/util/files.d.ts +1 -1
  398. package/util/files.js +1 -1
  399. package/util/mermaid/ast.d.ts +4 -3
  400. package/util/mermaid/ast.js +36 -8
  401. package/util/mermaid/cfg.js +1 -1
  402. package/util/mermaid/dfg.d.ts +1 -0
  403. package/util/mermaid/dfg.js +3 -3
  404. package/util/simple-df/dfg-view.d.ts +2 -1
  405. package/util/simple-df/dfg-view.js +2 -2
  406. package/util/version.js +1 -1
  407. package/dataflow/environments/remove.d.ts +0 -12
  408. package/dataflow/environments/remove.js +0 -52
  409. package/documentation/print-analyzer-wiki.d.ts +0 -1
  410. package/documentation/print-analyzer-wiki.js +0 -141
  411. package/documentation/print-capabilities-markdown.d.ts +0 -1
  412. package/documentation/print-cfg-wiki.d.ts +0 -1
  413. package/documentation/print-core-wiki.d.ts +0 -5
  414. package/documentation/print-dataflow-graph-wiki.d.ts +0 -1
  415. package/documentation/print-engines-wiki.d.ts +0 -1
  416. package/documentation/print-faq-wiki.d.ts +0 -1
  417. package/documentation/print-faq-wiki.js +0 -18
  418. package/documentation/print-interface-wiki.d.ts +0 -1
  419. package/documentation/print-linter-issue.d.ts +0 -1
  420. package/documentation/print-linter-wiki.d.ts +0 -1
  421. package/documentation/print-linting-and-testing-wiki.d.ts +0 -1
  422. package/documentation/print-normalized-ast-wiki.d.ts +0 -1
  423. package/documentation/print-onboarding-wiki.d.ts +0 -1
  424. package/documentation/print-query-wiki.d.ts +0 -1
  425. package/documentation/print-readme.d.ts +0 -1
  426. package/documentation/print-search-wiki.d.ts +0 -1
  427. package/documentation/print-search-wiki.js +0 -74
  428. package/util/formats/adapter-format.d.ts +0 -6
  429. package/util/formats/adapter-format.js +0 -3
  430. package/util/formats/adapter.d.ts +0 -27
  431. package/util/formats/adapter.js +0 -58
  432. package/util/formats/adapters/r-adapter.d.ts +0 -4
  433. package/util/formats/adapters/r-adapter.js +0 -7
  434. package/util/formats/adapters/rmd-adapter.d.ts +0 -35
  435. package/util/formats/adapters/rmd-adapter.js +0 -100
@@ -25,7 +25,7 @@ const isImplicitLoop = /[lsvmt]?apply/;
25
25
  function visitLoops(info, input) {
26
26
  // holds number of loops and their nesting depths
27
27
  const loopStack = [];
28
- (0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
28
+ (0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
29
29
  switch (node.type) {
30
30
  case type_1.RType.Next:
31
31
  info.nextStatements++;
@@ -50,7 +50,7 @@ function classifyArguments(args, existing) {
50
50
  function visitCalls(info, input) {
51
51
  const calls = [];
52
52
  const allCalls = [];
53
- (0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
53
+ (0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
54
54
  if (node.type !== type_1.RType.FunctionCall) {
55
55
  return;
56
56
  }
@@ -84,7 +84,7 @@ function visitCalls(info, input) {
84
84
  hasCallsEdge ? 1 : 0
85
85
  ]);
86
86
  }
87
- classifyArguments(node.arguments.map(e => (0, unpack_argument_1.unpackArgument)(e)), info.args);
87
+ classifyArguments(node.arguments.map(e => (0, unpack_argument_1.unpackNonameArg)(e)), info.args);
88
88
  calls.push(node);
89
89
  }, node => {
90
90
  // drop again :D
@@ -7,6 +7,7 @@ const visitor_1 = require("../../../../r-bridge/lang-4.x/ast/model/processing/vi
7
7
  const type_1 = require("../../../../r-bridge/lang-4.x/ast/model/type");
8
8
  const r_symbol_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol");
9
9
  const statistics_file_1 = require("../../../output/statistics-file");
10
+ const vertex_1 = require("../../../../dataflow/graph/vertex");
10
11
  const initialVariableInfo = {
11
12
  numberOfVariableUses: 0,
12
13
  numberOfDefinitions: 0,
@@ -15,7 +16,7 @@ const initialVariableInfo = {
15
16
  unknownVariables: 0
16
17
  };
17
18
  function visitVariables(info, input) {
18
- (0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
19
+ (0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
19
20
  if (node.type !== type_1.RType.Symbol || (0, r_symbol_1.isSpecialSymbol)(node)) {
20
21
  return;
21
22
  }
@@ -30,7 +31,7 @@ function visitVariables(info, input) {
30
31
  return;
31
32
  }
32
33
  const [dfNode] = mayNode;
33
- if (dfNode.tag === 'variable-definition') {
34
+ if (dfNode.tag === vertex_1.VertexType.VariableDefinition) {
34
35
  info.numberOfDefinitions++;
35
36
  const lexeme = node.info.fullLexeme ?? node.lexeme;
36
37
  (0, statistics_file_1.appendStatisticsFile)(exports.variables.name, 'definedVariables', [[
@@ -14,6 +14,7 @@ const pipeline_executor_1 = require("../core/pipeline-executor");
14
14
  const default_pipelines_1 = require("../core/steps/pipeline/default-pipelines");
15
15
  const feature_1 = require("./features/feature");
16
16
  const convert_values_1 = require("../r-bridge/lang-4.x/convert-values");
17
+ const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-context");
17
18
  /**
18
19
  * By default, {@link extractUsageStatistics} requires a generator, but sometimes you already know all the files
19
20
  * that you want to process. This function simply reps your requests as a generator.
@@ -82,8 +83,8 @@ function processMetaOnSuccessful(meta, request) {
82
83
  const parser = new xmldom_1.DOMParser();
83
84
  async function extractSingle(result, shell, request, features, suffixFilePath, config) {
84
85
  const slicerOutput = await new pipeline_executor_1.PipelineExecutor(default_pipelines_1.DEFAULT_DATAFLOW_PIPELINE, {
85
- request, parser: shell
86
- }, config).allRemainingSteps();
86
+ context: (0, flowr_analyzer_context_1.contextFromInput)(request, config), parser: shell
87
+ }).allRemainingSteps();
87
88
  // retrieve parsed xml through (legacy) xmlparsedata
88
89
  const suffix = request.request === 'file' ? ', encoding="utf-8"' : '';
89
90
  shell.sendCommands(`try(flowr_parsed<-parse(${request.request}=${JSON.stringify(request.content)},keep.source=TRUE${suffix}),silent=FALSE)`, 'try(flowr_output<-xmlparsedata::xml_parse_data(flowr_parsed,includeText=TRUE,pretty=FALSE),silent=FALSE)');
package/util/assert.d.ts CHANGED
@@ -53,6 +53,10 @@ export declare function isUndefined<T>(x: T | undefined): x is undefined;
53
53
  * @see {@link isNotUndefined}
54
54
  */
55
55
  export declare function isNotNull<T>(x: T | null): x is T;
56
+ /**
57
+ * Generates a GitHub issue URL for reporting guard errors
58
+ */
59
+ export declare function getGuardIssueUrl(message: string): string;
56
60
  export type GuardMessage = string | (() => string);
57
61
  /**
58
62
  * @param assertion - will be asserted
package/util/assert.js CHANGED
@@ -5,6 +5,7 @@ exports.assertUnreachable = assertUnreachable;
5
5
  exports.isNotUndefined = isNotUndefined;
6
6
  exports.isUndefined = isUndefined;
7
7
  exports.isNotNull = isNotNull;
8
+ exports.getGuardIssueUrl = getGuardIssueUrl;
8
9
  exports.guard = guard;
9
10
  /* v8 ignore next */
10
11
  const version_1 = require("./version");
@@ -86,6 +87,9 @@ function prepareStack(stack) {
86
87
  }
87
88
  return lines.map(l => l.replaceAll(/\(\/.*(src|test)/g, '(<>/$1')).join('\n');
88
89
  }
90
+ /**
91
+ * Generates a GitHub issue URL for reporting guard errors
92
+ */
89
93
  function getGuardIssueUrl(message) {
90
94
  const body = encodeURIComponent(`<!-- Please describe your issue in more detail below! -->
91
95
 
@@ -26,7 +26,7 @@ function getAccessOperands(args) {
26
26
  * @returns The indicesCollection of the resolved definitions
27
27
  */
28
28
  function resolveIndicesByName(name, environment) {
29
- const definitions = (0, resolve_by_name_1.resolveByName)(name, environment);
29
+ const definitions = (0, resolve_by_name_1.resolveByNameAnyType)(name, environment);
30
30
  return definitions?.flatMap(def => def?.indicesCollection ?? []);
31
31
  }
32
32
  /**
package/util/files.d.ts CHANGED
@@ -75,7 +75,7 @@ export declare function getParentDirectory(directory: string): string;
75
75
  * @param file - The file to parse
76
76
  * @returns Map containing the keys and values of the provided file.
77
77
  */
78
- export declare function parseDCF(file: FlowrFileProvider<string>): Map<string, string[]>;
78
+ export declare function parseDCF(file: FlowrFileProvider): Map<string, string[]>;
79
79
  /**
80
80
  * Checks whether the given path-like object is a file that exists on the local filesystem.
81
81
  */
package/util/files.js CHANGED
@@ -212,7 +212,7 @@ function parseDCF(file) {
212
212
  let currentValue = '';
213
213
  const indentRegex = new RegExp(/^\s/);
214
214
  const firstColonRegex = new RegExp(/:(.*)/s);
215
- const fileContent = file.content().split(/\r?\n/);
215
+ const fileContent = file.content().toString().split(/\r?\n/);
216
216
  for (const line of fileContent) {
217
217
  if (indentRegex.test(line)) {
218
218
  currentValue += '\n' + line.trim();
@@ -1,9 +1,10 @@
1
- import type { RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
1
+ import type { ParentInformation, RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
2
+ import type { RProject } from '../../r-bridge/lang-4.x/ast/model/nodes/r-project';
2
3
  /**
3
4
  * Serialize the normalized AST to mermaid format
4
5
  */
5
- export declare function normalizedAstToMermaid(ast: RNodeWithParent, prefix?: string): string;
6
+ export declare function normalizedAstToMermaid(ast: RProject<ParentInformation> | RNodeWithParent, prefix?: string): string;
6
7
  /**
7
8
  * Use mermaid to visualize the normalized AST.
8
9
  */
9
- export declare function normalizedAstToMermaidUrl(ast: RNodeWithParent, prefix?: string): string;
10
+ export declare function normalizedAstToMermaidUrl(ast: RProject<ParentInformation> | RNodeWithParent, prefix?: string): string;
@@ -6,6 +6,14 @@ const mermaid_1 = require("./mermaid");
6
6
  const visitor_1 = require("../../r-bridge/lang-4.x/ast/model/processing/visitor");
7
7
  const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
8
8
  const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
9
+ const flowr_file_1 = require("../../project/context/flowr-file");
10
+ function identifyMermaidDirection(prefix) {
11
+ const directionMatch = prefix.match(/flowchart (TD|LR|RL|BT)/);
12
+ if (directionMatch) {
13
+ return directionMatch[1];
14
+ }
15
+ return 'TD';
16
+ }
9
17
  /**
10
18
  * Serialize the normalized AST to mermaid format
11
19
  */
@@ -24,17 +32,37 @@ function normalizedAstToMermaid(ast, prefix = 'flowchart TD\n') {
24
32
  output += ` n${n.info.id} -.-|"group-close"| n${n.grouping[1].info.id}\n`;
25
33
  }
26
34
  }
27
- (0, visitor_1.visitAst)(ast, n => {
28
- showNode(n);
29
- if (n.type === 'RAccess' && (n.operator !== '[' && n.operator !== '[[')) {
30
- for (const k of n.access) {
31
- if (k !== r_function_call_1.EmptyArgument) {
32
- showNode(k);
35
+ function showAst(ast) {
36
+ (0, visitor_1.visitAst)(ast, n => {
37
+ showNode(n);
38
+ if (n.type === 'RAccess' && (n.operator !== '[' && n.operator !== '[[')) {
39
+ for (const k of n.access) {
40
+ if (k !== r_function_call_1.EmptyArgument) {
41
+ showNode(k);
42
+ }
33
43
  }
34
44
  }
45
+ return false;
46
+ });
47
+ }
48
+ if (ast.type === type_1.RType.Project) {
49
+ for (const f of ast.files) {
50
+ // add a subgraph for each file
51
+ if (ast.files.length !== 1 || (f.filePath && f.filePath !== flowr_file_1.FlowrFile.INLINE_PATH)) {
52
+ output += ` subgraph "File: ${(0, mermaid_1.escapeMarkdown)(f.filePath ?? flowr_file_1.FlowrFile.INLINE_PATH)}"\n`;
53
+ const direction = identifyMermaidDirection(prefix);
54
+ output += ` direction ${direction}\n`;
55
+ showAst(f.root);
56
+ output += ' end\n';
57
+ }
58
+ else {
59
+ showAst(f.root);
60
+ }
35
61
  }
36
- return false;
37
- });
62
+ }
63
+ else {
64
+ showAst(ast);
65
+ }
38
66
  return output;
39
67
  }
40
68
  /**
@@ -43,7 +43,7 @@ function cfgToMermaid(cfg, normalizedAst, prefix = 'flowchart BT\n', simplify =
43
43
  if (vertex.type === control_flow_graph_1.CfgVertexType.Block) {
44
44
  if (simplify) {
45
45
  const ids = vertex.elems?.map(e => e.id) ?? [];
46
- const reconstruct = (0, reconstruct_1.reconstructToCode)(normalizedAst, new Set(ids), auto_select_defaults_1.doNotAutoSelect).code;
46
+ const reconstruct = (0, reconstruct_1.reconstructToCode)(normalizedAst, { nodes: new Set(ids) }, auto_select_defaults_1.doNotAutoSelect).code;
47
47
  const name = `"\`Basic Block (${id})\n${(0, mermaid_1.escapeMarkdown)(reconstruct)}\`"`;
48
48
  output += ` n${id}[[${name}]]\n`;
49
49
  }
@@ -40,6 +40,7 @@ interface MermaidGraphConfiguration {
40
40
  rootGraph?: DataflowGraph;
41
41
  presentEdges?: Set<string>;
42
42
  simplified?: boolean;
43
+ includeOnlyIds?: ReadonlySet<NodeId>;
43
44
  }
44
45
  /**
45
46
  * Converts a dataflow graph to mermaid graph code that visualizes the graph.
@@ -108,7 +108,7 @@ function encodeEdge(from, to, types) {
108
108
  function mermaidNodeBrackets(tag) {
109
109
  let open;
110
110
  let close;
111
- if (tag === 'function-definition' || tag === 'variable-definition') {
111
+ if (tag === vertex_1.VertexType.FunctionDefinition || tag === vertex_1.VertexType.VariableDefinition) {
112
112
  open = '[';
113
113
  close = ']';
114
114
  }
@@ -209,7 +209,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark) {
209
209
  }
210
210
  }
211
211
  }
212
- if (info.tag === 'function-definition') {
212
+ if (info.tag === vertex_1.VertexType.FunctionDefinition) {
213
213
  subflowToMermaid(id, info.exitPoints, info.subflow, mermaid, idPrefix);
214
214
  }
215
215
  }
@@ -227,7 +227,7 @@ function graphToMermaidGraph(rootIds, { simplified, graph, prefix = 'flowchart B
227
227
  * Converts a dataflow graph to mermaid graph code that visualizes the graph.
228
228
  */
229
229
  function graphToMermaid(config) {
230
- const mermaid = graphToMermaidGraph(config.graph.rootIds(), config);
230
+ const mermaid = graphToMermaidGraph(config.includeOnlyIds ? config.includeOnlyIds : config.graph.rootIds(), config);
231
231
  return { string: `${mermaid.nodeLines.join('\n')}\n${mermaid.edgeLines.join('\n')}`, mermaid };
232
232
  }
233
233
  /**
@@ -2,6 +2,7 @@ import { DataflowGraph } from '../../dataflow/graph/graph';
2
2
  import { VertexType } from '../../dataflow/graph/vertex';
3
3
  import { type MergeableRecord } from '../objects';
4
4
  import type { DeepPartial } from 'ts-essentials';
5
+ import type { REnvironmentInformation } from '../../dataflow/environments/environment';
5
6
  export interface ReduceVertexOptions extends MergeableRecord {
6
7
  tags: VertexType[];
7
8
  nameRegex: string;
@@ -16,4 +17,4 @@ export interface ReduceOptions extends MergeableRecord {
16
17
  /**
17
18
  * Produces a reduced version of the given dataflow graph according to the given options.
18
19
  */
19
- export declare function reduceDfg(dfg: DataflowGraph, options: DeepPartial<ReduceOptions>): DataflowGraph;
20
+ export declare function reduceDfg(dfg: DataflowGraph, options: DeepPartial<ReduceOptions>, cleanEnv: REnvironmentInformation): DataflowGraph;
@@ -36,7 +36,7 @@ function makeFilter(options, idMap) {
36
36
  /**
37
37
  * Produces a reduced version of the given dataflow graph according to the given options.
38
38
  */
39
- function reduceDfg(dfg, options) {
39
+ function reduceDfg(dfg, options, cleanEnv) {
40
40
  const newDfg = new graph_1.DataflowGraph(dfg.idMap);
41
41
  const applyOptions = (0, objects_1.deepMergeObject)(defaultReduceOptions, options);
42
42
  // overwrite the tag set if possible
@@ -48,7 +48,7 @@ function reduceDfg(dfg, options) {
48
48
  for (const [id, info] of dfg.vertices(!applyOptions)) {
49
49
  const result = applyFilter(info);
50
50
  if (result) {
51
- newDfg.addVertex(result, dfg.isRoot(id));
51
+ newDfg.addVertex(result, cleanEnv, dfg.isRoot(id));
52
52
  }
53
53
  }
54
54
  for (const [from, out] of dfg.edges()) {
package/util/version.js CHANGED
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
6
6
  const semver_1 = require("semver");
7
7
  const assert_1 = require("./assert");
8
8
  // this is automatically replaced with the current version by release-it
9
- const version = '2.6.2';
9
+ const version = '2.7.0';
10
10
  /**
11
11
  * Retrieves the current flowR version as a new {@link SemVer} object.
12
12
  */
@@ -1,12 +0,0 @@
1
- import type { IEnvironment, REnvironmentInformation } from './environment';
2
- import type { Identifier } from './identifier';
3
- import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
4
- /**
5
- * Removes all definitions of a given name from the environment.
6
- */
7
- export declare function remove(name: Identifier, environment: REnvironmentInformation, defaultEnvironment: IEnvironment): REnvironmentInformation;
8
- /** Creates a copy of the original environment but without the definitions of the given ids */
9
- export declare function removeAll(definitions: readonly {
10
- nodeId: NodeId;
11
- name: Identifier | undefined;
12
- }[], environment: REnvironmentInformation): REnvironmentInformation;
@@ -1,52 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.remove = remove;
4
- exports.removeAll = removeAll;
5
- const info_1 = require("../info");
6
- const clone_1 = require("./clone");
7
- /**
8
- * Removes all definitions of a given name from the environment.
9
- */
10
- function remove(name, environment, defaultEnvironment) {
11
- let current = environment.current;
12
- do {
13
- const definition = current.memory.get(name);
14
- if (definition !== undefined) {
15
- current.memory.delete(name);
16
- if (definition.every(d => (0, info_1.happensInEveryBranch)(d.controlDependencies))) {
17
- break;
18
- }
19
- }
20
- current = current.parent;
21
- } while (current.id !== defaultEnvironment.id);
22
- // we never remove built ins
23
- return environment;
24
- }
25
- /** Creates a copy of the original environment but without the definitions of the given ids */
26
- function removeAll(definitions, environment) {
27
- environment = (0, clone_1.cloneEnvironmentInformation)(environment, true);
28
- let current = environment.current;
29
- do {
30
- for (const { nodeId, name } of definitions) {
31
- if (name) {
32
- current.memory.delete(name);
33
- }
34
- else {
35
- // remove all definitions for the node id
36
- for (const [key, values] of current.memory) {
37
- const res = values.filter(v => v.nodeId === nodeId);
38
- if (res.length > 0) {
39
- current.memory.set(key, values);
40
- }
41
- else {
42
- current.memory.delete(key);
43
- }
44
- }
45
- }
46
- }
47
- current = current.parent;
48
- } while (!current.builtInEnv);
49
- // we never remove built ins so we can stop one early
50
- return environment;
51
- }
52
- //# sourceMappingURL=remove.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1,141 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const shell_1 = require("../r-bridge/shell");
7
- const log_1 = require("../../test/functionality/_helper/log");
8
- const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
9
- const doc_types_1 = require("./doc-util/doc-types");
10
- const path_1 = __importDefault(require("path"));
11
- const flowr_analyzer_1 = require("../project/flowr-analyzer");
12
- const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
13
- const doc_structure_1 = require("./doc-util/doc-structure");
14
- const doc_files_1 = require("./doc-util/doc-files");
15
- async function analyzerQuickExample() {
16
- const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
17
- .addRequestFromInput('x <- 1; print(x)')
18
- .setEngine('tree-sitter')
19
- .build();
20
- // get the dataflow
21
- const df = await analyzer.dataflow();
22
- // obtain the identified loading order
23
- console.log(analyzer.inspectContext().files.loadingOrder.getLoadingOrder());
24
- // run a dependency query
25
- const results = await analyzer.query([{ type: 'dependencies' }]);
26
- return { analyzer, df, results };
27
- }
28
- async function getText(shell) {
29
- const rversion = (await shell.usedRVersion())?.format() ?? 'unknown';
30
- const types = (0, doc_types_1.getTypesFromFolder)({
31
- rootFolder: path_1.default.resolve('src/'),
32
- inlineTypes: doc_types_1.mermaidHide
33
- });
34
- return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'analyzer', rVersion: rversion })}
35
-
36
- We are currently working on documenting the capabilities of the analyzer (with the plugins, their loading order, etc.). In general, the code documentation
37
- starting with the ${(0, doc_types_1.shortLink)(flowr_analyzer_1.FlowrAnalyzer.name, types.info)} and the ${(0, doc_types_1.shortLink)(flowr_analyzer_builder_1.FlowrAnalyzerBuilder.name, types.info)}
38
- should be the best starting point.
39
-
40
- ${(0, doc_structure_1.collapsibleToc)({
41
- 'Overview': undefined,
42
- 'Builder Configuration': undefined,
43
- 'Plugins': {
44
- 'Plugin Types': {
45
- 'Dependency Identification': undefined,
46
- 'Project Discovery': undefined,
47
- 'File Loading': undefined,
48
- 'Loading Order': undefined
49
- },
50
- 'How to add a new plugin': undefined,
51
- 'How to add a new plugin type': undefined
52
- },
53
- 'Context Information': {
54
- 'Files Context': undefined,
55
- 'Loading Order Context': undefined,
56
- 'Dependencies Context': undefined
57
- },
58
- 'Analyzer Internals': undefined
59
- })}
60
-
61
-
62
- ${(0, doc_structure_1.section)('Overview', 2)}
63
-
64
- No matter whether you want to analyze a single R script, a couple of R notebooks, or a complete project,
65
- your journey starts with the ${(0, doc_types_1.shortLink)(flowr_analyzer_builder_1.FlowrAnalyzerBuilder.name, types.info)} (further described in [Builder Configuration](#builder-configuration) below).
66
- This builder allows you to configure the analysis in many different ways, for example, by specifying which files to analyze, which plugins to use, or
67
- what [Engine](${doc_files_1.FlowrWikiBaseRef}/Engines) to use for the analysis.
68
-
69
- ${(0, doc_structure_1.block)({
70
- type: 'NOTE',
71
- content: `If you want to quickly try out the analyzer, you can use the following code snippet that analyzes a simple R expression:
72
-
73
- ${(0, doc_types_1.printCodeOfElement)({ program: types.program, info: types.info, dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true }, analyzerQuickExample.name)}
74
- `
75
- })}
76
-
77
- In general, we work on providing a set of example repositories that demonstrate how to use the analyzer in different scenarios:
78
-
79
- * [${doc_files_1.FlowrGithubGroupName}/sample-analyzer-project-query](${doc_files_1.FlowrGithubBaseRef}/sample-analyzer-project-query) for an example project that runs queries on an R project
80
-
81
- **TODO**: mention [Context](#Context_Information)
82
-
83
- ${(0, doc_structure_1.section)('Builder Configuration', 2)}
84
-
85
- **TODO** also explain buildSync and that TreeSitter has to be initialized for this
86
-
87
- ${(0, doc_structure_1.section)('Plugins', 2)}
88
-
89
- ${(0, doc_structure_1.section)('Plugin Types', 3)}
90
-
91
- During the construction of a new ${(0, doc_types_1.shortLink)(flowr_analyzer_1.FlowrAnalyzer.name, types.info)}, plugins of different types are applied at different stages of the analysis.
92
- These plugins are grouped by their ${(0, doc_types_1.shortLink)('PluginType', types.info)} and are applied in the following order (as shown in the documentation of the ${(0, doc_types_1.shortLink)('PluginType', types.info)}):
93
-
94
- ${(() => {
95
- const doc = (0, doc_types_1.getDocumentationForType)('PluginType', types.info);
96
- // skip until the first ```text
97
- const lines = doc.split('\n');
98
- const start = lines.findIndex(l => l.trim().startsWith('```text'));
99
- const end = lines.findIndex((l, i) => i > start && l.trim().startsWith('```'));
100
- // github rendering pls fix xD
101
- return start >= 0 && end > start ? '```text\n' + lines.slice(start + 1, end).join('\n').replaceAll('▶', '>') + '\n```' : doc;
102
- })()}
103
-
104
- We describe the different plugin types in more detail below.
105
-
106
-
107
- ${(0, doc_structure_1.section)('Project Discovery', 4)}
108
-
109
- ${(0, doc_structure_1.section)('File Loading', 4)}
110
-
111
- ${(0, doc_structure_1.section)('Dependency Identification', 4)}
112
-
113
- ${(0, doc_structure_1.section)('Loading Order', 4)}
114
-
115
- ${(0, doc_structure_1.section)('How to add a new plugin', 3)}
116
-
117
- ${(0, doc_structure_1.section)('How to add a new plugin type', 3)}
118
-
119
- ${(0, doc_structure_1.section)('Context Information', 2)}
120
-
121
- ${(0, doc_structure_1.section)('Files Context', 3)}
122
-
123
- ${(0, doc_structure_1.section)('Loading Order Context', 3)}
124
-
125
- ${(0, doc_structure_1.section)('Dependencies Context', 3)}
126
-
127
- ${(0, doc_structure_1.section)('Analyzer Internals', 2)}
128
-
129
- `;
130
- }
131
- /** if we run this script, we want a Markdown representation of the capabilities */
132
- if (require.main === module) {
133
- (0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
134
- const shell = new shell_1.RShell();
135
- void getText(shell).then(str => {
136
- console.log(str);
137
- }).finally(() => {
138
- shell.close();
139
- });
140
- }
141
- //# sourceMappingURL=print-analyzer-wiki.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { FlowrAnalyzer } from '../project/flowr-analyzer';
2
- /**
3
- *
4
- */
5
- export declare function inspectContextExample(analyzer: FlowrAnalyzer): void;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const log_1 = require("../../test/functionality/_helper/log");
4
- const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
5
- const faqs_1 = require("./data/faq/faqs");
6
- function print() {
7
- const faqs = (0, faqs_1.registerFaqs)();
8
- return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'frequently asked questions' })}
9
-
10
- ${faqs.toMarkdown()}
11
-
12
- `.trim();
13
- }
14
- if (require.main === module) {
15
- (0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
16
- console.log(print());
17
- }
18
- //# sourceMappingURL=print-faq-wiki.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};