@eagleoutice/flowr 2.4.8 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/README.md +66 -45
  2. package/benchmark/slicer.js +1 -1
  3. package/benchmark/summarizer/second-phase/graph.js +2 -2
  4. package/cli/flowr.js +3 -29
  5. package/cli/repl/commands/repl-cfg.d.ts +5 -5
  6. package/cli/repl/commands/repl-cfg.js +21 -22
  7. package/cli/repl/commands/repl-commands.d.ts +3 -3
  8. package/cli/repl/commands/repl-commands.js +2 -0
  9. package/cli/repl/commands/repl-dataflow.d.ts +5 -5
  10. package/cli/repl/commands/repl-dataflow.js +27 -30
  11. package/cli/repl/commands/repl-execute.js +1 -0
  12. package/cli/repl/commands/repl-lineage.js +1 -0
  13. package/cli/repl/commands/repl-main.d.ts +34 -3
  14. package/cli/repl/commands/repl-normalize.d.ts +3 -3
  15. package/cli/repl/commands/repl-normalize.js +15 -19
  16. package/cli/repl/commands/repl-parse.d.ts +2 -2
  17. package/cli/repl/commands/repl-parse.js +13 -8
  18. package/cli/repl/commands/repl-query.d.ts +3 -3
  19. package/cli/repl/commands/repl-query.js +29 -19
  20. package/cli/repl/commands/repl-quit.js +1 -0
  21. package/cli/repl/commands/repl-version.js +1 -0
  22. package/cli/repl/core.d.ts +4 -1
  23. package/cli/repl/core.js +21 -1
  24. package/cli/repl/server/connection.d.ts +7 -3
  25. package/cli/repl/server/connection.js +40 -48
  26. package/cli/repl/server/messages/message-slice.d.ts +1 -1
  27. package/cli/slicer-app.js +8 -3
  28. package/config.d.ts +1 -1
  29. package/config.js +4 -1
  30. package/control-flow/extract-cfg.d.ts +1 -1
  31. package/control-flow/extract-cfg.js +1 -1
  32. package/core/pipeline-executor.d.ts +5 -0
  33. package/core/pipeline-executor.js +5 -0
  34. package/core/steps/pipeline/create-pipeline.js +1 -1
  35. package/core/steps/pipeline/default-pipelines.d.ts +42 -42
  36. package/core/steps/pipeline/default-pipelines.js +4 -1
  37. package/dataflow/graph/dataflowgraph-builder.d.ts +11 -12
  38. package/dataflow/graph/dataflowgraph-builder.js +6 -6
  39. package/documentation/doc-util/doc-query.d.ts +3 -6
  40. package/documentation/doc-util/doc-query.js +5 -17
  41. package/documentation/doc-util/doc-search.js +7 -10
  42. package/documentation/doc-util/doc-structure.d.ts +4 -0
  43. package/documentation/doc-util/doc-structure.js +28 -0
  44. package/documentation/doc-util/doc-types.d.ts +5 -1
  45. package/documentation/doc-util/doc-types.js +29 -3
  46. package/documentation/print-analyzer-wiki.d.ts +1 -0
  47. package/documentation/print-analyzer-wiki.js +137 -0
  48. package/documentation/print-core-wiki.d.ts +2 -1
  49. package/documentation/print-core-wiki.js +58 -4
  50. package/documentation/print-dataflow-graph-wiki.js +15 -22
  51. package/documentation/print-interface-wiki.js +18 -1
  52. package/documentation/print-linter-wiki.js +5 -1
  53. package/documentation/print-linting-and-testing-wiki.js +4 -0
  54. package/documentation/print-normalized-ast-wiki.js +6 -8
  55. package/documentation/print-readme.js +6 -0
  56. package/engines.d.ts +9 -0
  57. package/engines.js +38 -0
  58. package/linter/linter-executor.d.ts +2 -8
  59. package/linter/linter-executor.js +9 -4
  60. package/linter/linter-format.d.ts +8 -9
  61. package/linter/linter-rules.d.ts +57 -15
  62. package/linter/linter-rules.js +2 -0
  63. package/linter/rules/absolute-path.d.ts +1 -0
  64. package/linter/rules/dataframe-access-validation.d.ts +4 -3
  65. package/linter/rules/dataframe-access-validation.js +7 -4
  66. package/linter/rules/dead-code.d.ts +2 -1
  67. package/linter/rules/deprecated-functions.d.ts +15 -28
  68. package/linter/rules/deprecated-functions.js +5 -43
  69. package/linter/rules/file-path-validity.d.ts +2 -1
  70. package/linter/rules/file-path-validity.js +1 -1
  71. package/linter/rules/function-finder-util.d.ts +51 -0
  72. package/linter/rules/function-finder-util.js +77 -0
  73. package/linter/rules/naming-convention.d.ts +2 -1
  74. package/linter/rules/network-functions.d.ts +40 -0
  75. package/linter/rules/network-functions.js +24 -0
  76. package/linter/rules/seeded-randomness.d.ts +2 -1
  77. package/linter/rules/unused-definition.d.ts +2 -1
  78. package/linter/rules/useless-loop.d.ts +3 -2
  79. package/linter/rules/useless-loop.js +4 -6
  80. package/package.json +5 -1
  81. package/project/cache/flowr-analyzer-cache.d.ts +93 -0
  82. package/project/cache/flowr-analyzer-cache.js +156 -0
  83. package/project/cache/flowr-cache.d.ts +28 -0
  84. package/project/cache/flowr-cache.js +49 -0
  85. package/project/context/abstract-flowr-analyzer-context.d.ts +35 -0
  86. package/project/context/abstract-flowr-analyzer-context.js +46 -0
  87. package/project/context/flowr-analyzer-context.d.ts +48 -0
  88. package/project/context/flowr-analyzer-context.js +47 -0
  89. package/project/context/flowr-analyzer-dependencies-context.d.ts +38 -0
  90. package/project/context/flowr-analyzer-dependencies-context.js +39 -0
  91. package/project/context/flowr-analyzer-files-context.d.ts +86 -0
  92. package/project/context/flowr-analyzer-files-context.js +130 -0
  93. package/project/context/flowr-analyzer-loading-order-context.d.ts +76 -0
  94. package/project/context/flowr-analyzer-loading-order-context.js +90 -0
  95. package/project/context/flowr-file.d.ts +89 -0
  96. package/project/context/flowr-file.js +78 -0
  97. package/project/flowr-analyzer-builder.d.ts +106 -0
  98. package/project/flowr-analyzer-builder.js +197 -0
  99. package/project/flowr-analyzer.d.ts +125 -0
  100. package/project/flowr-analyzer.js +81 -0
  101. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +17 -0
  102. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +28 -0
  103. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +21 -0
  104. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +34 -0
  105. package/project/plugins/file-plugins/flowr-description-file.d.ts +24 -0
  106. package/project/plugins/file-plugins/flowr-description-file.js +38 -0
  107. package/project/plugins/flowr-analyzer-plugin.d.ts +90 -0
  108. package/project/plugins/flowr-analyzer-plugin.js +82 -0
  109. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +14 -0
  110. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +56 -0
  111. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.d.ts +13 -0
  112. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +33 -0
  113. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +14 -0
  114. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +41 -0
  115. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +10 -0
  116. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +29 -0
  117. package/project/plugins/package-version-plugins/package.d.ts +15 -0
  118. package/project/plugins/package-version-plugins/package.js +56 -0
  119. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +15 -0
  120. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +44 -0
  121. package/queries/base-query-format.d.ts +2 -8
  122. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
  123. package/queries/catalog/call-context-query/call-context-query-executor.js +20 -13
  124. package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -3
  125. package/queries/catalog/call-context-query/call-context-query-format.js +2 -2
  126. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +1 -1
  127. package/queries/catalog/cluster-query/cluster-query-executor.js +2 -2
  128. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -54
  129. package/queries/catalog/cluster-query/cluster-query-format.js +2 -2
  130. package/queries/catalog/config-query/config-query-executor.d.ts +1 -1
  131. package/queries/catalog/config-query/config-query-executor.js +5 -5
  132. package/queries/catalog/config-query/config-query-format.d.ts +1 -1
  133. package/queries/catalog/config-query/config-query-format.js +1 -1
  134. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
  135. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -3
  136. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -54
  137. package/queries/catalog/control-flow-query/control-flow-query-format.js +2 -2
  138. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +1 -1
  139. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +2 -2
  140. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -54
  141. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -1
  142. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +1 -1
  143. package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
  144. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -54
  145. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -1
  146. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
  147. package/queries/catalog/dependencies-query/dependencies-query-executor.js +19 -12
  148. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +7 -56
  149. package/queries/catalog/dependencies-query/dependencies-query-format.js +7 -4
  150. package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +1 -1
  151. package/queries/catalog/df-shape-query/df-shape-query-executor.js +4 -4
  152. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +1 -54
  153. package/queries/catalog/df-shape-query/df-shape-query-format.js +1 -1
  154. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +1 -1
  155. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  156. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -54
  157. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -1
  158. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +1 -1
  159. package/queries/catalog/id-map-query/id-map-query-executor.js +2 -2
  160. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -54
  161. package/queries/catalog/id-map-query/id-map-query-format.js +2 -2
  162. package/queries/catalog/lineage-query/lineage-query-executor.d.ts +1 -1
  163. package/queries/catalog/lineage-query/lineage-query-executor.js +2 -2
  164. package/queries/catalog/lineage-query/lineage-query-format.d.ts +1 -54
  165. package/queries/catalog/lineage-query/lineage-query-format.js +1 -1
  166. package/queries/catalog/linter-query/linter-query-executor.d.ts +1 -1
  167. package/queries/catalog/linter-query/linter-query-executor.js +2 -3
  168. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -54
  169. package/queries/catalog/linter-query/linter-query-format.js +1 -1
  170. package/queries/catalog/location-map-query/location-map-query-executor.d.ts +1 -1
  171. package/queries/catalog/location-map-query/location-map-query-executor.js +3 -2
  172. package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
  173. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  174. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
  175. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +2 -2
  176. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -54
  177. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -1
  178. package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
  179. package/queries/catalog/origin-query/origin-query-executor.js +3 -3
  180. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -54
  181. package/queries/catalog/origin-query/origin-query-format.js +1 -1
  182. package/queries/catalog/project-query/project-query-executor.d.ts +1 -1
  183. package/queries/catalog/project-query/project-query-executor.js +2 -2
  184. package/queries/catalog/project-query/project-query-format.d.ts +1 -54
  185. package/queries/catalog/project-query/project-query-format.js +1 -1
  186. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +1 -1
  187. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +4 -2
  188. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -54
  189. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -1
  190. package/queries/catalog/search-query/search-query-executor.d.ts +1 -1
  191. package/queries/catalog/search-query/search-query-executor.js +3 -3
  192. package/queries/catalog/search-query/search-query-format.d.ts +1 -54
  193. package/queries/catalog/search-query/search-query-format.js +1 -1
  194. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
  195. package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -3
  196. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -54
  197. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -1
  198. package/queries/query-print.d.ts +4 -4
  199. package/queries/query-print.js +12 -12
  200. package/queries/query.d.ts +29 -885
  201. package/queries/query.js +1 -1
  202. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +1 -1
  203. package/r-bridge/retriever.d.ts +15 -2
  204. package/r-bridge/retriever.js +15 -5
  205. package/search/flowr-search-executor.d.ts +3 -5
  206. package/search/flowr-search-executor.js +6 -4
  207. package/search/flowr-search-filters.d.ts +12 -6
  208. package/search/flowr-search-filters.js +1 -1
  209. package/search/flowr-search.d.ts +5 -16
  210. package/search/flowr-search.js +14 -5
  211. package/search/search-executor/search-enrichers.d.ts +37 -36
  212. package/search/search-executor/search-enrichers.js +4 -4
  213. package/search/search-executor/search-generators.d.ts +12 -12
  214. package/search/search-executor/search-generators.js +27 -19
  215. package/search/search-executor/search-mappers.d.ts +5 -5
  216. package/search/search-executor/search-transformer.d.ts +17 -17
  217. package/search/search-executor/search-transformer.js +14 -7
  218. package/util/collections/arrays.d.ts +1 -0
  219. package/util/collections/arrays.js +15 -0
  220. package/util/collections/objectmap.d.ts +17 -0
  221. package/util/collections/objectmap.js +28 -0
  222. package/util/containers.d.ts +0 -1
  223. package/util/containers.js +0 -1
  224. package/util/files.d.ts +17 -0
  225. package/util/files.js +65 -0
  226. package/util/formats/adapter-format.d.ts +6 -0
  227. package/util/formats/adapter-format.js +3 -0
  228. package/util/formats/adapter.d.ts +18 -0
  229. package/util/formats/adapter.js +49 -0
  230. package/util/formats/adapters/r-adapter.d.ts +4 -0
  231. package/util/formats/adapters/r-adapter.js +7 -0
  232. package/util/formats/adapters/rmd-adapter.d.ts +26 -0
  233. package/util/formats/adapters/rmd-adapter.js +91 -0
  234. package/util/version.js +1 -1
@@ -21,60 +21,7 @@ export interface LinterQueryResult extends BaseQueryResult {
21
21
  }
22
22
  export declare const LinterQueryDefinition: {
23
23
  readonly executor: typeof executeLinterQuery;
24
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
25
- readonly name: "parse";
26
- readonly humanReadableName: "parse with R shell";
27
- readonly description: "Parse the given R code into an AST";
28
- readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
29
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
30
- readonly printer: {
31
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
32
- readonly 2: {
33
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
34
- (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
35
- };
36
- readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
37
- };
38
- readonly dependencies: readonly [];
39
- readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
40
- } | {
41
- readonly name: "normalize";
42
- readonly humanReadableName: "normalize";
43
- readonly description: "Normalize the AST to flowR's AST";
44
- readonly processor: (results: {
45
- parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
46
- }, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
47
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
48
- readonly printer: {
49
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
50
- readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
51
- readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
52
- readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
53
- readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
54
- };
55
- readonly dependencies: readonly ["parse"];
56
- readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
57
- } | {
58
- readonly humanReadableName: "dataflow";
59
- readonly processor: (results: {
60
- normalize?: import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
61
- }, input: {
62
- request?: import("../../../r-bridge/retriever").RParseRequests;
63
- parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
64
- }, config: import("../../../config").FlowrConfigOptions) => import("../../../dataflow/info").DataflowInformation;
65
- readonly requiredInput: {};
66
- readonly name: "dataflow";
67
- readonly description: "Construct the dataflow graph";
68
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
69
- readonly printer: {
70
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
71
- readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
72
- readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
73
- readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
74
- readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
75
- };
76
- readonly dependencies: readonly ["normalize"];
77
- }>>, queryResults: BaseQueryResult, result: string[]) => true;
24
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").FlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => true;
78
25
  readonly schema: Joi.ObjectSchema<any>;
79
26
  readonly flattenInvolvedNodes: () => never[];
80
27
  };
@@ -13,7 +13,7 @@ const time_1 = require("../../../util/text/time");
13
13
  const doc_code_1 = require("../../../documentation/doc-util/doc-code");
14
14
  exports.LinterQueryDefinition = {
15
15
  executor: linter_query_executor_1.executeLinterQuery,
16
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
16
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
17
17
  const out = queryResults;
18
18
  result.push(`Query: ${(0, ansi_1.bold)('linter', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
19
19
  for (const [ruleName, results] of Object.entries(out.results)) {
@@ -1,3 +1,3 @@
1
1
  import type { LocationMapQuery, LocationMapQueryResult } from './location-map-query-format';
2
2
  import type { BasicQueryData } from '../../base-query-format';
3
- export declare function executeLocationMapQuery({ ast, dataflow: { graph } }: BasicQueryData, queries: readonly LocationMapQuery[]): LocationMapQueryResult;
3
+ export declare function executeLocationMapQuery({ analyzer }: BasicQueryData, queries: readonly LocationMapQuery[]): Promise<LocationMapQueryResult>;
@@ -22,7 +22,7 @@ function fuzzyFindFile(node, idMap) {
22
22
  }
23
23
  return '<inline>';
24
24
  }
25
- function executeLocationMapQuery({ ast, dataflow: { graph } }, queries) {
25
+ async function executeLocationMapQuery({ analyzer }, queries) {
26
26
  const start = Date.now();
27
27
  const criteriaOfInterest = new Set(queries
28
28
  .flatMap(q => q.ids ?? [])
@@ -34,11 +34,12 @@ function executeLocationMapQuery({ ast, dataflow: { graph } }, queries) {
34
34
  };
35
35
  let count = 0;
36
36
  const inverseMap = new Map();
37
- for (const file of graph.sourced) {
37
+ for (const file of (await analyzer.dataflow()).graph.sourced) {
38
38
  locationMap.files[count] = file;
39
39
  inverseMap.set(file, count);
40
40
  count++;
41
41
  }
42
+ const ast = await analyzer.normalize();
42
43
  for (const [id, node] of ast.idMap.entries()) {
43
44
  if (node.location && (criteriaOfInterest.size === 0 || criteriaOfInterest.has(id))) {
44
45
  const file = fuzzyFindFile(node, ast.idMap);
@@ -24,7 +24,7 @@ export interface LocationMapQueryResult extends BaseQueryResult {
24
24
  }
25
25
  export declare const LocationMapQueryDefinition: {
26
26
  readonly executor: typeof executeLocationMapQuery;
27
- readonly asciiSummarizer: (formatter: OutputFormatter, _processed: unknown, queryResults: BaseQueryResult, result: string[]) => boolean;
27
+ readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => boolean;
28
28
  readonly schema: Joi.ObjectSchema<any>;
29
29
  readonly flattenInvolvedNodes: () => never[];
30
30
  };
@@ -11,7 +11,7 @@ const joi_1 = __importDefault(require("joi"));
11
11
  const query_print_1 = require("../../query-print");
12
12
  exports.LocationMapQueryDefinition = {
13
13
  executor: location_map_query_executor_1.executeLocationMapQuery,
14
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
14
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
15
15
  const out = queryResults;
16
16
  result.push(`Query: ${(0, ansi_1.bold)('location-map', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
17
17
  result.push(' ╰ File List:');
@@ -1,3 +1,3 @@
1
1
  import type { NormalizedAstQuery, NormalizedAstQueryResult } from './normalized-ast-query-format';
2
2
  import type { BasicQueryData } from '../../base-query-format';
3
- export declare function executeNormalizedAstQuery({ ast }: BasicQueryData, queries: readonly NormalizedAstQuery[]): NormalizedAstQueryResult;
3
+ export declare function executeNormalizedAstQuery({ analyzer }: BasicQueryData, queries: readonly NormalizedAstQuery[]): Promise<NormalizedAstQueryResult>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeNormalizedAstQuery = executeNormalizedAstQuery;
4
4
  const log_1 = require("../../../util/log");
5
- function executeNormalizedAstQuery({ ast }, queries) {
5
+ async function executeNormalizedAstQuery({ analyzer }, queries) {
6
6
  if (queries.length !== 1) {
7
7
  log_1.log.warn('Normalized-Ast query expects only up to one query, but got', queries.length);
8
8
  }
@@ -11,7 +11,7 @@ function executeNormalizedAstQuery({ ast }, queries) {
11
11
  /* there is no sense in measuring a get */
12
12
  timing: 0
13
13
  },
14
- normalized: ast
14
+ normalized: await analyzer.normalize()
15
15
  };
16
16
  }
17
17
  //# sourceMappingURL=normalized-ast-query-executor.js.map
@@ -13,60 +13,7 @@ export interface NormalizedAstQueryResult extends BaseQueryResult {
13
13
  }
14
14
  export declare const NormalizedAstQueryDefinition: {
15
15
  readonly executor: typeof executeNormalizedAstQuery;
16
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
17
- readonly name: "parse";
18
- readonly humanReadableName: "parse with R shell";
19
- readonly description: "Parse the given R code into an AST";
20
- readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
21
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
22
- readonly printer: {
23
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
24
- readonly 2: {
25
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
26
- (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
27
- };
28
- readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
29
- };
30
- readonly dependencies: readonly [];
31
- readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
32
- } | {
33
- readonly name: "normalize";
34
- readonly humanReadableName: "normalize";
35
- readonly description: "Normalize the AST to flowR's AST";
36
- readonly processor: (results: {
37
- parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
38
- }, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
39
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
40
- readonly printer: {
41
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
42
- readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
43
- readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
44
- readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
45
- readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
46
- };
47
- readonly dependencies: readonly ["parse"];
48
- readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
49
- } | {
50
- readonly humanReadableName: "dataflow";
51
- readonly processor: (results: {
52
- normalize?: NormalizedAst;
53
- }, input: {
54
- request?: import("../../../r-bridge/retriever").RParseRequests;
55
- parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
56
- }, config: import("../../../config").FlowrConfigOptions) => import("../../../dataflow/info").DataflowInformation;
57
- readonly requiredInput: {};
58
- readonly name: "dataflow";
59
- readonly description: "Construct the dataflow graph";
60
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
61
- readonly printer: {
62
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
63
- readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
64
- readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
65
- readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
66
- readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
67
- };
68
- readonly dependencies: readonly ["normalize"];
69
- }>>, queryResults: BaseQueryResult, result: string[]) => true;
16
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").FlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => true;
70
17
  readonly schema: Joi.ObjectSchema<any>;
71
18
  readonly flattenInvolvedNodes: () => never[];
72
19
  };
@@ -11,7 +11,7 @@ const ast_1 = require("../../../util/mermaid/ast");
11
11
  const joi_1 = __importDefault(require("joi"));
12
12
  exports.NormalizedAstQueryDefinition = {
13
13
  executor: normalized_ast_query_executor_1.executeNormalizedAstQuery,
14
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
14
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
15
15
  const out = queryResults;
16
16
  result.push(`Query: ${(0, ansi_1.bold)('normalized-ast', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
17
17
  result.push(` ╰ [Normalized AST](${(0, ast_1.normalizedAstToMermaidUrl)(out.normalized.ast)})`);
@@ -1,5 +1,5 @@
1
1
  import type { BasicQueryData } from '../../base-query-format';
2
2
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
3
- import type { OriginQueryResult, OriginQuery } from './origin-query-format';
3
+ import type { OriginQuery, OriginQueryResult } from './origin-query-format';
4
4
  export declare function fingerPrintOfQuery(query: OriginQuery): SingleSlicingCriterion;
5
- export declare function executeResolveValueQuery({ dataflow: { graph }, ast }: BasicQueryData, queries: readonly OriginQuery[]): OriginQueryResult;
5
+ export declare function executeResolveValueQuery({ analyzer }: BasicQueryData, queries: readonly OriginQuery[]): Promise<OriginQueryResult>;
@@ -8,7 +8,7 @@ const dfg_get_origin_1 = require("../../../dataflow/origin/dfg-get-origin");
8
8
  function fingerPrintOfQuery(query) {
9
9
  return query.criterion;
10
10
  }
11
- function executeResolveValueQuery({ dataflow: { graph }, ast }, queries) {
11
+ async function executeResolveValueQuery({ analyzer }, queries) {
12
12
  const start = Date.now();
13
13
  const results = {};
14
14
  for (const query of queries) {
@@ -16,12 +16,12 @@ function executeResolveValueQuery({ dataflow: { graph }, ast }, queries) {
16
16
  if (results[key]) {
17
17
  log_1.log.warn(`Duplicate Key for origin-query: ${key}, skipping...`);
18
18
  }
19
- const astId = (0, parse_1.slicingCriterionToId)(key, ast.idMap);
19
+ const astId = (0, parse_1.slicingCriterionToId)(key, (await analyzer.normalize()).idMap);
20
20
  if (astId === undefined) {
21
21
  log_1.log.warn(`Could not resolve id for ${key}, skipping...`);
22
22
  continue;
23
23
  }
24
- results[key] = (0, dfg_get_origin_1.getOriginInDfg)(graph, astId);
24
+ results[key] = (0, dfg_get_origin_1.getOriginInDfg)((await analyzer.dataflow()).graph, astId);
25
25
  }
26
26
  return {
27
27
  '.meta': {
@@ -14,60 +14,7 @@ export interface OriginQueryResult extends BaseQueryResult {
14
14
  }
15
15
  export declare const OriginQueryDefinition: {
16
16
  readonly executor: typeof executeResolveValueQuery;
17
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
18
- readonly name: "parse";
19
- readonly humanReadableName: "parse with R shell";
20
- readonly description: "Parse the given R code into an AST";
21
- readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
22
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
23
- readonly printer: {
24
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
25
- readonly 2: {
26
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
27
- (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
28
- };
29
- readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
30
- };
31
- readonly dependencies: readonly [];
32
- readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
33
- } | {
34
- readonly name: "normalize";
35
- readonly humanReadableName: "normalize";
36
- readonly description: "Normalize the AST to flowR's AST";
37
- readonly processor: (results: {
38
- parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
39
- }, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
40
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
41
- readonly printer: {
42
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
43
- readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
44
- readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
45
- readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
46
- readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
47
- };
48
- readonly dependencies: readonly ["parse"];
49
- readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
50
- } | {
51
- readonly humanReadableName: "dataflow";
52
- readonly processor: (results: {
53
- normalize?: import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
54
- }, input: {
55
- request?: import("../../../r-bridge/retriever").RParseRequests;
56
- parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
57
- }, config: import("../../../config").FlowrConfigOptions) => import("../../../dataflow/info").DataflowInformation;
58
- readonly requiredInput: {};
59
- readonly name: "dataflow";
60
- readonly description: "Construct the dataflow graph";
61
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
62
- readonly printer: {
63
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
64
- readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
65
- readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
66
- readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
67
- readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
68
- };
69
- readonly dependencies: readonly ["normalize"];
70
- }>>, queryResults: BaseQueryResult, result: string[]) => true;
17
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").FlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => true;
71
18
  readonly schema: Joi.ObjectSchema<any>;
72
19
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
73
20
  };
@@ -10,7 +10,7 @@ const joi_1 = __importDefault(require("joi"));
10
10
  const origin_query_executor_1 = require("./origin-query-executor");
11
11
  exports.OriginQueryDefinition = {
12
12
  executor: origin_query_executor_1.executeResolveValueQuery,
13
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
13
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
14
14
  const out = queryResults;
15
15
  result.push(`Query: ${(0, ansi_1.bold)('origin', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
16
16
  for (const [criteria, obj] of Object.entries(out.results)) {
@@ -1,3 +1,3 @@
1
1
  import type { ProjectQuery, ProjectQueryResult } from './project-query-format';
2
2
  import type { BasicQueryData } from '../../base-query-format';
3
- export declare function executeProjectQuery({ dataflow }: BasicQueryData, queries: readonly ProjectQuery[]): ProjectQueryResult;
3
+ export declare function executeProjectQuery({ analyzer }: BasicQueryData, queries: readonly ProjectQuery[]): Promise<ProjectQueryResult>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeProjectQuery = executeProjectQuery;
4
4
  const log_1 = require("../../../util/log");
5
- function executeProjectQuery({ dataflow }, queries) {
5
+ async function executeProjectQuery({ analyzer }, queries) {
6
6
  if (queries.length !== 1) {
7
7
  log_1.log.warn('Project query expects only up to one query, but got', queries.length);
8
8
  }
@@ -11,7 +11,7 @@ function executeProjectQuery({ dataflow }, queries) {
11
11
  /* there is no sense in measuring a get */
12
12
  timing: 0
13
13
  },
14
- files: dataflow.graph.sourced
14
+ files: (await analyzer.dataflow()).graph.sourced
15
15
  };
16
16
  }
17
17
  //# sourceMappingURL=project-query-executor.js.map
@@ -9,60 +9,7 @@ export interface ProjectQueryResult extends BaseQueryResult {
9
9
  }
10
10
  export declare const ProjectQueryDefinition: {
11
11
  readonly executor: typeof executeProjectQuery;
12
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
13
- readonly name: "parse";
14
- readonly humanReadableName: "parse with R shell";
15
- readonly description: "Parse the given R code into an AST";
16
- readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
17
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
18
- readonly printer: {
19
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
20
- readonly 2: {
21
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
22
- (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
23
- };
24
- readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
25
- };
26
- readonly dependencies: readonly [];
27
- readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
28
- } | {
29
- readonly name: "normalize";
30
- readonly humanReadableName: "normalize";
31
- readonly description: "Normalize the AST to flowR's AST";
32
- readonly processor: (results: {
33
- parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
34
- }, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
35
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
36
- readonly printer: {
37
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
38
- readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
39
- readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
40
- readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
41
- readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
42
- };
43
- readonly dependencies: readonly ["parse"];
44
- readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
45
- } | {
46
- readonly humanReadableName: "dataflow";
47
- readonly processor: (results: {
48
- normalize?: import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
49
- }, input: {
50
- request?: import("../../../r-bridge/retriever").RParseRequests;
51
- parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
52
- }, config: import("../../../config").FlowrConfigOptions) => import("../../../dataflow/info").DataflowInformation;
53
- readonly requiredInput: {};
54
- readonly name: "dataflow";
55
- readonly description: "Construct the dataflow graph";
56
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
57
- readonly printer: {
58
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
59
- readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
60
- readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
61
- readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
62
- readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
63
- };
64
- readonly dependencies: readonly ["normalize"];
65
- }>>, queryResults: BaseQueryResult, result: string[]) => true;
12
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").FlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => true;
66
13
  readonly schema: Joi.ObjectSchema<any>;
67
14
  readonly flattenInvolvedNodes: () => never[];
68
15
  };
@@ -10,7 +10,7 @@ const time_1 = require("../../../util/text/time");
10
10
  const joi_1 = __importDefault(require("joi"));
11
11
  exports.ProjectQueryDefinition = {
12
12
  executor: project_query_executor_1.executeProjectQuery,
13
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
13
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
14
14
  const out = queryResults;
15
15
  result.push(`Query: ${(0, ansi_1.bold)('project', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
16
16
  result.push(` ╰ Contains ${out.files.length} file${out.files.length === 1 ? '' : 's'}`);
@@ -1,4 +1,4 @@
1
1
  import type { ResolveValueQuery, ResolveValueQueryResult } from './resolve-value-query-format';
2
2
  import type { BasicQueryData } from '../../base-query-format';
3
3
  export declare function fingerPrintOfQuery(query: ResolveValueQuery): string;
4
- export declare function executeResolveValueQuery({ dataflow: { graph }, ast, config }: BasicQueryData, queries: readonly ResolveValueQuery[]): ResolveValueQueryResult;
4
+ export declare function executeResolveValueQuery({ analyzer }: BasicQueryData, queries: readonly ResolveValueQuery[]): Promise<ResolveValueQueryResult>;
@@ -8,9 +8,11 @@ const alias_tracking_1 = require("../../../dataflow/eval/resolve/alias-tracking"
8
8
  function fingerPrintOfQuery(query) {
9
9
  return JSON.stringify(query);
10
10
  }
11
- function executeResolveValueQuery({ dataflow: { graph }, ast, config }, queries) {
11
+ async function executeResolveValueQuery({ analyzer }, queries) {
12
12
  const start = Date.now();
13
13
  const results = {};
14
+ const graph = (await analyzer.dataflow()).graph;
15
+ const ast = await analyzer.normalize();
14
16
  for (const query of queries) {
15
17
  const key = fingerPrintOfQuery(query);
16
18
  if (results[key]) {
@@ -18,7 +20,7 @@ function executeResolveValueQuery({ dataflow: { graph }, ast, config }, queries)
18
20
  }
19
21
  const values = query.criteria
20
22
  .map(criteria => (0, parse_1.slicingCriterionToId)(criteria, ast.idMap))
21
- .flatMap(ident => (0, alias_tracking_1.resolveIdToValue)(ident, { graph, full: true, idMap: ast.idMap, resolve: config.solver.variables }));
23
+ .flatMap(ident => (0, alias_tracking_1.resolveIdToValue)(ident, { graph, full: true, idMap: ast.idMap, resolve: analyzer.flowrConfig.solver.variables }));
22
24
  results[key] = {
23
25
  values: values
24
26
  };
@@ -15,60 +15,7 @@ export interface ResolveValueQueryResult extends BaseQueryResult {
15
15
  }
16
16
  export declare const ResolveValueQueryDefinition: {
17
17
  readonly executor: typeof executeResolveValueQuery;
18
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
19
- readonly name: "parse";
20
- readonly humanReadableName: "parse with R shell";
21
- readonly description: "Parse the given R code into an AST";
22
- readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
23
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
24
- readonly printer: {
25
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
26
- readonly 2: {
27
- (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
28
- (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
29
- };
30
- readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
31
- };
32
- readonly dependencies: readonly [];
33
- readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
34
- } | {
35
- readonly name: "normalize";
36
- readonly humanReadableName: "normalize";
37
- readonly description: "Normalize the AST to flowR's AST";
38
- readonly processor: (results: {
39
- parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
40
- }, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
41
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
42
- readonly printer: {
43
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
44
- readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
45
- readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
46
- readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
47
- readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
48
- };
49
- readonly dependencies: readonly ["parse"];
50
- readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
51
- } | {
52
- readonly humanReadableName: "dataflow";
53
- readonly processor: (results: {
54
- normalize?: import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
55
- }, input: {
56
- request?: import("../../../r-bridge/retriever").RParseRequests;
57
- parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
58
- }, config: import("../../../config").FlowrConfigOptions) => import("../../../dataflow/info").DataflowInformation;
59
- readonly requiredInput: {};
60
- readonly name: "dataflow";
61
- readonly description: "Construct the dataflow graph";
62
- readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
63
- readonly printer: {
64
- readonly 0: typeof import("../../../core/print/print").internalPrinter;
65
- readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
66
- readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
67
- readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
68
- readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
69
- };
70
- readonly dependencies: readonly ["normalize"];
71
- }>>, queryResults: BaseQueryResult, result: string[]) => true;
18
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").FlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => true;
72
19
  readonly schema: Joi.ObjectSchema<any>;
73
20
  readonly flattenInvolvedNodes: () => never[];
74
21
  };
@@ -11,7 +11,7 @@ const resolve_value_query_executor_1 = require("./resolve-value-query-executor")
11
11
  const r_value_1 = require("../../../dataflow/eval/values/r-value");
12
12
  exports.ResolveValueQueryDefinition = {
13
13
  executor: resolve_value_query_executor_1.executeResolveValueQuery,
14
- asciiSummarizer: (formatter, _processed, queryResults, result) => {
14
+ asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
15
15
  const out = queryResults;
16
16
  result.push(`Query: ${(0, ansi_1.bold)('resolve-value', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
17
17
  for (const [fingerprint, obj] of Object.entries(out.results)) {
@@ -1,3 +1,3 @@
1
1
  import type { BasicQueryData } from '../../base-query-format';
2
2
  import type { SearchQuery, SearchQueryResult } from './search-query-format';
3
- export declare function executeSearch({ ast, dataflow, config }: BasicQueryData, queries: readonly SearchQuery[]): SearchQueryResult;
3
+ export declare function executeSearch({ analyzer }: BasicQueryData, queries: readonly SearchQuery[]): Promise<SearchQueryResult>;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeSearch = executeSearch;
4
4
  const flowr_search_executor_1 = require("../../../search/flowr-search-executor");
5
- function executeSearch({ ast, dataflow, config }, queries) {
5
+ async function executeSearch({ analyzer }, queries) {
6
6
  const start = Date.now();
7
7
  const results = [];
8
8
  for (const query of queries) {
9
9
  const { search } = query;
10
+ const searchResult = await (0, flowr_search_executor_1.runSearch)(search, analyzer);
10
11
  results.push({
11
- ids: (0, flowr_search_executor_1.runSearch)(search, { normalize: ast, dataflow, config })
12
- .getElements().map(({ node }) => node.info.id),
12
+ ids: searchResult.getElements().map(({ node }) => node.info.id),
13
13
  search
14
14
  });
15
15
  }