@eagleoutice/flowr 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +36 -40
  2. package/abstract-interpretation/data-frame/absint-visitor.d.ts +1 -1
  3. package/abstract-interpretation/data-frame/absint-visitor.js +1 -1
  4. package/cli/flowr.js +8 -4
  5. package/cli/repl/commands/repl-cfg.js +4 -4
  6. package/cli/repl/commands/repl-commands.js +2 -2
  7. package/cli/repl/commands/repl-dataflow.js +4 -4
  8. package/cli/repl/commands/repl-execute.d.ts +1 -1
  9. package/cli/repl/commands/repl-execute.js +8 -8
  10. package/cli/repl/commands/repl-lineage.d.ts +2 -2
  11. package/cli/repl/commands/repl-lineage.js +11 -12
  12. package/cli/repl/commands/repl-main.d.ts +4 -7
  13. package/cli/repl/commands/repl-normalize.js +2 -2
  14. package/cli/repl/commands/repl-parse.js +3 -2
  15. package/cli/repl/commands/repl-query.js +3 -3
  16. package/cli/repl/commands/repl-quit.js +1 -1
  17. package/cli/repl/commands/repl-version.d.ts +1 -16
  18. package/cli/repl/commands/repl-version.js +2 -19
  19. package/cli/repl/core.d.ts +9 -9
  20. package/cli/repl/core.js +14 -20
  21. package/cli/repl/print-version.js +2 -2
  22. package/cli/repl/server/connection.js +6 -2
  23. package/cli/repl/server/messages/message-hello.d.ts +1 -1
  24. package/cli/repl/server/server.js +2 -2
  25. package/core/steps/all/core/20-dataflow.d.ts +3 -1
  26. package/core/steps/pipeline/default-pipelines.d.ts +66 -50
  27. package/dataflow/environments/default-builtin-config.js +8 -0
  28. package/dataflow/eval/resolve/alias-tracking.js +2 -0
  29. package/dataflow/eval/resolve/resolve.js +3 -0
  30. package/dataflow/eval/values/r-value.d.ts +4 -1
  31. package/dataflow/eval/values/r-value.js +2 -0
  32. package/dataflow/extractor.d.ts +4 -1
  33. package/dataflow/extractor.js +7 -5
  34. package/dataflow/fn/higher-order-function.d.ts +9 -0
  35. package/dataflow/fn/higher-order-function.js +75 -0
  36. package/documentation/doc-util/doc-repl.js +5 -2
  37. package/documentation/print-dataflow-graph-wiki.js +2 -2
  38. package/documentation/print-query-wiki.js +20 -0
  39. package/documentation/print-readme.js +1 -1
  40. package/package.json +1 -1
  41. package/project/cache/flowr-analyzer-cache.d.ts +6 -5
  42. package/project/cache/flowr-analyzer-cache.js +21 -13
  43. package/project/cfg-kind.d.ts +17 -0
  44. package/project/cfg-kind.js +22 -0
  45. package/project/context/abstract-flowr-analyzer-context.d.ts +4 -0
  46. package/project/context/flowr-analyzer-context.d.ts +6 -0
  47. package/project/context/flowr-analyzer-context.js +11 -0
  48. package/project/context/flowr-analyzer-dependencies-context.d.ts +1 -0
  49. package/project/context/flowr-analyzer-dependencies-context.js +4 -0
  50. package/project/context/flowr-analyzer-files-context.d.ts +1 -0
  51. package/project/context/flowr-analyzer-files-context.js +4 -0
  52. package/project/context/flowr-analyzer-loading-order-context.d.ts +1 -0
  53. package/project/context/flowr-analyzer-loading-order-context.js +6 -0
  54. package/project/flowr-analyzer.d.ts +19 -18
  55. package/project/flowr-analyzer.js +15 -8
  56. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -1
  57. package/queries/catalog/config-query/config-query-format.d.ts +1 -1
  58. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -1
  59. package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
  60. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +3 -0
  61. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +45 -0
  62. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +22 -0
  63. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +32 -0
  64. package/queries/query.d.ts +10 -2
  65. package/queries/query.js +2 -0
  66. package/r-bridge/parser.d.ts +7 -0
  67. package/search/search-executor/search-enrichers.js +2 -1
  68. package/util/r-value.d.ts +1 -1
  69. package/util/r-value.js +2 -0
  70. package/util/version.d.ts +17 -0
  71. package/util/version.js +28 -1
package/README.md CHANGED
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
24
24
 
25
25
  ```shell
26
26
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
27
- flowR repl using flowR v2.5.0, R v4.5.0 (r-shell engine)
27
+ flowR repl using flowR v2.6.0, R v4.5.0 (r-shell engine)
28
28
  R> :query @linter "read.csv(\"/root/x.txt\")"
29
29
  ```
30
30
 
@@ -33,36 +33,32 @@ It offers a wide variety of features, for example:
33
33
 
34
34
 
35
35
  ```text
36
- Query: linter (14 ms)
36
+ Query: linter (6 ms)
37
37
  ╰ **Deprecated Functions** (deprecated-functions):
38
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
39
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
38
+ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":3,"processTimeMs":0}</code>
40
39
  ╰ **File Path Validity** (file-path-validity):
41
- Error during execution of Rule: Cannot read properties of undefined (reading 'library')
40
+ certain:
41
+ ╰ Path `/root/x.txt` at 1.1-23
42
+ ╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":1,"processTimeMs":0}</code>
42
43
  ╰ **Seeded Randomness** (seeded-randomness):
43
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
44
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
44
+ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":1,"processTimeMs":0}</code>
45
45
  ╰ **Absolute Paths** (absolute-file-paths):
46
- Error during execution of Rule: Cannot read properties of undefined (reading 'library')
46
+ certain:
47
+ ╰ Path `/root/x.txt` at 1.1-23
48
+ ╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":0,"processTimeMs":0}</code>
47
49
  ╰ **Unused Definitions** (unused-definitions):
48
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
49
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
50
+ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>
50
51
  ╰ **Naming Convention** (naming-convention):
51
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
52
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
52
+ _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>
53
53
  ╰ **Network Functions** (network-functions):
54
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
55
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
54
+ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>
56
55
  ╰ **Dataframe Access Validation** (dataframe-access-validation):
57
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
58
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
56
+ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":1,"processTimeMs":0}</code>
59
57
  ╰ **Dead Code** (dead-code):
60
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
61
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
58
+ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>
62
59
  ╰ **Useless Loops** (useless-loop):
63
- Error during execution of Rule: unable to parse R code (see the log for more information) for request {"request":"text","content":"@linter read.csv(\"/root/x.txt\")"}}
64
- Report a Bug: https://github.com/flowr-analysis/flowr/issues/new?body=%3C!%2D%2D%20Please%20describe%20your%20issue%20in%20more%20detail%20below!%20%2D%2D%3E%0A%0A%0A%3C!%2D%2D%20Automatically%20generated%20issue%20metadata%2C%20please%20do%20not%20edit%20or%20delete%20content%20below%20this%20line%20%2D%2D%3E%0A%2D%2D%2D%0A%0AflowR%20version%3A%202.5.0%0Anode%20version%3A%20v22.14.0%0Anode%20arch%3A%20x64%0Anode%20platform%3A%20linux%0Amessage%3A%20%60unable%20to%20parse%20R%20code%20%28see%20the%20log%20for%20more%20information%29%20for%20request%20%7B%22request%22%3A%22text%22%2C%22content%22%3A%22%40linter%20read.csv%28%5C%22%2Froot%2Fx.txt%5C%22%29%22%7D%7D%60%0Astack%20trace%3A%0A%60%60%60%0A%20%20%20%20at%20guard%20%28%3C%3E%2Fsrc%2Futil%2Fassert.ts%3A75%3A9%29%0A%20%20%20%20at%20guardRetrievedOutput%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A210%3A7%29%0A%20%20%20%20at%20%2Fhome%2Frunner%2Fwork%2Fflowr%2Fflowr%2Fsrc%2Fr%2Dbridge%2Fretriever.ts%3A174%3A4%0A%20%20%20%20at%20processTicksAndRejections%20%28node%3Ainternal%2Fprocess%2Ftask_queues%3A105%3A5%29%0A%20%20%20%20at%20async%20Object.parseRequests%20%5Bas%20processor%5D%20%28%3C%3E%2Fsrc%2Fr%2Dbridge%2Fparser.ts%3A58%3A18%29%0A%20%20%20%20at%20async%20PipelineExecutor.nextStep%20%28%3C%3E%2Fsrc%2Fcore%2Fpipeline%2Dexecutor.ts%3A205%3A25%29%0A%20%20%20%20at%20async%20FlowrAnalyzerCache.runTapeUntil%20%28%3C%3E%2Fsrc%2Fproject%2Fcache%2Fflowr%2Danalyzer%2Dcache.ts%3A100%3A4%29%0A%20%20%20%20at%20async%20getAllNodes%20%28%3C%3E%2Fsrc%2Fsearch%2Fsearch%2Dexecutor%2Fsearch%2Dgenerators.ts%3A47%3A20%29%0A%60%60%60%0A%0A%2D%2D%2D%0A%09
65
- All queries together required ≈14 ms (1ms accuracy, total 17 ms)
60
+ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>
61
+ All queries together required ≈6 ms (1ms accuracy, total 9 ms)
66
62
  ```
67
63
 
68
64
 
@@ -84,19 +80,19 @@ It offers a wide variety of features, for example:
84
80
 
85
81
  _Results (prettified and summarized):_
86
82
 
87
- Query: **linter** (210 ms)\
83
+ Query: **linter** (213 ms)\
88
84
  &nbsp;&nbsp;&nbsp;╰ **Deprecated Functions** (deprecated-functions):\
89
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":196,"processTimeMs":0}</code>\
85
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":199,"processTimeMs":1}</code>\
90
86
  &nbsp;&nbsp;&nbsp;╰ **File Path Validity** (file-path-validity):\
91
87
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
92
88
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ Path `/root/x.txt` at 1.1-23\
93
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":5,"processTimeMs":1}</code>\
89
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":4,"processTimeMs":1}</code>\
94
90
  &nbsp;&nbsp;&nbsp;╰ **Seeded Randomness** (seeded-randomness):\
95
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>\
91
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":1}</code>\
96
92
  &nbsp;&nbsp;&nbsp;╰ **Absolute Paths** (absolute-file-paths):\
97
93
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
98
94
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ Path `/root/x.txt` at 1.1-23\
99
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":3,"processTimeMs":0}</code>\
95
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":2,"processTimeMs":0}</code>\
100
96
  &nbsp;&nbsp;&nbsp;╰ **Unused Definitions** (unused-definitions):\
101
97
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>\
102
98
  &nbsp;&nbsp;&nbsp;╰ **Naming Convention** (naming-convention):\
@@ -109,11 +105,11 @@ It offers a wide variety of features, for example:
109
105
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":1}</code>\
110
106
  &nbsp;&nbsp;&nbsp;╰ **Useless Loops** (useless-loop):\
111
107
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>\
112
- _All queries together required ≈211 ms (1ms accuracy, total 211 ms)_
108
+ _All queries together required ≈213 ms (1ms accuracy, total 214 ms)_
113
109
 
114
110
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
115
111
 
116
- The analysis required _211.4 ms_ (including parsing and normalization and the query) within the generation environment.
112
+ The analysis required _214.2 ms_ (including parsing and normalization and the query) within the generation environment.
117
113
 
118
114
  In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
119
115
  Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
@@ -130,8 +126,8 @@ It offers a wide variety of features, for example:
130
126
  ".meta": {
131
127
  "totalCalls": 0,
132
128
  "totalFunctionDefinitions": 0,
133
- "searchTimeMs": 196,
134
- "processTimeMs": 0
129
+ "searchTimeMs": 199,
130
+ "processTimeMs": 1
135
131
  }
136
132
  },
137
133
  "file-path-validity": {
@@ -152,7 +148,7 @@ It offers a wide variety of features, for example:
152
148
  "totalUnknown": 0,
153
149
  "totalWritesBeforeAlways": 0,
154
150
  "totalValid": 0,
155
- "searchTimeMs": 5,
151
+ "searchTimeMs": 4,
156
152
  "processTimeMs": 1
157
153
  }
158
154
  },
@@ -164,7 +160,7 @@ It offers a wide variety of features, for example:
164
160
  "callsWithAssignmentProducers": 0,
165
161
  "callsWithNonConstantProducers": 0,
166
162
  "searchTimeMs": 0,
167
- "processTimeMs": 0
163
+ "processTimeMs": 1
168
164
  }
169
165
  },
170
166
  "absolute-file-paths": {
@@ -183,7 +179,7 @@ It offers a wide variety of features, for example:
183
179
  ".meta": {
184
180
  "totalConsidered": 1,
185
181
  "totalUnknown": 0,
186
- "searchTimeMs": 3,
182
+ "searchTimeMs": 2,
187
183
  "processTimeMs": 0
188
184
  }
189
185
  },
@@ -241,11 +237,11 @@ It offers a wide variety of features, for example:
241
237
  }
242
238
  },
243
239
  ".meta": {
244
- "timing": 210
240
+ "timing": 213
245
241
  }
246
242
  },
247
243
  ".meta": {
248
- "timing": 211
244
+ "timing": 213
249
245
  }
250
246
  }
251
247
  ```
@@ -310,7 +306,7 @@ It offers a wide variety of features, for example:
310
306
 
311
307
  ```shell
312
308
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
313
- flowR repl using flowR v2.5.0, R v4.5.0 (r-shell engine)
309
+ flowR repl using flowR v2.6.0, R v4.5.0 (r-shell engine)
314
310
  R> :slicer test/testfiles/example.R --criterion "11@sum"
315
311
  ```
316
312
 
@@ -357,7 +353,7 @@ It offers a wide variety of features, for example:
357
353
 
358
354
 
359
355
  * 🚀 **fast data- and control-flow graphs**\
360
- Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">136.9 ms</span></i> (as of Sep 23, 2025),
356
+ Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">136.9 ms</span></i> (as of Oct 13, 2025),
361
357
  _flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
362
358
  and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
363
359
 
@@ -393,7 +389,7 @@ It offers a wide variety of features, for example:
393
389
 
394
390
  ```shell
395
391
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
396
- flowR repl using flowR v2.5.0, R v4.5.0 (r-shell engine)
392
+ flowR repl using flowR v2.6.0, R v4.5.0 (r-shell engine)
397
393
  R> :dataflow* test/testfiles/example.R
398
394
  ```
399
395
 
@@ -698,7 +694,7 @@ It offers a wide variety of features, for example:
698
694
  ```
699
695
 
700
696
 
701
- (The analysis required _14.4 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
697
+ (The analysis required _15.0 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
702
698
 
703
699
 
704
700
 
@@ -768,7 +764,7 @@ We welcome every contribution! Please check out the [developer onboarding](https
768
764
 
769
765
  ----
770
766
 
771
- *flowr* is actively developed by [Florian Sihler](https://eagleoutice.github.io/portfolio/) under the
767
+ *flowr* is actively developed by [Florian Sihler](https://eagleoutice.github.io/portfolio/) and (since October 1st 2025) [Oliver Gerstl](https://www.linkedin.com/in/oliver-gerstl) under the
772
768
  [GPLv3 License](LICENSE).\
773
769
  It is partially supported by the German Research Foundation (DFG) under the grant [504226141](https://gepris.dfg.de/gepris/projekt/504226141) ("CodeInspector").
774
770
 
@@ -22,7 +22,7 @@ export declare class DataFrameShapeInferenceVisitor<OtherInfo = NoInfo, ControlF
22
22
  private oldDomain;
23
23
  /**
24
24
  * The new domain of an AST node during and after processing the node.
25
- * This information is stored in the {@link AbstractInterpretationInfo} afterwards.
25
+ * This information is stored in the {@link AbstractInterpretationInfo} afterward.
26
26
  */
27
27
  private newDomain;
28
28
  constructor(config: Config);
@@ -23,7 +23,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
23
23
  oldDomain = new Map();
24
24
  /**
25
25
  * The new domain of an AST node during and after processing the node.
26
- * This information is stored in the {@link AbstractInterpretationInfo} afterwards.
26
+ * This information is stored in the {@link AbstractInterpretationInfo} afterward.
27
27
  */
28
28
  newDomain = new Map();
29
29
  constructor(config) {
package/cli/flowr.js CHANGED
@@ -17,12 +17,12 @@ const scripts_info_1 = require("./common/scripts-info");
17
17
  const execute_1 = require("./repl/execute");
18
18
  const repl_main_1 = require("./repl/commands/repl-main");
19
19
  const core_1 = require("./repl/core");
20
- const repl_version_1 = require("./repl/commands/repl-version");
21
20
  const print_version_1 = require("./repl/print-version");
22
21
  const flowr_main_options_1 = require("./flowr-main-options");
23
22
  const fs_1 = __importDefault(require("fs"));
24
23
  const path_1 = __importDefault(require("path"));
25
24
  const engines_1 = require("../engines");
25
+ const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
26
26
  exports.toolName = 'flowr';
27
27
  exports.optionHelp = [
28
28
  {
@@ -120,19 +120,23 @@ async function mainRepl() {
120
120
  const defaultEngine = engines.engines[engines.default];
121
121
  if (options.version) {
122
122
  for (const engine of Object.values(engines.engines)) {
123
- await (0, repl_version_1.printVersionInformation)(repl_main_1.standardReplOutput, engine);
123
+ await (0, version_1.printVersionInformation)(repl_main_1.standardReplOutput, engine);
124
124
  engine?.close();
125
125
  }
126
126
  process.exit(0);
127
127
  }
128
128
  hookSignalHandlers(engines);
129
+ const analyzer = new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
130
+ .setParser(defaultEngine)
131
+ .setConfig(config)
132
+ .buildSync();
129
133
  const allowRSessionAccess = options['r-session-access'] ?? false;
130
134
  if (options.execute) {
131
- await (0, core_1.replProcessAnswer)(config, repl_main_1.standardReplOutput, options.execute, defaultEngine, allowRSessionAccess);
135
+ await (0, core_1.replProcessAnswer)(analyzer, repl_main_1.standardReplOutput, options.execute, allowRSessionAccess);
132
136
  }
133
137
  else {
134
138
  await (0, print_version_1.printVersionRepl)(defaultEngine);
135
- await (0, core_1.repl)(config, { parser: defaultEngine, allowRSessionAccess });
139
+ await (0, core_1.repl)({ analyzer: analyzer, allowRSessionAccess });
136
140
  }
137
141
  process.exit(0);
138
142
  }
@@ -57,7 +57,7 @@ async function produceAndPrintCfg(analyzer, output, simplifications, cfgConverte
57
57
  }
58
58
  exports.controlflowCommand = {
59
59
  description: `Get mermaid code for the control-flow graph of R code, start with '${retriever_1.fileProtocol}' to indicate a file`,
60
- usesAnalyzer: true,
60
+ isCodeCommand: true,
61
61
  usageExample: ':controlflow',
62
62
  aliases: ['cfg', 'cf'],
63
63
  script: false,
@@ -68,7 +68,7 @@ exports.controlflowCommand = {
68
68
  };
69
69
  exports.controlflowStarCommand = {
70
70
  description: 'Returns the URL to mermaid.live',
71
- usesAnalyzer: true,
71
+ isCodeCommand: true,
72
72
  usageExample: ':controlflow*',
73
73
  aliases: ['cfg*', 'cf*'],
74
74
  script: false,
@@ -79,7 +79,7 @@ exports.controlflowStarCommand = {
79
79
  };
80
80
  exports.controlflowBbCommand = {
81
81
  description: `Get mermaid code for the control-flow graph with basic blocks, start with '${retriever_1.fileProtocol}' to indicate a file`,
82
- usesAnalyzer: true,
82
+ isCodeCommand: true,
83
83
  usageExample: ':controlflowbb',
84
84
  aliases: ['cfgb', 'cfb'],
85
85
  script: false,
@@ -90,7 +90,7 @@ exports.controlflowBbCommand = {
90
90
  };
91
91
  exports.controlflowBbStarCommand = {
92
92
  description: 'Returns the URL to mermaid.live',
93
- usesAnalyzer: true,
93
+ isCodeCommand: true,
94
94
  usageExample: ':controlflowbb*',
95
95
  aliases: ['cfgb*', 'cfb*'],
96
96
  script: false,
@@ -47,7 +47,7 @@ function printCommandHelp(formatter) {
47
47
  }
48
48
  exports.helpCommand = {
49
49
  description: 'Show help information',
50
- usesAnalyzer: false,
50
+ isCodeCommand: false,
51
51
  script: false,
52
52
  usageExample: ':help',
53
53
  aliases: ['h', '?'],
@@ -114,7 +114,7 @@ function getReplCommands() {
114
114
  aliases: [],
115
115
  script: true,
116
116
  usageExample: `:${script} --help`,
117
- usesAnalyzer: false,
117
+ isCodeCommand: false,
118
118
  fn: async ({ output, remainingLine }) => {
119
119
  // check if the target *module* exists in the current directory, else try two dirs up, otherwise, fail with a message
120
120
  let path = `${__dirname}/${target}`;
@@ -43,7 +43,7 @@ function formatInfo(out, type, meta) {
43
43
  }
44
44
  exports.dataflowCommand = {
45
45
  description: `Get mermaid code for the dataflow graph, start with '${retriever_1.fileProtocol}' to indicate a file`,
46
- usesAnalyzer: true,
46
+ isCodeCommand: true,
47
47
  usageExample: ':dataflow',
48
48
  aliases: ['d', 'df'],
49
49
  script: false,
@@ -62,7 +62,7 @@ exports.dataflowCommand = {
62
62
  };
63
63
  exports.dataflowStarCommand = {
64
64
  description: 'Returns the URL to mermaid.live',
65
- usesAnalyzer: true,
65
+ isCodeCommand: true,
66
66
  usageExample: ':dataflow*',
67
67
  aliases: ['d*', 'df*'],
68
68
  script: false,
@@ -81,7 +81,7 @@ exports.dataflowStarCommand = {
81
81
  };
82
82
  exports.dataflowSimplifiedCommand = {
83
83
  description: `Get mermaid code for the simplified dataflow graph, start with '${retriever_1.fileProtocol}' to indicate a file`,
84
- usesAnalyzer: true,
84
+ isCodeCommand: true,
85
85
  usageExample: ':dataflowsimple',
86
86
  aliases: ['ds', 'dfs'],
87
87
  script: false,
@@ -100,7 +100,7 @@ exports.dataflowSimplifiedCommand = {
100
100
  };
101
101
  exports.dataflowSimpleStarCommand = {
102
102
  description: 'Returns the URL to mermaid.live',
103
- usesAnalyzer: true,
103
+ isCodeCommand: true,
104
104
  usageExample: ':dataflowsimple*',
105
105
  aliases: ['ds*', 'dfs*'],
106
106
  script: false,
@@ -1,3 +1,3 @@
1
1
  import type { ReplCommand, ReplCommandInformation } from './repl-main';
2
- export declare function tryExecuteRShellCommand({ output, parser, allowRSessionAccess, remainingLine }: ReplCommandInformation): Promise<void>;
2
+ export declare function tryExecuteRShellCommand({ output, analyzer, allowRSessionAccess, remainingLine }: ReplCommandInformation): Promise<void>;
3
3
  export declare const executeCommand: ReplCommand;
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeCommand = void 0;
4
4
  exports.tryExecuteRShellCommand = tryExecuteRShellCommand;
5
5
  const ansi_1 = require("../../../util/text/ansi");
6
- const shell_1 = require("../../../r-bridge/shell");
7
- async function tryExecuteRShellCommand({ output, parser, allowRSessionAccess, remainingLine }) {
6
+ async function tryExecuteRShellCommand({ output, analyzer, allowRSessionAccess, remainingLine }) {
7
+ const parserInfo = await analyzer.parserInformation();
8
8
  if (!allowRSessionAccess) {
9
9
  output.stderr(`${output.formatter.format('You are not allowed to execute arbitrary R code.', { style: 1 /* FontStyles.Bold */, color: 1 /* Colors.Red */, effect: ansi_1.ColorEffect.Foreground })}
10
- If you want to do so, please restart flowR with the ${output.formatter.format('--r-session-access', { style: 1 /* FontStyles.Bold */ })} flag${parser.name !== 'r-shell' ? '. Additionally, please enable the r-shell engine, e.g., with ' + output.formatter.format('--default-engine r-shell', { style: 1 /* FontStyles.Bold */ }) : ''}. Please be careful of the security implications of this action. When running flowR with npm, you have to use an extra ${output.formatter.format('--', { style: 1 /* FontStyles.Bold */ })} to separate flowR from npm arguments.`);
10
+ If you want to do so, please restart flowR with the ${output.formatter.format('--r-session-access', { style: 1 /* FontStyles.Bold */ })} flag${parserInfo.name !== 'r-shell' ? '. Additionally, please enable the r-shell engine, e.g., with ' + output.formatter.format('--default-engine r-shell', { style: 1 /* FontStyles.Bold */ }) : ''}. Please be careful of the security implications of this action. When running flowR with npm, you have to use an extra ${output.formatter.format('--', { style: 1 /* FontStyles.Bold */ })} to separate flowR from npm arguments.`);
11
11
  }
12
- else if (parser instanceof shell_1.RShell) {
13
- await executeRShellCommand(output, parser, remainingLine);
12
+ else if (parserInfo.name === 'r-shell') {
13
+ await executeRShellCommand(output, analyzer, remainingLine);
14
14
  }
15
15
  else {
16
16
  output.stderr(`Executing arbitrary R code is only possible when using the r-shell engine as the default engine. Enable it using the configuration file or the ${output.formatter.format('--default-engine r-shell', { style: 1 /* FontStyles.Bold */ })} command line option. When running flowR with npm, you have to use an extra ${output.formatter.format('--', { style: 1 /* FontStyles.Bold */ })} to separate flowR from npm arguments.`);
17
17
  }
18
18
  }
19
- async function executeRShellCommand(output, shell, statement) {
19
+ async function executeRShellCommand(output, analyzer, statement) {
20
20
  try {
21
- const result = await shell.sendCommandWithOutput(statement, {
21
+ const result = await analyzer.sendCommandWithOutput(statement, {
22
22
  from: 'both',
23
23
  automaticallyTrimOutput: true
24
24
  });
@@ -30,7 +30,7 @@ async function executeRShellCommand(output, shell, statement) {
30
30
  }
31
31
  exports.executeCommand = {
32
32
  description: 'Execute the given code as R code (essentially similar to using now command). This requires the `--r-session-access` flag to be set and requires the r-shell engine.',
33
- usesAnalyzer: false,
33
+ isCodeCommand: false,
34
34
  usageExample: ':execute',
35
35
  aliases: ['e', 'r'],
36
36
  script: false,
@@ -1,4 +1,4 @@
1
- import type { ReplCommand } from './repl-main';
1
+ import type { ReplCodeCommand } from './repl-main';
2
2
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
3
3
  import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
4
4
  import type { DataflowGraph } from '../../../dataflow/graph/graph';
@@ -12,4 +12,4 @@ import type { AstIdMap } from '../../../r-bridge/lang-4.x/ast/model/processing/d
12
12
  * @returns The lineage of the node represented as a set of node ids
13
13
  */
14
14
  export declare function getLineage(criterion: SingleSlicingCriterion, graph: DataflowGraph, idMap?: AstIdMap): Set<NodeId>;
15
- export declare const lineageCommand: ReplCommand;
15
+ export declare const lineageCommand: ReplCodeCommand;
@@ -2,19 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lineageCommand = void 0;
4
4
  exports.getLineage = getLineage;
5
- const default_pipelines_1 = require("../../../core/steps/pipeline/default-pipelines");
6
- const retriever_1 = require("../../../r-bridge/retriever");
7
5
  const parse_1 = require("../../../slicing/criterion/parse");
8
6
  const edge_1 = require("../../../dataflow/graph/edge");
9
7
  const assert_1 = require("../../../util/assert");
10
8
  function splitAt(str, idx) {
11
9
  return [str.slice(0, idx), str.slice(idx)];
12
10
  }
13
- async function getDfg(config, parser, remainingLine) {
14
- return await (0, default_pipelines_1.createDataflowPipeline)(parser, {
15
- request: (0, retriever_1.requestFromInput)(remainingLine.trim())
16
- }, config).allRemainingSteps();
17
- }
18
11
  function filterRelevantEdges(edge) {
19
12
  return (0, edge_1.edgeIncludesType)(edge_1.EdgeType.DefinedBy | edge_1.EdgeType.DefinedByOnCall | edge_1.EdgeType.Returns | edge_1.EdgeType.Reads, edge.types);
20
13
  }
@@ -53,14 +46,20 @@ function getLineage(criterion, graph, idMap) {
53
46
  }
54
47
  exports.lineageCommand = {
55
48
  description: 'Get the lineage of an R object',
56
- usesAnalyzer: false,
49
+ isCodeCommand: true,
57
50
  usageExample: ':lineage',
58
51
  aliases: ['lin'],
59
52
  script: false,
60
- fn: async ({ output, parser, remainingLine, config }) => {
61
- const [criterion, rest] = splitAt(remainingLine, remainingLine.indexOf(' '));
62
- const { dataflow: dfg } = await getDfg(config, parser, rest);
63
- const lineageIds = getLineage(criterion, dfg.graph);
53
+ argsParser: (args) => {
54
+ const [criterion, rest] = splitAt(args, args.indexOf(' '));
55
+ const code = rest.trim();
56
+ return {
57
+ input: code.startsWith('"') ? JSON.parse(code) : code,
58
+ remaining: [criterion]
59
+ };
60
+ },
61
+ fn: async ({ output, analyzer, remainingArgs }) => {
62
+ const lineageIds = getLineage(remainingArgs[0], (await analyzer.dataflow()).graph);
64
63
  output.stdout([...lineageIds].join('\n'));
65
64
  }
66
65
  };
@@ -1,6 +1,4 @@
1
1
  import type { OutputFormatter } from '../../../util/text/ansi';
2
- import type { KnownParser } from '../../../r-bridge/parser';
3
- import type { FlowrConfigOptions } from '../../../config';
4
2
  import type { FlowrAnalysisProvider } from '../../../project/flowr-analyzer';
5
3
  /**
6
4
  * Defines the main interface for output of the repl.
@@ -26,9 +24,8 @@ export declare const standardReplOutput: ReplOutput;
26
24
  export interface ReplCommandInformation {
27
25
  output: ReplOutput;
28
26
  allowRSessionAccess: boolean;
29
- parser: KnownParser;
27
+ analyzer: FlowrAnalysisProvider;
30
28
  remainingLine: string;
31
- config: FlowrConfigOptions;
32
29
  }
33
30
  /**
34
31
  * Information passed to each {@link ReplCodeCommand#fn}.
@@ -54,7 +51,7 @@ export interface ReplBaseCommand {
54
51
  usageExample: string;
55
52
  }
56
53
  export interface ReplCommand extends ReplBaseCommand {
57
- usesAnalyzer: false;
54
+ isCodeCommand: false;
58
55
  /**
59
56
  * Function to execute when the command is invoked, it must not write to the command line but instead use the output handler.
60
57
  * Furthermore, it has to obey the formatter defined in the {@link ReplOutput}.
@@ -65,7 +62,7 @@ export interface ReplCommand extends ReplBaseCommand {
65
62
  * Repl command that uses the {@link FlowrAnalyzer}
66
63
  */
67
64
  export interface ReplCodeCommand extends ReplBaseCommand {
68
- usesAnalyzer: true;
65
+ isCodeCommand: true;
69
66
  /**
70
67
  * Function to execute when the command is invoked, it must not write to the command line but instead use the output handler.
71
68
  * Furthermore, it has to obey the formatter defined in the {@link ReplOutput}.
@@ -75,7 +72,7 @@ export interface ReplCodeCommand extends ReplBaseCommand {
75
72
  * Argument parser function which handles the input given after the repl command
76
73
  */
77
74
  argsParser: (remainingLine: string) => {
78
- input: string;
75
+ input: string | undefined;
79
76
  remaining: string[];
80
77
  };
81
78
  }
@@ -43,7 +43,7 @@ function formatInfo(out, type, meta) {
43
43
  }
44
44
  exports.normalizeCommand = {
45
45
  description: `Get mermaid code for the normalized AST of R code, start with '${retriever_1.fileProtocol}' to indicate a file`,
46
- usesAnalyzer: true,
46
+ isCodeCommand: true,
47
47
  usageExample: ':normalize',
48
48
  aliases: ['n'],
49
49
  script: false,
@@ -62,7 +62,7 @@ exports.normalizeCommand = {
62
62
  };
63
63
  exports.normalizeStarCommand = {
64
64
  description: 'Returns the URL to mermaid.live',
65
- usesAnalyzer: true,
65
+ isCodeCommand: true,
66
66
  usageExample: ':normalize*',
67
67
  aliases: ['n*'],
68
68
  script: false,
@@ -126,7 +126,7 @@ function depthListToTextTree(list, f) {
126
126
  }
127
127
  exports.parseCommand = {
128
128
  description: `Prints ASCII Art of the parsed, unmodified AST, start with '${retriever_1.fileProtocol}' to indicate a file`,
129
- usesAnalyzer: true,
129
+ isCodeCommand: true,
130
130
  usageExample: ':parse',
131
131
  aliases: ['p'],
132
132
  script: false,
@@ -139,7 +139,8 @@ exports.parseCommand = {
139
139
  },
140
140
  fn: async ({ output, analyzer }) => {
141
141
  const result = await analyzer.parse();
142
- if (analyzer.parserName() === 'r-shell') {
142
+ const parserInfo = await analyzer.parserInformation();
143
+ if (parserInfo.name === 'r-shell') {
143
144
  const object = (0, format_1.convertPreparedParsedData)((0, format_1.prepareParsedData)(result.parsed));
144
145
  output.stdout(depthListToTextTree(toDepthMap(object), output.formatter));
145
146
  }
@@ -74,13 +74,13 @@ async function processQueryArgs(output, analyzer, remainingArgs) {
74
74
  function parseArgs(line) {
75
75
  const args = (0, args_1.splitAtEscapeSensitive)(line);
76
76
  return {
77
- input: args.join(' ').trim(),
77
+ input: args[1].trim() === 'help' ? '' : args.slice(1).join(' ').trim(),
78
78
  remaining: args
79
79
  };
80
80
  }
81
81
  exports.queryCommand = {
82
82
  description: `Query the given R code, start with '${retriever_1.fileProtocol}' to indicate a file. The query is to be a valid query in json format (use 'help' to get more information).`,
83
- usesAnalyzer: true,
83
+ isCodeCommand: true,
84
84
  usageExample: ':query "<query>" <code>',
85
85
  aliases: [],
86
86
  script: false,
@@ -96,7 +96,7 @@ exports.queryCommand = {
96
96
  };
97
97
  exports.queryStarCommand = {
98
98
  description: 'Similar to query, but returns the output in json format.',
99
- usesAnalyzer: true,
99
+ isCodeCommand: true,
100
100
  usageExample: ':query* <query> <code>',
101
101
  aliases: [],
102
102
  script: false,
@@ -4,7 +4,7 @@ exports.quitCommand = void 0;
4
4
  const log_1 = require("../../../util/log");
5
5
  exports.quitCommand = {
6
6
  description: 'End the repl',
7
- usesAnalyzer: false,
7
+ isCodeCommand: false,
8
8
  aliases: ['q', 'exit'],
9
9
  usageExample: ':quit',
10
10
  script: false,
@@ -1,17 +1,2 @@
1
- import type { ReplCommand, ReplOutput } from './repl-main';
2
- import type { KnownParser } from '../../../r-bridge/parser';
3
- type Version = `${number}.${number}.${number}`;
4
- /**
5
- * Describes the version of flowR and the used R interpreter.
6
- */
7
- export interface VersionInformation {
8
- /** The version of flowR */
9
- flowr: Version;
10
- /** The version of R identified by the underlying {@link RShell} */
11
- r: Version | 'unknown' | 'none';
12
- engine: string;
13
- }
14
- export declare function retrieveVersionInformation(parser: KnownParser): Promise<VersionInformation>;
15
- export declare function printVersionInformation(output: ReplOutput, parser: KnownParser): Promise<void>;
1
+ import type { ReplCommand } from './repl-main';
16
2
  export declare const versionCommand: ReplCommand;
17
- export {};