@eagleoutice/flowr 2.13.9 → 2.13.11

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 (181) hide show
  1. package/README.md +40 -40
  2. package/config.d.ts +50 -2
  3. package/config.js +37 -6
  4. package/dataflow/environments/apply-kill.js +4 -4
  5. package/dataflow/environments/built-in-props.d.ts +28 -4
  6. package/dataflow/environments/built-in-props.js +31 -8
  7. package/dataflow/environments/built-in.d.ts +7 -2
  8. package/dataflow/environments/built-in.js +10 -12
  9. package/dataflow/environments/default-builtin-config.d.ts +46 -6
  10. package/dataflow/environments/default-builtin-config.js +30 -16
  11. package/dataflow/environments/environment.d.ts +16 -0
  12. package/dataflow/environments/environment.js +114 -26
  13. package/dataflow/environments/identifier.d.ts +6 -0
  14. package/dataflow/environments/identifier.js +18 -5
  15. package/dataflow/environments/query-fn-props.js +34 -2
  16. package/dataflow/environments/reference-to-maybe.js +1 -1
  17. package/dataflow/environments/resolve-by-name.js +16 -6
  18. package/dataflow/environments/resolve-helper.d.ts +43 -0
  19. package/dataflow/environments/resolve-helper.js +47 -0
  20. package/dataflow/eval/resolve/alias-tracking.js +45 -1
  21. package/dataflow/eval/resolve/resolve-argument.js +25 -17
  22. package/dataflow/eval/resolve/resolve-strings.d.ts +17 -0
  23. package/dataflow/eval/resolve/resolve-strings.js +16 -9
  24. package/dataflow/eval/resolve/resolve.js +3 -1
  25. package/dataflow/graph/call-graph.d.ts +7 -0
  26. package/dataflow/graph/call-graph.js +103 -0
  27. package/dataflow/graph/df-helper.d.ts +50 -1
  28. package/dataflow/graph/df-helper.js +63 -0
  29. package/dataflow/graph/graph.d.ts +5 -8
  30. package/dataflow/graph/graph.js +24 -13
  31. package/dataflow/internal/linker.d.ts +5 -5
  32. package/dataflow/internal/linker.js +31 -92
  33. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -2
  34. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +3 -9
  35. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +4 -30
  36. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
  37. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +1 -1
  38. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +7 -1
  39. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +3 -3
  40. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +1 -1
  41. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +5 -1
  42. package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +2 -2
  43. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -6
  44. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +32 -14
  45. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +16 -4
  46. package/dataflow/internal/process/functions/call/known-call-handling.js +29 -8
  47. package/documentation/data/faq/faqs.js +1 -1
  48. package/documentation/data/faq/wiki-faq-store.js +3 -2
  49. package/documentation/data/server/doc-data-server-messages.js +1 -1
  50. package/documentation/doc-readme.js +1 -1
  51. package/documentation/doc-util/doc-files.d.ts +5 -0
  52. package/documentation/doc-util/doc-files.js +13 -3
  53. package/documentation/doc-util/doc-sigdb.d.ts +9 -0
  54. package/documentation/doc-util/doc-sigdb.js +32 -0
  55. package/documentation/wiki-analyzer.js +10 -10
  56. package/documentation/wiki-core.js +1 -1
  57. package/documentation/wiki-dataflow-graph.js +3 -3
  58. package/documentation/wiki-interface.js +13 -2
  59. package/documentation/wiki-linting-and-testing.js +13 -13
  60. package/documentation/wiki-mk/doc-context.d.ts +1 -1
  61. package/documentation/wiki-mk/doc-context.js +9 -5
  62. package/documentation/wiki-normalized-ast.js +1 -1
  63. package/documentation/wiki-overview.js +2 -2
  64. package/documentation/wiki-query.js +4 -1
  65. package/documentation/wiki-setup.js +3 -3
  66. package/documentation/wiki-signature-database.js +2 -5
  67. package/gas.d.ts +6 -0
  68. package/gas.js +7 -1
  69. package/linter/linter-rules.d.ts +1 -1
  70. package/linter/rules/syntactically-valid.d.ts +12 -1
  71. package/linter/rules/syntactically-valid.js +88 -17
  72. package/package.json +7 -8
  73. package/project/attached-packages.d.ts +13 -0
  74. package/project/attached-packages.js +30 -0
  75. package/project/context/flowr-analyzer-context.d.ts +15 -0
  76. package/project/context/flowr-analyzer-context.js +14 -3
  77. package/project/context/flowr-analyzer-files-context.d.ts +11 -0
  78. package/project/context/flowr-analyzer-files-context.js +3 -0
  79. package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +4 -0
  80. package/project/context/flowr-analyzer-incremental-analysis-context.js +69 -0
  81. package/project/context/flowr-analyzer-loading-order-context.d.ts +8 -0
  82. package/project/context/flowr-analyzer-loading-order-context.js +23 -2
  83. package/project/dependency-version-space.d.ts +33 -11
  84. package/project/dependency-version-space.js +58 -32
  85. package/project/plugins/file-plugins/files/flowr-namespace-file.js +52 -24
  86. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.d.ts +22 -0
  87. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +101 -0
  88. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +30 -11
  89. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +79 -37
  90. package/project/plugins/plugin-registry.d.ts +2 -1
  91. package/project/plugins/plugin-registry.js +2 -0
  92. package/project/sigdb/manifest.js +9 -5
  93. package/project/sigdb/reader.d.ts +20 -0
  94. package/project/sigdb/reader.js +93 -10
  95. package/project/sigdb/signature-match.d.ts +5 -18
  96. package/project/sigdb/signature-match.js +5 -18
  97. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +1 -1
  98. package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
  99. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +4 -0
  100. package/queries/catalog/call-graph-query/call-graph-query-format.js +4 -0
  101. package/queries/catalog/dependencies-query/dependencies-query-executor.js +11 -3
  102. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +25 -1
  103. package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -2
  104. package/queries/catalog/dependencies-query/function-info/library-functions.js +7 -1
  105. package/queries/catalog/dependencies-query/function-info/read-functions.js +5 -5
  106. package/queries/catalog/dependencies-query/function-info/remote-functions.d.ts +18 -0
  107. package/queries/catalog/dependencies-query/function-info/remote-functions.js +46 -0
  108. package/queries/catalog/dependencies-query/function-info/visualize-functions.js +52 -2
  109. package/queries/catalog/dependencies-query/function-info/write-functions.js +8 -4
  110. package/queries/catalog/dependencies-query/link-devices.d.ts +16 -0
  111. package/queries/catalog/dependencies-query/link-devices.js +104 -0
  112. package/queries/catalog/dice-query/dice-query-format.d.ts +2 -0
  113. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +25 -6
  114. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +37 -6
  115. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +17 -4
  116. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  117. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +14 -0
  118. package/queries/catalog/happens-before-query/happens-before-query-format.js +18 -2
  119. package/queries/catalog/input-sources-query/input-sources-query-format.js +4 -0
  120. package/queries/catalog/input-sources-query/input-types.d.ts +10 -0
  121. package/queries/catalog/input-sources-query/input-types.js +10 -0
  122. package/queries/catalog/location-map-query/location-map-query-executor.js +16 -6
  123. package/queries/catalog/location-map-query/location-map-query-format.d.ts +15 -1
  124. package/queries/catalog/location-map-query/location-map-query-format.js +22 -5
  125. package/queries/catalog/signature-query/signature-query-executor.js +3 -0
  126. package/queries/catalog/signature-query/signature-query-format.d.ts +5 -0
  127. package/queries/catalog/slice-query-options.d.ts +11 -1
  128. package/queries/catalog/slice-query-options.js +8 -4
  129. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -1
  130. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +5 -1
  131. package/queries/query.d.ts +1 -1
  132. package/r-bridge/lang-4.x/ast/model/model.d.ts +23 -2
  133. package/r-bridge/lang-4.x/ast/model/model.js +44 -0
  134. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -0
  135. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
  136. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -0
  137. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +3 -0
  138. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +3 -0
  139. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +3 -0
  140. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +3 -0
  141. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +8 -8
  142. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +9 -46
  143. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +3 -0
  144. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -0
  145. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +3 -0
  146. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +3 -0
  147. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +3 -0
  148. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -0
  149. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -0
  150. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +3 -0
  151. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -0
  152. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -0
  153. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -0
  154. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -0
  155. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -0
  156. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +0 -5
  157. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +6 -3
  158. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +1 -1
  159. package/reconstruct/reconstruct.d.ts +9 -0
  160. package/reconstruct/reconstruct.js +1 -0
  161. package/search/flowr-search-filters.d.ts +25 -1
  162. package/search/flowr-search-filters.js +42 -7
  163. package/search/search-executor/search-generators.js +7 -2
  164. package/search/search-executor/search-transformer.js +4 -1
  165. package/slicing/criterion/parse.d.ts +5 -25
  166. package/slicing/criterion/parse.js +15 -20
  167. package/slicing/static/fingerprint.js +18 -6
  168. package/slicing/static/slice-call.js +2 -2
  169. package/slicing/static/slicer-types.d.ts +10 -0
  170. package/slicing/static/static-slicer.d.ts +1 -1
  171. package/slicing/static/static-slicer.js +29 -6
  172. package/slicing/static/visiting-queue.d.ts +12 -2
  173. package/slicing/static/visiting-queue.js +28 -3
  174. package/util/arg-matching.d.ts +18 -0
  175. package/util/arg-matching.js +70 -0
  176. package/util/collections/bimap.d.ts +21 -1
  177. package/util/collections/bimap.js +43 -7
  178. package/util/r-regex.js +19 -1
  179. package/util/range.d.ts +7 -8
  180. package/util/range.js +10 -11
  181. package/util/version.js +1 -1
@@ -44,7 +44,7 @@ ${(0, doc_code_1.codeBlock)('json', await (0, doc_server_message_1.inServerConte
44
44
 
45
45
  There are currently a few messages that you can send after the hello message.
46
46
  If you want to _slice_ a piece of R code you first have to send an [analysis request](#message-request-file-analysis), so that you can send one or multiple slice requests afterward.
47
- Requests for the [REPL](#message-request-repl) are independent of that.
47
+ Requests for the [REPL](#message-request-repl-execution) are independent of that.
48
48
  `;
49
49
  }
50
50
  });
@@ -208,7 +208,7 @@ ${await (0, doc_repl_1.documentReplSession)(treeSitter, [{
208
208
  `), ' ')}
209
209
 
210
210
  * 🚀 **fast call-graph, data-, and control-flow graphs**\\
211
- Within just [${'<i>' + (0, html_hover_over_1.textWithTooltip)((0, numbers_1.roundToDecimals)(await (0, doc_benchmarks_1.getLatestDfAnalysisTime)('"social-science" Benchmark Suite (tree-sitter)'), 1) + ' ms', 'This measurement is automatically fetched from the latest benchmark!') + '</i>'} (as of ${new Date(await (0, doc_benchmarks_1.getLastBenchmarkUpdate)()).toLocaleDateString('en-US', dateOptions)})](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark),
211
+ Within just ${ctx.linkPage('flowr:benchmarks', `${'<i>' + (0, html_hover_over_1.textWithTooltip)((0, numbers_1.roundToDecimals)(await (0, doc_benchmarks_1.getLatestDfAnalysisTime)('"social-science" Benchmark Suite (tree-sitter)'), 1) + ' ms', 'This measurement is automatically fetched from the latest benchmark!') + '</i>'} (as of ${new Date(await (0, doc_benchmarks_1.getLastBenchmarkUpdate)()).toLocaleDateString('en-US', dateOptions)})`)},
212
212
  _flowR_ can analyze the data- and control-flow of the average real-world R&nbsp;script. See the ${ctx.linkPage('flowr:benchmarks', 'benchmarks')} for more information,
213
213
  and consult the ${ctx.linkPage('wiki/Dataflow Graph', 'wiki pages')} for more details on the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graphs')} as well as ${ctx.linkPage('wiki/Dataflow Graph', 'call graphs', 'perspectives-cg')}.
214
214
 
@@ -26,3 +26,8 @@ export declare function getFileContentFromRoot(path: string): string;
26
26
  * Returns a markdown link to the given flowr source file path.
27
27
  */
28
28
  export declare function linkFlowRSourceFile(path: string): string;
29
+ /**
30
+ * Returns the remote url for the given flowr source file path,
31
+ * ensuring exactly one slash between the base ref and the path.
32
+ */
33
+ export declare function flowrSourceFileUrl(path: string): string;
@@ -7,6 +7,7 @@ exports.toPosixPath = exports.FlowrRAdapter = exports.FlowrRStudioAddin = export
7
7
  exports.getFilePathMd = getFilePathMd;
8
8
  exports.getFileContentFromRoot = getFileContentFromRoot;
9
9
  exports.linkFlowRSourceFile = linkFlowRSourceFile;
10
+ exports.flowrSourceFileUrl = flowrSourceFileUrl;
10
11
  const fs_1 = __importDefault(require("fs"));
11
12
  const path_1 = __importDefault(require("path"));
12
13
  const files_1 = require("../../util/files");
@@ -30,8 +31,8 @@ exports.FlowrRAdapter = `${exports.FlowrGithubBaseRef}/flowr-r-adapter`;
30
31
  function getFilePathMd(filePath) {
31
32
  // we go one up as we are in doc-util now :D #convenience
32
33
  const fullpath = require.resolve('../' + filePath);
33
- const relative = './' + (0, files_1.toPosixPath)(path_1.default.relative(process.cwd(), fullpath));
34
- return `[\`${relative}\`](${exports.RemoteFlowrFilePathBaseRef}${relative})`;
34
+ const relative = (0, files_1.toPosixPath)(path_1.default.relative(process.cwd(), fullpath));
35
+ return `[\`./${relative}\`](${flowrSourceFileUrl(relative)})`;
35
36
  }
36
37
  /**
37
38
  * Returns the content of a file located at the given path relative to the project root.
@@ -45,6 +46,15 @@ function getFileContentFromRoot(path) {
45
46
  * Returns a markdown link to the given flowr source file path.
46
47
  */
47
48
  function linkFlowRSourceFile(path) {
48
- return `[${path}](${exports.RemoteFlowrFilePathBaseRef}/${path})`;
49
+ return `[${path}](${flowrSourceFileUrl(path)})`;
50
+ }
51
+ /**
52
+ * Returns the remote url for the given flowr source file path,
53
+ * ensuring exactly one slash between the base ref and the path.
54
+ */
55
+ function flowrSourceFileUrl(path) {
56
+ const base = exports.RemoteFlowrFilePathBaseRef.replace(/\/+$/, '');
57
+ const suffix = path.startsWith('/') ? path : '/' + path;
58
+ return base + suffix;
49
59
  }
50
60
  //# sourceMappingURL=doc-files.js.map
@@ -0,0 +1,9 @@
1
+ /** Whether a CRAN signature database is installed, i.e. more than the `base` shard every checkout ships. */
2
+ export declare function cranDatabaseAvailable(): boolean;
3
+ /** The warning shown when a page that documents the signature database is generated without one. */
4
+ export declare function missingSigDbWarning(target: string): string;
5
+ /**
6
+ * Warns that `target` documents the signature database while none is installed, so whatever it would write
7
+ * shows base R alone. Returns whether the database is missing, so a caller can skip the page instead.
8
+ */
9
+ export declare function warnMissingSigDb(target: string): boolean;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cranDatabaseAvailable = cranDatabaseAvailable;
4
+ exports.missingSigDbWarning = missingSigDbWarning;
5
+ exports.warnMissingSigDb = warnMissingSigDb;
6
+ const manifest_1 = require("../../project/sigdb/manifest");
7
+ const ansi_1 = require("../../util/text/ansi");
8
+ /** Whether a CRAN signature database is installed, i.e. more than the `base` shard every checkout ships. */
9
+ function cranDatabaseAvailable() {
10
+ return (0, manifest_1.defaultSigDbPath)('current') !== undefined || (0, manifest_1.defaultSigDbPath)('full') !== undefined;
11
+ }
12
+ /** The warning shown when a page that documents the signature database is generated without one. */
13
+ function missingSigDbWarning(target) {
14
+ const warn = (s) => ansi_1.ansiFormatter.format(s, { color: 3 /* Colors.Yellow */, effect: ansi_1.ColorEffect.Foreground });
15
+ return warn(`
16
+ ${(0, ansi_1.bold)('!! no signature database installed !!', ansi_1.ansiFormatter)}
17
+ [${target}] documents the signature database, but only the bundled base shard is present.
18
+ Generating it now would replace the committed page with base-R-only numbers and examples.
19
+ Run ${(0, ansi_1.bold)('npm run sync:sigdb', ansi_1.ansiFormatter)} first (see wiki/Signature Database), or leave the page as it is.`);
20
+ }
21
+ /**
22
+ * Warns that `target` documents the signature database while none is installed, so whatever it would write
23
+ * shows base R alone. Returns whether the database is missing, so a caller can skip the page instead.
24
+ */
25
+ function warnMissingSigDb(target) {
26
+ if (cranDatabaseAvailable()) {
27
+ return false;
28
+ }
29
+ console.warn(missingSigDbWarning(target));
30
+ return true;
31
+ }
32
+ //# sourceMappingURL=doc-sigdb.js.map
@@ -98,7 +98,7 @@ ${(0, doc_structure_1.collapsibleToc)({
98
98
  ${(0, doc_structure_1.section)('Overview', 2)}
99
99
 
100
100
  No matter whether you want to analyze a single R script, a couple of R notebooks, a complete project, or an R package,
101
- your journey starts with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)} (further described in [Builder Configuration](#builder-configuration) below).
101
+ your journey starts with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)} (further described in [Builder Configuration](#Builder_Configuration) below).
102
102
  This builder allows you to configure the analysis in many different ways, for example, by specifying which [plugins](#Plugins) to use or
103
103
  what ${ctx.linkPage('wiki/Engines', 'engine')} to use for the analysis.
104
104
 
@@ -118,7 +118,7 @@ The builder provides two methods for building the analyzer:
118
118
  which requires that the engine (e.g., TreeSitter) has already been initialized before calling this method.
119
119
  Yet, as Engines only have to be initialized once per process, this method is often more convenient to use.
120
120
 
121
- For more information on how to configure the builder, please refer to the [Builder Configuration](#builder-configuration) section below.
121
+ For more information on how to configure the builder, please refer to the [Builder Configuration](#Builder_Configuration) section below.
122
122
 
123
123
  ${(0, doc_structure_1.section)('Overview of the Analyzer', 3)}
124
124
 
@@ -168,12 +168,12 @@ We work on providing a set of example repositories that demonstrate how to use t
168
168
 
169
169
  ${(0, doc_structure_1.section)('Builder Configuration', 2)}
170
170
 
171
- If you are interested in all available options, have a look at the [Builder Reference](#builder-reference) below.
171
+ If you are interested in all available options, have a look at the [Builder Reference](#Builder_Reference) below.
172
172
  The following sections highlight some of the most important configuration options:
173
173
 
174
- 1. How to [configure flowR](#configuring-flowr)
175
- 1. How to [configure the engine](#configuring-the-engine)
176
- 2. How to [register plugins](#configuring-plugins)
174
+ 1. How to [configure flowR](#Configuring_flowR)
175
+ 1. How to [configure the engine](#Configuring_the_Engine)
176
+ 2. How to [register plugins](#Configuring_Plugins)
177
177
 
178
178
  ${(0, doc_structure_1.section)('Configuring flowR', 3)}
179
179
 
@@ -256,8 +256,8 @@ Plugins allow you to extend the capabilities of the analyzer in many different w
256
256
  For example, they can be used to support other file formats, or to provide new algorithms to determine the loading order of files in a project.
257
257
  All plugins have to extend the ${ctx.link(flowr_analyzer_plugin_1.FlowrAnalyzerPlugin)} base class and specify their ${ctx.link('PluginType')}.
258
258
  During the analysis, the analyzer will apply all registered plugins of the different types at the appropriate stages of the analysis.
259
- If you just want to _use_ these plugins, you can usually ignore their [type](#plugin-types) and just register them with the builder as described
260
- in the [Builder Configuration](#builder-configuration) section above.
259
+ If you just want to _use_ these plugins, you can usually ignore their [type](#Plugin_Types) and just register them with the builder as described
260
+ in the [Builder Configuration](#Builder_Configuration) section above.
261
261
  However, if you want to _create_ new plugins, you should be aware of the different plugin types and when they are applied during the analysis.
262
262
 
263
263
  Currently, flowR supports the following plugin types built-in:
@@ -333,7 +333,7 @@ All loading order plugins should conform to the ${ctx.link(flowr_analyzer_loadin
333
333
 
334
334
  ${(0, doc_structure_1.section)('How to add a new plugin', 3)}
335
335
 
336
- If you want to make a new plugin you first have to decide which type of plugin you want to create (see [Plugin Types](#plugin-types) above).
336
+ If you want to make a new plugin you first have to decide which type of plugin you want to create (see [Plugin Types](#Plugin_Types) above).
337
337
  Then, you must create a new class that extends the corresponding base class (e.g., ${ctx.link(flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin)} for file loading plugins).
338
338
  In general, most plugins operate on the [context information](#Context_Information) provided by the analyzer.
339
339
  Usually it is a good idea to have a look at the existing plugins of the same type to get an idea of how to implement your own plugin.
@@ -524,7 +524,7 @@ The cache is maintained by the ${ctx.link(flowr_analyzer_cache_1.FlowrAnalyzerCa
524
524
  Underlying, it relies on the ${ctx.link(pipeline_executor_1.PipelineExecutor)} to cache results of different pipeline stages.
525
525
 
526
526
  Usually, you do not have to worry about the cache, as it is managed automatically by the analyzer.
527
- If you want to overwrite cache information, the analysis methods in ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} (see [Conducting Analyses](#conducting-analyses) above)
527
+ If you want to overwrite cache information, the analysis methods in ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} (see [Conducting Analyses](#Conducting_Analyses) above)
528
528
  usually provide an optional \`force\` parameter to control whether to use the cache or recompute the results.
529
529
  `;
530
530
  }
@@ -191,7 +191,7 @@ It is mostly intended for developers that want to extend the capabilities of _fl
191
191
  and assumes knowledge of [TypeScript](https://www.typescriptlang.org/) and [R](https://www.r-project.org/).
192
192
  If you think parts of the wiki are missing, wrong, or outdated, please do not hesitate to [open a new issue](${doc_issue_1.NewIssueUrl})!
193
193
  In case you are new and want to develop for flowR, please check out the relevant ${ctx.linkPage('wiki/Setup', 'Setup', '-developing-for-flowr')} wiki page
194
- and the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md).
194
+ and the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md).
195
195
 
196
196
  ${(0, doc_structure_1.block)({
197
197
  type: 'NOTE',
@@ -594,7 +594,7 @@ However, nested definitions can carry it (in the nested case, \`x\` is defined b
594
594
  name: 'Calls Edge',
595
595
  type: edge_1.EdgeType.Calls,
596
596
  description: `Link the [function call](#function-call-vertex) to the [function definition](#function-definition-vertex) that is called. To find all called definitions,
597
- please use the ${ctx.link(dfg_get_origin_1.getOriginInDfg.name)} function, as explained in ${ctx.linkPage('wiki/Dataflow Graph', 'working with the dataflow graph', 'Working-with-the-Dataflow-Graph')}.
597
+ please use the ${ctx.link(dfg_get_origin_1.getOriginInDfg.name)} function, as explained in ${ctx.linkPage('wiki/Dataflow Graph', 'working with the dataflow graph', 'dfg-working')}.
598
598
  If you are interested in the call graph, refer to ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'callGraph')} and consult the ${ctx.linkPage('wiki/Dataflow Graph', 'call graph wiki', 'perspectives-cg')} for more information.
599
599
  `,
600
600
  code: 'foo <- function() {}\nfoo()',
@@ -801,7 +801,7 @@ ${(0, doc_structure_1.details)('Simplified Version of the graph', await (0, doc_
801
801
 
802
802
  The following vertices types exist:
803
803
 
804
- 1. ${(0, doc_data_dfg_util_1.getAllVertices)().map(([k, v], index) => `[\`${k}\`](#${index + 1}-${v.toLowerCase().replace(/\s/g, '-')}-vertex)`).join('\n1. ')}
804
+ 1. ${(0, doc_data_dfg_util_1.getAllVertices)().map(([k, v]) => `[\`${k}\`](#${v.toLowerCase().replace(/\s/g, '-')}-vertex)`).join('\n1. ')}
805
805
 
806
806
  ${(0, doc_structure_1.details)('Class Diagram', 'All boxes should link to their respective implementation:\n' + (0, doc_code_1.codeBlock)('mermaid', ctx.mermaid('DataflowGraphVertexInfo', { inlineTypes: ['MergeableRecord'] })))}
807
807
 
@@ -929,7 +929,7 @@ ${(0, doc_structure_1.details)('Example: Nested Conditionals', await (0, doc_dfg
929
929
 
930
930
  ${(0, doc_structure_1.section)('Dataflow Information', 2, 'dataflow-information')}
931
931
 
932
- Using _flowR's_ code interface (see the ${ctx.linkPage('wiki/Interface', 'Interface', 'creating-flowr-analyses')} wiki page for more), you can generate the dataflow information
932
+ Using _flowR's_ code interface (see the ${ctx.linkPage('wiki/Interface', 'Interface', 'creating-analyses-with-flowr')} wiki page for more), you can generate the dataflow information
933
933
  for a given piece of R code (in this case \`x <- 1; x + 1\`) as follows:
934
934
 
935
935
  ${(0, doc_code_1.codeBlock)('ts', `
@@ -301,8 +301,19 @@ ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
301
301
  }
302
302
  }
303
303
  },
304
- incrementalParsing: {
305
- activated: false,
304
+ incremental: {
305
+ alwaysIncremental: false,
306
+ parsing: {
307
+ activated: false,
308
+ heuristics: {
309
+ activated: true,
310
+ mtime: true,
311
+ linesFrom: 500,
312
+ bytesFrom: 50_000,
313
+ alwaysWithEdits: false,
314
+ minFiles: 1,
315
+ },
316
+ },
306
317
  },
307
318
  gas: {
308
319
  thresholds: {
@@ -17,7 +17,7 @@ class WikiLintingAndTesting extends doc_maker_1.DocMaker {
17
17
  text({ ctx }) {
18
18
  return `
19
19
  For the latest code coverage information, see [codecov.io](${doc_files_1.FlowrCodecovRef}),
20
- for the latest benchmark results, see the [benchmark results](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark) wiki page.
20
+ for the latest benchmark results, see the ${ctx.linkPage('flowr:benchmarks', 'benchmark results')} wiki page.
21
21
 
22
22
  - [🏨 Testing Suites](#testing-suites)
23
23
  - [🧪 Functionality Tests](#functionality-tests)
@@ -81,7 +81,7 @@ It is up to the [ci](#ci-pipeline) to run the tests on different systems to ensu
81
81
  <a id='test-structure'></a>
82
82
  #### 🏗️ Test Structure
83
83
 
84
- All functionality tests are to be located under [test/functionality](${doc_files_1.RemoteFlowrFilePathBaseRef}/test/functionality).
84
+ All functionality tests are to be located under [test/functionality](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality).
85
85
 
86
86
  This folder contains three special and important elements:
87
87
 
@@ -120,7 +120,7 @@ and it is probably best to have a look at existing tests in that area to get an
120
120
  Various helper functions are available to ease in writing tests with common behaviors, like testing for dataflow, slicing or query results.
121
121
  These can be found in [the \`_helper\` subdirectory](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/_helper).
122
122
 
123
- For example, an [existing test](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/dataflow/processing-of-elements/atomic/dataflow-atomic.test.ts) that tests the dataflow graph of a simple variable looks like this:
123
+ For example, an [existing test](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/dataflow/main/atomic/dataflow-atomic.test.ts) that tests the dataflow graph of a simple variable looks like this:
124
124
  ${(0, doc_code_1.codeBlock)('typescript', `
125
125
  assertDataflow(label('simple variable', ['name-normal']), shell,
126
126
  'x', emptyGraph().use('0', 'x')
@@ -179,7 +179,7 @@ To run them, issue:
179
179
 
180
180
  ${(0, doc_code_1.codeBlock)('shell', 'npm run performance-test')}
181
181
 
182
- See [test/performance](${doc_files_1.RemoteFlowrFilePathBaseRef}test/performance) for more information on the suites, how to run them, and their results. If you are interested in the results of the benchmarks, see [here](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark).
182
+ See ${(0, doc_files_1.linkFlowRSourceFile)('test/performance')} for more information on the suites, how to run them, and their results. If you are interested in the results of the benchmarks, see ${ctx.linkPage('flowr:benchmarks', 'here')}.
183
183
 
184
184
  <a id='testing-within-your-ide'></a>
185
185
  ### 📝 Testing Within Your IDE
@@ -207,18 +207,18 @@ Otherwise, the tests will not be instantiated.
207
207
  <a id='ci-pipeline'></a>
208
208
  ## 🪈 CI Pipeline
209
209
 
210
- We have several workflows defined in [.github/workflows](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/).
210
+ We have several workflows defined in ${(0, doc_files_1.linkFlowRSourceFile)('.github/workflows')}.
211
211
  We explain the most important workflows in the following:
212
212
 
213
- - [qa.yaml](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/qa.yaml) is the main workflow that will run different steps depending on several factors. It is responsible for:
213
+ - ${(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:
214
214
  - running the [functionality](#functionality-tests) and [performance tests](#performance-tests)
215
- - uploading the results to the [benchmark page](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark) for releases
215
+ - uploading the results to the ${ctx.linkPage('flowr:benchmarks', 'benchmark page')} for releases
216
216
  - running the [functionality tests](#functionality-tests) on different operating systems (Windows, macOS, Linux) and with different versions of R
217
217
  - reporting code coverage
218
218
  - running the [linter](#linting) and reporting its results
219
- - deploying the documentation to [GitHub Pages](${doc_files_1.FlowrSiteBaseRef}/doc/)
220
- - [release.yaml](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/release.yaml) is responsible for creating a new release, only to be run by repository owners. Furthermore, it adds the new docker image to ${ctx.linkPage('flowr:docker', 'docker hub')}.
221
- - [broken-links-and-wiki.yaml](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/broken-links-and-wiki.yaml) repeatedly tests that all links are not dead!
219
+ - deploying the documentation to ${ctx.linkPage('flowr:docs', 'GitHub Pages')}
220
+ - ${(0, doc_files_1.linkFlowRSourceFile)('.github/workflows/release.yaml')} is responsible for creating a new release, only to be run by repository owners. Furthermore, it adds the new docker image to ${ctx.linkPage('flowr:docker', 'docker hub')}.
221
+ - ${(0, doc_files_1.linkFlowRSourceFile)('.github/workflows/broken-links-and-wiki.yaml')} repeatedly tests that all links are not dead!
222
222
 
223
223
  <a id='linting'></a>
224
224
  ## 🧹 Linting
@@ -228,11 +228,11 @@ The main one:
228
228
 
229
229
  ${(0, doc_code_1.codeBlock)('shell', 'npm run lint')}
230
230
 
231
- And a weaker version of the first (allowing for *todo* comments) which is run automatically in the [pre-push githook](${doc_files_1.RemoteFlowrFilePathBaseRef}/.githooks/pre-push) as explained in the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md):
231
+ And a weaker version of the first (allowing for *todo* comments) which is run automatically in the [pre-push githook](${doc_files_1.RemoteFlowrFilePathBaseRef}.githooks/pre-push) as explained in the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md):
232
232
 
233
233
  ${(0, doc_code_1.codeBlock)('shell', 'npm run lint-local')}
234
234
 
235
- Besides checking coding style (as defined in the [package.json](${doc_files_1.RemoteFlowrFilePathBaseRef}/package.json)), the *full* linter runs the [license checker](#license-checker).
235
+ Besides checking coding style (as defined in the [package.json](${doc_files_1.RemoteFlowrFilePathBaseRef}package.json)), the *full* linter runs the [license checker](#license-checker).
236
236
 
237
237
  In case you are unaware,
238
238
  eslint can automatically fix several linting problems[](https://eslint.org/docs/latest/use/command-line-interface#fix-problems).
@@ -252,7 +252,7 @@ However, in case you think that the linter is wrong, please do not hesitate to o
252
252
  <a id='license-checker'></a>
253
253
  ### 🪪 License Checker
254
254
 
255
- *flowR* is licensed under the [GPLv3 License](${doc_files_1.FlowrGithubBaseRef}/flowr/blob/main/LICENSE) requiring us to only rely on [compatible licenses](https://www.gnu.org/licenses/license-list.en.html). For now, this list is hardcoded as part of the npm [\`license-compat\`](${doc_files_1.RemoteFlowrFilePathBaseRef}/package.json) script so it can very well be that a new dependency you add causes the checker to fail &mdash; *even though it is compatible*. In that case, please either open a [new issue](${doc_files_1.FlowrGithubBaseRef}/flowr/issues/new/choose) or directly add the license to the list (including a reference to why it is compatible).
255
+ *flowR* is licensed under the [GPLv3 License](${doc_files_1.FlowrGithubBaseRef}/flowr/blob/main/LICENSE) requiring us to only rely on [compatible licenses](https://www.gnu.org/licenses/license-list.en.html). For now, this list is hardcoded as part of the npm [\`license-compat\`](${doc_files_1.RemoteFlowrFilePathBaseRef}package.json) script so it can very well be that a new dependency you add causes the checker to fail &mdash; *even though it is compatible*. In that case, please either open a [new issue](${doc_files_1.FlowrGithubBaseRef}/flowr/issues/new/choose) or directly add the license to the list (including a reference to why it is compatible).
256
256
 
257
257
  <a id='debugging'></a>
258
258
  ## 🐛 Debugging
@@ -86,7 +86,7 @@ export declare const ConstantWikiLinkInfo: {
86
86
  readonly name: "flowR benchmark page";
87
87
  };
88
88
  readonly 'flowr:docs': {
89
- readonly url: "https://flowr-analysis.github.io/flowr/docs";
89
+ readonly url: "https://flowr-analysis.github.io/flowr/doc/";
90
90
  readonly name: "flowR code docs";
91
91
  };
92
92
  readonly 'flowr:zenodo': {
@@ -31,8 +31,8 @@ exports.ConstantWikiLinkInfo = {
31
31
  'flowr:positron': { url: doc_files_1.FlowrPositron, name: 'flowR extension for Positron' },
32
32
  'flowr:rstudio-addin': { url: doc_files_1.FlowrRStudioAddin, name: 'flowR RStudio Addin' },
33
33
  'flowr:radapter': { url: doc_files_1.FlowrRAdapter, name: 'flowR R Adapter' },
34
- 'flowr:benchmarks': { url: 'https://flowr-analysis.github.io/flowr/wiki/stats/benchmark', name: 'flowR benchmark page' },
35
- 'flowr:docs': { url: 'https://flowr-analysis.github.io/flowr/docs', name: 'flowR code docs' },
34
+ 'flowr:benchmarks': { url: `${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark`, name: 'flowR benchmark page' },
35
+ 'flowr:docs': { url: `${doc_files_1.FlowrSiteBaseRef}/doc/`, name: 'flowR code docs' },
36
36
  'flowr:zenodo': { url: 'https://zenodo.org/doi/10.5281/zenodo.13319290', name: 'flowR on Zenodo' },
37
37
  };
38
38
  /**
@@ -124,15 +124,19 @@ function makeDocContextForTypes(shell, ...rootFolders) {
124
124
  link = i.url;
125
125
  text ??= i.name;
126
126
  }
127
+ else if (pageName.startsWith('wiki/')) {
128
+ link = `${doc_files_1.FlowrWikiBaseRef}/${pageName.slice('wiki/'.length).replaceAll(' ', '-')}`;
129
+ }
127
130
  else {
128
- link = `${doc_files_1.FlowrGithubRef}/${pageName.toLowerCase().replaceAll(' ', '-')}`;
131
+ link = (0, doc_files_1.flowrSourceFileUrl)(/\.[a-z0-9]+$/i.test(pageName) ? pageName : pageName + '.md');
129
132
  }
130
133
  text ??= pageName.split('/').pop() ?? pageName;
131
134
  return `[${text}](${link}${segment ? '#' + segment : ''})`;
132
135
  },
133
136
  linkCode(path, lineNumber) {
134
- const lnk = lineNumber ? `${path.toString()}#L${lineNumber}` : path.toString();
135
- return `[${path.toString()}](${encodeURIComponent(lnk)})`;
137
+ const p = path.toString();
138
+ const lnk = (0, doc_files_1.flowrSourceFileUrl)(p) + (lineNumber ? `#L${lineNumber}` : '');
139
+ return `[${p}](${encodeURI(lnk)})`;
136
140
  },
137
141
  cliOption(scriptName, optionName, withAlias = false, quote = true) {
138
142
  return (0, doc_cli_option_1.getCliLongOptionOf)(scriptName, optionName, withAlias, quote);
@@ -109,7 +109,7 @@ The following segments intend to give you an overview of how to work with the no
109
109
 
110
110
  ## How to Get a Normalized AST
111
111
 
112
- As explained alongside the ${ctx.linkPage('wiki/Interface', 'Interface', 'creating-flowr-analyses')} wiki page, you can use an instance of
112
+ As explained alongside the ${ctx.linkPage('wiki/Interface', 'Interface', 'creating-analyses-with-flowr')} wiki page, you can use an instance of
113
113
  ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} to get the ${ctx.link('NormalizedAst')}:
114
114
 
115
115
  ${ctx.code(simpleNormalizedAst, { dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true })}
@@ -38,7 +38,7 @@ Primarily, _flowR_ provides a dataflow analysis framework for the [*R*](https://
38
38
  Its subcomponents (like the custom ${ctx.link(shell_1.RShell)}) or the internals of the static ${ctx.link(graph_1.DataflowGraph)})
39
39
  are not important if you simply wish to use _flowR_.
40
40
  If you wish to use _flowR_, check out one of its extensions (e.g., the ${ctx.linkPage('flowr:vscode', 'VS Code extension')}),
41
- the [REPL and server interfaces](#using-_flowr_-from-the-outside) or its coding API with the
41
+ the [REPL and server interfaces](#using-flowr-from-the-outside) or its coding API with the
42
42
  ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)}.
43
43
 
44
44
  The benchmark module is only of interest if you want to benchmark/measure the runtime performance and reduction of the slicer.
@@ -112,7 +112,7 @@ The supported requests are documented alongside the internal documentation, see
112
112
  <details>
113
113
  <summary>Small demonstration using netcat</summary>
114
114
 
115
- ![Example of a simple netcat session](gif/server-demo.gif)
115
+ ![Example of a simple netcat session](gif/server-demo-opt.gif)
116
116
 
117
117
  <details>
118
118
  <summary>Used <a href="https://github.com/charmbracelet/vhs">vhs</a> code</summary>
@@ -44,6 +44,7 @@ const absint_query_executor_1 = require("../queries/catalog/absint-query/absint-
44
44
  const dice_query_executor_1 = require("../queries/catalog/dice-query/dice-query-executor");
45
45
  const dataflow_lens_query_executor_1 = require("../queries/catalog/dataflow-lens-query/dataflow-lens-query-executor");
46
46
  const signature_query_executor_1 = require("../queries/catalog/signature-query/signature-query-executor");
47
+ const doc_sigdb_1 = require("./doc-util/doc-sigdb");
47
48
  const guess_dep_versions_query_executor_1 = require("../queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor");
48
49
  (0, doc_query_1.registerQueryDocumentation)('call-context', {
49
50
  type: 'active',
@@ -1046,6 +1047,8 @@ class WikiQuery extends doc_maker_1.DocMaker {
1046
1047
  }
1047
1048
  async text({ ctx, shell }) {
1048
1049
  (0, doc_query_1.assertAllQueriesDocumented)();
1050
+ /* the signature query documented here answers from the database, so its examples need one */
1051
+ (0, doc_sigdb_1.warnMissingSigDb)(this.getTarget());
1049
1052
  for (const [file, content] of Object.entries({
1050
1053
  ...await (0, doc_query_1.queryPages)(shell, ctx, 'active'),
1051
1054
  ...await (0, doc_query_1.queryPages)(shell, ctx, 'virtual')
@@ -1061,7 +1064,7 @@ ${(0, doc_structure_1.block)({
1061
1064
  content: `
1062
1065
  There are many ways to query a dataflow graph created by flowR.
1063
1066
  For example, you can use the ${ctx.linkPage('wiki/Interface', '`request-query`', 'message-request-query')} message
1064
- with a running flowR server, or the ${(0, doc_cli_option_1.getReplCommand)('query')} command in the flowR ${ctx.linkPage('wiki/Interface', 'REPL', 'repl')}.
1067
+ with a running flowR server, or the ${(0, doc_cli_option_1.getReplCommand)('query')} command in the flowR ${ctx.linkPage('wiki/Interface', 'REPL', '-using-the-repl')}.
1065
1068
 
1066
1069
  Also, check out the [${doc_files_1.FlowrGithubGroupName}/sample-analyzer-project-query](${doc_files_1.FlowrGithubBaseRef}/sample-analyzer-project-query) repository for a complete example project using the query API.
1067
1070
  `.trim()
@@ -24,7 +24,7 @@ or use its ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')} and $
24
24
 
25
25
 
26
26
  If you want to develop for _flowR_, you want to see how to [build from scratch](#-building-from-scratch) and have a
27
- look at the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md).
27
+ look at the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md).
28
28
 
29
29
  ## 🗒️ Using the Visual Studio Code Extension
30
30
 
@@ -106,7 +106,7 @@ At the time of writing this, there is currently no page for frequently encounter
106
106
  ## 📜 Developing for _flowR_
107
107
 
108
108
  If you want to develop for _flowR_, explore the wiki.
109
- For details on _how_ to contribute, please refer to the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md) in the repository.
109
+ For details on _how_ to contribute, please refer to the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md) in the repository.
110
110
 
111
111
  ### 📦 The Signature Database
112
112
 
@@ -116,7 +116,7 @@ _flowR_ resolves \`library(pkg)\`/\`pkg::fn\` calls from a downloaded signature
116
116
  <a id="note1" href="#note1ref">&lt;1&gt;</a>: Currently, _flowR_ is only tested with R versions \`4.x\` and \`3.6.x\`.
117
117
 
118
118
  <a id="note2" href="#note2ref">&lt;2&gt;</a>: We use
119
- [git-lfs](https://git-lfs.com/) to store larger files, especially for the wiki pages. So if you want to work on these parts, make sure to have it set-up (see the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md) in the repository for more information).
119
+ [git-lfs](https://git-lfs.com/) to store larger files, especially for the wiki pages. So if you want to work on these parts, make sure to have it set-up (see the [CONTRIBUTING.md](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md) in the repository for more information).
120
120
  `.trim();
121
121
  }
122
122
  }
@@ -18,9 +18,7 @@ const config_1 = require("../config");
18
18
  const flowr_analyzer_package_versions_sigdb_plugin_1 = require("../project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin");
19
19
  const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
20
20
  const flowr_analyzer_dependencies_context_1 = require("../project/context/flowr-analyzer-dependencies-context");
21
- function cranDatabaseAvailable() {
22
- return (0, manifest_1.defaultSigDbPath)('current') !== undefined || (0, manifest_1.defaultSigDbPath)('full') !== undefined;
23
- }
21
+ const doc_sigdb_1 = require("./doc-util/doc-sigdb");
24
22
  /** point the resolver at your own database (a file path or manifest) */
25
23
  function usePackageDatabase(parser) {
26
24
  const sigdb = new flowr_analyzer_package_versions_sigdb_plugin_1.FlowrAnalyzerPackageVersionsSigDbPlugin('/path/to/sigs.manifest.json.br');
@@ -201,8 +199,7 @@ class WikiSignatureDatabase extends doc_maker_1.DocMaker {
201
199
  * leaves the committed page untouched, so the workflow reports no change and publishes nothing.
202
200
  */
203
201
  async make(args) {
204
- if (!cranDatabaseAvailable()) {
205
- console.log(` [${this.getTarget()}] skipped: no CRAN sigdb present (not downloaded); keeping the committed page`);
202
+ if ((0, doc_sigdb_1.warnMissingSigDb)(this.getTarget())) {
206
203
  return false;
207
204
  }
208
205
  return super.make(args);
package/gas.d.ts CHANGED
@@ -25,6 +25,12 @@ export declare const GasFeatureKey: {
25
25
  readonly SideEffectLinking: "side-effect-linking";
26
26
  /** Gas key for the linter, checked once per linting rule. Under critical pressure, remaining rules are skipped. */
27
27
  readonly Linter: "linter";
28
+ /**
29
+ * Gas key for the static slicer, checked while traversing the dataflow graph. Under critical pressure the
30
+ * traversal stops and the slice is returned as far as it got (`SliceResult.stoppedEarly`), which is the only
31
+ * way to bound the otherwise synchronous traversal from the outside.
32
+ */
33
+ readonly Slicer: "slicer";
28
34
  };
29
35
  export type GasFeatureKey = typeof GasFeatureKey[keyof typeof GasFeatureKey];
30
36
  /** Paired low/high thresholds used inside {@link FlowrGasThresholds}. */
package/gas.js CHANGED
@@ -13,6 +13,12 @@ exports.GasFeatureKey = {
13
13
  /** Gas key for the side-effect link resolution phase of the dataflow extractor, which matches unknown side effects against call sites via the CFG and can be expensive for large scripts. */
14
14
  SideEffectLinking: 'side-effect-linking',
15
15
  /** Gas key for the linter, checked once per linting rule. Under critical pressure, remaining rules are skipped. */
16
- Linter: 'linter'
16
+ Linter: 'linter',
17
+ /**
18
+ * Gas key for the static slicer, checked while traversing the dataflow graph. Under critical pressure the
19
+ * traversal stops and the slice is returned as far as it got (`SliceResult.stoppedEarly`), which is the only
20
+ * way to bound the otherwise synchronous traversal from the outside.
21
+ */
22
+ Slicer: 'slicer'
17
23
  };
18
24
  //# sourceMappingURL=gas.js.map
@@ -379,7 +379,7 @@ export declare const LintingRules: {
379
379
  };
380
380
  };
381
381
  readonly 'syntactically-valid': {
382
- readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", [], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
382
+ readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"from", [], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
383
383
  readonly processSearchResult: (_elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/syntactically-valid").SyntacticallyValidConfig, data: import("../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>) => Promise<{
384
384
  results: import("./rules/syntactically-valid").SyntacticallyValidResult[];
385
385
  ".meta": import("./rules/syntactically-valid").SyntacticallyValidMetadata;
@@ -19,10 +19,21 @@ export interface SyntacticallyValidMetadata extends MergeableRecord {
19
19
  readonly fixable: number;
20
20
  readonly parser: string;
21
21
  }
22
+ /** One pass over an error region, blind to strings and comments. */
23
+ export interface RegionScan {
24
+ /** The closing delimiters the region leaves open, innermost first. */
25
+ readonly closers: readonly string[];
26
+ /** Offset of every `%` outside a string or comment; an odd count means an unclosed `%...%` operator. */
27
+ readonly percentAt: readonly number[];
28
+ }
22
29
  /** A `missing` (parser-inserted, zero-width) or `error` (un-parseable) tree-sitter node. */
23
30
  export interface SyntaxErrorFinding {
24
31
  readonly kind: 'missing' | 'error';
25
32
  readonly node: SyntaxNode;
33
+ /** The source line the node starts on, for patterns judging a pasted line rather than a token. */
34
+ readonly line: string;
35
+ /** The region, scanned on first use. */
36
+ readonly scan: RegionScan;
26
37
  }
27
38
  /** An extensible auto-fix pattern; append to {@link SyntaxErrorFixPatterns} to teach the rule new repairs. */
28
39
  export interface SyntaxErrorFixPattern {
@@ -35,7 +46,7 @@ export interface SyntaxErrorFixPattern {
35
46
  /** The built-in auto-fix patterns; append a {@link SyntaxErrorFixPattern} to add repairs. */
36
47
  export declare const SyntaxErrorFixPatterns: SyntaxErrorFixPattern[];
37
48
  export declare const SYNTACTICALLY_VALID: {
38
- readonly createSearch: () => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", [], import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
49
+ readonly createSearch: () => import("../../search/flowr-search-builder").FlowrSearchBuilder<"from", [], import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
39
50
  readonly processSearchResult: (_elements: import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: SyntacticallyValidConfig, data: import("../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>) => Promise<{
40
51
  results: SyntacticallyValidResult[];
41
52
  ".meta": SyntacticallyValidMetadata;