@eagleoutice/flowr 2.9.13 → 2.10.1

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 (237) hide show
  1. package/README.md +52 -28
  2. package/abstract-interpretation/absint-visitor.d.ts +1 -1
  3. package/abstract-interpretation/absint-visitor.js +20 -20
  4. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +2 -2
  5. package/benchmark/slicer.d.ts +1 -1
  6. package/benchmark/slicer.js +7 -5
  7. package/benchmark/stats/stats.d.ts +2 -2
  8. package/cli/repl/commands/repl-dataflow.js +5 -5
  9. package/cli/repl/parser/slice-query-parser.d.ts +3 -3
  10. package/cli/repl/parser/slice-query-parser.js +2 -2
  11. package/cli/repl/server/connection.js +2 -2
  12. package/cli/repl/server/messages/message-slice.d.ts +1 -1
  13. package/cli/repl/server/messages/message-slice.js +2 -2
  14. package/config.d.ts +12 -8
  15. package/config.js +5 -3
  16. package/control-flow/extract-cfg.js +2 -2
  17. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  18. package/control-flow/semantic-cfg-guided-visitor.js +43 -43
  19. package/control-flow/useless-loop.d.ts +1 -1
  20. package/control-flow/useless-loop.js +3 -3
  21. package/core/print/dataflow-printer.d.ts +0 -14
  22. package/core/print/dataflow-printer.js +0 -21
  23. package/core/steps/all/core/20-dataflow.d.ts +3 -3
  24. package/core/steps/all/core/20-dataflow.js +3 -2
  25. package/core/steps/all/static-slicing/00-slice.d.ts +2 -5
  26. package/core/steps/all/static-slicing/00-slice.js +6 -8
  27. package/core/steps/pipeline/default-pipelines.d.ts +89 -89
  28. package/dataflow/environments/built-in-proc-name.d.ts +83 -0
  29. package/dataflow/environments/built-in-proc-name.js +88 -0
  30. package/dataflow/environments/built-in.d.ts +1 -83
  31. package/dataflow/environments/built-in.js +37 -120
  32. package/dataflow/environments/default-builtin-config.d.ts +1 -1
  33. package/dataflow/environments/default-builtin-config.js +75 -75
  34. package/dataflow/environments/identifier.d.ts +5 -0
  35. package/dataflow/environments/identifier.js +18 -0
  36. package/dataflow/eval/resolve/resolve.js +2 -2
  37. package/dataflow/fn/exceptions-of-function.d.ts +1 -1
  38. package/dataflow/fn/exceptions-of-function.js +2 -2
  39. package/dataflow/graph/call-graph.d.ts +46 -19
  40. package/dataflow/graph/call-graph.js +95 -114
  41. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  42. package/dataflow/graph/dataflowgraph-builder.js +2 -2
  43. package/dataflow/graph/df-helper.d.ts +133 -0
  44. package/dataflow/graph/df-helper.js +138 -0
  45. package/dataflow/graph/diff-dataflow-graph.d.ts +5 -10
  46. package/dataflow/graph/diff-dataflow-graph.js +3 -28
  47. package/dataflow/graph/edge.d.ts +1 -0
  48. package/dataflow/graph/edge.js +1 -0
  49. package/dataflow/graph/graph-helper.d.ts +60 -0
  50. package/dataflow/graph/graph-helper.js +128 -0
  51. package/dataflow/graph/graph.d.ts +19 -3
  52. package/dataflow/graph/graph.js +32 -5
  53. package/dataflow/graph/vertex.d.ts +3 -1
  54. package/dataflow/info.d.ts +14 -4
  55. package/dataflow/info.js +28 -16
  56. package/dataflow/internal/linker.d.ts +14 -10
  57. package/dataflow/internal/linker.js +29 -32
  58. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +5 -5
  59. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +5 -4
  60. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +8 -7
  61. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  62. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +3 -3
  63. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +2 -2
  64. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +3 -3
  65. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +6 -6
  66. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -2
  67. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +3 -3
  68. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +2 -2
  69. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  70. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -1
  71. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +5 -5
  72. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -2
  73. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +2 -2
  74. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
  75. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +5 -5
  76. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -2
  77. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -1
  78. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -4
  79. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -2
  80. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +3 -3
  81. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  82. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +7 -7
  84. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +3 -3
  86. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +2 -2
  88. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +6 -9
  89. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  90. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -2
  91. package/dataflow/internal/process/functions/call/common.js +2 -1
  92. package/dataflow/internal/process/functions/call/known-call-handling.js +2 -2
  93. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -1
  94. package/dataflow/internal/process/functions/call/named-call-handling.js +1 -1
  95. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +2 -2
  96. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  97. package/dataflow/internal/process/process-uninteresting-leaf.d.ts +1 -1
  98. package/dataflow/internal/process/process-uninteresting-leaf.js +1 -1
  99. package/dataflow/origin/dfg-get-origin.d.ts +1 -1
  100. package/dataflow/origin/dfg-get-symbol-refs.js +6 -6
  101. package/documentation/doc-readme.js +2 -1
  102. package/documentation/doc-util/doc-dfg.d.ts +3 -0
  103. package/documentation/doc-util/doc-dfg.js +5 -7
  104. package/documentation/doc-util/doc-normalized-ast.d.ts +0 -6
  105. package/documentation/doc-util/doc-normalized-ast.js +0 -23
  106. package/documentation/doc-util/doc-structure.js +3 -3
  107. package/documentation/doc-util/doc-types.js +3 -3
  108. package/documentation/wiki-core.js +5 -4
  109. package/documentation/wiki-dataflow-graph.js +14 -12
  110. package/documentation/wiki-interface.js +3 -3
  111. package/documentation/wiki-linter.js +6 -0
  112. package/documentation/wiki-normalized-ast.js +5 -4
  113. package/documentation/wiki-query.js +28 -3
  114. package/linter/linter-rules.d.ts +49 -1
  115. package/linter/linter-rules.js +5 -1
  116. package/linter/rules/problematic-eval.d.ts +44 -0
  117. package/linter/rules/problematic-eval.js +83 -0
  118. package/linter/rules/seeded-randomness.js +2 -2
  119. package/linter/rules/stop-with-call-arg.d.ts +35 -0
  120. package/linter/rules/stop-with-call-arg.js +72 -0
  121. package/linter/rules/useless-loop.d.ts +1 -1
  122. package/package.json +7 -7
  123. package/project/cache/flowr-analyzer-cache.d.ts +1 -1
  124. package/project/cache/flowr-analyzer-cache.js +1 -1
  125. package/project/flowr-analyzer-builder.d.ts +3 -0
  126. package/project/flowr-analyzer.d.ts +1 -1
  127. package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +2 -2
  128. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -1
  129. package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -2
  130. package/queries/catalog/cluster-query/cluster-query-format.js +2 -2
  131. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +2 -2
  132. package/queries/catalog/dataflow-query/dataflow-query-format.js +2 -2
  133. package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -2
  134. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -3
  135. package/queries/catalog/does-call-query/does-call-query-executor.js +2 -2
  136. package/queries/catalog/does-call-query/does-call-query-format.d.ts +2 -2
  137. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
  138. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +3 -3
  139. package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +6 -0
  140. package/queries/catalog/input-sources-query/input-sources-query-executor.js +66 -0
  141. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +36 -0
  142. package/queries/catalog/input-sources-query/input-sources-query-format.js +63 -0
  143. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +90 -0
  144. package/queries/catalog/input-sources-query/simple-input-classifier.js +308 -0
  145. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +2 -2
  146. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
  147. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  148. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -3
  149. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
  150. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -2
  151. package/queries/catalog/location-map-query/location-map-query-executor.js +2 -2
  152. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -2
  153. package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
  154. package/queries/catalog/origin-query/origin-query-executor.js +3 -3
  155. package/queries/catalog/origin-query/origin-query-format.d.ts +3 -3
  156. package/queries/catalog/provenance-query/provenance-query-executor.d.ts +6 -0
  157. package/queries/catalog/provenance-query/provenance-query-executor.js +34 -0
  158. package/queries/catalog/provenance-query/provenance-query-format.d.ts +35 -0
  159. package/queries/catalog/provenance-query/provenance-query-format.js +62 -0
  160. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  161. package/queries/catalog/search-query/search-query-format.js +1 -1
  162. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -2
  163. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -2
  164. package/queries/catalog/static-slice-query/static-slice-query-format.js +3 -3
  165. package/queries/query.d.ts +17 -1
  166. package/queries/query.js +4 -0
  167. package/r-bridge/lang-4.x/ast/model/model.d.ts +9 -0
  168. package/r-bridge/lang-4.x/ast/model/model.js +10 -1
  169. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +16 -1
  170. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +2 -0
  171. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +16 -1
  172. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +2 -0
  173. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
  174. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -0
  175. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +15 -0
  176. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +2 -0
  177. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +15 -0
  178. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +2 -0
  179. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +16 -1
  180. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +2 -0
  181. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +16 -1
  182. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +2 -0
  183. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +16 -1
  184. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -0
  185. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +29 -1
  186. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +29 -0
  187. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +16 -1
  188. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +2 -0
  189. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +16 -1
  190. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +2 -0
  191. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +16 -1
  192. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +2 -0
  193. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +16 -1
  194. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +2 -0
  195. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +16 -1
  196. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +2 -0
  197. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +16 -1
  198. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +2 -0
  199. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +16 -1
  200. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +2 -0
  201. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +16 -1
  202. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +2 -0
  203. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +16 -1
  204. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -0
  205. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +16 -1
  206. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +2 -0
  207. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
  208. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -0
  209. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +16 -1
  210. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +2 -0
  211. package/search/flowr-search-filters.d.ts +1 -1
  212. package/search/flowr-search-printer.js +3 -3
  213. package/search/search-executor/search-enrichers.js +2 -2
  214. package/search/search-executor/search-generators.js +1 -1
  215. package/slicing/criterion/parse.d.ts +43 -18
  216. package/slicing/criterion/parse.js +68 -63
  217. package/slicing/static/slicer-types.d.ts +2 -3
  218. package/slicing/static/static-slicer.d.ts +3 -4
  219. package/slicing/static/static-slicer.js +32 -12
  220. package/util/collections/arrays.d.ts +4 -0
  221. package/util/collections/arrays.js +7 -0
  222. package/util/diff.d.ts +2 -2
  223. package/util/mermaid/ast.js +4 -4
  224. package/util/mermaid/cfg.js +5 -5
  225. package/util/mermaid/dfg.d.ts +33 -18
  226. package/util/mermaid/dfg.js +47 -31
  227. package/util/mermaid/mermaid.d.ts +57 -12
  228. package/util/mermaid/mermaid.js +74 -67
  229. package/util/range.d.ts +8 -0
  230. package/util/range.js +13 -1
  231. package/util/slice-direction.d.ts +7 -0
  232. package/util/slice-direction.js +12 -0
  233. package/util/version.js +1 -1
  234. package/dataflow/graph/invert-dfg.d.ts +0 -6
  235. package/dataflow/graph/invert-dfg.js +0 -20
  236. package/dataflow/graph/resolve-graph.d.ts +0 -8
  237. package/dataflow/graph/resolve-graph.js +0 -59
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.9.12, R grammar v14 (tree-sitter engine)
27
+ flowR repl using flowR v2.10.0, R grammar v14 (tree-sitter engine)
28
28
  R> :query @linter "read.csv(\"/root/x.txt\")"
29
29
  ```
30
30
 
@@ -33,13 +33,13 @@ It offers a wide variety of features, for example:
33
33
 
34
34
 
35
35
  ```text
36
- Query: linter (3 ms)
36
+ Query: linter (2 ms)
37
37
  ╰ Deprecated Functions (deprecated-functions):
38
- ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
38
+ ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0
39
39
  ╰ File Path Validity (file-path-validity):
40
40
  ╰ certain:
41
41
  ╰ Path `/root/x.txt` at 1.1-23
42
- ╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0
42
+ ╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, processTimeMs: 0
43
43
  ╰ Seeded Randomness (seeded-randomness):
44
44
  ╰ Metadata: consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0
45
45
  ╰ Absolute Paths (absolute-file-paths):
@@ -53,12 +53,16 @@ It offers a wide variety of features, for example:
53
53
  ╰ Network Functions (network-functions):
54
54
  ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
55
55
  ╰ Dataframe Access Validation (dataframe-access-validation):
56
- ╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1
56
+ ╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 0
57
57
  ╰ Dead Code (dead-code):
58
58
  ╰ Metadata: consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0
59
59
  ╰ Useless Loops (useless-loop):
60
60
  ╰ Metadata: numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0
61
- All queries together required ≈3 ms (1ms accuracy, total 3 ms)
61
+ Problematic eval (problematic-eval):
62
+ ╰ Metadata: searchTimeMs: 0, processTimeMs: 0
63
+ ╰ Stop without call.=False argument (stop-call):
64
+ ╰ Metadata: consideredNodes: 0, searchTimeMs: 0, processTimeMs: 0
65
+ All queries together required ≈2 ms (1ms accuracy, total 2 ms)
62
66
  ```
63
67
 
64
68
 
@@ -82,17 +86,17 @@ It offers a wide variety of features, for example:
82
86
 
83
87
  Query: **linter** (2 ms)\
84
88
     ╰ **Deprecated Functions** (deprecated-functions):\
85
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
89
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0</code>\
86
90
  &nbsp;&nbsp;&nbsp;╰ **File Path Validity** (file-path-validity):\
87
91
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
88
92
  &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>\
93
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, processTimeMs: 0</code>\
90
94
  &nbsp;&nbsp;&nbsp;╰ **Seeded Randomness** (seeded-randomness):\
91
95
  &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
96
  &nbsp;&nbsp;&nbsp;╰ **Absolute Paths** (absolute-file-paths):\
93
97
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
94
98
  &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>\
99
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs: 1, processTimeMs: 0</code>\
96
100
  &nbsp;&nbsp;&nbsp;╰ **Unused Definitions** (unused-definitions):\
97
101
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0</code>\
98
102
  &nbsp;&nbsp;&nbsp;╰ **Naming Convention** (naming-convention):\
@@ -100,16 +104,20 @@ It offers a wide variety of features, for example:
100
104
  &nbsp;&nbsp;&nbsp;╰ **Network Functions** (network-functions):\
101
105
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
102
106
  &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>\
107
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 0</code>\
104
108
  &nbsp;&nbsp;&nbsp;╰ **Dead Code** (dead-code):\
105
109
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0</code>\
106
110
  &nbsp;&nbsp;&nbsp;╰ **Useless Loops** (useless-loop):\
107
111
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0</code>\
112
+ &nbsp;&nbsp;&nbsp;╰ **Problematic eval** (problematic-eval):\
113
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>searchTimeMs: 0, processTimeMs: 0</code>\
114
+ &nbsp;&nbsp;&nbsp;╰ **Stop without call.=False argument** (stop-call):\
115
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consideredNodes: 0, searchTimeMs: 0, processTimeMs: 0</code>\
108
116
  _All queries together required ≈2 ms (1ms accuracy, total 2 ms)_
109
117
 
110
118
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
111
119
 
112
- The analysis required _2.1 ms_ (including parsing and normalization and the query) within the generation environment.
120
+ The analysis required _2.3 ms_ (including parsing and normalization and the query) within the generation environment.
113
121
 
114
122
  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
123
  Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
@@ -126,7 +134,7 @@ It offers a wide variety of features, for example:
126
134
  ".meta": {
127
135
  "totalCalls": 0,
128
136
  "totalFunctionDefinitions": 0,
129
- "searchTimeMs": 0,
137
+ "searchTimeMs": 1,
130
138
  "processTimeMs": 0
131
139
  }
132
140
  },
@@ -149,7 +157,7 @@ It offers a wide variety of features, for example:
149
157
  "totalUnknown": 0,
150
158
  "totalWritesBeforeAlways": 0,
151
159
  "totalValid": 0,
152
- "searchTimeMs": 1,
160
+ "searchTimeMs": 0,
153
161
  "processTimeMs": 0
154
162
  }
155
163
  },
@@ -181,7 +189,7 @@ It offers a wide variety of features, for example:
181
189
  ".meta": {
182
190
  "totalConsidered": 1,
183
191
  "totalUnknown": 0,
184
- "searchTimeMs": 0,
192
+ "searchTimeMs": 1,
185
193
  "processTimeMs": 0
186
194
  }
187
195
  },
@@ -218,7 +226,7 @@ It offers a wide variety of features, for example:
218
226
  "numAccesses": 0,
219
227
  "totalAccessed": 0,
220
228
  "searchTimeMs": 0,
221
- "processTimeMs": 1
229
+ "processTimeMs": 0
222
230
  }
223
231
  },
224
232
  "dead-code": {
@@ -236,6 +244,21 @@ It offers a wide variety of features, for example:
236
244
  "searchTimeMs": 0,
237
245
  "processTimeMs": 0
238
246
  }
247
+ },
248
+ "problematic-eval": {
249
+ "results": [],
250
+ ".meta": {
251
+ "searchTimeMs": 0,
252
+ "processTimeMs": 0
253
+ }
254
+ },
255
+ "stop-call": {
256
+ "results": [],
257
+ ".meta": {
258
+ "consideredNodes": 0,
259
+ "searchTimeMs": 0,
260
+ "processTimeMs": 0
261
+ }
239
262
  }
240
263
  },
241
264
  ".meta": {
@@ -308,7 +331,7 @@ It offers a wide variety of features, for example:
308
331
 
309
332
  ```shell
310
333
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
311
- flowR repl using flowR v2.9.12, R grammar v14 (tree-sitter engine)
334
+ flowR repl using flowR v2.10.0, R grammar v14 (tree-sitter engine)
312
335
  R> :query @static-slice (11@sum) file://test/testfiles/example.R
313
336
  ```
314
337
 
@@ -322,7 +345,7 @@ It offers a wide variety of features, for example:
322
345
  N <- 10
323
346
  for(i in 1:(N-1)) sum <- sum + i + w
324
347
  sum
325
- All queries together required ≈3 ms (1ms accuracy, total 4 ms)
348
+ All queries together required ≈2 ms (1ms accuracy, total 2 ms)
326
349
  ```
327
350
 
328
351
 
@@ -356,7 +379,7 @@ It offers a wide variety of features, for example:
356
379
 
357
380
 
358
381
  * 🚀 **fast call-graph, data-, and control-flow graphs**\
359
- Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">97.7 ms</span></i> (as of Feb 19, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
382
+ Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">99.2 ms</span></i> (as of Mar 13, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
360
383
  _flowR_ can analyze the data- and control-flow of the average real-world R&nbsp;script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
361
384
  and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) for more details on the [dataflow graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) as well as [call graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph#perspectives-cg).
362
385
 
@@ -392,7 +415,7 @@ It offers a wide variety of features, for example:
392
415
 
393
416
  ```shell
394
417
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
395
- flowR repl using flowR v2.9.12, R grammar v14 (tree-sitter engine)
418
+ flowR repl using flowR v2.10.0, R grammar v14 (tree-sitter engine)
396
419
  R> :dataflow* test/testfiles/example.R
397
420
  ```
398
421
 
@@ -418,7 +441,7 @@ It offers a wide variety of features, for example:
418
441
  *1.8*`"}}
419
442
  %% No edges found for 1
420
443
  0["`#91;RSymbol#93; sum
421
- (0)
444
+ (0, sources: [1])
422
445
  *1.1-3*`"]
423
446
  2[["`#91;RBinaryOp#93; #60;#45;
424
447
  (2)
@@ -432,7 +455,7 @@ It offers a wide variety of features, for example:
432
455
  *2.12*`"}}
433
456
  %% No edges found for 4
434
457
  3["`#91;RSymbol#93; product
435
- (3)
458
+ (3, sources: [4])
436
459
  *2.1-7*`"]
437
460
  5[["`#91;RBinaryOp#93; #60;#45;
438
461
  (5)
@@ -443,7 +466,7 @@ It offers a wide variety of features, for example:
443
466
  *3.6*`"}}
444
467
  %% No edges found for 7
445
468
  6["`#91;RSymbol#93; w
446
- (6)
469
+ (6, sources: [7])
447
470
  *3.1*`"]
448
471
  8[["`#91;RBinaryOp#93; #60;#45;
449
472
  (8)
@@ -454,14 +477,14 @@ It offers a wide variety of features, for example:
454
477
  *4.6-7*`"}}
455
478
  %% No edges found for 10
456
479
  9["`#91;RSymbol#93; N
457
- (9)
480
+ (9, sources: [10])
458
481
  *4.1*`"]
459
482
  11[["`#91;RBinaryOp#93; #60;#45;
460
483
  (11)
461
484
  *4.1-7*
462
485
  (9, 10)`"]]
463
486
  12["`#91;RSymbol#93; i
464
- (12)
487
+ (12, sources: [20])
465
488
  *6.6*`"]
466
489
  13{{"`#91;RNumber#93; 1
467
490
  (13)
@@ -513,7 +536,7 @@ It offers a wide variety of features, for example:
513
536
  *7.10-20*
514
537
  (26, 27)`"]]
515
538
  23["`#91;RSymbol#93; sum
516
- (23, :may:36+)
539
+ (23, :may:36+, sources: [28])
517
540
  *7.3-5*`"]
518
541
  29[["`#91;RBinaryOp#93; #60;#45;
519
542
  (29, :may:36+)
@@ -530,7 +553,7 @@ It offers a wide variety of features, for example:
530
553
  *8.14-24*
531
554
  (31, 32)`"]]
532
555
  30["`#91;RSymbol#93; product
533
- (30, :may:36+)
556
+ (30, :may:36+, sources: [33])
534
557
  *8.3-9*`"]
535
558
  34[["`#91;RBinaryOp#93; #60;#45;
536
559
  (34, :may:36+)
@@ -700,7 +723,7 @@ It offers a wide variety of features, for example:
700
723
  ```
701
724
 
702
725
 
703
- (The analysis required _1.5 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
726
+ (The analysis required _1.6 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
704
727
 
705
728
 
706
729
 
@@ -877,7 +900,8 @@ We welcome every contribution! Please check out the [developer onboarding](https
877
900
 
878
901
  *flowr* is actively developed by [Florian Sihler](https://eagleoutice.github.io/portfolio/) and (since October 1st 2025) [Oliver Gerstl](https://www.linkedin.com/in/oliver-gerstl) under the
879
902
  [GPLv3 License](LICENSE).\
880
- It is partially supported by the German Research Foundation (DFG) under the grant [504226141](https://gepris.dfg.de/gepris/projekt/504226141) ("CodeInspector").
903
+ It is partially supported by the German Research Foundation (DFG) under the grant [504226141](https://gepris.dfg.de/gepris/projekt/504226141) ("CodeInspector")
904
+ and received an unrestricted gift from [Posit](https://posit.co/), the open-source data science company.
881
905
 
882
906
  ----
883
907
 
@@ -2,7 +2,6 @@ import type { ControlFlowInformation } from '../control-flow/control-flow-graph'
2
2
  import { CfgVertex } from '../control-flow/control-flow-graph';
3
3
  import type { SemanticCfgGuidedVisitorConfiguration } from '../control-flow/semantic-cfg-guided-visitor';
4
4
  import { SemanticCfgGuidedVisitor } from '../control-flow/semantic-cfg-guided-visitor';
5
- import { BuiltInProcName } from '../dataflow/environments/built-in';
6
5
  import type { DataflowGraph } from '../dataflow/graph/graph';
7
6
  import { type DataflowGraphVertexFunctionCall, type DataflowGraphVertexVariableDefinition } from '../dataflow/graph/vertex';
8
7
  import type { NoInfo, RNode } from '../r-bridge/lang-4.x/ast/model/model';
@@ -11,6 +10,7 @@ import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
11
10
  import { type AnyAbstractDomain } from './domains/abstract-domain';
12
11
  import type { StateAbstractDomain } from './domains/state-abstract-domain';
13
12
  import { MutableStateAbstractDomain } from './domains/state-abstract-domain';
13
+ import { BuiltInProcName } from '../dataflow/environments/built-in-proc-name';
14
14
  export type AbsintVisitorConfiguration = Omit<SemanticCfgGuidedVisitorConfiguration<NoInfo, ControlFlowInformation, NormalizedAst>, 'defaultVisitingOrder' | 'defaultVisitingType'>;
15
15
  /**
16
16
  * A control flow graph visitor to perform abstract interpretation.
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractInterpretationVisitor = void 0;
4
4
  const control_flow_graph_1 = require("../control-flow/control-flow-graph");
5
5
  const semantic_cfg_guided_visitor_1 = require("../control-flow/semantic-cfg-guided-visitor");
6
- const built_in_1 = require("../dataflow/environments/built-in");
7
6
  const vertex_1 = require("../dataflow/graph/vertex");
8
- const dfg_get_origin_1 = require("../dataflow/origin/dfg-get-origin");
9
7
  const model_1 = require("../r-bridge/lang-4.x/ast/model/model");
10
8
  const r_function_call_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
11
9
  const type_1 = require("../r-bridge/lang-4.x/ast/model/type");
12
10
  const assert_1 = require("../util/assert");
13
11
  const abstract_domain_1 = require("./domains/abstract-domain");
14
12
  const state_abstract_domain_1 = require("./domains/state-abstract-domain");
13
+ const df_helper_1 = require("../dataflow/graph/df-helper");
14
+ const built_in_proc_name_1 = require("../dataflow/environments/built-in-proc-name");
15
15
  /**
16
16
  * A control flow graph visitor to perform abstract interpretation.
17
17
  *
@@ -86,7 +86,7 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
86
86
  else if (node.type === type_1.RType.ExpressionList && node.children.length > 0) {
87
87
  return this.getAbstractValue(node.children.at(-1), state);
88
88
  }
89
- else if (origins.includes(built_in_1.BuiltInProcName.Pipe)) {
89
+ else if (origins.includes(built_in_proc_name_1.BuiltInProcName.Pipe)) {
90
90
  if (node.type === type_1.RType.Pipe || node.type === type_1.RType.BinaryOp) {
91
91
  return this.getAbstractValue(node.rhs, state);
92
92
  }
@@ -94,7 +94,7 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
94
94
  return this.getAbstractValue(call.args[1].nodeId, state);
95
95
  }
96
96
  }
97
- else if (origins.includes(built_in_1.BuiltInProcName.IfThenElse)) {
97
+ else if (origins.includes(built_in_proc_name_1.BuiltInProcName.IfThenElse)) {
98
98
  let values = [];
99
99
  if (node.type === type_1.RType.IfThenElse && node.otherwise !== undefined) {
100
100
  values = [node.then, node.otherwise].map(entry => this.getAbstractValue(entry, state));
@@ -203,20 +203,20 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
203
203
  onDispatchFunctionCallOrigin(call, origin) {
204
204
  super.onDispatchFunctionCallOrigin(call, origin);
205
205
  switch (origin) {
206
- case built_in_1.BuiltInProcName.ExpressionList:
207
- case built_in_1.BuiltInProcName.IfThenElse:
208
- case built_in_1.BuiltInProcName.ForLoop:
209
- case built_in_1.BuiltInProcName.WhileLoop:
210
- case built_in_1.BuiltInProcName.RepeatLoop:
211
- case built_in_1.BuiltInProcName.FunctionDefinition:
212
- case built_in_1.BuiltInProcName.Assignment:
213
- case built_in_1.BuiltInProcName.AssignmentLike:
214
- case built_in_1.BuiltInProcName.TableAssignment:
215
- case built_in_1.BuiltInProcName.Replacement:
216
- case built_in_1.BuiltInProcName.Access:
217
- case built_in_1.BuiltInProcName.Pipe:
218
- case built_in_1.BuiltInProcName.Break:
219
- case built_in_1.BuiltInProcName.Return:
206
+ case built_in_proc_name_1.BuiltInProcName.ExpressionList:
207
+ case built_in_proc_name_1.BuiltInProcName.IfThenElse:
208
+ case built_in_proc_name_1.BuiltInProcName.ForLoop:
209
+ case built_in_proc_name_1.BuiltInProcName.WhileLoop:
210
+ case built_in_proc_name_1.BuiltInProcName.RepeatLoop:
211
+ case built_in_proc_name_1.BuiltInProcName.FunctionDefinition:
212
+ case built_in_proc_name_1.BuiltInProcName.Assignment:
213
+ case built_in_proc_name_1.BuiltInProcName.AssignmentLike:
214
+ case built_in_proc_name_1.BuiltInProcName.TableAssignment:
215
+ case built_in_proc_name_1.BuiltInProcName.Replacement:
216
+ case built_in_proc_name_1.BuiltInProcName.Access:
217
+ case built_in_proc_name_1.BuiltInProcName.Pipe:
218
+ case built_in_proc_name_1.BuiltInProcName.Break:
219
+ case built_in_proc_name_1.BuiltInProcName.Return:
220
220
  return;
221
221
  default:
222
222
  return this.onFunctionCall({ call });
@@ -273,7 +273,7 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
273
273
  }
274
274
  /** Gets each variable origin that has already been visited and whose assignment has already been processed */
275
275
  getVariableOrigins(nodeId) {
276
- return (0, dfg_get_origin_1.getOriginInDfg)(this.config.dfg, nodeId)
276
+ return df_helper_1.Dataflow.origin(this.config.dfg, nodeId)
277
277
  ?.filter(origin => origin.type === 0 /* OriginType.ReadVariableOrigin */)
278
278
  .map(origin => origin.id)
279
279
  .filter(origin => this.trace.has(origin) && !this.unassigned.has(origin)) ?? [];
@@ -293,7 +293,7 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
293
293
  return false;
294
294
  }
295
295
  const origin = dataflowVertex.origin;
296
- return origin.includes(built_in_1.BuiltInProcName.ForLoop) || origin.includes(built_in_1.BuiltInProcName.WhileLoop) || origin.includes(built_in_1.BuiltInProcName.RepeatLoop);
296
+ return origin.includes(built_in_proc_name_1.BuiltInProcName.ForLoop) || origin.includes(built_in_proc_name_1.BuiltInProcName.WhileLoop) || origin.includes(built_in_proc_name_1.BuiltInProcName.RepeatLoop);
297
297
  }
298
298
  /**
299
299
  * Checks whether a control flow graph vertex should be skipped during visitation.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mapDataFrameReplacementFunction = mapDataFrameReplacementFunction;
4
4
  const config_1 = require("../../../config");
5
- const built_in_1 = require("../../../dataflow/environments/built-in");
6
5
  const vertex_1 = require("../../../dataflow/graph/vertex");
7
6
  const make_argument_1 = require("../../../dataflow/internal/process/functions/call/argument/make-argument");
8
7
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
@@ -12,6 +11,7 @@ const semantics_1 = require("../semantics");
12
11
  const access_mapper_1 = require("./access-mapper");
13
12
  const arguments_1 = require("./arguments");
14
13
  const identifier_1 = require("../../../dataflow/environments/identifier");
14
+ const built_in_proc_name_1 = require("../../../dataflow/environments/built-in-proc-name");
15
15
  /** Mapper for mapping the supported data frame replacement functions to mapper functions */
16
16
  const DataFrameReplacementFunctionMapper = {
17
17
  'colnames': mapDataFrameColNamesAssignment,
@@ -59,7 +59,7 @@ function isDataFrameReplacement(functionName) {
59
59
  }
60
60
  function hasParentReplacement(node, dfg) {
61
61
  const parentVertex = node.info.parent ? dfg.getVertex(node.info.parent) : undefined;
62
- return (0, vertex_1.isFunctionCallVertex)(parentVertex) && parentVertex.origin.includes(built_in_1.BuiltInProcName.Replacement);
62
+ return (0, vertex_1.isFunctionCallVertex)(parentVertex) && parentVertex.origin.includes(built_in_proc_name_1.BuiltInProcName.Replacement);
63
63
  }
64
64
  function mapDataFrameContentAssignment(access, expression, inference) {
65
65
  const dataFrame = access.accessed;
@@ -8,7 +8,7 @@ import type { SliceResult } from '../slicing/static/slicer-types';
8
8
  import type { ReconstructionResult } from '../reconstruct/reconstruct';
9
9
  import type { PerSliceStats, SlicerStats, SlicerStatsDfShape } from './stats/stats';
10
10
  import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
11
- import type { SlicingCriteria } from '../slicing/criterion/parse';
11
+ import { SlicingCriteria } from '../slicing/criterion/parse';
12
12
  import { type RParseRequestFromFile, type RParseRequestFromText } from '../r-bridge/retriever';
13
13
  import { type SlicingCriteriaFilter } from '../slicing/criterion/collect-all';
14
14
  import type { AutoSelectPredicate } from '../reconstruct/auto-select/auto-select-defaults';
@@ -13,6 +13,7 @@ const seedrandom_1 = __importDefault(require("seedrandom"));
13
13
  const log_1 = require("../util/log");
14
14
  const assert_1 = require("../util/assert");
15
15
  const strings_1 = require("../util/text/strings");
16
+ const parse_1 = require("../slicing/criterion/parse");
16
17
  const default_pipelines_1 = require("../core/steps/pipeline/default-pipelines");
17
18
  const retriever_1 = require("../r-bridge/retriever");
18
19
  const collect_all_1 = require("../slicing/criterion/collect-all");
@@ -199,15 +200,16 @@ class BenchmarkSlicer {
199
200
  this.executor.updateRequest({ criterion: slicingCriteria });
200
201
  const totalStopwatch = measurements.start('total');
201
202
  const slicedOutput = await this.measureSliceStep('slice', measurements, 'static slicing');
202
- stats.slicingCriteria = [...slicedOutput.decodedCriteria];
203
+ const decodedCriteria = parse_1.SlicingCriteria.decodeAll(slicingCriteria, this.normalizedAst.idMap);
204
+ stats.slicingCriteria = Array.from(decodedCriteria);
203
205
  stats.reconstructedCode = await this.measureSliceStep('reconstruct', measurements, 'reconstruct code');
204
206
  totalStopwatch.stop();
205
207
  exports.benchmarkLogger.debug(`Produced code for ${JSON.stringify(slicingCriteria)}: ${stats.reconstructedCode.code}`);
206
208
  const results = this.executor.getResults(false);
207
209
  if (exports.benchmarkLogger.settings.minLevel >= 3 /* LogLevel.Info */) {
208
- exports.benchmarkLogger.info(`mapped slicing criteria: ${slicedOutput.decodedCriteria.map(c => {
209
- const node = results.normalize.idMap.get(c.id);
210
- return `\n- id: ${c.id}, location: ${JSON.stringify(node?.location)}, lexeme: ${JSON.stringify(node?.lexeme)}`;
210
+ exports.benchmarkLogger.info(`mapped slicing criteria: ${slicedOutput.slicedFor.map(id => {
211
+ const node = results.normalize.idMap.get(id);
212
+ return `\n- id: ${id}, location: ${JSON.stringify(node?.location)}, lexeme: ${JSON.stringify(node?.lexeme)}`;
211
213
  }).join('')}`);
212
214
  }
213
215
  // if it is not in the dataflow graph it was kept to be safe and should not count to the included nodes
@@ -235,7 +237,7 @@ class BenchmarkSlicer {
235
237
  this.guardActive();
236
238
  const g = this.dataflow?.graph;
237
239
  (0, assert_1.guard)(g !== undefined, 'dataflow should be defined for call graph extraction');
238
- this.callGraph = this.measureSimpleStep('extract call graph', () => (0, call_graph_1.computeCallGraph)(g));
240
+ this.callGraph = this.measureSimpleStep('extract call graph', () => call_graph_1.CallGraph.compute(g));
239
241
  }
240
242
  /**
241
243
  * Infer the shape of data frames using abstract interpretation with {@link inferDataFrameShapes}
@@ -1,4 +1,4 @@
1
- import type { SingleSlicingCriterion, SlicingCriteria } from '../../slicing/criterion/parse';
1
+ import type { SlicingCriterion, SlicingCriteria } from '../../slicing/criterion/parse';
2
2
  import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
3
3
  import type { ReconstructionResult } from '../../reconstruct/reconstruct';
4
4
  import type { RParseRequestFromFile, RParseRequestFromText } from '../../r-bridge/retriever';
@@ -15,7 +15,7 @@ export type ElapsedTime = bigint;
15
15
  export interface PerSliceStats {
16
16
  measurements: Map<PerSliceMeasurements, ElapsedTime>;
17
17
  slicingCriteria: {
18
- criterion: SingleSlicingCriterion;
18
+ criterion: SlicingCriterion;
19
19
  id: NodeId;
20
20
  }[];
21
21
  reconstructedCode: ReconstructionResult;
@@ -35,11 +35,11 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.dataflowSimpleStarCommand = exports.dataflowSimplifiedCommand = exports.dataflowSilentCommand = exports.dataflowAsciiCommand = exports.dataflowStarCommand = exports.dataflowCommand = void 0;
37
37
  const retriever_1 = require("../../../r-bridge/retriever");
38
- const dfg_1 = require("../../../util/mermaid/dfg");
39
38
  const ansi_1 = require("../../../util/text/ansi");
40
39
  const core_1 = require("../core");
41
40
  const vertex_1 = require("../../../dataflow/graph/vertex");
42
41
  const dfg_ascii_1 = require("../../../util/simple-df/dfg-ascii");
42
+ const df_helper_1 = require("../../../dataflow/graph/df-helper");
43
43
  function formatInfo(out, type, meta) {
44
44
  return out.formatter.format(`Copied ${type} to clipboard (dataflow: ${meta['.meta'].timing + 'ms'}).`, { color: 7 /* Colors.White */, effect: ansi_1.ColorEffect.Foreground, style: 3 /* FontStyles.Italic */ });
45
45
  }
@@ -52,7 +52,7 @@ exports.dataflowCommand = {
52
52
  argsParser: (args) => (0, core_1.handleString)(args),
53
53
  fn: async ({ output, analyzer }) => {
54
54
  const result = await analyzer.dataflow();
55
- const mermaid = (0, dfg_1.graphToMermaid)({ graph: result.graph, includeEnvironments: false }).string;
55
+ const mermaid = df_helper_1.Dataflow.visualize.mermaid.convert({ graph: result.graph, includeEnvironments: false }).string;
56
56
  output.stdout(mermaid);
57
57
  try {
58
58
  const clipboard = await Promise.resolve().then(() => __importStar(require('clipboardy')));
@@ -72,7 +72,7 @@ exports.dataflowStarCommand = {
72
72
  argsParser: (args) => (0, core_1.handleString)(args),
73
73
  fn: async ({ output, analyzer }) => {
74
74
  const result = await analyzer.dataflow();
75
- const mermaid = (0, dfg_1.graphToMermaidUrl)(result.graph, false);
75
+ const mermaid = df_helper_1.Dataflow.visualize.mermaid.url(result.graph, false);
76
76
  output.stdout(mermaid);
77
77
  try {
78
78
  const clipboard = await Promise.resolve().then(() => __importStar(require('clipboardy')));
@@ -126,7 +126,7 @@ exports.dataflowSimplifiedCommand = {
126
126
  argsParser: (args) => (0, core_1.handleString)(args),
127
127
  fn: async ({ output, analyzer }) => {
128
128
  const result = await analyzer.dataflow();
129
- const mermaid = (0, dfg_1.graphToMermaid)({ graph: result.graph, includeEnvironments: false, simplified: true }).string;
129
+ const mermaid = df_helper_1.Dataflow.visualize.mermaid.convert({ graph: result.graph, includeEnvironments: false, simplified: true }).string;
130
130
  output.stdout(mermaid);
131
131
  try {
132
132
  const clipboard = await Promise.resolve().then(() => __importStar(require('clipboardy')));
@@ -145,7 +145,7 @@ exports.dataflowSimpleStarCommand = {
145
145
  argsParser: (args) => (0, core_1.handleString)(args),
146
146
  fn: async ({ output, analyzer }) => {
147
147
  const result = await analyzer.dataflow();
148
- const mermaid = (0, dfg_1.graphToMermaidUrl)(result.graph, false, undefined, true);
148
+ const mermaid = df_helper_1.Dataflow.visualize.mermaid.url(result.graph, false, undefined, true);
149
149
  output.stdout(mermaid);
150
150
  try {
151
151
  const clipboard = await Promise.resolve().then(() => __importStar(require('clipboardy')));
@@ -1,5 +1,5 @@
1
- import { SliceDirection } from '../../../core/steps/all/static-slicing/00-slice';
2
- import type { SingleSlicingCriterion, SlicingCriteria } from '../../../slicing/criterion/parse';
1
+ import type { SlicingCriterion, SlicingCriteria } from '../../../slicing/criterion/parse';
2
+ import { SliceDirection } from '../../../util/slice-direction';
3
3
  /**
4
4
  * Checks whether the given argument represents a slicing direction with an `f` suffix.
5
5
  */
@@ -7,7 +7,7 @@ export declare function sliceDirectionParser(argument: string): SliceDirection;
7
7
  /**
8
8
  * Parses a single slicing criterion from the given argument.
9
9
  */
10
- export declare function sliceCriterionParser(argument: string | undefined): SingleSlicingCriterion | undefined;
10
+ export declare function sliceCriterionParser(argument: string | undefined): SlicingCriterion | undefined;
11
11
  /**
12
12
  * Parses multiple slicing criteria from the given argument.
13
13
  */
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sliceDirectionParser = sliceDirectionParser;
4
4
  exports.sliceCriterionParser = sliceCriterionParser;
5
5
  exports.sliceCriteriaParser = sliceCriteriaParser;
6
- const _00_slice_1 = require("../../../core/steps/all/static-slicing/00-slice");
6
+ const slice_direction_1 = require("../../../util/slice-direction");
7
7
  /**
8
8
  * Checks whether the given argument represents a slicing direction with an `f` suffix.
9
9
  */
10
10
  function sliceDirectionParser(argument) {
11
11
  const endBracket = argument.indexOf(')');
12
- return argument[endBracket + 1] === 'f' ? _00_slice_1.SliceDirection.Forward : _00_slice_1.SliceDirection.Backward;
12
+ return argument[endBracket + 1] === 'f' ? slice_direction_1.SliceDirection.Forward : slice_direction_1.SliceDirection.Backward;
13
13
  }
14
14
  /**
15
15
  * Parses a single slicing criterion from the given argument.
@@ -58,8 +58,8 @@ const tmp = __importStar(require("tmp"));
58
58
  const fs_1 = __importDefault(require("fs"));
59
59
  const message_query_1 = require("./messages/message-query");
60
60
  const compact_1 = require("./compact");
61
- const _00_slice_1 = require("../../../core/steps/all/static-slicing/00-slice");
62
61
  const flowr_analyzer_builder_1 = require("../../../project/flowr-analyzer-builder");
62
+ const slice_direction_1 = require("../../../util/slice-direction");
63
63
  /**
64
64
  * Each connection handles a single client, answering to its requests.
65
65
  * There is no need to construct this class manually, {@link FlowRServer} will do it for you.
@@ -235,7 +235,7 @@ class FlowRServerConnection {
235
235
  return;
236
236
  }
237
237
  const request = requestResult.message;
238
- this.logger.info(`[${request.filetoken}] Received ${request.direction ?? _00_slice_1.SliceDirection.Backward} slice request with criteria ${JSON.stringify(request.criterion)}`);
238
+ this.logger.info(`[${request.filetoken}] Received ${request.direction ?? slice_direction_1.SliceDirection.Backward} slice request with criteria ${JSON.stringify(request.criterion)}`);
239
239
  const fileInformation = this.fileMap.get(request.filetoken);
240
240
  if (!fileInformation) {
241
241
  (0, send_1.sendMessage)(this.socket, {
@@ -2,7 +2,7 @@ import type { IdMessageBase, MessageDefinition } from './all-messages';
2
2
  import type { SlicingCriteria } from '../../../../slicing/criterion/parse';
3
3
  import type { PipelineOutput } from '../../../../core/steps/pipeline/pipeline';
4
4
  import type { DEFAULT_DATAFLOW_PIPELINE, DEFAULT_SLICING_PIPELINE } from '../../../../core/steps/pipeline/default-pipelines';
5
- import { SliceDirection } from '../../../../core/steps/all/static-slicing/00-slice';
5
+ import { SliceDirection } from '../../../../util/slice-direction';
6
6
  /**
7
7
  * Can only be sent after you have sent the {@link FileAnalysisRequestMessage}.
8
8
  * Using the same `filetoken` as in the {@link FileAnalysisRequestMessage} you
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.responseSliceMessage = exports.requestSliceMessage = void 0;
37
37
  const Joi = __importStar(require("joi"));
38
- const _00_slice_1 = require("../../../../core/steps/all/static-slicing/00-slice");
38
+ const slice_direction_1 = require("../../../../util/slice-direction");
39
39
  exports.requestSliceMessage = {
40
40
  type: 'request-slice',
41
41
  schema: Joi.object({
@@ -43,7 +43,7 @@ exports.requestSliceMessage = {
43
43
  id: Joi.string().optional().description('The id of the message, if you passed one in the request.'),
44
44
  filetoken: Joi.string().required().description('The filetoken of the file to slice must be the same as with the analysis request.'),
45
45
  criterion: Joi.array().items(Joi.string()).min(0).required().required().description('The slicing criteria to use.'),
46
- direction: Joi.string().valid(...Object.values(_00_slice_1.SliceDirection)).description('The direction to slice in. Defaults to backward slicing if unset.')
46
+ direction: Joi.string().valid(...Object.values(slice_direction_1.SliceDirection)).description('The direction to slice in. Defaults to backward slicing if unset.')
47
47
  })
48
48
  };
49
49
  exports.responseSliceMessage = {