@eagleoutice/flowr 2.13.16 → 2.14.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 (196) hide show
  1. package/README.md +31 -31
  2. package/abstract-interpretation/absint-visitor.js +1 -1
  3. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  4. package/abstract-interpretation/data-frame/mappers/arguments.js +7 -4
  5. package/abstract-interpretation/data-frame/mappers/function-mapper.js +18 -17
  6. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +6 -6
  7. package/abstract-interpretation/data-frame/resolve-args.d.ts +9 -4
  8. package/abstract-interpretation/data-frame/resolve-args.js +10 -5
  9. package/benchmark/calibration.d.ts +12 -5
  10. package/benchmark/calibration.js +42 -14
  11. package/benchmark/slicer.d.ts +1 -1
  12. package/benchmark/slicer.js +5 -4
  13. package/benchmark/stats/size-of.js +1 -1
  14. package/benchmark/summarizer/first-phase/process.d.ts +2 -0
  15. package/benchmark/summarizer/first-phase/process.js +2 -0
  16. package/cli/common/options.d.ts +0 -31
  17. package/cli/common/options.js +1 -8
  18. package/cli/common/scripts-info.d.ts +0 -38
  19. package/cli/common/scripts-info.js +0 -8
  20. package/cli/repl/core.js +1 -1
  21. package/cli/repl/parser/slice-query-parser.js +1 -1
  22. package/cli/repl/print-version.js +2 -2
  23. package/config.d.ts +16 -0
  24. package/config.js +79 -0
  25. package/control-flow/extract-cfg.js +1 -1
  26. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  27. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  28. package/control-flow/useless-loop.js +1 -1
  29. package/core/print/slice-diff-ansi.js +1 -1
  30. package/core/steps/pipeline/create-pipeline.js +1 -1
  31. package/dataflow/cluster.js +2 -2
  32. package/dataflow/environments/built-in-props.d.ts +8 -1
  33. package/dataflow/environments/built-in-props.js +18 -0
  34. package/dataflow/environments/built-in.d.ts +7 -1
  35. package/dataflow/environments/built-in.js +42 -3
  36. package/dataflow/environments/default-builtin-config.d.ts +442 -10
  37. package/dataflow/environments/default-builtin-config.js +188 -18
  38. package/dataflow/environments/environment.d.ts +1 -1
  39. package/dataflow/environments/identifier.d.ts +7 -2
  40. package/dataflow/environments/identifier.js +6 -1
  41. package/dataflow/environments/query-fn-props.js +2 -2
  42. package/dataflow/environments/reference-to-maybe.js +5 -5
  43. package/dataflow/environments/resolve-by-name.d.ts +3 -0
  44. package/dataflow/environments/resolve-by-name.js +30 -5
  45. package/dataflow/environments/resolve-helper.d.ts +6 -0
  46. package/dataflow/environments/resolve-helper.js +6 -0
  47. package/dataflow/eval/resolve/alias-tracking.d.ts +5 -0
  48. package/dataflow/eval/resolve/alias-tracking.js +21 -14
  49. package/dataflow/eval/resolve/node-value.d.ts +6 -0
  50. package/dataflow/eval/resolve/node-value.js +15 -9
  51. package/dataflow/eval/resolve/resolve-argument.js +2 -2
  52. package/dataflow/eval/resolve/resolve-numbers.js +2 -2
  53. package/dataflow/eval/resolve/resolve-operators.js +4 -3
  54. package/dataflow/eval/resolve/resolve-strings.js +3 -3
  55. package/dataflow/eval/resolve/resolve-working-directory.js +2 -1
  56. package/dataflow/eval/resolve/resolve.d.ts +5 -5
  57. package/dataflow/eval/resolve/resolve.js +10 -11
  58. package/dataflow/eval/values/general.d.ts +4 -1
  59. package/dataflow/eval/values/general.js +1 -1
  60. package/dataflow/extractor.js +2 -1
  61. package/dataflow/fn/exceptions-of-function.js +5 -4
  62. package/dataflow/fn/higher-order-function.js +5 -4
  63. package/dataflow/graph/call-graph.js +14 -14
  64. package/dataflow/graph/df-helper.d.ts +15 -0
  65. package/dataflow/graph/df-helper.js +10 -4
  66. package/dataflow/graph/diff-dataflow-graph.js +6 -6
  67. package/dataflow/graph/edge.d.ts +27 -0
  68. package/dataflow/graph/edge.js +33 -0
  69. package/dataflow/graph/graph-helper.d.ts +3 -4
  70. package/dataflow/graph/graph-helper.js +4 -5
  71. package/dataflow/graph/graph.d.ts +11 -1
  72. package/dataflow/graph/graph.js +16 -5
  73. package/dataflow/graph/vertex.d.ts +42 -6
  74. package/dataflow/graph/vertex.js +42 -6
  75. package/dataflow/internal/linker.d.ts +1 -0
  76. package/dataflow/internal/linker.js +11 -9
  77. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -2
  78. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  79. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -5
  80. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +2 -2
  81. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -7
  82. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -6
  83. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -0
  84. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +19 -18
  85. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +6 -1
  86. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  87. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -2
  88. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -2
  89. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +5 -5
  90. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +1 -1
  91. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -3
  92. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -3
  93. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -2
  94. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  95. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +3 -3
  96. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +3 -1
  97. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +15 -12
  98. package/dataflow/internal/process/functions/call/common.d.ts +9 -1
  99. package/dataflow/internal/process/functions/call/common.js +17 -6
  100. package/dataflow/internal/process/functions/call/deferred.js +2 -1
  101. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +3 -1
  102. package/dataflow/internal/process/functions/call/known-call-handling.js +6 -3
  103. package/dataflow/internal/process/functions/call/named-call-handling.js +44 -12
  104. package/dataflow/internal/process/functions/call/nse.d.ts +33 -5
  105. package/dataflow/internal/process/functions/call/nse.js +113 -6
  106. package/dataflow/internal/process/functions/call/quoted.d.ts +5 -0
  107. package/dataflow/internal/process/functions/call/quoted.js +21 -9
  108. package/dataflow/origin/dfg-get-origin.d.ts +1 -0
  109. package/dataflow/origin/dfg-get-origin.js +9 -6
  110. package/documentation/data/faq/faqs.js +88 -88
  111. package/documentation/data/faq/recommended-configs.js +1 -1
  112. package/documentation/data/faq/wiki-faq-store.js +1 -1
  113. package/documentation/doc-capabilities.js +1 -1
  114. package/documentation/doc-readme.js +1 -1
  115. package/documentation/doc-util/doc-auto-gen.js +6 -2
  116. package/documentation/doc-util/doc-functions.js +1 -1
  117. package/documentation/wiki-cfg.js +2 -2
  118. package/documentation/wiki-create-linting-rules.js +45 -45
  119. package/documentation/wiki-dataflow-graph.js +17 -18
  120. package/documentation/wiki-linting-and-testing.js +93 -5
  121. package/documentation/wiki-mk/doc-maker.js +1 -1
  122. package/documentation/wiki-overview.js +12 -1
  123. package/documentation/wiki-signature-database.js +3 -0
  124. package/linter/rules/file-path-validity.js +1 -1
  125. package/linter/rules/function-finder-util.js +1 -1
  126. package/linter/rules/naming-convention.js +1 -1
  127. package/linter/rules/no-leaked-credentials.js +2 -1
  128. package/linter/rules/stop-with-call-arg.js +4 -4
  129. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  130. package/linter/rules/undefined-symbol-util.js +5 -4
  131. package/linter/rules/undefined-symbol.js +3 -3
  132. package/linter/rules/unused-definition.js +2 -1
  133. package/package.json +35 -45
  134. package/project/context/flowr-analyzer-environment-context.d.ts +23 -0
  135. package/project/context/flowr-analyzer-environment-context.js +25 -0
  136. package/project/dependency-version-space.js +1 -2
  137. package/project/flowr-analyzer.js +1 -1
  138. package/project/plugins/file-plugins/files/flowr-rda-file.js +3 -3
  139. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
  140. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +3 -1
  141. package/project/sigdb/build.js +16 -16
  142. package/project/sigdb/codec.d.ts +1 -1
  143. package/project/sigdb/codec.js +13 -13
  144. package/project/sigdb/decompress.d.ts +1 -1
  145. package/project/sigdb/decompress.js +33 -33
  146. package/project/sigdb/index-format.js +2 -2
  147. package/project/sigdb/manifest.js +21 -21
  148. package/project/sigdb/memory-source.d.ts +64 -0
  149. package/project/sigdb/memory-source.js +133 -0
  150. package/project/sigdb/reader.js +13 -13
  151. package/queries/catalog/call-context-query/call-context-query-executor.js +1 -1
  152. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -2
  153. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  154. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  155. package/queries/catalog/dependencies-query/link-devices.js +2 -2
  156. package/queries/catalog/does-call-query/does-call-query-executor.js +2 -1
  157. package/queries/catalog/input-sources-query/simple-input-classifier.js +4 -4
  158. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  159. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  160. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -0
  161. package/queries/catalog/signature-query/signature-query-executor.js +3 -2
  162. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +3 -3
  163. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +1 -1
  164. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -1
  165. package/r-bridge/retriever.d.ts +2 -1
  166. package/r-bridge/retriever.js +3 -2
  167. package/r-bridge/roxygen2/documentation-provider.d.ts +1 -0
  168. package/r-bridge/roxygen2/documentation-provider.js +1 -0
  169. package/r-bridge/roxygen2/roxygen-parse.d.ts +1 -1
  170. package/r-bridge/roxygen2/roxygen-parse.js +1 -1
  171. package/search/flowr-search-filters.d.ts +1 -1
  172. package/search/flowr-search-filters.js +2 -2
  173. package/search/search-executor/search-enrichers.js +4 -4
  174. package/search/search-executor/search-generators.js +1 -1
  175. package/slicing/criterion/parse.js +3 -3
  176. package/slicing/static/slice-call.d.ts +1 -1
  177. package/slicing/static/slice-call.js +2 -2
  178. package/slicing/static/static-slicer.js +4 -3
  179. package/util/assert.js +1 -1
  180. package/util/log.d.ts +4 -1
  181. package/util/log.js +15 -2
  182. package/util/logic.js +2 -2
  183. package/util/mermaid/cfg.js +1 -1
  184. package/util/mermaid/dfg.js +6 -6
  185. package/util/mermaid/mermaid.js +3 -1
  186. package/util/quads.js +19 -6
  187. package/util/schema.js +2 -2
  188. package/util/text/ansi.d.ts +2 -0
  189. package/util/text/ansi.js +8 -0
  190. package/util/text/name-rank.d.ts +29 -0
  191. package/util/text/name-rank.js +39 -0
  192. package/util/text/url-encoding.d.ts +15 -0
  193. package/util/text/url-encoding.js +59 -0
  194. package/util/version.js +1 -1
  195. package/cli/export-quads-app.d.ts +0 -7
  196. package/cli/export-quads-app.js +0 -44
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![flowR logo](https://raw.githubusercontent.com/wiki/flowr-analysis/flowr/img/flowR.png)](https://github.com/flowr-analysis/flowr/wiki)\
1
+ [![flowR logo](https://raw.githubusercontent.com/wiki/flowr-analysis/flowr/img/flowR.png)](https://flowr-analysis.github.io/flowr/)\
2
2
  [![QA (and potentially deploy)](https://github.com/flowr-analysis/flowr/actions/workflows/qa.yaml/badge.svg)](https://github.com/flowr-analysis/flowr/actions/workflows/qa.yaml)
3
3
  [![codecov](https://codecov.io/gh/flowr-analysis/flowr/graph/badge.svg)](https://codecov.io/gh/flowr-analysis/flowr)
4
4
  [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/eagleoutice/flowr?logo=docker&logoColor=white&label=dockerhub)](https://hub.docker.com/r/eagleoutice/flowr)
@@ -43,7 +43,7 @@ It offers a wide variety of features, for example:
43
43
 
44
44
  ```shell
45
45
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
46
- flowR repl v2.13.15, R grammar v14 (tree-sitter engine)
46
+ flowR repl v2.13.16, R grammar v14 (tree-sitter engine)
47
47
  R> :query @linter "read.csv(\"/root/x.txt\")"
48
48
  ```
49
49
 
@@ -52,7 +52,7 @@ It offers a wide variety of features, for example:
52
52
 
53
53
 
54
54
  ```text
55
- Query: linter (5 ms)
55
+ Query: linter (66 ms)
56
56
  ╰ Deprecated Functions (deprecated-functions): no findings
57
57
  ╰ File Path Validity (file-path-validity): no findings
58
58
  ╰ Seeded Randomness (seeded-randomness): no findings
@@ -67,7 +67,7 @@ It offers a wide variety of features, for example:
67
67
  ╰ Roxygen Arguments (roxygen-arguments): no findings
68
68
  ╰ No Leaked Credentials (no-leaked-credentials): no findings
69
69
  ╰ Undefined Symbol (undefined-symbol): no findings
70
- All queries together required ≈5 ms (1ms accuracy, total 5 ms)
70
+ All queries together required ≈66 ms (1ms accuracy, total 67 ms)
71
71
  ```
72
72
 
73
73
 
@@ -89,17 +89,17 @@ It offers a wide variety of features, for example:
89
89
 
90
90
  _Results (prettified and summarized):_
91
91
 
92
- Query: **linter** (7 ms)\
92
+ Query: **linter** (473 ms)\
93
93
     ╰ **Deprecated Functions** (deprecated-functions): _no findings_\
94
94
     ╰ **File Path Validity** (file-path-validity):\
95
95
         ╰ certain:\
96
96
             ╰ Path `/root/x.txt` at 1.1-23\
97
-        ╰ _Metadata_: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 1\
97
+        ╰ _Metadata_: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 5, processTimeMs: 2\
98
98
     ╰ **Seeded Randomness** (seeded-randomness): _no findings_\
99
99
     ╰ **Absolute Paths** (absolute-file-paths):\
100
100
         ╰ certain:\
101
101
             ╰ Path `/root/x.txt` at 1.1-23\
102
-        ╰ _Metadata_: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0\
102
+        ╰ _Metadata_: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 2, processTimeMs: 0\
103
103
     ╰ **Unused Definitions** (unused-definitions): _no findings_\
104
104
     ╰ **Network Functions** (network-functions): _no findings_\
105
105
     ╰ **Dataframe Access Validation** (dataframe-access-validation): _no findings_\
@@ -110,11 +110,11 @@ It offers a wide variety of features, for example:
110
110
     ╰ **Roxygen Arguments** (roxygen-arguments): _no findings_\
111
111
     ╰ **No Leaked Credentials** (no-leaked-credentials): _no findings_\
112
112
     ╰ **Undefined Symbol** (undefined-symbol): _no findings_\
113
- _All queries together required ≈7 ms (1ms accuracy, total 8 ms)_
113
+ _All queries together required ≈473 ms (1ms accuracy, total 479 ms)_
114
114
 
115
115
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
116
116
 
117
- The analysis required _8.3 ms_ (including parsing and normalization and the query) within the generation environment.
117
+ The analysis required _479.0 ms_ (including parsing and normalization and the query) within the generation environment.
118
118
 
119
119
  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.
120
120
  Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
@@ -131,8 +131,8 @@ It offers a wide variety of features, for example:
131
131
  ".meta": {
132
132
  "totalCalls": 0,
133
133
  "totalFunctionDefinitions": 0,
134
- "searchTimeMs": 1,
135
- "processTimeMs": 1
134
+ "searchTimeMs": 112,
135
+ "processTimeMs": 293
136
136
  }
137
137
  },
138
138
  "file-path-validity": {
@@ -154,8 +154,8 @@ It offers a wide variety of features, for example:
154
154
  "totalUnknown": 0,
155
155
  "totalWritesBeforeAlways": 0,
156
156
  "totalValid": 0,
157
- "searchTimeMs": 1,
158
- "processTimeMs": 1
157
+ "searchTimeMs": 5,
158
+ "processTimeMs": 2
159
159
  }
160
160
  },
161
161
  "seeded-randomness": {
@@ -166,7 +166,7 @@ It offers a wide variety of features, for example:
166
166
  "callsWithAssignmentProducers": 0,
167
167
  "callsWithNonConstantProducers": 0,
168
168
  "callsWithOtherBranchProducers": 0,
169
- "searchTimeMs": 0,
169
+ "searchTimeMs": 1,
170
170
  "processTimeMs": 0
171
171
  }
172
172
  },
@@ -186,7 +186,7 @@ It offers a wide variety of features, for example:
186
186
  ".meta": {
187
187
  "totalConsidered": 1,
188
188
  "totalUnknown": 0,
189
- "searchTimeMs": 0,
189
+ "searchTimeMs": 2,
190
190
  "processTimeMs": 0
191
191
  }
192
192
  },
@@ -195,7 +195,7 @@ It offers a wide variety of features, for example:
195
195
  ".meta": {
196
196
  "totalConsidered": 0,
197
197
  "searchTimeMs": 0,
198
- "processTimeMs": 0
198
+ "processTimeMs": 1
199
199
  }
200
200
  },
201
201
  "network-functions": {
@@ -203,8 +203,8 @@ It offers a wide variety of features, for example:
203
203
  ".meta": {
204
204
  "totalCalls": 0,
205
205
  "totalFunctionDefinitions": 0,
206
- "searchTimeMs": 0,
207
- "processTimeMs": 1
206
+ "searchTimeMs": 1,
207
+ "processTimeMs": 2
208
208
  }
209
209
  },
210
210
  "dataframe-access-validation": {
@@ -214,13 +214,13 @@ It offers a wide variety of features, for example:
214
214
  "numAccesses": 0,
215
215
  "totalAccessed": 0,
216
216
  "searchTimeMs": 0,
217
- "processTimeMs": 0
217
+ "processTimeMs": 7
218
218
  }
219
219
  },
220
220
  "dead-code": {
221
221
  "results": [],
222
222
  ".meta": {
223
- "searchTimeMs": 0,
223
+ "searchTimeMs": 1,
224
224
  "processTimeMs": 0
225
225
  }
226
226
  },
@@ -228,7 +228,7 @@ It offers a wide variety of features, for example:
228
228
  "results": [],
229
229
  ".meta": {
230
230
  "numOfUselessLoops": 0,
231
- "searchTimeMs": 0,
231
+ "searchTimeMs": 1,
232
232
  "processTimeMs": 0
233
233
  }
234
234
  },
@@ -236,7 +236,7 @@ It offers a wide variety of features, for example:
236
236
  "results": [],
237
237
  ".meta": {
238
238
  "searchTimeMs": 0,
239
- "processTimeMs": 0
239
+ "processTimeMs": 1
240
240
  }
241
241
  },
242
242
  "stop-call": {
@@ -275,16 +275,16 @@ It offers a wide variety of features, for example:
275
275
  "subscript": 0
276
276
  },
277
277
  "searchTimeMs": 0,
278
- "processTimeMs": 1
278
+ "processTimeMs": 40
279
279
  }
280
280
  }
281
281
  },
282
282
  ".meta": {
283
- "timing": 7
283
+ "timing": 473
284
284
  }
285
285
  },
286
286
  ".meta": {
287
- "timing": 7
287
+ "timing": 473
288
288
  }
289
289
  }
290
290
  ```
@@ -348,7 +348,7 @@ It offers a wide variety of features, for example:
348
348
 
349
349
  ```shell
350
350
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
351
- flowR repl v2.13.15, R grammar v14 (tree-sitter engine)
351
+ flowR repl v2.13.16, R grammar v14 (tree-sitter engine)
352
352
  R> :query @static-slice (11@sum) file://test/testfiles/example.R
353
353
  ```
354
354
 
@@ -362,7 +362,7 @@ It offers a wide variety of features, for example:
362
362
  N <- 10
363
363
  for(i in 1:(N-1)) sum <- sum + i + w
364
364
  sum
365
- All queries together required ≈2 ms (1ms accuracy, total 2 ms)
365
+ All queries together required ≈30 ms (1ms accuracy, total 31 ms)
366
366
  ```
367
367
 
368
368
 
@@ -377,7 +377,7 @@ It offers a wide variety of features, for example:
377
377
  </details>
378
378
 
379
379
  * 🚀 **fast call-graph, data-, and control-flow graphs**\
380
- Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">78.5 ms</span></i> (as of Aug 14, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
380
+ Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">105.6 ms</span></i> (as of Aug 14, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
381
381
  _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,
382
382
  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).
383
383
 
@@ -413,7 +413,7 @@ It offers a wide variety of features, for example:
413
413
 
414
414
  ```shell
415
415
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
416
- flowR repl v2.13.15, R grammar v14 (tree-sitter engine)
416
+ flowR repl v2.13.16, R grammar v14 (tree-sitter engine)
417
417
  R> :dataflow* test/testfiles/example.R
418
418
  ```
419
419
 
@@ -686,7 +686,7 @@ It offers a wide variety of features, for example:
686
686
  ```
687
687
 
688
688
 
689
- (The analysis required _1.7 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment. No [signature database](https://github.com/flowr-analysis/flowr/wiki/Signature-Database) is mounted for these generated graphs, so `library()` calls attach no package exports; base-R names are still qualified via the generated base-package store (e.g. `acf` as `stats::acf`).)
689
+ (The analysis required _4.4 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment. No [signature database](https://github.com/flowr-analysis/flowr/wiki/Signature-Database) is mounted for these generated graphs, so `library()` calls attach no package exports; base-R names are still qualified via the generated base-package store (e.g. `acf` as `stats::acf`).)
690
690
 
691
691
 
692
692
 
@@ -889,6 +889,6 @@ and received an unrestricted gift from [Posit](https://posit.co/), the open-sour
889
889
 
890
890
  ### Generation Notice
891
891
 
892
- Please notice that this file was generated automatically using the file [src/documentation/doc-readme.ts](https://github.com/flowr-analysis/flowr/tree/main/src/documentation/doc-readme.ts) as a source.\
892
+ Please notice that this file was generated automatically using the file [doc-readme.ts](https://github.com/flowr-analysis/flowr/tree/main/src/documentation/doc-readme.ts "src/documentation/doc-readme.ts") as a source.\
893
893
  If you want to make changes please edit the source file (the CI will take care of the rest).
894
894
  In fact, many files in the [wiki](https://github.com/flowr-analysis/flowr/wiki) are generated, so make sure to check for the source file if you want to make changes.
@@ -300,7 +300,7 @@ class AbstractInterpretationVisitor extends semantic_cfg_guided_visitor_1.Semant
300
300
  return true;
301
301
  }
302
302
  const dataflowVertex = this.getDataflowGraph(nodeId);
303
- if (dataflowVertex?.tag !== vertex_1.VertexType.FunctionCall || !Array.isArray(dataflowVertex.origin)) {
303
+ if (!vertex_1.FunctionCallVertex.is(dataflowVertex) || !Array.isArray(dataflowVertex.origin)) {
304
304
  return false;
305
305
  }
306
306
  const origin = dataflowVertex.origin;
@@ -6,8 +6,8 @@ const config_1 = require("../../../config");
6
6
  const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
7
7
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
8
8
  const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
9
- const resolve_args_1 = require("../resolve-args");
10
9
  const arguments_1 = require("./arguments");
10
+ const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
11
11
  /**
12
12
  * Maps a concrete data frame access operation to abstract data frame operations.
13
13
  * @param node - The R node of the access
@@ -33,7 +33,7 @@ function mapDataFrameNamedColumnAccess(access, inference, info) {
33
33
  if (!(0, arguments_1.isDataFrameArgument)(dataFrame, inference)) {
34
34
  return;
35
35
  }
36
- const colname = (0, resolve_args_1.resolveIdToArgValueSymbolName)(access.access[0], info);
36
+ const colname = resolve_helper_1.Resolve.argument.symbolName(access.access[0], info);
37
37
  return [{
38
38
  operation: 'accessCols',
39
39
  operand: dataFrame.info.id,
@@ -57,7 +57,7 @@ function mapDataFrameIndexColRowAccess(access, inference, info) {
57
57
  let rows = undefined;
58
58
  let columns = undefined;
59
59
  if (rowArg !== undefined && rowArg !== r_function_call_1.EmptyArgument) {
60
- const rowValue = (0, resolve_args_1.resolveIdToArgValue)(rowArg, info);
60
+ const rowValue = resolve_helper_1.Resolve.argument.value(rowArg, info);
61
61
  if (typeof rowValue === 'number') {
62
62
  rows = [rowValue];
63
63
  }
@@ -71,7 +71,7 @@ function mapDataFrameIndexColRowAccess(access, inference, info) {
71
71
  });
72
72
  }
73
73
  if (colArg !== undefined && colArg !== r_function_call_1.EmptyArgument) {
74
- const colValue = (0, resolve_args_1.resolveIdToArgValue)(colArg, info);
74
+ const colValue = resolve_helper_1.Resolve.argument.value(colArg, info);
75
75
  if (typeof colValue === 'number') {
76
76
  columns = [colValue];
77
77
  }
@@ -24,6 +24,8 @@ const assert_1 = require("../../../util/assert");
24
24
  const files_1 = require("../../../util/files");
25
25
  const resolve_args_1 = require("../resolve-args");
26
26
  const identifier_1 = require("../../../dataflow/environments/identifier");
27
+ const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
28
+ const nse_1 = require("../../../dataflow/internal/process/functions/call/nse");
27
29
  /** Regular expression representing valid columns names, e.g. for `data.frame` */
28
30
  const ColNamesRegex = /^[A-Za-z.][A-Za-z0-9_.]*$/;
29
31
  /** Regular expression representing line terminations (LF, CRLF, CR) */
@@ -82,7 +84,7 @@ function filterValidNames(colnames, checkNames, noDupNames, noEmptyNames, collap
82
84
  function getArgumentValue(args, argument, info) {
83
85
  const arg = getFunctionArgument(args, argument, info);
84
86
  const defaultValue = typeof argument !== 'string' ? argument.default : undefined;
85
- return arg !== undefined ? (0, resolve_args_1.resolveIdToArgValue)(arg, info) : defaultValue;
87
+ return arg !== undefined ? resolve_helper_1.Resolve.argument.value(arg, info) : defaultValue;
86
88
  }
87
89
  /**
88
90
  * Gets all effective argument from a list of arguments by removing all arguments whose names should be excluded.
@@ -105,7 +107,7 @@ function getFunctionArgument(args, argument, info) {
105
107
  const name = typeof argument !== 'string' ? argument.name : argument;
106
108
  let arg = undefined;
107
109
  if (name !== undefined) {
108
- arg = args.find(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info) === name);
110
+ arg = args.find(arg => resolve_helper_1.Resolve.argument.toName(arg, info) === name);
109
111
  }
110
112
  const hasArgPos = arg === undefined && pos >= 0 && pos < args.length && args[pos] !== r_function_call_1.EmptyArgument && args[pos].name === undefined;
111
113
  if (hasArgPos) {
@@ -145,7 +147,8 @@ function getUnresolvedSymbolsInExpression(expression, dfg) {
145
147
  const vertex = dfg.get(node.info.id);
146
148
  const symbolName = identifier_1.Identifier.mapName(node.content, resolve_args_1.unquoteArgument);
147
149
  // ignore symbols named ".", as they are used as argument placeholder in magrittr pipe operations
148
- if (vertex_1.UseVertex.is(vertex?.[0]) && vertex[1].size === 0 && symbolName !== '.') {
150
+ /* the mask read the dataflow adds to a column keeps the name a column, so ask the mark rather than the edges */
151
+ if (vertex_1.UseVertex.is(vertex?.[0]) && symbolName !== '.' && (vertex[1].size === 0 || nse_1.Nse.maskedName(dfg, node.info.id))) {
149
152
  unresolvedSymbols.push(symbolName);
150
153
  }
151
154
  }
@@ -166,7 +169,7 @@ function hasCriticalArgument(args, critical, info) {
166
169
  continue;
167
170
  }
168
171
  else if (typeof param !== 'string' && param.default !== undefined) {
169
- const value = (0, resolve_args_1.resolveIdToArgValue)(arg, info);
172
+ const value = resolve_helper_1.Resolve.argument.value(arg, info);
170
173
  if (value !== undefined && value === param.default) {
171
174
  continue;
172
175
  }
@@ -14,6 +14,7 @@ const semantics_1 = require("../semantics");
14
14
  const arguments_1 = require("./arguments");
15
15
  const identifier_1 = require("../../../dataflow/environments/identifier");
16
16
  const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
17
+ const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
17
18
  /**
18
19
  * Represents the different types of data frames in R
19
20
  */
@@ -594,8 +595,8 @@ function mapDataFrameCreate(args, params, inference, info) {
594
595
  const checkNames = (0, arguments_1.getArgumentValue)(args, params.checkNames, info);
595
596
  const noDupNames = (0, arguments_1.getArgumentValue)(args, params.noDupNames, info);
596
597
  args = (0, arguments_1.getEffectiveArgs)(args, params.special);
597
- const argNames = args.map(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info));
598
- const argLengths = args.map(arg => (0, resolve_args_1.resolveIdToArgVectorLength)(arg, info));
598
+ const argNames = args.map(arg => resolve_helper_1.Resolve.argument.toName(arg, info));
599
+ const argLengths = args.map(arg => resolve_helper_1.Resolve.argument.vectorLength(arg, info));
599
600
  const allVectors = argLengths.every(assert_1.isNotUndefined);
600
601
  const rows = allVectors ? Math.max(...argLengths, 0) : undefined;
601
602
  let colnames = argNames;
@@ -704,8 +705,8 @@ function mapDataFrameColBind(args, params, inference, info) {
704
705
  operand = undefined;
705
706
  // added columns are top if argument cannot be resolved to constant (vector-like) value
706
707
  }
707
- else if ((0, resolve_args_1.resolveIdToArgValue)(arg, info) !== undefined) {
708
- const colname = (0, resolve_args_1.resolveIdToArgName)(arg, info);
708
+ else if (resolve_helper_1.Resolve.argument.value(arg, info) !== undefined) {
709
+ const colname = resolve_helper_1.Resolve.argument.toName(arg, info);
709
710
  colnames?.push(colname);
710
711
  }
711
712
  else {
@@ -746,7 +747,7 @@ function mapDataFrameRowBind(args, params, inference, info) {
746
747
  operand = undefined;
747
748
  // number of added rows is top if arguments cannot be resolved to constant (vector-like) value
748
749
  }
749
- else if ((0, resolve_args_1.resolveIdToArgValue)(arg, info) !== undefined) {
750
+ else if (resolve_helper_1.Resolve.argument.value(arg, info) !== undefined) {
750
751
  rows = rows !== undefined ? rows + 1 : undefined;
751
752
  }
752
753
  else {
@@ -804,7 +805,7 @@ function mapDataFrameSubset(args, params, inference, info) {
804
805
  const result = [];
805
806
  let operand = dataFrame.value;
806
807
  const filterArg = (0, arguments_1.getFunctionArgument)(args, params.subset, info);
807
- const filterValue = (0, resolve_args_1.resolveIdToArgValue)(filterArg, info);
808
+ const filterValue = resolve_helper_1.Resolve.argument.value(filterArg, info);
808
809
  const selectArg = (0, arguments_1.getFunctionArgument)(args, params.select, info);
809
810
  const dropArg = (0, arguments_1.getFunctionArgument)(args, params.drop, info);
810
811
  const condition = typeof filterValue === 'boolean' ? filterValue : undefined;
@@ -868,9 +869,9 @@ function mapDataFrameFilter(args, params, inference, info) {
868
869
  }
869
870
  const result = [];
870
871
  const filterArgs = args.filter(arg => arg !== dataFrame);
871
- const filterValues = filterArgs.map(arg => (0, resolve_args_1.resolveIdToArgValue)(arg, info));
872
+ const filterValues = filterArgs.map(arg => resolve_helper_1.Resolve.argument.value(arg, info));
872
873
  const accessedNames = filterArgs.flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph).map(identifier_1.Identifier.getName));
873
- const condition = filterValues.every(value => typeof value === 'boolean') ? filterValues.every(cond => cond) : undefined;
874
+ const condition = filterValues.every(value => typeof value === 'boolean') ? filterValues.every(Boolean) : undefined;
874
875
  if (accessedNames.length > 0) {
875
876
  result.push({
876
877
  operation: 'accessCols',
@@ -952,10 +953,10 @@ function mapDataFrameMutate(args, params, inference, info) {
952
953
  const mutateArgs = args.filter(arg => arg !== dataFrame);
953
954
  let deletedCols = mutateArgs
954
955
  .filter(arguments_1.isRNull)
955
- .map(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info));
956
+ .map(arg => resolve_helper_1.Resolve.argument.toName(arg, info));
956
957
  let mutatedCols = mutateArgs
957
958
  .filter(arg => !(0, arguments_1.isRNull)(arg))
958
- .map(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info));
959
+ .map(arg => resolve_helper_1.Resolve.argument.toName(arg, info));
959
960
  // only column names that are not created by mutation are preconditions on the operand
960
961
  const accessedNames = mutateArgs
961
962
  .flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph).map(identifier_1.Identifier.toString))
@@ -1001,7 +1002,7 @@ function mapDataFrameGroupBy(args, params, inference, info) {
1001
1002
  const result = [];
1002
1003
  const byArgs = args.filter(arg => arg !== dataFrame);
1003
1004
  const accessedNames = byArgs.flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph)).map(identifier_1.Identifier.toString);
1004
- const byNames = byArgs.map(arg => r_argument_1.RArgument.isNamed(arg) ? (0, resolve_args_1.resolveIdToArgName)(arg, info) : (0, resolve_args_1.resolveIdToArgValueSymbolName)(arg, info));
1005
+ const byNames = byArgs.map(arg => r_argument_1.RArgument.isNamed(arg) ? resolve_helper_1.Resolve.argument.toName(arg, info) : resolve_helper_1.Resolve.argument.symbolName(arg, info));
1005
1006
  const mutatedCols = byArgs.some(r_argument_1.RArgument.isNamed) || byNames.some(assert_1.isUndefined);
1006
1007
  if (accessedNames.length > 0) {
1007
1008
  result.push({
@@ -1026,7 +1027,7 @@ function mapDataFrameSummarize(args, params, inference, info) {
1026
1027
  }
1027
1028
  const result = [];
1028
1029
  const summarizeArgs = args.filter(arg => arg !== dataFrame);
1029
- const summarizedCols = summarizeArgs.map(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info));
1030
+ const summarizedCols = summarizeArgs.map(arg => resolve_helper_1.Resolve.argument.toName(arg, info));
1030
1031
  // only column names that are not created by summarize are preconditions on the operand
1031
1032
  const accessedNames = summarizeArgs
1032
1033
  .flatMap(arg => (0, arguments_1.getUnresolvedSymbolsInExpression)(arg, info.graph).map(identifier_1.Identifier.toString))
@@ -1066,7 +1067,7 @@ function mapDataFrameJoin(args, params, inference, info) {
1066
1067
  let byCols;
1067
1068
  const joinType = getJoinType(joinAll, joinLeft, joinRight);
1068
1069
  if (byArg !== undefined) {
1069
- const byValue = (0, resolve_args_1.resolveIdToArgValue)(byArg, info);
1070
+ const byValue = resolve_helper_1.Resolve.argument.value(byArg, info);
1070
1071
  if (typeof byValue === 'string' || typeof byValue === 'number') {
1071
1072
  byCols = [byValue];
1072
1073
  }
@@ -1132,7 +1133,7 @@ function getRequestFromRead(fileNameArg, textArg, params, info) {
1132
1133
  let source;
1133
1134
  let request;
1134
1135
  if (fileNameArg !== undefined && fileNameArg !== r_function_call_1.EmptyArgument) {
1135
- const fileName = (0, resolve_args_1.resolveIdToArgValue)(fileNameArg, info);
1136
+ const fileName = resolve_helper_1.Resolve.argument.value(fileNameArg, info);
1136
1137
  if (typeof fileName === 'string') {
1137
1138
  const text = (0, resolve_args_1.unescapeSpecialChars)(fileName);
1138
1139
  source = fileName;
@@ -1150,7 +1151,7 @@ function getRequestFromRead(fileNameArg, textArg, params, info) {
1150
1151
  }
1151
1152
  }
1152
1153
  else if (textArg !== undefined && textArg !== r_function_call_1.EmptyArgument) {
1153
- const text = (0, resolve_args_1.resolveIdToArgValue)(textArg, info);
1154
+ const text = resolve_helper_1.Resolve.argument.value(textArg, info);
1154
1155
  if (typeof text === 'string') {
1155
1156
  request = (0, retriever_1.requestFromInput)((0, resolve_args_1.unescapeSpecialChars)(text));
1156
1157
  }
@@ -1203,7 +1204,7 @@ function getSelectedColumns(args, info) {
1203
1204
  unselectedCols = joinColumns(unselectedCols, result.selectedCols);
1204
1205
  }
1205
1206
  else if (arg.value?.type === type_1.RType.BinaryOp && arg.value.operator === ':' && info.idMap !== undefined) {
1206
- const values = (0, resolve_args_1.resolveIdToArgValue)((0, make_argument_1.toUnnamedArgument)(arg.value, info.idMap), { ...info, resolve: config_1.VariableResolve.Disabled });
1207
+ const values = resolve_helper_1.Resolve.argument.value((0, make_argument_1.toUnnamedArgument)(arg.value, info.idMap), { ...info, resolve: config_1.VariableResolve.Disabled });
1207
1208
  if (Array.isArray(values) && values.every(value => typeof value === 'number')) {
1208
1209
  selectedCols = joinColumns(selectedCols, values.filter(value => value >= 0));
1209
1210
  unselectedCols = joinColumns(unselectedCols, values.filter(value => value < 0).map(Math.abs));
@@ -1213,7 +1214,7 @@ function getSelectedColumns(args, info) {
1213
1214
  }
1214
1215
  }
1215
1216
  else if (arg.value?.type === type_1.RType.Symbol || arg.value?.type === type_1.RType.String) {
1216
- selectedCols?.push((0, resolve_args_1.resolveIdToArgValueSymbolName)(arg, info));
1217
+ selectedCols?.push(resolve_helper_1.Resolve.argument.symbolName(arg, info));
1217
1218
  }
1218
1219
  else if (arg.value?.type === type_1.RType.Number) {
1219
1220
  selectedCols?.push(arg.value.content.num);
@@ -7,12 +7,12 @@ const make_argument_1 = require("../../../dataflow/internal/process/functions/ca
7
7
  const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
8
8
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
9
9
  const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
10
- const resolve_args_1 = require("../resolve-args");
11
10
  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");
15
14
  const built_in_proc_name_1 = require("../../../dataflow/environments/built-in-proc-name");
15
+ const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
16
16
  /** Mapper for mapping the supported data frame replacement functions to mapper functions */
17
17
  const DataFrameReplacementFunctionMapper = {
18
18
  'colnames': mapDataFrameColNamesAssignment,
@@ -60,7 +60,7 @@ function isDataFrameReplacement(functionName) {
60
60
  }
61
61
  function hasParentReplacement(node, dfg) {
62
62
  const parentVertex = node.info.parent ? dfg.getVertex(node.info.parent) : undefined;
63
- return vertex_1.FunctionCallVertex.is(parentVertex) && parentVertex.origin.includes(built_in_proc_name_1.BuiltInProcName.Replacement);
63
+ return vertex_1.FunctionCallVertex.hasOrigin(parentVertex, built_in_proc_name_1.BuiltInProcName.Replacement);
64
64
  }
65
65
  function mapDataFrameContentAssignment(access, expression, inference) {
66
66
  const dataFrame = access.accessed;
@@ -88,7 +88,7 @@ function mapDataFrameNamedColumnAssignment(access, expression, inference, info)
88
88
  if (!(0, arguments_1.isDataFrameArgument)(dataFrame, inference)) {
89
89
  return;
90
90
  }
91
- const colname = (0, resolve_args_1.resolveIdToArgValueSymbolName)(access.access[0], info);
91
+ const colname = resolve_helper_1.Resolve.argument.symbolName(access.access[0], info);
92
92
  if ((0, arguments_1.isRNull)(expression)) {
93
93
  return [{
94
94
  operation: 'removeCols',
@@ -116,7 +116,7 @@ function mapDataFrameIndexColRowAssignment(access, expression, inference, info)
116
116
  const rowArg = args.length < 2 ? undefined : args[0];
117
117
  const colArg = args.length < 2 ? args[0] : args[1];
118
118
  if (rowArg !== undefined && rowArg !== r_function_call_1.EmptyArgument) {
119
- const rowValue = (0, resolve_args_1.resolveIdToArgValue)(rowArg, info);
119
+ const rowValue = resolve_helper_1.Resolve.argument.value(rowArg, info);
120
120
  let rows = undefined;
121
121
  if (typeof rowValue === 'number') {
122
122
  rows = [rowValue];
@@ -131,7 +131,7 @@ function mapDataFrameIndexColRowAssignment(access, expression, inference, info)
131
131
  });
132
132
  }
133
133
  if (colArg !== undefined && colArg !== r_function_call_1.EmptyArgument) {
134
- const colValue = (0, resolve_args_1.resolveIdToArgValue)(colArg, info);
134
+ const colValue = resolve_helper_1.Resolve.argument.value(colArg, info);
135
135
  let columns = undefined;
136
136
  if (typeof colValue === 'string') {
137
137
  columns = [colValue];
@@ -166,7 +166,7 @@ function mapDataFrameColNamesAssignment(operand, expression, inference, info, pa
166
166
  return;
167
167
  }
168
168
  const argument = info.idMap !== undefined ? (0, make_argument_1.toUnnamedArgument)(expression, info.idMap) : r_function_call_1.EmptyArgument;
169
- const assignedNames = (0, resolve_args_1.resolveIdToArgStringVector)(argument, info);
169
+ const assignedNames = resolve_helper_1.Resolve.argument.stringVector(argument, info);
170
170
  return [{
171
171
  operation: 'setColNames',
172
172
  operand: operand.value?.info.id,
@@ -1,25 +1,30 @@
1
- import { type ResolveInfo } from '../../dataflow/eval/resolve/alias-tracking';
1
+ import type { ResolveInfo } from '../../dataflow/eval/resolve/alias-tracking';
2
2
  import type { RArgument } from '../../r-bridge/lang-4.x/ast/model/nodes/r-argument';
3
3
  import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
4
4
  import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
5
5
  /**
6
6
  * Returns the argument name of a function argument
7
+ * @useInstead {@link Resolve.argument.toName}
7
8
  */
8
9
  export declare function resolveIdToArgName(id: NodeId | RArgument<ParentInformation> | undefined, info: ResolveInfo): string | undefined;
9
10
  /**
10
- * Resolves the value of a function argument as string, number, boolean, or vector using {@link resolveIdToValue}
11
+ * Resolves the value of a function argument as string, number, boolean, or vector using {@link Resolve.toValue}
12
+ * @useInstead {@link Resolve.argument.value}
11
13
  */
12
14
  export declare function resolveIdToArgValue(id: NodeId | RArgument<ParentInformation> | undefined, info: ResolveInfo): string | number | boolean | (string | number | boolean)[] | undefined;
13
15
  /**
14
- * Resolves the value of a function argument to a string vector using {@link resolveIdToValue} and {@link unwrapRValueToString}
16
+ * Resolves the value of a function argument to a string vector using {@link Resolve.toValue} and {@link unwrapRValueToString}
17
+ * @useInstead {@link Resolve.argument.stringVector}
15
18
  */
16
19
  export declare function resolveIdToArgStringVector(id: NodeId | RArgument<ParentInformation> | undefined, info: ResolveInfo): string[] | undefined;
17
20
  /**
18
21
  * Returns the symbol name or string value of the value of a function argument
22
+ * @useInstead {@link Resolve.argument.symbolName}
19
23
  */
20
24
  export declare function resolveIdToArgValueSymbolName(id: NodeId | RArgument<ParentInformation> | undefined, info: ResolveInfo): string | undefined;
21
25
  /**
22
- * Resolves the vector length of the value of a function argument using {@link resolveIdToValue}
26
+ * Resolves the vector length of the value of a function argument using {@link Resolve.toValue}
27
+ * @useInstead {@link Resolve.argument.vectorLength}
23
28
  */
24
29
  export declare function resolveIdToArgVectorLength(id: NodeId | RArgument<ParentInformation> | undefined, info: ResolveInfo): number | undefined;
25
30
  /**
@@ -8,21 +8,23 @@ exports.resolveIdToArgVectorLength = resolveIdToArgVectorLength;
8
8
  exports.unquoteArgument = unquoteArgument;
9
9
  exports.unescapeQuotes = unescapeQuotes;
10
10
  exports.unescapeSpecialChars = unescapeSpecialChars;
11
- const alias_tracking_1 = require("../../dataflow/eval/resolve/alias-tracking");
12
11
  const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
13
12
  const assert_1 = require("../../util/assert");
14
13
  const r_value_1 = require("../../util/r-value");
15
14
  const strings_1 = require("../../util/text/strings");
16
15
  const identifier_1 = require("../../dataflow/environments/identifier");
16
+ const resolve_helper_1 = require("../../dataflow/environments/resolve-helper");
17
17
  /**
18
18
  * Returns the argument name of a function argument
19
+ * @useInstead {@link Resolve.argument.toName}
19
20
  */
20
21
  function resolveIdToArgName(id, info) {
21
22
  const node = resolveIdToArgument(id, info);
22
23
  return unquoteArgument(node?.name?.content);
23
24
  }
24
25
  /**
25
- * Resolves the value of a function argument as string, number, boolean, or vector using {@link resolveIdToValue}
26
+ * Resolves the value of a function argument as string, number, boolean, or vector using {@link Resolve.toValue}
27
+ * @useInstead {@link Resolve.argument.value}
26
28
  */
27
29
  function resolveIdToArgValue(id, info) {
28
30
  const unliftedValue = resolveArgToUnlifted(id, info);
@@ -37,7 +39,8 @@ function resolveIdToArgValue(id, info) {
37
39
  return undefined;
38
40
  }
39
41
  /**
40
- * Resolves the value of a function argument to a string vector using {@link resolveIdToValue} and {@link unwrapRValueToString}
42
+ * Resolves the value of a function argument to a string vector using {@link Resolve.toValue} and {@link unwrapRValueToString}
43
+ * @useInstead {@link Resolve.argument.stringVector}
41
44
  */
42
45
  function resolveIdToArgStringVector(id, info) {
43
46
  const unliftedValue = resolveArgToUnlifted(id, info);
@@ -55,6 +58,7 @@ function resolveIdToArgStringVector(id, info) {
55
58
  }
56
59
  /**
57
60
  * Returns the symbol name or string value of the value of a function argument
61
+ * @useInstead {@link Resolve.argument.symbolName}
58
62
  */
59
63
  function resolveIdToArgValueSymbolName(id, info) {
60
64
  const node = resolveIdToArgument(id, info);
@@ -67,7 +71,8 @@ function resolveIdToArgValueSymbolName(id, info) {
67
71
  return undefined;
68
72
  }
69
73
  /**
70
- * Resolves the vector length of the value of a function argument using {@link resolveIdToValue}
74
+ * Resolves the vector length of the value of a function argument using {@link Resolve.toValue}
75
+ * @useInstead {@link Resolve.argument.vectorLength}
71
76
  */
72
77
  function resolveIdToArgVectorLength(id, info) {
73
78
  const unliftedValue = resolveArgToUnlifted(id, info);
@@ -84,7 +89,7 @@ function resolveIdToArgVectorLength(id, info) {
84
89
  /** The unlifted value of a function argument, `undefined` if the argument carries no value. */
85
90
  function resolveArgToUnlifted(id, info) {
86
91
  const node = resolveIdToArgument(id, info);
87
- return node?.value !== undefined ? (0, r_value_1.unliftRValue)((0, alias_tracking_1.resolveIdToValue)(node.value, info)) : undefined;
92
+ return node?.value !== undefined ? (0, r_value_1.unliftRValue)(resolve_helper_1.Resolve.toValue(node.value, info)) : undefined;
88
93
  }
89
94
  function resolveIdToArgument(id, { graph, idMap }) {
90
95
  idMap ??= graph?.idMap;
@@ -7,12 +7,19 @@
7
7
  * and cheap (well below a second).
8
8
  * @module
9
9
  */
10
- /** How often the {@link calibrationRound} is repeated within one {@link runCalibration} call. */
11
- export declare const CalibrationRounds = 8;
10
+ /** How often the {@link calibrationRound} is timed within one {@link runCalibration} call. */
11
+ export declare const CalibrationReps = 6;
12
12
  /** How many elements a single {@link calibrationRound} works on. */
13
13
  export declare const CalibrationSize = 4096;
14
14
  /**
15
- * Runs the calibration workload {@link CalibrationRounds} times.
16
- * @returns a checksum, only returned so that the work cannot be optimized away
15
+ * Times {@link calibrationRound} {@link CalibrationReps} times and reports the fastest of them.
16
+ *
17
+ * The first round is thrown away: it pays for compiling the workload and would describe the engine
18
+ * rather than the machine. Of the rounds that follow, only the fastest counts, because every
19
+ * disturbance a shared runner can add (another job, a scheduler switch, a collection) can only ever
20
+ * make a round slower. That makes the number a statement about the machine, not about its bad luck.
21
+ * @returns the nanoseconds the fastest round took
17
22
  */
18
- export declare function runCalibration(): number;
23
+ export declare function runCalibration(): bigint;
24
+ /** the checksum of the rounds run so far, only exposed so that the workload has an observable effect */
25
+ export declare function calibrationChecksum(): number;