@eagleoutice/flowr 2.15.9 → 2.16.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 (244) hide show
  1. package/README.md +47 -41
  2. package/abstract-interpretation/absint-inference.d.ts +2 -2
  3. package/abstract-interpretation/absint-inference.js +32 -79
  4. package/abstract-interpretation/data-frame/arguments.js +11 -7
  5. package/benchmark/slicer.d.ts +0 -1
  6. package/benchmark/slicer.js +1 -2
  7. package/cli/repl/commands/repl-signature.js +12 -3
  8. package/config.d.ts +5 -1
  9. package/control-flow/cfg-properties.js +0 -22
  10. package/control-flow/happens-before.d.ts +7 -2
  11. package/control-flow/happens-before.js +55 -31
  12. package/control-flow/useless-loop.d.ts +1 -1
  13. package/control-flow/useless-loop.js +29 -42
  14. package/dataflow/environments/apply-kill.js +6 -2
  15. package/dataflow/environments/built-in-config.d.ts +2 -0
  16. package/dataflow/environments/built-in-props.d.ts +16 -1
  17. package/dataflow/environments/built-in-props.js +33 -20
  18. package/dataflow/environments/built-in.d.ts +8 -3
  19. package/dataflow/environments/built-in.js +52 -82
  20. package/dataflow/environments/default-builtin-config.d.ts +551 -21
  21. package/dataflow/environments/default-builtin-config.js +121 -45
  22. package/dataflow/environments/define.d.ts +3 -2
  23. package/dataflow/environments/define.js +4 -3
  24. package/dataflow/environments/deprecation-info.d.ts +45 -0
  25. package/dataflow/environments/deprecation-info.js +13 -0
  26. package/dataflow/environments/environment.d.ts +7 -5
  27. package/dataflow/environments/environment.js +55 -121
  28. package/dataflow/environments/identifier.d.ts +6 -2
  29. package/dataflow/environments/identifier.js +23 -69
  30. package/dataflow/environments/reference-to-maybe.d.ts +9 -0
  31. package/dataflow/environments/reference-to-maybe.js +23 -51
  32. package/dataflow/environments/resolve-by-name.js +37 -76
  33. package/dataflow/eval/resolve/resolve-argument.d.ts +3 -1
  34. package/dataflow/eval/resolve/resolve-argument.js +61 -64
  35. package/dataflow/eval/resolve/resolve-working-directory.d.ts +8 -2
  36. package/dataflow/eval/resolve/resolve-working-directory.js +12 -20
  37. package/dataflow/eval/resolve/resolve.d.ts +4 -0
  38. package/dataflow/eval/resolve/resolve.js +23 -14
  39. package/dataflow/extractor.js +180 -58
  40. package/dataflow/fn/class-declaration.d.ts +8 -13
  41. package/dataflow/fn/class-declaration.js +95 -116
  42. package/dataflow/fn/exceptions-of-function.js +68 -37
  43. package/dataflow/fn/frame-reflection.d.ts +12 -4
  44. package/dataflow/fn/frame-reflection.js +51 -41
  45. package/dataflow/fn/function-props.js +15 -33
  46. package/dataflow/fn/function-semantics.d.ts +11 -3
  47. package/dataflow/fn/function-semantics.js +6 -0
  48. package/dataflow/fn/higher-order-function.d.ts +9 -1
  49. package/dataflow/fn/higher-order-function.js +27 -24
  50. package/dataflow/fn/strict-function.d.ts +13 -0
  51. package/dataflow/fn/strict-function.js +291 -123
  52. package/dataflow/graph/call-graph.d.ts +7 -6
  53. package/dataflow/graph/call-graph.js +35 -46
  54. package/dataflow/graph/graph.d.ts +13 -1
  55. package/dataflow/graph/graph.js +74 -66
  56. package/dataflow/graph/vertex.d.ts +1 -1
  57. package/dataflow/info.d.ts +8 -1
  58. package/dataflow/info.js +24 -30
  59. package/dataflow/internal/control-flow.d.ts +31 -4
  60. package/dataflow/internal/control-flow.js +61 -39
  61. package/dataflow/internal/linker.d.ts +17 -8
  62. package/dataflow/internal/linker.js +286 -213
  63. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +179 -0
  64. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +874 -0
  65. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +3 -1
  66. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +60 -48
  67. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +4 -2
  68. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +135 -198
  69. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +7 -9
  70. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +5 -1
  71. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +21 -14
  72. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  73. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
  74. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +141 -146
  75. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +56 -24
  76. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +292 -253
  77. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  78. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +30 -32
  79. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +68 -67
  80. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +91 -129
  81. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -3
  82. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +16 -12
  83. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +4 -4
  84. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -35
  85. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -0
  86. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +8 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +5 -3
  88. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +13 -31
  89. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +1 -1
  90. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +42 -119
  91. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -3
  92. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +21 -21
  93. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -0
  94. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +93 -102
  95. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -3
  96. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +173 -114
  97. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -3
  98. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +23 -26
  99. package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
  100. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +34 -9
  101. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +1 -1
  102. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +119 -93
  103. package/dataflow/internal/process/functions/call/common.d.ts +4 -4
  104. package/dataflow/internal/process/functions/call/common.js +49 -71
  105. package/dataflow/internal/process/functions/call/deferred.d.ts +12 -2
  106. package/dataflow/internal/process/functions/call/deferred.js +81 -63
  107. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -2
  108. package/dataflow/internal/process/functions/call/known-call-handling.js +65 -68
  109. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +3 -5
  110. package/dataflow/internal/process/functions/call/named-call-handling.js +48 -19
  111. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
  112. package/dataflow/internal/process/functions/call/quoted.js +257 -154
  113. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +17 -38
  114. package/dataflow/internal/process/functions/process-parameter.js +25 -32
  115. package/dataflow/internal/process/process-symbol.js +4 -3
  116. package/dataflow/internal/program-order.d.ts +26 -0
  117. package/dataflow/internal/program-order.js +49 -0
  118. package/documentation/data/faq/faqs.js +3 -3
  119. package/documentation/data/interface/doc-writing-code.js +1 -2
  120. package/documentation/data/server/doc-data-server-messages.js +7 -7
  121. package/documentation/doc-capabilities.js +80 -34
  122. package/documentation/doc-util/doc-query.d.ts +0 -3
  123. package/documentation/doc-util/doc-query.js +4 -3
  124. package/documentation/wiki-analyzer.js +1 -1
  125. package/documentation/wiki-cfg.js +5 -6
  126. package/documentation/wiki-core.js +8 -8
  127. package/documentation/wiki-dataflow-graph.js +10 -11
  128. package/documentation/wiki-interface.js +2 -2
  129. package/documentation/wiki-linting-and-testing.js +3 -3
  130. package/documentation/wiki-overview.js +6 -6
  131. package/documentation/wiki-query.js +9 -101
  132. package/documentation/wiki-setup.js +23 -0
  133. package/documentation/wiki-signature-database.js +1 -1
  134. package/linter/linter-rules.d.ts +18 -9
  135. package/linter/rules/absolute-path.js +63 -87
  136. package/linter/rules/deprecated-functions.d.ts +1 -45
  137. package/linter/rules/deprecated-functions.js +24 -33
  138. package/linter/rules/file-path-validity.d.ts +4 -2
  139. package/linter/rules/file-path-validity.js +114 -80
  140. package/linter/rules/namespace-access.js +21 -33
  141. package/linter/rules/naming-convention.d.ts +1 -1
  142. package/linter/rules/naming-convention.js +60 -48
  143. package/linter/rules/network-functions.js +11 -7
  144. package/linter/rules/no-leaked-credentials.js +15 -18
  145. package/linter/rules/problematic-inputs.d.ts +2 -1
  146. package/linter/rules/problematic-inputs.js +39 -59
  147. package/linter/rules/roxygen-arguments.d.ts +9 -4
  148. package/linter/rules/roxygen-arguments.js +29 -48
  149. package/linter/rules/seeded-randomness.d.ts +7 -4
  150. package/linter/rules/seeded-randomness.js +128 -89
  151. package/linter/rules/stop-with-call-arg.d.ts +4 -2
  152. package/linter/rules/stop-with-call-arg.js +25 -22
  153. package/linter/rules/unclosed-connection.js +31 -24
  154. package/linter/rules/undefined-symbol.d.ts +4 -6
  155. package/linter/rules/undefined-symbol.js +58 -75
  156. package/linter/rules/unescaped-arguments.js +18 -44
  157. package/linter/rules/unused-definition.d.ts +6 -0
  158. package/linter/rules/unused-definition.js +105 -145
  159. package/linter/rules/unused-import.d.ts +3 -0
  160. package/linter/rules/unused-import.js +25 -43
  161. package/package.json +5 -2
  162. package/project/flowr-analyzer.d.ts +2 -0
  163. package/project/flowr-analyzer.js +28 -1
  164. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -2
  165. package/project/plugins/file-plugins/files/flowr-jupyter-file.js +8 -12
  166. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -2
  167. package/project/plugins/file-plugins/files/flowr-rda-file.js +10 -55
  168. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +7 -5
  169. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +34 -56
  170. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -1
  171. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +22 -45
  172. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  173. package/project/sigdb/build.js +4 -0
  174. package/project/sigdb/manifest.d.ts +2 -0
  175. package/project/sigdb/manifest.js +10 -1
  176. package/project/sigdb/reader.js +23 -61
  177. package/project/sigdb/sigdb-download.d.ts +29 -6
  178. package/project/sigdb/sigdb-download.js +212 -64
  179. package/queries/base-query-format.js +1 -2
  180. package/queries/catalog/absint-query/absint-query-format.js +1 -1
  181. package/queries/catalog/call-context-query/cascade-action.d.ts +3 -1
  182. package/queries/catalog/call-context-query/cascade-action.js +2 -0
  183. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +3 -0
  184. package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
  185. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -0
  186. package/queries/catalog/dataflow-query/dataflow-query-format.js +4 -7
  187. package/queries/catalog/dependencies-query/dependencies-query-executor.js +50 -114
  188. package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +5 -9
  189. package/queries/catalog/dependencies-query/function-info/library-functions.js +6 -0
  190. package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
  191. package/queries/catalog/dependencies-query/function-info/write-functions.js +7 -3
  192. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +4 -4
  193. package/queries/catalog/input-sources-query/simple-input-classifier.js +192 -301
  194. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -1
  195. package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
  196. package/queries/catalog/origin-query/origin-query-executor.js +2 -2
  197. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -2
  198. package/queries/catalog/origin-query/origin-query-format.js +1 -1
  199. package/queries/query.d.ts +1 -1
  200. package/r-bridge/data/data.d.ts +21 -14
  201. package/r-bridge/data/data.js +28 -20
  202. package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -1
  203. package/r-bridge/lang-4.x/ast/model/model.js +19 -43
  204. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  205. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
  206. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -12
  207. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  208. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  209. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  210. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  211. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  212. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
  213. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  214. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  215. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  216. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  217. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  218. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
  219. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  220. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  221. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  222. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  223. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  224. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  225. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  226. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  227. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +11 -2
  228. package/r-bridge/roxygen2/roxygen-parse.js +28 -42
  229. package/r-bridge/shell.js +6 -0
  230. package/search/search-executor/search-enrichers.js +25 -37
  231. package/slicing/static/slice-call.d.ts +4 -3
  232. package/slicing/static/slice-call.js +56 -88
  233. package/slicing/static/static-slicer.js +115 -79
  234. package/slicing/static/visiting-queue.d.ts +4 -6
  235. package/slicing/static/visiting-queue.js +9 -13
  236. package/util/files.d.ts +2 -0
  237. package/util/files.js +3 -1
  238. package/util/mermaid/mermaid.js +6 -2
  239. package/util/proc.js +2 -1
  240. package/util/r-base-packages.d.ts +2 -0
  241. package/util/r-base-packages.js +23 -13
  242. package/util/text/playground-link.d.ts +12 -3
  243. package/util/text/playground-link.js +18 -27
  244. package/util/version.js +4 -10
@@ -141,9 +141,10 @@ function tocForQueryType(type) {
141
141
  }
142
142
  return result.join('\n');
143
143
  }
144
- async function explainQuery(shell, ctx, id, { shortDescription, functionName, functionFile, buildExplanation }) {
144
+ async function explainQuery(shell, ctx, id, { shortDescription, buildExplanation }) {
145
145
  const name = getQueryTitle(id);
146
- const syntax = query_1.SupportedQueries[id]?.syntax;
146
+ const supported = query_1.SupportedQueries[id];
147
+ const syntax = supported?.syntax;
147
148
  return `
148
149
  ${(0, doc_auto_gen_1.autoGenHeader)({ filename: QueryDocFile, purpose: 'query API' })}
149
150
  ${(0, doc_structure_1.section)(name + `&emsp;<sup>[<a href="${doc_files_1.FlowrWikiBaseRef}/Query-API">overview</a>]</sup>`, 2, name)}
@@ -157,7 +158,7 @@ ${await buildExplanation(shell, ctx)}
157
158
 
158
159
  <summary style="color:gray">Implementation Details</summary>
159
160
 
160
- Responsible for the execution of the ${name} query is \`${functionName}\` in ${(0, doc_files_1.getFilePathMd)(functionFile)}.
161
+ The ${name} is executed by ${ctx.link((supported?.executor ?? virtual_queries_1.SupportedVirtualQueries[id]).name)}.
161
162
 
162
163
  </details>
163
164
 
@@ -296,7 +296,7 @@ ${(0, doc_structure_1.section)('Project Discovery', 4)}
296
296
  These plugins trigger when confronted with a project analysis request (see, ${ctx.link('RProjectAnalysisRequest')}).
297
297
  Their job is to identify the files that belong to the project and add them to the analysis.
298
298
  flowR provides the ${ctx.link(flowr_analyzer_project_discovery_plugin_1.FlowrAnalyzerProjectDiscoveryPlugin)} with a
299
- ${ctx.link(flowr_analyzer_project_discovery_plugin_1.FlowrAnalyzerProjectDiscoveryPlugin.defaultPlugin.name)} as the default implementation that simply collects all R source files in the given folder.
299
+ ${ctx.link(flowr_analyzer_project_discovery_plugin_1.FlowrAnalyzerProjectDiscoveryPlugin.defaultPlugin.name)} as the default implementation that collects all R source files in the given folder.
300
300
 
301
301
  Please note that all project discovery plugins should conform to the ${ctx.link(flowr_analyzer_project_discovery_plugin_1.FlowrAnalyzerProjectDiscoveryPlugin)} base class.
302
302
 
@@ -119,7 +119,7 @@ _flowR_ produces three main perspectives of the program: 1)&nbsp;a ${ctx.linkPag
119
119
  2)&nbsp;a ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}, and 3)&nbsp;a control flow graph&nbsp;(CFG).
120
120
  flowR uses this CFG interweaved with its data flow analysis and for some of its queries (e.g., to link to the last call in a ${(0, doc_query_1.linkToQueryOfName)('call-context')}).
121
121
 
122
- Please note that the control flow graph is a view on the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')},
122
+ The control flow graph is a view on the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')},
123
123
  similar to the ${ctx.linkPage('wiki/Dataflow Graph', 'call graph', 'perspectives-cg')}.
124
124
 
125
125
  ${(0, doc_structure_1.block)({
@@ -251,7 +251,7 @@ There are two kinds, told apart by the ${ctx.link('CfgEdgeType')} enum.
251
251
 
252
252
  ${(0, doc_structure_1.section)('Flow Edges', 4, 'cfg-flow-edge')}
253
253
 
254
- A flow edge says that the target simply runs next. In \`x; y\` there is one from \`x\` to \`y\`:
254
+ A flow edge says that the target runs next. In \`x; y\` there is one from \`x\` to \`y\`:
255
255
 
256
256
  ${await (0, doc_cfg_1.printCfgCode)(shell, 'x; y', { showCode: false, prefix: 'flowchart LR\n', ctx })}
257
257
 
@@ -278,7 +278,7 @@ ${await (async () => {
278
278
  })()}
279
279
  <br/>
280
280
 
281
- Please note that repeat loops have no control edges, as they repeat their body unconditionally.
281
+ Repeat loops have no control edges, as they repeat their body unconditionally.
282
282
  Additionally, the control flow graph does not have to be connected. If you use a repeat without any exit condition,
283
283
  the loop is never left, so its vertex is not reachable from the entry:
284
284
 
@@ -327,7 +327,7 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(shell, 'print(3)', { showCode: true,
327
327
 
328
328
  ${(0, doc_structure_1.section)('Adding Basic Blocks', 3, 'cfg-basic-blocks')}
329
329
 
330
- As mentioned in the introduction, our control flow graph does not use basic blocks by default and hence simply links all vertices independent of whether they have (un-)conditional jumps or not.
330
+ As mentioned in the introduction, our control flow graph does not use basic blocks by default and hence links all vertices independent of whether they have (un-)conditional jumps or not.
331
331
  On the upside, this tells us the execution order (and, in case of promises, forcing order) of involved expressions and seamlessly handles cases like
332
332
  \`x <- return(3)\`. On the downside, this makes it hard to apply classical control flow graph algorithms and, in general, makes the graph much harder to read.
333
333
  Yet, we can request basic blocks or transform an existing CFG into basic blocks using the ${ctx.link(cfg_to_basic_blocks_1.convertCfgToBasicBlocks)} function.
@@ -409,8 +409,7 @@ In general, we check for a hammock graph (given that the program contains no def
409
409
 
410
410
  ${(0, doc_structure_1.section)('Sophisticated CFG Traversal', 3, 'cfg-traversal')}
411
411
 
412
- The [simple traversal](#cfg-simple-traversal) functions are great for simple tasks, but very unhandy when you want to do something more sophisticated
413
- that incorporates language semantics such as function calls. Hence, we provide a series of incrementally more sophisticated (but complex)
412
+ The [simple traversal](#cfg-simple-traversal) functions are unhandy once you need language semantics such as function calls. Hence, we provide a series of incrementally more sophisticated (but complex)
414
413
  visitors that incorporate various alternative perspectives:
415
414
 
416
415
  - [Basic CFG Visitor](#cfg-traversal-basic):\\
@@ -370,7 +370,7 @@ We can see that it relies on three steps:
370
370
  3. **${ctx.link('STATIC_DATAFLOW', { codeFont: false })}** ([dataflow](#dataflow-graph-generation)): Produces the actual ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} from the normalized AST.\\
371
371
  _Its main function linked as the processor is the ${ctx.link(extractor_1.produceDataFlowGraph, { codeFont: false })} function._
372
372
 
373
- To explore these steps, let's use the REPL with the (very simple and contrived) R code: \`${sampleCode}\`.
373
+ To explore these steps, let's use the REPL with the (simple, contrived) R code: \`${sampleCode}\`.
374
374
 
375
375
  ${await (0, doc_repl_1.documentReplSession)(shell, [{
376
376
  command: `:parse "${sampleCode}"`,
@@ -421,10 +421,10 @@ ${await (async () => {
421
421
 
422
422
  ### Parsing
423
423
 
424
- The parsing step uses the ${ctx.link(shell_1.RShell)} to parse the input program (or, of course, the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} when using the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}).
424
+ The parsing step uses the ${ctx.link(shell_1.RShell)} to parse the input program (or the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} when using the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}).
425
425
  To speed up the process, we use the ${ctx.link(init_1.initCommand)} function to compile the parsing function and rely on a
426
426
  custom serialization, which outputs the information in a CSV-like format.
427
- This means, that the ${(0, doc_cli_option_1.getReplCommand)('parse')} command actually kind-of lies to you, as it does pretty print the serialized version which looks more like the following (this uses the ${ctx.link(retriever_1.retrieveParseDataFromRCode.name)} function with the sample code \`${sampleCode}\`):
427
+ The ${(0, doc_cli_option_1.getReplCommand)('parse')} command pretty-prints the serialized version, which looks more like the following (this uses the ${ctx.link(retriever_1.retrieveParseDataFromRCode.name)} function with the sample code \`${sampleCode}\`):
428
428
 
429
429
  ${(0, doc_structure_1.details)(`Raw parse output for <code>${sampleCode}</code>`, `For the code \`${sampleCode}\`:\n\n` + (0, doc_code_1.codeBlock)('csv', await (0, retriever_1.retrieveParseDataFromRCode)((0, retriever_1.requestFromInput)(sampleCode), shell)))}
430
430
 
@@ -526,11 +526,11 @@ While all of them are essentially empty when processing an “uninteresting leaf
526
526
 
527
527
  ${ctx.hierarchy(process_value_1.processValue, { maxDepth: 2, openTop: true })}
528
528
 
529
- Please note, that we add the ${ctx.linkPage('wiki/Dataflow Graph', 'value vertex', 'value-vertex')} to the newly created dataflow graph,
529
+ Note that we add the ${ctx.linkPage('wiki/Dataflow Graph', 'value vertex', 'value-vertex')} to the newly created dataflow graph,
530
530
  which holds a reference to the constant. If you are confused with the use of the ${ctx.link('ParentInformation')} type,
531
531
  this stems from the [AST decoration](#normalization) and signals that we have a decorated ${ctx.link(model_1.RNode)} (which may have additional information in \`OtherInfo\`).
532
532
 
533
- Yet again, this is not very interesting. When looking at the ${ctx.link('processors')} object you may be confused by
533
+ When looking at the ${ctx.link('processors')} object you may be confused by
534
534
  many lines just mapping the node to the ${ctx.link(process_named_call_1.processAsNamedCall)} function.
535
535
  This is because during the dataflow analysis we actually "desugar" the AST, and treat syntax constructs like binary operators (e.g., \`x + y\`) as function calls (e.g. \`\` \`+\`(x, y) \`\`).
536
536
  We do this, because R does it the same way, and allows to even overwrite these operators (including \`if\`, \`<-\`, etc.) by their name.
@@ -566,18 +566,18 @@ Afterward, we take the \`processedArguments\`, perform another round of sanity c
566
566
  semantic effects of the repeat loop. We first use one of flowR's linkers to
567
567
  ${ctx.link(linker_1.linkCircularRedefinitionsWithinALoop.name)} and then retrieve the active exit points with ${ctx.link(info_1.filterOutLoopExitPoints.name)}.
568
568
 
569
- Feel free to have a look around and explore the other handlers for now. Each of them uses the results of its children alongside the active backpack
569
+ Each of them uses the results of its children alongside the active backpack
570
570
  to produce a new dataflow information.
571
571
 
572
572
  ## Beyond the Dataflow Graph
573
573
 
574
574
  Given the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}, you can do a lot more!
575
575
  You can issue ${ctx.linkPage('wiki/Query API', 'queries')} to explore the graph, ${ctx.linkPage('wiki/Search API', 'search')} for specific elements, or, for example, request a [static backward slice](#static-backward-slicing).
576
- Of course, all of these endeavors work not just with the ${ctx.link(shell_1.RShell)} but also with the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}.
576
+ All of these work with both the ${ctx.link(shell_1.RShell)} and the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}.
577
577
 
578
578
  ### Static Backward Slicing
579
579
 
580
- The slicing is available as an extra step as you can see by inspecting he ${ctx.link('DEFAULT_SLICING_PIPELINE')}.
580
+ The slicing is available as an extra step, see the ${ctx.link('DEFAULT_SLICING_PIPELINE')}.
581
581
  Besides ${ctx.link('STATIC_SLICE')} it contains a ${ctx.link('NAIVE_RECONSTRUCT')} to print the slice as (executable) R code.
582
582
 
583
583
  Your main point of interesting here is the ${ctx.link(static_slicer_1.staticSlice.name)} function which relies on a modified
@@ -106,7 +106,7 @@ async function getVertexExplanations(parser, ctx) {
106
106
  type: vertex_1.VertexType.Value,
107
107
  description: `
108
108
  Describes a constant value (numbers, booleans/logicals, strings, ...).
109
- In general, the respective vertex is more or less a dummy vertex as you can see from its implementation.
109
+ The respective vertex is more or less a dummy vertex.
110
110
 
111
111
  ${ctx.hierarchy('DataflowGraphVertexValue')}
112
112
 
@@ -228,8 +228,7 @@ In this case, we have a function call vertex with id \`${callId}\` and the follo
228
228
 
229
229
  ${(0, doc_code_1.codeBlock)('json', JSON.stringify(callVert.args, json_1.jsonReplacer, 2))}
230
230
 
231
- Of course now, this is hard to read in this form (although the ids of the arguments can be mapped pretty easily to the visualization),
232
- as the \`type\` of these references is a bit-mask, encoding one of the following reference types:
231
+ This is hard to read in this form, as the \`type\` of these references is a bit-mask, encoding one of the following reference types:
233
232
 
234
233
  | Value | Reference Type |
235
234
  |------:|----------------|
@@ -338,7 +337,7 @@ Interesting program, right? Running this with \`u <- TRUE\` will cause the last
338
337
  operator to mean multiplication, while with \`u <- FALSE\` causes \`x\` to be assigned to \`3\`.
339
338
  In short: the last line may either refer to a definition or to a use of \`x\`, and we are not fully equipped to visualize this (this causes a warning).
340
339
  First of all how can you spot that something weird is happening? Well, this definition has a ${linkEdgeName(edge_1.EdgeType.Reads)} and a ${linkEdgeName(edge_1.EdgeType.DefinedBy)} edge,
341
- but this of course does not apply to the general case.
340
+ but this does not apply to the general case.
342
341
 
343
342
  For starters, let's have a look at the environment of the call to \`<-\` in the last line:
344
343
 
@@ -407,10 +406,10 @@ The implementation is relatively sparse and similar to the other marker vertices
407
406
  ${ctx.hierarchy('DataflowGraphVertexVariableDefinition')}
408
407
  Of only interest is \`par\`, which signals that the definitions is partial (e.g., in the case of \`x[a] <- 1\`).
409
408
 
410
- Of course, there are not just operators that define variables, but also functions, like \`assign\`.
409
+ Functions can define variables too, like \`assign\`.
411
410
 
412
411
  ${(0, doc_structure_1.details)('Example: Using <code>assign</code>', await (0, doc_dfg_1.printDfGraphForCode)(parser, 'assign("x", 1)\nx', { mark: new Set([1]), ctx })
413
- + `\nThe example may be misleading as the visualization prints the lexeme of the variable. However, this actually defines the variable \`x\` (without the quotes) as you can see with the ${linkEdgeName(edge_1.EdgeType.Reads)} edge.`)}
412
+ + `\nThe example may be misleading as the visualization prints the lexeme of the variable. However, this actually defines the variable \`x\` (without the quotes), as the ${linkEdgeName(edge_1.EdgeType.Reads)} edge shows.`)}
414
413
 
415
414
  Please be aware, that the name of the symbol defined may differ from what you read in the program as R allows the assignments to strings, escaped names, and more:
416
415
 
@@ -430,7 +429,7 @@ In this case, the definition of \`x\` is constrained by the conditional, which i
430
429
 
431
430
  ${finalEnvironment}
432
431
 
433
- As you can see, _flowR_ is able to recognize that the initial definition of \`x\` has no influence on the final value of the variable.
432
+ _flowR_ recognizes that the initial definition of \`x\` has no influence on the final value of the variable.
434
433
  `;
435
434
  })())}
436
435
 
@@ -471,7 +470,7 @@ ${(0, doc_structure_1.details)('Example: Nested Function Definitions', await (as
471
470
  return `
472
471
  ${text}
473
472
 
474
- As you can see, the vertex ids of the subflow do not contain those of nested function definitions but again only those which are part of the respective scope (creating a tree-like structure):
473
+ The vertex ids of the subflow do not contain those of nested function definitions but again only those which are part of the respective scope (creating a tree-like structure):
475
474
 
476
475
  | Id | Vertex Ids in Subflow |
477
476
  |---:|-----------------------|
@@ -498,7 +497,7 @@ Let's first consider the following dataflow graph (of \`${code}\`):
498
497
  ${text}
499
498
 
500
499
  The function definition we are interested in has the id \`${id}\`. Looking at the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} of the code,
501
- we can get the parameters simply be requesting the \`parameters\` property of the function definition (yielding the names: [${normalized.parameters.map(p => `\`${p.name.content}\``).join(', ')}]):
500
+ we can get the parameters by requesting the \`parameters\` property of the function definition (yielding the names: [${normalized.parameters.map(p => `\`${p.name.content}\``).join(', ')}]):
502
501
 
503
502
  ${ast}
504
503
  `;
@@ -607,7 +606,7 @@ However, nested definitions can carry it (in the nested case, \`x\` is defined b
607
606
  name: 'Returns Edge',
608
607
  type: edge_1.EdgeType.Returns,
609
608
  description: `Link the [function call](#function-call-vertex) to the exit points of the target definition (this may incorporate the call-context).
610
- As you can see in the example, this happens for user-defined functions (like \`foo\`) as well as for built-in functions (like \`<-\`).
609
+ This happens for user-defined functions (like \`foo\`) as well as for built-in functions (like \`<-\`).
611
610
  However, these edges are specific to scenarios in which flowR knows that a specific element is returned.
612
611
  For contrast, compare this to a use of, for example, \`+\`:
613
612
 
@@ -921,7 +920,7 @@ in the first line at the seventh character and ending in the first line at the n
921
920
  ${(0, doc_structure_1.section)('Arguments and Additional Information', 3, 'vtx-additional-info')}
922
921
 
923
922
  Some vertices (e.g., [function calls](#function-call-vertex)) have additional information, like the arguments of the call.
924
- As you can see with the \`if\` example above alongside the [vertex id](#vtx-id),
923
+ As in the \`if\` example above, alongside the [vertex id](#vtx-id),
925
924
  these vertices also have an additional line (prefixed with \`arg:\`) which lists the ids of the arguments in order to clear any ambiguity in case, for example,
926
925
  the mermaid graph layouting fumbles the order.
927
926
 
@@ -27,7 +27,7 @@ const flowr_analyzer_1 = require("../project/flowr-analyzer");
27
27
  async function explainServer(parser, ctx) {
28
28
  (0, doc_data_server_messages_1.documentAllServerMessages)(ctx);
29
29
  return `
30
- As explained in the ${ctx.linkPage('wiki/Overview', 'Overview')}, you can simply run the [TCP](https://de.wikipedia.org/wiki/Transmission_Control_Protocol)&nbsp;server by adding the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'server', true)} flag (and, due to the interactive mode, exit with the conventional <kbd>CTRL</kbd>+<kbd>C</kbd>).
30
+ As explained in the ${ctx.linkPage('wiki/Overview', 'Overview')}, you can run the [TCP](https://de.wikipedia.org/wiki/Transmission_Control_Protocol)&nbsp;server by adding the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'server', true)} flag (and, due to the interactive mode, exit with the conventional <kbd>CTRL</kbd>+<kbd>C</kbd>).
31
31
  Currently, every connection is handled by the same underlying \`${shell_1.RShell.name}\` - so the server is not designed to handle many clients at a time.
32
32
  Additionally, the server is not well guarded against attacks (e.g., you can theoretically spawn an arbitrary number of&nbsp;${shell_1.RShell.name} sessions on the target machine).
33
33
 
@@ -103,7 +103,7 @@ async function explainRepl(parser, ctx) {
103
103
  > Please be aware that this introduces a security risk and note that this relies on the ${ctx.linkPage('wiki/Engines', '`r-shell` engine')} .
104
104
 
105
105
  Although primarily meant for users to explore,
106
- there is nothing which forbids simply calling _flowR_ as a subprocess to use standard-in, -output, and -error
106
+ there is nothing which forbids calling _flowR_ as a subprocess to use standard-in, -output, and -error
107
107
  for communication (although you can access the REPL using the server as well,
108
108
  with the [REPL Request](#message-request-repl-execution) message).
109
109
 
@@ -52,7 +52,7 @@ for the latest benchmark results, see the ${ctx.linkPage('flowr:benchmarks', 'be
52
52
  ## 🏨 Testing Suites
53
53
 
54
54
  Currently, flowR contains four testing suites: one for [functionality](#functionality-tests),
55
- one for [system tests](#system-tests), one for [mutation tests](#mutation-tests), and one for [performance](#performance-tests). We explain each of them in the following.
55
+ one for [system tests](#system-tests), one for [mutation tests](#mutation-tests), and one for [performance](#performance-tests).
56
56
  In addition to running those tests, you can use the more generalized \`npm run checkup\`.
57
57
  This command includes the construction of the docker image, the generation of the wiki and landing pages, and the linter.
58
58
  It runs these jobs concurrently but caps the test workers so the combined run fits the machine (it splits the
@@ -124,7 +124,7 @@ The resulting labels are used in the test report that is generated as part of th
124
124
  They group tests by the capabilities they test and allow the report to display how many tests ensure that any given capability is properly supported.
125
125
  The report can be found on flowR's ${ctx.linkPage('flowr:capabilities', 'capabilities page')}.
126
126
 
127
- To add new labels, simply add them to the relevant section in ${(0, doc_files_1.getFilePathMd)('../r-bridge/data/data.ts')} as part of a pull request.
127
+ To add new labels, add them to the relevant section in ${(0, doc_files_1.getFilePathMd)('../r-bridge/data/data.ts')} as part of a pull request.
128
128
 
129
129
  <a id='writing-a-test'></a>
130
130
  #### 🖋️ Writing a Test
@@ -313,7 +313,7 @@ Otherwise, the tests will not be instantiated.
313
313
  ## 🪈 CI Pipeline
314
314
 
315
315
  We have several workflows defined in ${(0, doc_files_1.linkFlowRSourceFile)('.github/workflows')}.
316
- We explain the most important workflows in the following:
316
+ The most important ones:
317
317
 
318
318
  - ${(0, doc_files_1.linkFlowRSourceFile)('.github/workflows/qa.yaml')} is the main workflow that will run different steps depending on several factors. It is responsible for:
319
319
  - running the [functionality](#functionality-tests), [system](#system-tests), [mutation](#mutation-tests), and [performance tests](#performance-tests)
@@ -38,8 +38,8 @@ for instructions on how to install _flowR_.
38
38
 
39
39
  Primarily, _flowR_ provides a dataflow analysis framework for the [*R*](https://www.r-project.org/) programming language.
40
40
  Its subcomponents (like the custom ${ctx.link(shell_1.RShell)}) or the internals of the static ${ctx.link(graph_1.DataflowGraph)})
41
- are not important if you simply wish to use _flowR_.
42
- If you wish to use _flowR_, check out one of its extensions (e.g., the ${ctx.linkPage('flowr:vscode', 'VS Code extension')}),
41
+ are not important if you only wish to use _flowR_.
42
+ Instead, check out one of its extensions (e.g., the ${ctx.linkPage('flowr:vscode', 'VS Code extension')}),
43
43
  the [REPL and server interfaces](#using-flowr-from-the-outside) or its coding API with the
44
44
  ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)}, which you build with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)}:
45
45
 
@@ -72,10 +72,10 @@ _flowR_ itself has two main ways to operate:
72
72
  Besides these two ways, there is a ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')} that allows you to use _flowR_ directly from within the editor (it is available on ${ctx.linkPage('flowr:positron', 'open-vsx')} as well).
73
73
  Similarly, we offer an ${ctx.linkPage('flowr:rstudio-addin', 'Addin for RStudio')}, as well as an ${ctx.linkPage('flowr:radapter', 'R package')}.
74
74
 
75
- 🐳️ If you use the docker-version, simply starting the docker container in interactive mode drops you right into the REPL (\`docker run -it --rm eagleoutice/flowr:latest\`), while launching with the ${ctx.cliOption('flowr', 'server')} argument starts the server (\`docker run -it --rm eagleoutice/flowr:latest --server\`).\\
75
+ 🐳️ If you use the docker-version, starting the docker container in interactive mode drops you right into the REPL (\`docker run -it --rm eagleoutice/flowr:latest\`), while launching with the ${ctx.cliOption('flowr', 'server')} argument starts the server (\`docker run -it --rm eagleoutice/flowr:latest --server\`).\\
76
76
  ⚒️ If you compile the _flowR_ sources yourself, you can access _flowR_ by the main script \`npm run flowr\` or in the development mode \`npm run main-dev\`.
77
77
 
78
- Independent of your way of launching *flowr*, we will write simply \`flowr\` for either (🐳️)&nbsp;\`docker run -it --rm eagleoutice/flowr:latest\` or (⚒️)&nbsp;\`npm run flowr\`.
78
+ Independent of your way of launching *flowr*, we write \`flowr\` for either (🐳️)&nbsp;\`docker run -it --rm eagleoutice/flowr:latest\` or (⚒️)&nbsp;\`npm run flowr\`.
79
79
  See the ${ctx.linkPage('wiki/Setup')} wiki page for more information on how to get _flowR_ running.
80
80
 
81
81
  ### The Read-Eval-Print Loop (REPL)
@@ -166,7 +166,7 @@ The server allows accessing the REPL as well
166
166
  ## Calling the Scripts Directly
167
167
 
168
168
  This describes the old way of using _flowR_ by creating and calling the respective scripts directly.
169
- Although this is no longer necessary, the scripts still remain, fully integrated into the REPL of _flowR_ (you can access them simply by adding a colon \`:\` before the name).
169
+ Although this is no longer necessary, the scripts still remain, fully integrated into the REPL of _flowR_ (you can access them by adding a colon \`:\` before the name).
170
170
 
171
171
  ### Generate Static Slices
172
172
 
@@ -227,7 +227,7 @@ For this, you can make use of the _summarizer_ script from within the \`cli\` di
227
227
  npm run summarizer -- "<output.json>"
228
228
  \`\`\`
229
229
 
230
- Please note that the summarizer may require a long time as it parses, normalizes, and analyzes _each_ slice produced, to calculate the reduction numbers. Therefore, it actually executes two steps:
230
+ The summarizer may require a long time as it parses, normalizes, and analyzes _each_ slice produced, to calculate the reduction numbers. Therefore, it actually executes two steps:
231
231
 
232
232
  1. For each file, it calculates the reduction, required time, and other information, written to \`<output-summary.json>\`
233
233
  2. Calculate the "ultimate" summary by aggregating the intermediate results for each file