@eagleoutice/flowr 2.7.5 → 2.8.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 (208) hide show
  1. package/README.md +68 -65
  2. package/cli/wiki.js +1 -1
  3. package/control-flow/extract-cfg.js +3 -3
  4. package/control-flow/useless-loop.d.ts +1 -1
  5. package/control-flow/useless-loop.js +2 -2
  6. package/dataflow/cluster.js +3 -3
  7. package/dataflow/environments/built-in-config.d.ts +8 -4
  8. package/dataflow/environments/built-in.d.ts +27 -14
  9. package/dataflow/environments/built-in.js +27 -12
  10. package/dataflow/environments/default-builtin-config.d.ts +614 -3
  11. package/dataflow/environments/default-builtin-config.js +50 -15
  12. package/dataflow/environments/environment.js +3 -2
  13. package/dataflow/environments/identifier.d.ts +5 -1
  14. package/dataflow/environments/reference-to-maybe.d.ts +2 -2
  15. package/dataflow/environments/reference-to-maybe.js +23 -14
  16. package/dataflow/environments/resolve-by-name.d.ts +6 -2
  17. package/dataflow/environments/resolve-by-name.js +5 -1
  18. package/dataflow/environments/scoping.js +1 -3
  19. package/dataflow/eval/resolve/alias-tracking.js +5 -1
  20. package/dataflow/extractor.js +3 -3
  21. package/dataflow/fn/exceptions-of-function.d.ts +13 -0
  22. package/dataflow/fn/exceptions-of-function.js +47 -0
  23. package/dataflow/fn/higher-order-function.d.ts +1 -1
  24. package/dataflow/fn/higher-order-function.js +3 -3
  25. package/dataflow/fn/recursive-function.d.ts +6 -0
  26. package/dataflow/fn/recursive-function.js +32 -0
  27. package/dataflow/graph/call-graph.d.ts +10 -0
  28. package/dataflow/graph/call-graph.js +209 -0
  29. package/dataflow/graph/dataflowgraph-builder.d.ts +7 -2
  30. package/dataflow/graph/dataflowgraph-builder.js +14 -9
  31. package/dataflow/graph/diff-dataflow-graph.js +96 -2
  32. package/dataflow/graph/graph.d.ts +10 -7
  33. package/dataflow/graph/graph.js +7 -8
  34. package/dataflow/graph/vertex.d.ts +6 -3
  35. package/dataflow/hooks.d.ts +30 -0
  36. package/dataflow/hooks.js +38 -0
  37. package/dataflow/info.d.ts +28 -5
  38. package/dataflow/info.js +66 -31
  39. package/dataflow/internal/linker.d.ts +13 -3
  40. package/dataflow/internal/linker.js +155 -53
  41. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +4 -0
  42. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +7 -0
  43. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  44. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +19 -3
  45. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +14 -0
  46. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +30 -0
  47. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -1
  48. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +24 -17
  49. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
  50. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -1
  51. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +59 -21
  52. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -3
  53. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +34 -0
  54. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +92 -0
  55. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -0
  56. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.d.ts +21 -0
  57. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +129 -0
  58. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +16 -0
  59. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +127 -0
  60. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
  61. package/dataflow/internal/process/functions/call/common.d.ts +13 -1
  62. package/dataflow/internal/process/functions/call/common.js +33 -2
  63. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +13 -1
  64. package/dataflow/internal/process/functions/call/known-call-handling.js +29 -3
  65. package/dataflow/internal/process/functions/call/named-call-handling.js +2 -1
  66. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +6 -4
  67. package/dataflow/internal/process/functions/process-argument.js +7 -6
  68. package/dataflow/internal/process/functions/process-parameter.js +2 -1
  69. package/dataflow/internal/process/process-named-call.d.ts +2 -2
  70. package/dataflow/internal/process/process-symbol.js +3 -2
  71. package/dataflow/internal/process/process-value.d.ts +3 -2
  72. package/dataflow/internal/process/process-value.js +8 -6
  73. package/dataflow/origin/dfg-get-origin.js +2 -1
  74. package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
  75. package/documentation/doc-readme.d.ts +1 -1
  76. package/documentation/doc-readme.js +6 -6
  77. package/documentation/doc-util/doc-code.js +1 -1
  78. package/documentation/doc-util/doc-dfg.d.ts +1 -0
  79. package/documentation/doc-util/doc-dfg.js +7 -4
  80. package/documentation/doc-util/doc-query.d.ts +1 -0
  81. package/documentation/doc-util/doc-query.js +1 -1
  82. package/documentation/doc-util/doc-repl.d.ts +2 -1
  83. package/documentation/doc-util/doc-repl.js +11 -3
  84. package/documentation/wiki-analyzer.js +2 -0
  85. package/documentation/wiki-dataflow-graph.js +59 -16
  86. package/documentation/wiki-interface.js +33 -5
  87. package/documentation/wiki-mk/doc-context.d.ts +2 -1
  88. package/documentation/wiki-mk/doc-context.js +2 -2
  89. package/documentation/wiki-mk/doc-maker.js +4 -3
  90. package/documentation/wiki-normalized-ast.js +6 -0
  91. package/documentation/wiki-query.js +109 -1
  92. package/linter/linter-rules.d.ts +1 -1
  93. package/linter/rules/seeded-randomness.js +17 -12
  94. package/linter/rules/useless-loop.d.ts +1 -1
  95. package/package.json +9 -11
  96. package/project/cache/flowr-analyzer-cache.d.ts +11 -0
  97. package/project/cache/flowr-analyzer-cache.js +19 -0
  98. package/project/context/flowr-analyzer-dependencies-context.d.ts +6 -1
  99. package/project/context/flowr-analyzer-dependencies-context.js +6 -0
  100. package/project/context/flowr-analyzer-files-context.d.ts +5 -2
  101. package/project/context/flowr-analyzer-files-context.js +24 -17
  102. package/project/context/flowr-file.d.ts +9 -4
  103. package/project/context/flowr-file.js +20 -6
  104. package/project/flowr-analyzer.d.ts +11 -0
  105. package/project/flowr-analyzer.js +6 -0
  106. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +11 -3
  107. package/project/plugins/file-plugins/files/flowr-description-file.js +38 -28
  108. package/project/plugins/file-plugins/files/flowr-jupyter-file.js +1 -1
  109. package/project/plugins/file-plugins/files/flowr-namespace-file.js +1 -1
  110. package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
  111. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -1
  112. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  113. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +4 -1
  114. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +3 -0
  115. package/project/plugins/file-plugins/{flowr-analyzer-namespace-file-plugin.d.ts → flowr-analyzer-namespace-files-plugin.d.ts} +1 -1
  116. package/project/plugins/file-plugins/{flowr-analyzer-namespace-file-plugin.js → flowr-analyzer-namespace-files-plugin.js} +4 -4
  117. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +26 -0
  118. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +39 -0
  119. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +26 -0
  120. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +39 -0
  121. package/project/plugins/flowr-analyzer-plugin-defaults.js +6 -2
  122. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +3 -13
  123. package/project/plugins/package-version-plugins/package.d.ts +1 -1
  124. package/project/plugins/package-version-plugins/package.js +3 -3
  125. package/project/plugins/plugin-registry.d.ts +4 -2
  126. package/project/plugins/plugin-registry.js +6 -2
  127. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +11 -0
  128. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +5 -2
  129. package/queries/catalog/call-context-query/call-context-query-format.d.ts +4 -12
  130. package/queries/catalog/call-graph-query/call-graph-query-executor.d.ts +6 -0
  131. package/queries/catalog/call-graph-query/call-graph-query-executor.js +21 -0
  132. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +21 -0
  133. package/queries/catalog/call-graph-query/call-graph-query-format.js +32 -0
  134. package/queries/catalog/dataflow-query/dataflow-query-executor.js +4 -3
  135. package/queries/catalog/dependencies-query/dependencies-query-executor.js +29 -3
  136. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -0
  137. package/queries/catalog/dependencies-query/function-info/function-info.d.ts +8 -1
  138. package/queries/catalog/dependencies-query/function-info/write-functions.js +13 -0
  139. package/queries/catalog/does-call-query/does-call-query-executor.d.ts +6 -0
  140. package/queries/catalog/does-call-query/does-call-query-executor.js +100 -0
  141. package/queries/catalog/does-call-query/does-call-query-format.d.ts +51 -0
  142. package/queries/catalog/does-call-query/does-call-query-format.js +102 -0
  143. package/queries/catalog/files-query/files-query-executor.js +4 -4
  144. package/queries/catalog/files-query/files-query-format.d.ts +2 -1
  145. package/queries/catalog/files-query/files-query-format.js +18 -2
  146. package/queries/catalog/id-map-query/id-map-query-executor.js +4 -3
  147. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +18 -0
  148. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +56 -0
  149. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +34 -0
  150. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +54 -0
  151. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -28
  152. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -0
  153. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +12 -0
  154. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +6 -0
  155. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +23 -0
  156. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +28 -0
  157. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +44 -0
  158. package/queries/catalog/linter-query/linter-query-format.js +4 -1
  159. package/queries/catalog/location-map-query/location-map-query-executor.js +1 -1
  160. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +4 -3
  161. package/queries/catalog/project-query/project-query-executor.js +9 -3
  162. package/queries/catalog/project-query/project-query-format.d.ts +8 -3
  163. package/queries/catalog/project-query/project-query-format.js +35 -9
  164. package/queries/query.d.ts +34 -2
  165. package/queries/query.js +9 -0
  166. package/r-bridge/data/data.d.ts +10 -5
  167. package/r-bridge/data/data.js +11 -5
  168. package/r-bridge/lang-4.x/ast/model/model.d.ts +7 -7
  169. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +2 -2
  170. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +2 -2
  171. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +2 -2
  172. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +5 -2
  173. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +8 -0
  174. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -2
  175. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +2 -2
  176. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +3 -3
  177. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +2 -2
  178. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +2 -2
  179. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +2 -2
  180. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -2
  181. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +2 -2
  182. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +2 -2
  183. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +2 -2
  184. package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.js +0 -1
  185. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +0 -2
  186. package/r-bridge/roxygen2/roxygen-ast.d.ts +218 -0
  187. package/r-bridge/roxygen2/roxygen-ast.js +82 -0
  188. package/r-bridge/roxygen2/roxygen-parse.d.ts +24 -0
  189. package/r-bridge/roxygen2/roxygen-parse.js +214 -0
  190. package/reconstruct/auto-select/magic-comments.js +4 -4
  191. package/slicing/static/slice-call.js +3 -4
  192. package/slicing/static/static-slicer.js +2 -2
  193. package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
  194. package/util/collections/defaultmap.d.ts +3 -3
  195. package/util/mermaid/dfg.js +5 -5
  196. package/util/objects.js +1 -1
  197. package/util/r-author.d.ts +5 -0
  198. package/util/r-author.js +110 -0
  199. package/util/r-license.d.ts +32 -0
  200. package/util/r-license.js +217 -0
  201. package/util/r-version.d.ts +19 -0
  202. package/util/r-version.js +106 -0
  203. package/util/range.d.ts +6 -0
  204. package/util/range.js +7 -0
  205. package/util/simple-df/dfg-ascii.js +2 -2
  206. package/util/text/args.d.ts +9 -0
  207. package/util/text/args.js +65 -0
  208. package/util/version.js +1 -1
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.7.4, R grammar v14 (tree-sitter engine)
27
+ flowR repl using flowR v2.7.6, R grammar v14 (tree-sitter engine)
28
28
  R> :query @linter "read.csv(\"/root/x.txt\")"
29
29
  ```
30
30
 
@@ -33,32 +33,32 @@ It offers a wide variety of features, for example:
33
33
 
34
34
 
35
35
  ```text
36
- Query: linter (2 ms)
37
- **Deprecated Functions** (deprecated-functions):
38
- _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>
39
- **File Path Validity** (file-path-validity):
36
+ Query: linter (2 ms)
37
+ ╰ Deprecated Functions (deprecated-functions):
38
+ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0
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>
43
- **Seeded Randomness** (seeded-randomness):
44
- _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"callsWithOtherBranchProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>
45
- **Absolute Paths** (absolute-file-paths):
42
+ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, processTimeMs: 0
43
+ ╰ Seeded Randomness (seeded-randomness):
44
+ Metadata: consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0
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":0,"processTimeMs":0}</code>
49
- **Unused Definitions** (unused-definitions):
50
- _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>
51
- **Naming Convention** (naming-convention):
52
- _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>
53
- **Network Functions** (network-functions):
54
- _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>
55
- **Dataframe Access Validation** (dataframe-access-validation):
56
- _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":1}</code>
57
- **Dead Code** (dead-code):
58
- _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>
59
- **Useless Loops** (useless-loop):
60
- _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>
61
- All queries together required ≈2 ms (1ms accuracy, total 2 ms)
48
+ Metadata: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0
49
+ ╰ Unused Definitions (unused-definitions):
50
+ Metadata: totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0
51
+ ╰ Naming Convention (naming-convention):
52
+ Metadata: numMatches: 0, numBreak: 0, searchTimeMs: 0, processTimeMs: 0
53
+ ╰ Network Functions (network-functions):
54
+ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
55
+ ╰ Dataframe Access Validation (dataframe-access-validation):
56
+ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1
57
+ ╰ Dead Code (dead-code):
58
+ Metadata: consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0
59
+ ╰ Useless Loops (useless-loop):
60
+ Metadata: numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0
61
+ All queries together required ≈2 ms (1ms accuracy, total 2 ms)
62
62
  ```
63
63
 
64
64
 
@@ -74,42 +74,42 @@ It offers a wide variety of features, for example:
74
74
  ```
75
75
 
76
76
 
77
- (This query can be shortened to `@linter` when used within the REPL command <span title="Description (Repl Command): Query the given R code, start with 'file://' to indicate a file. The query is to be a valid query in json format (use 'help' to get more information).">`:query`</span>).
77
+ (This can be shortened to `@linter` when used with the REPL command <span title="Description (Repl Command): Query the given R code, start with 'file://' to indicate a file. The query is to be a valid query in json format (use 'help' to get more information).">`:query`</span>).
78
78
 
79
79
 
80
80
 
81
81
  _Results (prettified and summarized):_
82
82
 
83
- Query: **linter** (3 ms)\
83
+ Query: **linter** (2 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":1,"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":1,"processTimeMs":0}</code>\
89
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, 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,"callsWithOtherBranchProducers":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":0,"processTimeMs":0}</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
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>\
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
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>\
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":0}</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":1}</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":0}</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
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>\
108
- _All queries together required ≈3 ms (1ms accuracy, total 3 ms)_
107
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0</code>\
108
+ _All queries together required ≈2 ms (1ms accuracy, total 2 ms)_
109
109
 
110
110
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
111
111
 
112
- The analysis required _3.0 ms_ (including parsing and normalization and the query) within the generation environment.
112
+ The analysis required _2.2 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.
@@ -148,7 +148,7 @@ It offers a wide variety of features, for example:
148
148
  "totalUnknown": 0,
149
149
  "totalWritesBeforeAlways": 0,
150
150
  "totalValid": 0,
151
- "searchTimeMs": 1,
151
+ "searchTimeMs": 0,
152
152
  "processTimeMs": 0
153
153
  }
154
154
  },
@@ -180,7 +180,7 @@ It offers a wide variety of features, for example:
180
180
  ".meta": {
181
181
  "totalConsidered": 1,
182
182
  "totalUnknown": 0,
183
- "searchTimeMs": 0,
183
+ "searchTimeMs": 1,
184
184
  "processTimeMs": 0
185
185
  }
186
186
  },
@@ -217,7 +217,7 @@ It offers a wide variety of features, for example:
217
217
  "numAccesses": 0,
218
218
  "totalAccessed": 0,
219
219
  "searchTimeMs": 0,
220
- "processTimeMs": 1
220
+ "processTimeMs": 0
221
221
  }
222
222
  },
223
223
  "dead-code": {
@@ -238,11 +238,11 @@ It offers a wide variety of features, for example:
238
238
  }
239
239
  },
240
240
  ".meta": {
241
- "timing": 3
241
+ "timing": 2
242
242
  }
243
243
  },
244
244
  ".meta": {
245
- "timing": 3
245
+ "timing": 2
246
246
  }
247
247
  }
248
248
  ```
@@ -307,7 +307,7 @@ It offers a wide variety of features, for example:
307
307
 
308
308
  ```shell
309
309
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
310
- flowR repl using flowR v2.7.4, R grammar v14 (tree-sitter engine)
310
+ flowR repl using flowR v2.7.6, R grammar v14 (tree-sitter engine)
311
311
  R> :query @static-slice (11@sum) file://test/testfiles/example.R
312
312
  ```
313
313
 
@@ -321,7 +321,7 @@ It offers a wide variety of features, for example:
321
321
  N <- 10
322
322
  for(i in 1:(N-1)) sum <- sum + i + w
323
323
  sum
324
- All queries together required ≈2 ms (1ms accuracy, total 3 ms)
324
+ All queries together required ≈2 ms (1ms accuracy, total 2 ms)
325
325
  ```
326
326
 
327
327
 
@@ -337,7 +337,7 @@ It offers a wide variety of features, for example:
337
337
 
338
338
 
339
339
  * 📚 **dependency analysis**\
340
- Given your analysis project, flowR offers a plethora of so-called [queries](https://github.com/flowr-analysis/flowr/wiki/Query-API) to get more information about your code.
340
+ Given your analysis project, flowR offers a plethora of so-called [queries](https://github.com/flowr-analysis/flowr/wiki/query-api) to get more information about your code.
341
341
  An important query is the [dependencies query](https://github.com/flowr-analysis/flowr/wiki/Query-API#dependencies-query), which shows you the library your project needs,
342
342
  the data files it reads, the scripts it sources, and the data it outputs.
343
343
 
@@ -352,12 +352,12 @@ It offers a wide variety of features, for example:
352
352
 
353
353
 
354
354
  </details>
355
-
355
+
356
356
 
357
- * 🚀 **fast data- and control-flow graphs**\
358
- Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">117.6 ms</span></i> (as of Dec 22, 2025),
357
+ * 🚀 **fast call-graph, data-, and control-flow graphs**\
358
+ Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">118 ms</span></i> (as of Dec 23, 2025)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
359
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,
360
- and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
360
+ and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) for more details on the dataflow graphs as well as call graphs.
361
361
 
362
362
 
363
363
  <details><summary>Example: Generating a dataflow graph with flowR</summary>
@@ -391,7 +391,7 @@ It offers a wide variety of features, for example:
391
391
 
392
392
  ```shell
393
393
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
394
- flowR repl using flowR v2.7.4, R grammar v14 (tree-sitter engine)
394
+ flowR repl using flowR v2.7.6, R grammar v14 (tree-sitter engine)
395
395
  R> :dataflow* test/testfiles/example.R
396
396
  ```
397
397
 
@@ -400,7 +400,8 @@ It offers a wide variety of features, for example:
400
400
 
401
401
 
402
402
  ```text
403
- https://mermaid.live/view#base64:eyJjb2RlIjoiZmxvd2NoYXJ0IEJUXG4gICAgMChbXCJgIzkxO1JTeW1ib2wjOTM7IHRlc3RcbiAgICAgICgwKVxuICAgICAgKjEuMS00KmBcIl0pXG4gICAgMShbXCJgIzkxO1JTeW1ib2wjOTM7IHRlc3RmaWxlc1xuICAgICAgKDEpXG4gICAgICAqMS42LTE0KmBcIl0pXG4gICAgMltbXCJgIzkxO1JCaW5hcnlPcCM5MzsgL1xuICAgICAgKDIpXG4gICAgICAqMS4xLTE0KlxuICAgICgwLCAxKWBcIl1dXG4gICAgYnVpbHQtaW46X1tcImBCdWlsdC1Jbjpcbi9gXCJdXG4gICAgc3R5bGUgYnVpbHQtaW46XyBzdHJva2U6Z3JheSxmaWxsOmxpZ2h0Z3JheSxzdHJva2Utd2lkdGg6MnB4LG9wYWNpdHk6Ljg7XG4gICAgMyhbXCJgIzkxO1JTeW1ib2wjOTM7IGV4YW1wbGUuUlxuICAgICAgKDMpXG4gICAgICAqMS4xNi0yNCpgXCJdKVxuICAgIDRbW1wiYCM5MTtSQmluYXJ5T3AjOTM7IC9cbiAgICAgICg0KVxuICAgICAgKjEuMS0yNCpcbiAgICAoMiwgMylgXCJdXVxuICAgIDIgLS0+fFwicmVhZHMsIGFyZ3VtZW50XCJ8IDBcbiAgICAyIC0tPnxcInJlYWRzLCBhcmd1bWVudFwifCAxXG4gICAgMiAtLi0+fFwicmVhZHMsIGNhbGxzXCJ8IGJ1aWx0LWluOl9cbiAgICBsaW5rU3R5bGUgMiBzdHJva2U6Z3JheTtcbiAgICA0IC0tPnxcInJlYWRzLCBhcmd1bWVudFwifCAyXG4gICAgNCAtLT58XCJyZWFkcywgYXJndW1lbnRcInwgM1xuICAgIDQgLS4tPnxcInJlYWRzLCBjYWxsc1wifCBidWlsdC1pbjpfXG4gICAgbGlua1N0eWxlIDUgc3Ryb2tlOmdyYXk7IiwibWVybWFpZCI6eyJhdXRvU3luYyI6dHJ1ZX19
403
+ https://mermaid.live/view#base64:eyJjb2RlIjoiZmxvd2NoYXJ0IEJUXG4gICAgMChbXCJgIzkxO1JTeW1ib2wjOTM7IHRlc3RcbiAgICAgICgwKVxuICAgICAgKjEuMS00KmBcIl0pXG4gICAgMShbXCJgIzkxO1JTeW1ib2wjOTM7IHRlc3RmaWxlc1xuICAgICAgKDEpXG4gICAgICAqMS42LTE0KmBcIl0pXG4gICAgMltbXCJgIzkxO1JCaW5hcnlPcCM5MzsgL1xuICAgICAgKDIpXG4gICAgICAqMS4xLTE0KlxuICAgICgwLCAxKWBcIl1dXG4gICAgYnVpbHQtaW46X1tcImBCdWlsdC1Jbjpcbi9gXCJdXG4gICAgc3R5bGUgYnVpbHQtaW46XyBzdHJva2U6Z3JheSxmaWxsOmdyYXksc3Ryb2tlLXdpZHRoOjJweCxvcGFjaXR5Oi44O1xuICAgIDMoW1wiYCM5MTtSU3ltYm9sIzkzOyBleGFtcGxlLlJcbiAgICAgICgzKVxuICAgICAgKjEuMTYtMjQqYFwiXSlcbiAgICA0W1tcImAjOTE7UkJpbmFyeU9wIzkzOyAvXG4gICAgICAoNClcbiAgICAgICoxLjEtMjQqXG4gICAgKDIsIDMpYFwiXV1cbiAgICAyIC0tPnxcInJlYWRzLCBhcmd1bWVudFwifCAwXG4gICAgMiAtLT58XCJyZWFkcywgYXJndW1lbnRcInwgMVxuICAgIDIgLS4tPnxcInJlYWRzLCBjYWxsc1wifCBidWlsdC1pbjpfXG4gICAgbGlua1N0eWxlIDIgc3Ryb2tlOmdyYXk7XG4gICAgNCAtLT58XCJyZWFkcywgYXJndW1lbnRcInwgMlxuICAgIDQgLS0+fFwicmVhZHMsIGFyZ3VtZW50XCJ8IDNcbiAgICA0IC0uLT58XCJyZWFkcywgY2FsbHNcInwgYnVpbHQtaW46X1xuICAgIGxpbmtTdHlsZSA1IHN0cm9rZTpncmF5OyIsIm1lcm1haWQiOnsiYXV0b1N5bmMiOnRydWV9fQ==
404
+ Copied mermaid url to clipboard (dataflow: 0ms).
404
405
  ```
405
406
 
406
407
 
@@ -424,7 +425,7 @@ It offers a wide variety of features, for example:
424
425
  (0, 1)`"]]
425
426
  built-in:_-["`Built-In:
426
427
  #60;#45;`"]
427
- style built-in:_- stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
428
+ style built-in:_- stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
428
429
  4{{"`#91;RNumber#93; 1
429
430
  (4)
430
431
  *2.12*`"}}
@@ -473,21 +474,21 @@ It offers a wide variety of features, for example:
473
474
  (16, 17)`"]]
474
475
  built-in:-["`Built-In:
475
476
  #45;`"]
476
- style built-in:- stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
477
+ style built-in:- stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
477
478
  19[["`#91;RExpressionList#93; (
478
479
  (19)
479
480
  *6.13*
480
481
  (18)`"]]
481
482
  built-in:_["`Built-In:
482
483
  (`"]
483
- style built-in:_ stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
484
+ style built-in:_ stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
484
485
  20[["`#91;RBinaryOp#93; #58;
485
486
  (20)
486
487
  *6.11-17*
487
488
  (13, 19)`"]]
488
489
  built-in::["`Built-In:
489
490
  #58;`"]
490
- style built-in:: stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
491
+ style built-in:: stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
491
492
  24(["`#91;RSymbol#93; sum
492
493
  (24, :may:36+)
493
494
  *7.10-12*`"])
@@ -539,7 +540,7 @@ It offers a wide variety of features, for example:
539
540
  (12, 20, 35)`"]]
540
541
  built-in:for["`Built-In:
541
542
  for`"]
542
- style built-in:for stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
543
+ style built-in:for stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
543
544
  38{{"`#91;RString#93; #34;Sum#58;#34;
544
545
  (38)
545
546
  *11.5-10*`"}}
@@ -548,7 +549,7 @@ It offers a wide variety of features, for example:
548
549
  *11.13-15*`"])
549
550
  built-in:sum["`Built-In:
550
551
  sum`"]
551
- style built-in:sum stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
552
+ style built-in:sum stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
552
553
  42{{"`#91;RString#93; #34;
553
554
  #34;
554
555
  (42)
@@ -559,7 +560,7 @@ It offers a wide variety of features, for example:
559
560
  (38, 40, 42)`"]]
560
561
  built-in:cat["`Built-In:
561
562
  cat`"]
562
- style built-in:cat stroke:gray,fill:lightgray,stroke-width:2px,opacity:.8;
563
+ style built-in:cat stroke:gray,fill:gray,stroke-width:2px,opacity:.8;
563
564
  46{{"`#91;RString#93; #34;Product#58;#34;
564
565
  (46)
565
566
  *12.5-14*`"}}
@@ -576,25 +577,25 @@ It offers a wide variety of features, for example:
576
577
  (46, 48, 50)`"]]
577
578
  0 -->|"defined-by"| 1
578
579
  0 -->|"defined-by"| 2
579
- 2 -->|"argument"| 1
580
+ 2 -->|"reads, argument"| 1
580
581
  2 -->|"returns, argument"| 0
581
582
  2 -.->|"reads, calls"| built-in:_-
582
583
  linkStyle 4 stroke:gray;
583
584
  3 -->|"defined-by"| 4
584
585
  3 -->|"defined-by"| 5
585
- 5 -->|"argument"| 4
586
+ 5 -->|"reads, argument"| 4
586
587
  5 -->|"returns, argument"| 3
587
588
  5 -.->|"reads, calls"| built-in:_-
588
589
  linkStyle 9 stroke:gray;
589
590
  6 -->|"defined-by"| 7
590
591
  6 -->|"defined-by"| 8
591
- 8 -->|"argument"| 7
592
+ 8 -->|"reads, argument"| 7
592
593
  8 -->|"returns, argument"| 6
593
594
  8 -.->|"reads, calls"| built-in:_-
594
595
  linkStyle 14 stroke:gray;
595
596
  9 -->|"defined-by"| 10
596
597
  9 -->|"defined-by"| 11
597
- 11 -->|"argument"| 10
598
+ 11 -->|"reads, argument"| 10
598
599
  11 -->|"returns, argument"| 9
599
600
  11 -.->|"reads, calls"| built-in:_-
600
601
  linkStyle 19 stroke:gray;
@@ -637,7 +638,7 @@ It offers a wide variety of features, for example:
637
638
  23 -->|"defined-by"| 29
638
639
  23 -->|"CD-True"| 36
639
640
  linkStyle 47 stroke:gray,color:gray;
640
- 29 -->|"argument"| 28
641
+ 29 -->|"reads, argument"| 28
641
642
  29 -->|"returns, argument"| 23
642
643
  29 -.->|"reads, calls"| built-in:_-
643
644
  linkStyle 50 stroke:gray;
@@ -660,7 +661,7 @@ It offers a wide variety of features, for example:
660
661
  30 -->|"defined-by"| 34
661
662
  30 -->|"CD-True"| 36
662
663
  linkStyle 63 stroke:gray,color:gray;
663
- 34 -->|"argument"| 33
664
+ 34 -->|"reads, argument"| 33
664
665
  34 -->|"returns, argument"| 30
665
666
  34 -.->|"reads, calls"| built-in:_-
666
667
  linkStyle 66 stroke:gray;
@@ -696,7 +697,7 @@ It offers a wide variety of features, for example:
696
697
  ```
697
698
 
698
699
 
699
- (The analysis required _2.7 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
700
+ (The analysis required _3.1 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
700
701
 
701
702
 
702
703
 
@@ -824,6 +825,8 @@ please check out the following publications (if you find that a paper is missing
824
825
 
825
826
 
826
827
  ```bibtex
828
+
829
+
827
830
  @inproceedings{DBLP:conf/msr/SihlerPSTDD24,
828
831
  author = {Florian Sihler and
829
832
  Lukas Pietzschmann and
package/cli/wiki.js CHANGED
@@ -128,7 +128,7 @@ if (require.main === module) {
128
128
  { name: 'force', alias: 'F', type: Boolean, description: 'Overwrite existing wiki files, even if nothing changes' },
129
129
  { name: 'filter', alias: 'f', type: String, multiple: true, description: 'Only generate wikis whose target path contains the given string' },
130
130
  { name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide for the wiki generator' },
131
- { name: 'keep-alive', type: Boolean, description: 'Keep-alive wiki generator (only sensible with a reloading script like ts-node-dev)' },
131
+ { name: 'keep-alive', type: Boolean, description: 'Keep-alive wiki generator (only sensible with a reloading script like node --watch)' },
132
132
  ];
133
133
  const optionHelp = [
134
134
  {
@@ -158,9 +158,9 @@ function cfgIfThenElse(ifNode, condition, then, otherwise) {
158
158
  }
159
159
  return {
160
160
  graph,
161
- breaks: [...then.breaks, ...otherwise?.breaks ?? []],
162
- nexts: [...then.nexts, ...otherwise?.nexts ?? []],
163
- returns: [...then.returns, ...otherwise?.returns ?? []],
161
+ breaks: then.breaks.concat(otherwise?.breaks ?? []),
162
+ nexts: then.nexts.concat(otherwise?.nexts ?? []),
163
+ returns: then.returns.concat(otherwise?.returns ?? []),
164
164
  exitPoints: [ifId + '-exit'],
165
165
  entryPoints: [ifId]
166
166
  };
@@ -3,7 +3,7 @@ import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/de
3
3
  import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
4
4
  import type { ControlFlowInformation } from './control-flow-graph';
5
5
  import type { ReadOnlyFlowrAnalyzerContext } from '../project/context/flowr-analyzer-context';
6
- export declare const loopyFunctions: Set<"builtin:default" | "builtin:eval" | "builtin:apply" | "builtin:expression-list" | "builtin:source" | "builtin:access" | "builtin:if-then-else" | "builtin:get" | "builtin:rm" | "builtin:library" | "builtin:assignment" | "builtin:special-bin-op" | "builtin:pipe" | "builtin:function-definition" | "builtin:quote" | "builtin:for-loop" | "builtin:repeat-loop" | "builtin:while-loop" | "builtin:replacement" | "builtin:list" | "builtin:vector">;
6
+ export declare const loopyFunctions: Set<"builtin:access" | "builtin:apply" | "builtin:assignment" | "builtin:assignment-like" | "builtin:default" | "builtin:eval" | "builtin:expression-list" | "builtin:for-loop" | "builtin:function-definition" | "builtin:get" | "builtin:if-then-else" | "builtin:library" | "builtin:list" | "builtin:pipe" | "builtin:quote" | "builtin:register-hook" | "builtin:repeat-loop" | "builtin:replacement" | "builtin:rm" | "builtin:source" | "builtin:special-bin-op" | "builtin:stopifnot" | "builtin:try" | "builtin:vector" | "builtin:while-loop">;
7
7
  /**
8
8
  * Checks whether a loop only loops once
9
9
  * @param loop - nodeid of the loop to analyse
@@ -123,14 +123,14 @@ class CfgSingleIterationLoopDetector extends semantic_cfg_guided_visitor_1.Seman
123
123
  for (const origin of data.call.origin) {
124
124
  if (origin === 'builtin:stop' || origin === 'builtin:return' || origin === 'builtin:break') {
125
125
  this.encounteredLoopBreaker = true;
126
- this.app(data.call.cds);
126
+ this.app(data.call.controlDependencies);
127
127
  return;
128
128
  }
129
129
  else if (origin === 'builtin:stopifnot') {
130
130
  const arg = this.getBoolArgValue(data);
131
131
  if (arg === false) {
132
132
  this.encounteredLoopBreaker = true;
133
- this.app(data.call.cds);
133
+ this.app(data.call.controlDependencies);
134
134
  return;
135
135
  }
136
136
  }
@@ -28,9 +28,9 @@ function makeCluster(graph, from, notReached) {
28
28
  const nodes = new Set([from]);
29
29
  // cluster function def exit points
30
30
  if (info.tag === vertex_1.VertexType.FunctionDefinition) {
31
- for (const sub of info.exitPoints) {
32
- if (notReached.delete(sub)) {
33
- makeCluster(graph, sub, notReached).forEach(n => nodes.add(n));
31
+ for (const { nodeId } of info.exitPoints) {
32
+ if (notReached.delete(nodeId)) {
33
+ makeCluster(graph, nodeId, notReached).forEach(n => nodes.add(n));
34
34
  }
35
35
  }
36
36
  }
@@ -24,7 +24,9 @@ export interface BuiltInConstantDefinition<Value> extends BaseBuiltInDefinition
24
24
  export interface BuiltInFunctionDefinition<BuiltInProcessor extends BuiltInMappingName> extends BaseBuiltInDefinition {
25
25
  readonly type: 'function';
26
26
  readonly processor: BuiltInProcessor;
27
- readonly config?: ConfigOfBuiltInMappingName<BuiltInProcessor>;
27
+ readonly config?: ConfigOfBuiltInMappingName<BuiltInProcessor> & {
28
+ libFn?: boolean;
29
+ };
28
30
  readonly evalHandler?: string;
29
31
  }
30
32
  /**
@@ -38,11 +40,13 @@ export interface BuiltInReplacementDefinition extends BaseBuiltInDefinition {
38
40
  readIndices: boolean;
39
41
  };
40
42
  }
41
- export type BuiltInDefinition = BuiltInConstantDefinition<any> | BuiltInFunctionDefinition<any> | BuiltInReplacementDefinition;
43
+ export type BuiltInDefinition<T extends BuiltInMappingName = BuiltInMappingName> = BuiltInConstantDefinition<unknown> | BuiltInFunctionDefinition<T> | BuiltInReplacementDefinition;
42
44
  /**
43
45
  * @see DefaultBuiltinConfig
44
46
  */
45
- export type BuiltInDefinitions = BuiltInDefinition[];
47
+ export type BuiltInDefinitions<Keys extends BuiltInMappingName[] = BuiltInMappingName[]> = [...{
48
+ [K in keyof Keys]: BuiltInDefinition<Keys[K]>;
49
+ }];
46
50
  /**
47
51
  * Get the {@link BuiltIns#builtInMemory} and {@link BuiltIns#emptyBuiltInMemory} for the {@link DefaultBuiltinConfig}.
48
52
  */
@@ -52,4 +56,4 @@ export declare function getDefaultBuiltInDefinitions(): BuiltIns;
52
56
  * @param definitions - the list of built-in definitions
53
57
  * @param loadDefaults - whether to first add the {@link DefaultBuiltinConfig} before the given {@link definitions}
54
58
  */
55
- export declare function getBuiltInDefinitions(definitions: BuiltInDefinitions, loadDefaults: boolean | undefined): BuiltIns;
59
+ export declare function getBuiltInDefinitions<Keys extends BuiltInMappingName[]>(definitions: BuiltInDefinitions<Keys>, loadDefaults: boolean | undefined): BuiltIns;
@@ -2,7 +2,7 @@ import type { DataflowProcessorInformation } from '../processor';
2
2
  import type { DataflowInformation, ExitPointType } from '../info';
3
3
  import { processAccess } from '../internal/process/functions/call/built-in/built-in-access';
4
4
  import { processIfThenElse } from '../internal/process/functions/call/built-in/built-in-if-then-else';
5
- import { processAssignment } from '../internal/process/functions/call/built-in/built-in-assignment';
5
+ import { processAssignment, processAssignmentLike } from '../internal/process/functions/call/built-in/built-in-assignment';
6
6
  import { processSpecialBinOp } from '../internal/process/functions/call/built-in/built-in-special-bin-op';
7
7
  import { processPipe } from '../internal/process/functions/call/built-in/built-in-pipe';
8
8
  import { processForLoop } from '../internal/process/functions/call/built-in/built-in-for-loop';
@@ -34,22 +34,31 @@ import type { DataflowGraph } from '../graph/graph';
34
34
  import type { VariableResolve } from '../../config';
35
35
  import type { BuiltInConstantDefinition, BuiltInDefinition, BuiltInFunctionDefinition, BuiltInReplacementDefinition } from './built-in-config';
36
36
  import type { ReadOnlyFlowrAnalyzerContext } from '../../project/context/flowr-analyzer-context';
37
+ import { processStopIfNot } from '../internal/process/functions/call/built-in/built-in-stop-if-not';
38
+ import { processTryCatch } from '../internal/process/functions/call/built-in/built-in-try-catch';
39
+ import { processRegisterHook } from '../internal/process/functions/call/built-in/built-in-register-hook';
37
40
  export type BuiltIn = `built-in:${string}`;
38
41
  /**
39
42
  * Generate a built-in id for the given name
40
43
  */
41
- export declare function builtInId(name: string): BuiltIn;
44
+ export declare function builtInId<T extends string>(name: T): `built-in:${T}`;
42
45
  /**
43
46
  * Checks whether the given name is a built-in identifier
44
47
  */
45
48
  export declare function isBuiltIn(name: NodeId | string): name is BuiltIn;
49
+ /**
50
+ * Drops the `built-in:` prefix from the given built-in name
51
+ */
52
+ export declare function dropBuiltInPrefix<T extends string>(name: `built-in:${T}`): T;
46
53
  export type BuiltInIdentifierProcessor = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>) => DataflowInformation;
47
54
  export type BuiltInIdentifierProcessorWithConfig<Config> = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: Config) => DataflowInformation;
48
55
  export interface BuiltInIdentifierDefinition extends IdentifierReference {
49
56
  type: ReferenceType.BuiltInFunction;
50
57
  definedAt: BuiltIn;
51
58
  processor: BuiltInIdentifierProcessor;
52
- config?: object;
59
+ config?: ConfigOfBuiltInMappingName<BuiltInMappingName> & {
60
+ libFn?: boolean;
61
+ };
53
62
  }
54
63
  export interface BuiltInIdentifierConstant<T = unknown> extends IdentifierReference {
55
64
  type: ReferenceType.BuiltInConstant;
@@ -73,27 +82,31 @@ export interface DefaultBuiltInProcessorConfiguration extends ForceArguments {
73
82
  export type BuiltInEvalHandler = (resolve: VariableResolve, a: RNodeWithParent, ctx: ReadOnlyFlowrAnalyzerContext, env?: REnvironmentInformation, graph?: DataflowGraph, map?: AstIdMap) => Value;
74
83
  declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { returnsNthArgument, useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
75
84
  export declare const BuiltInProcessorMapper: {
85
+ readonly 'builtin:access': typeof processAccess;
86
+ readonly 'builtin:apply': typeof processApply;
87
+ readonly 'builtin:assignment': typeof processAssignment;
88
+ readonly 'builtin:assignment-like': typeof processAssignmentLike;
76
89
  readonly 'builtin:default': typeof defaultBuiltInProcessor;
77
90
  readonly 'builtin:eval': typeof processEvalCall;
78
- readonly 'builtin:apply': typeof processApply;
79
91
  readonly 'builtin:expression-list': typeof processExpressionList;
80
- readonly 'builtin:source': typeof processSourceCall;
81
- readonly 'builtin:access': typeof processAccess;
82
- readonly 'builtin:if-then-else': typeof processIfThenElse;
92
+ readonly 'builtin:for-loop': typeof processForLoop;
93
+ readonly 'builtin:function-definition': typeof processFunctionDefinition;
83
94
  readonly 'builtin:get': typeof processGet;
84
- readonly 'builtin:rm': typeof processRm;
95
+ readonly 'builtin:if-then-else': typeof processIfThenElse;
85
96
  readonly 'builtin:library': typeof processLibrary;
86
- readonly 'builtin:assignment': typeof processAssignment;
87
- readonly 'builtin:special-bin-op': typeof processSpecialBinOp;
97
+ readonly 'builtin:list': typeof processList;
88
98
  readonly 'builtin:pipe': typeof processPipe;
89
- readonly 'builtin:function-definition': typeof processFunctionDefinition;
90
99
  readonly 'builtin:quote': typeof processQuote;
91
- readonly 'builtin:for-loop': typeof processForLoop;
100
+ readonly 'builtin:register-hook': typeof processRegisterHook;
92
101
  readonly 'builtin:repeat-loop': typeof processRepeatLoop;
93
- readonly 'builtin:while-loop': typeof processWhileLoop;
94
102
  readonly 'builtin:replacement': typeof processReplacementFunction;
95
- readonly 'builtin:list': typeof processList;
103
+ readonly 'builtin:rm': typeof processRm;
104
+ readonly 'builtin:source': typeof processSourceCall;
105
+ readonly 'builtin:special-bin-op': typeof processSpecialBinOp;
106
+ readonly 'builtin:stopifnot': typeof processStopIfNot;
107
+ readonly 'builtin:try': typeof processTryCatch;
96
108
  readonly 'builtin:vector': typeof processVector;
109
+ readonly 'builtin:while-loop': typeof processWhileLoop;
97
110
  };
98
111
  export declare const BuiltInEvalHandlerMapper: {
99
112
  readonly 'built-in:c': typeof resolveAsVector;