@eagleoutice/flowr 2.9.12 → 2.9.13

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 (81) hide show
  1. package/README.md +27 -27
  2. package/benchmark/slicer.d.ts +4 -2
  3. package/benchmark/slicer.js +20 -6
  4. package/benchmark/stats/print.js +12 -0
  5. package/benchmark/stats/stats.d.ts +3 -2
  6. package/benchmark/stats/stats.js +1 -1
  7. package/benchmark/summarizer/data.d.ts +1 -0
  8. package/benchmark/summarizer/second-phase/process.js +5 -0
  9. package/cli/benchmark-app.d.ts +1 -0
  10. package/cli/benchmark-app.js +1 -0
  11. package/cli/benchmark-helper-app.d.ts +2 -1
  12. package/cli/benchmark-helper-app.js +6 -3
  13. package/cli/common/options.d.ts +8 -0
  14. package/cli/common/options.js +3 -1
  15. package/cli/common/scripts-info.d.ts +8 -0
  16. package/cli/export-quads-app.js +1 -1
  17. package/cli/flowr.js +3 -3
  18. package/cli/repl/core.d.ts +3 -3
  19. package/cli/repl/server/connection.d.ts +2 -2
  20. package/cli/repl/server/server.d.ts +2 -2
  21. package/cli/script-core/statistics-core.d.ts +2 -2
  22. package/cli/script-core/statistics-helper-core.d.ts +2 -2
  23. package/cli/script-core/statistics-helper-core.js +1 -1
  24. package/cli/slicer-app.js +2 -2
  25. package/cli/statistics-app.js +1 -1
  26. package/cli/statistics-helper-app.js +1 -1
  27. package/cli/wiki.js +2 -2
  28. package/config.d.ts +65 -24
  29. package/config.js +197 -161
  30. package/control-flow/extract-cfg.js +5 -8
  31. package/core/steps/pipeline-step.d.ts +2 -2
  32. package/dataflow/eval/resolve/alias-tracking.js +12 -15
  33. package/dataflow/graph/graph.js +8 -8
  34. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -2
  35. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
  36. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +20 -9
  37. package/documentation/doc-readme.js +2 -2
  38. package/documentation/wiki-analyzer.js +7 -5
  39. package/documentation/wiki-core.js +1 -3
  40. package/documentation/wiki-dataflow-graph.js +1 -1
  41. package/documentation/wiki-interface.js +5 -3
  42. package/documentation/wiki-linter.js +5 -5
  43. package/documentation/wiki-mk/doc-context.js +3 -4
  44. package/engines.d.ts +2 -2
  45. package/engines.js +4 -4
  46. package/linter/rules/dataframe-access-validation.js +5 -5
  47. package/linter/rules/naming-convention.d.ts +1 -1
  48. package/linter/rules/naming-convention.js +7 -3
  49. package/package.json +3 -1
  50. package/project/context/flowr-analyzer-context.d.ts +6 -6
  51. package/project/context/flowr-analyzer-context.js +2 -2
  52. package/project/context/flowr-analyzer-files-context.d.ts +2 -2
  53. package/project/context/flowr-analyzer-files-context.js +28 -8
  54. package/project/flowr-analyzer-builder.d.ts +10 -6
  55. package/project/flowr-analyzer-builder.js +12 -3
  56. package/project/flowr-analyzer.d.ts +3 -3
  57. package/queries/catalog/config-query/config-query-format.d.ts +5 -5
  58. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +2 -2
  59. package/queries/catalog/does-call-query/does-call-query-format.d.ts +2 -2
  60. package/queries/catalog/files-query/files-query-format.d.ts +3 -3
  61. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  62. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
  63. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -2
  64. package/queries/catalog/linter-query/linter-query-format.d.ts +3 -3
  65. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -2
  66. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -2
  67. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +3 -3
  68. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -2
  69. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +4 -0
  70. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -2
  71. package/queries/query.d.ts +18 -18
  72. package/r-bridge/lang-4.x/ast/model/model.d.ts +7 -2
  73. package/r-bridge/lang-4.x/ast/model/model.js +13 -0
  74. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +2 -2
  75. package/r-bridge/lang-4.x/ast/parser/json/parser.js +2 -2
  76. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +6 -2
  77. package/statistics/statistics.d.ts +2 -2
  78. package/util/objects.d.ts +12 -0
  79. package/util/objects.js +28 -0
  80. package/util/summarizer.js +1 -1
  81. package/util/version.js +1 -1
@@ -59,7 +59,7 @@ export interface ReadOnlyFlowrAnalyzerFilesContext {
59
59
  /**
60
60
  * Check if the context has a file with the given path.
61
61
  * Please note, that this may also check the file system, depending on the configuration
62
- * (see {@link FlowrConfigOptions.project.resolveUnknownPathsOnDisk}).
62
+ * (see {@link FlowrConfig.project.resolveUnknownPathsOnDisk}).
63
63
  * @param path - The path to the file.
64
64
  *
65
65
  * If you do not know the exact path or, e.g., casing of the file, use {@link exists} instead.
@@ -70,7 +70,7 @@ export interface ReadOnlyFlowrAnalyzerFilesContext {
70
70
  * @param path - The path to the file.
71
71
  * @param ignoreCase - Whether to ignore case when checking for the file.
72
72
  *
73
- * Please note that this method checks the file system based on the configuration (see {@link FlowrConfigOptions.project.resolveUnknownPathsOnDisk}).
73
+ * Please note that this method checks the file system based on the configuration (see {@link FlowrConfig.project.resolveUnknownPathsOnDisk}).
74
74
  * @returns The actual path of the file if it exists, otherwise `undefined`.
75
75
  */
76
76
  exists(path: string, ignoreCase: boolean): string | undefined;
@@ -129,19 +129,39 @@ class FlowrAnalyzerFilesContext extends abstract_flowr_analyzer_context_1.Abstra
129
129
  if (!ignoreCase) {
130
130
  return this.hasFile(p) ? p : undefined;
131
131
  }
132
+ if (this.hasFile(p)) {
133
+ return p;
134
+ }
132
135
  // walk the directory and find the first match
133
136
  const dir = path_1.default.dirname(p);
134
- const file = path_1.default.basename(p);
137
+ const file = path_1.default.basename(p).toLowerCase();
135
138
  // try to find in local known files first
136
- const localFound = Array.from(this.files.keys()).find(f => {
137
- return path_1.default.dirname(f) === dir && path_1.default.basename(f).toLowerCase() === file.toLowerCase();
138
- });
139
- if (localFound) {
140
- return localFound;
139
+ for (const f of this.files.keys()) {
140
+ if (path_1.default.dirname(f).toLowerCase() !== dir.toLowerCase()) {
141
+ continue;
142
+ }
143
+ const lf = path_1.default.basename(f).toLowerCase();
144
+ if (file === lf) {
145
+ return f;
146
+ }
141
147
  }
142
148
  if (this.ctx.config.project.resolveUnknownPathsOnDisk) {
143
- const files = fs_1.default.readdirSync(dir);
144
- const found = files.find(f => f.toLowerCase() === file.toLowerCase());
149
+ let files;
150
+ if (fs_1.default.existsSync(dir)) {
151
+ files = fs_1.default.readdirSync(dir);
152
+ }
153
+ else {
154
+ // try to find a dir in parent
155
+ const parentDir = path_1.default.dirname(dir);
156
+ if (fs_1.default.existsSync(parentDir)) {
157
+ const parentFiles = fs_1.default.readdirSync(parentDir);
158
+ const foundDir = parentFiles.find(f => f.toLowerCase() === path_1.default.basename(dir).toLowerCase());
159
+ if (foundDir) {
160
+ files = fs_1.default.readdirSync(path_1.default.join(parentDir, foundDir));
161
+ }
162
+ }
163
+ }
164
+ const found = files?.find(f => f.toLowerCase() === file);
145
165
  return found ? path_1.default.join(dir, found) : undefined;
146
166
  }
147
167
  return undefined;
@@ -1,10 +1,11 @@
1
- import { type EngineConfig, type FlowrConfigOptions } from '../config';
2
- import type { DeepWritable } from 'ts-essentials';
1
+ import { type EngineConfig, FlowrConfig } from '../config';
2
+ import type { DeepWritable, PathValue } from 'ts-essentials';
3
3
  import { FlowrAnalyzer } from './flowr-analyzer';
4
4
  import type { KnownParser } from '../r-bridge/parser';
5
5
  import type { FlowrAnalyzerPlugin } from './plugins/flowr-analyzer-plugin';
6
6
  import type { NormalizeRequiredInput } from '../core/steps/all/core/10-normalize';
7
7
  import type { BuiltInFlowrPluginName, PluginToRegister } from './plugins/plugin-registry';
8
+ import type { AutocompletablePaths } from '../util/objects';
8
9
  /**
9
10
  * Builder for the {@link FlowrAnalyzer}, use it to configure all analysis aspects before creating the analyzer instance
10
11
  * with {@link FlowrAnalyzerBuilder#build|`.build()`} or {@link FlowrAnalyzerBuilder#buildSync|`.buildSync()`}.
@@ -32,7 +33,7 @@ export declare class FlowrAnalyzerBuilder {
32
33
  private flowrConfig;
33
34
  private parser?;
34
35
  private input?;
35
- private plugins;
36
+ private readonly plugins;
36
37
  /**
37
38
  * Creates a new builder for the {@link FlowrAnalyzer}.
38
39
  * By default, the standard set of plugins as returned by {@link FlowrAnalyzerPluginDefaults} are registered.
@@ -44,15 +45,18 @@ export declare class FlowrAnalyzerBuilder {
44
45
  constructor(withDefaultPlugins?: boolean);
45
46
  /**
46
47
  * Apply an amendment to the configuration the builder currently holds.
47
- * Per default, the {@link defaultConfigOptions} are used.
48
+ * This is mostly intended for more complex logic to transform the config.
49
+ * Please consider using {@link FlowrAnalyzerBuilder.configure} to set/amend individual values
50
+ * Per default, the value returned by {@link FlowrConfig.default} is used.
48
51
  * @param func - Receives the current configuration of the builder and allows for amendment.
49
52
  */
50
- amendConfig(func: (config: DeepWritable<FlowrConfigOptions>) => FlowrConfigOptions | void): this;
53
+ amendConfig(func: (config: DeepWritable<FlowrConfig>) => FlowrConfig | void): this;
51
54
  /**
52
55
  * Overwrite the configuration used by the resulting analyzer.
53
56
  * @param config - The new configuration.
54
57
  */
55
- setConfig(config: FlowrConfigOptions): this;
58
+ setConfig(config: FlowrConfig): this;
59
+ configure<K extends AutocompletablePaths<FlowrConfig>>(key: K, value: PathValue<FlowrConfig, K>): this;
56
60
  /**
57
61
  * Set the parser instance used by the analyzer.
58
62
  * This is an alternative to {@link FlowrAnalyzerBuilder#setEngine} if you already have a parser instance.
@@ -33,7 +33,7 @@ const plugin_registry_1 = require("./plugins/plugin-registry");
33
33
  * @see https://github.com/flowr-analysis/flowr/wiki/Analyzer
34
34
  */
35
35
  class FlowrAnalyzerBuilder {
36
- flowrConfig = (0, config_1.cloneConfig)(config_1.defaultConfigOptions);
36
+ flowrConfig = config_1.FlowrConfig.default();
37
37
  parser;
38
38
  input;
39
39
  plugins = new Map();
@@ -52,12 +52,14 @@ class FlowrAnalyzerBuilder {
52
52
  }
53
53
  /**
54
54
  * Apply an amendment to the configuration the builder currently holds.
55
- * Per default, the {@link defaultConfigOptions} are used.
55
+ * This is mostly intended for more complex logic to transform the config.
56
+ * Please consider using {@link FlowrAnalyzerBuilder.configure} to set/amend individual values
57
+ * Per default, the value returned by {@link FlowrConfig.default} is used.
56
58
  * @param func - Receives the current configuration of the builder and allows for amendment.
57
59
  */
58
60
  // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
59
61
  amendConfig(func) {
60
- this.flowrConfig = (0, config_1.amendConfig)(this.flowrConfig, func);
62
+ this.flowrConfig = config_1.FlowrConfig.amend(this.flowrConfig, func);
61
63
  return this;
62
64
  }
63
65
  /**
@@ -68,6 +70,13 @@ class FlowrAnalyzerBuilder {
68
70
  this.flowrConfig = config;
69
71
  return this;
70
72
  }
73
+ /**
74
+ * Set a specific value in the configuration used by the resulting analyzer.
75
+ */
76
+ configure(key, value) {
77
+ config_1.FlowrConfig.setInConfigInPlace(this.flowrConfig, key, value);
78
+ return this;
79
+ }
71
80
  /**
72
81
  * Set the parser instance used by the analyzer.
73
82
  * This is an alternative to {@link FlowrAnalyzerBuilder#setEngine} if you already have a parser instance.
@@ -1,4 +1,4 @@
1
- import type { FlowrConfigOptions } from '../config';
1
+ import type { FlowrConfig } from '../config';
2
2
  import type { KnownParser, KnownParserInformation } from '../r-bridge/parser';
3
3
  import { type Queries, type QueryResults, type SupportedQueryTypes } from '../queries/query';
4
4
  import type { ControlFlowInformation } from '../control-flow/control-flow-graph';
@@ -139,7 +139,7 @@ export interface ReadonlyFlowrAnalysisProvider<Parser extends KnownParser = Know
139
139
  */
140
140
  runFull(force?: boolean): Promise<void>;
141
141
  /** This is the config used for the analyzer */
142
- flowrConfig: FlowrConfigOptions;
142
+ flowrConfig: FlowrConfig;
143
143
  }
144
144
  /**
145
145
  * Central class for conducting analyses with FlowR.
@@ -165,7 +165,7 @@ export declare class FlowrAnalyzer<Parser extends KnownParser = KnownParser> imp
165
165
  * @param cache - The caching layer to use for storing analysis results.
166
166
  */
167
167
  constructor(parser: Parser, ctx: FlowrAnalyzerContext, cache: FlowrAnalyzerCache<Parser>);
168
- get flowrConfig(): FlowrConfigOptions;
168
+ get flowrConfig(): FlowrConfig;
169
169
  context(): FlowrAnalyzerContext;
170
170
  parserInformation(): KnownParserInformation;
171
171
  inspectContext(): ReadOnlyFlowrAnalyzerContext;
@@ -2,20 +2,20 @@ import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
2
  import { executeConfigQuery } from './config-query-executor';
3
3
  import { type OutputFormatter } from '../../../util/text/ansi';
4
4
  import Joi from 'joi';
5
- import type { FlowrConfigOptions } from '../../../config';
5
+ import type { FlowrConfig } from '../../../config';
6
6
  import type { DeepPartial } from 'ts-essentials';
7
7
  import type { ParsedQueryLine, Query } from '../../query';
8
8
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
9
9
  import type { CommandCompletions } from '../../../cli/repl/core';
10
10
  export interface ConfigQuery extends BaseQueryFormat {
11
11
  readonly type: 'config';
12
- readonly update?: DeepPartial<FlowrConfigOptions>;
12
+ readonly update?: DeepPartial<FlowrConfig>;
13
13
  }
14
14
  export interface ConfigQueryResult extends BaseQueryResult {
15
- readonly config: FlowrConfigOptions;
15
+ readonly config: FlowrConfig;
16
16
  }
17
- declare function configReplCompleter(partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfigOptions): CommandCompletions;
18
- declare function configQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'config'>;
17
+ declare function configReplCompleter(partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfig): CommandCompletions;
18
+ declare function configQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'config'>;
19
19
  export declare const ConfigQueryDefinition: {
20
20
  readonly executor: typeof executeConfigQuery;
21
21
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
@@ -2,7 +2,7 @@ import Joi from 'joi';
2
2
  import type { DataFrameDomain } from '../../../abstract-interpretation/data-frame/dataframe-domain';
3
3
  import type { StateAbstractDomain } from '../../../abstract-interpretation/domains/state-abstract-domain';
4
4
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
5
- import type { FlowrConfigOptions } from '../../../config';
5
+ import type { FlowrConfig } from '../../../config';
6
6
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
7
7
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
8
8
  import type { ParsedQueryLine } from '../../query';
@@ -15,7 +15,7 @@ export interface DfShapeQuery extends BaseQueryFormat {
15
15
  export interface DfShapeQueryResult extends BaseQueryResult {
16
16
  domains: StateAbstractDomain<DataFrameDomain> | Map<SingleSlicingCriterion, DataFrameDomain | undefined>;
17
17
  }
18
- declare function dfShapeQueryLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'df-shape'>;
18
+ declare function dfShapeQueryLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'df-shape'>;
19
19
  export declare const DfShapeQueryDefinition: {
20
20
  readonly executor: typeof executeDfShapeQuery;
21
21
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -5,7 +5,7 @@ import { executeDoesCallQuery } from './does-call-query-executor';
5
5
  import { type NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
6
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { FlowrConfigOptions } from '../../../config';
8
+ import type { FlowrConfig } from '../../../config';
9
9
  interface CallsIdConstraint {
10
10
  readonly type: 'calls-id';
11
11
  /** The id of the function being called. */
@@ -40,7 +40,7 @@ export interface DoesCallQueryResult extends BaseQueryResult {
40
40
  /** Results are either false (does not call) or an object with details on the calls made */
41
41
  readonly results: Record<string, FindAllCallsResult | false>;
42
42
  }
43
- declare function doesCallQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'does-call'>;
43
+ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'does-call'>;
44
44
  export declare const DoesCallQueryDefinition: {
45
45
  readonly executor: typeof executeDoesCallQuery;
46
46
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
@@ -5,7 +5,7 @@ import { executeFileQuery } from './files-query-executor';
5
5
  import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
6
  import { FileRole } from '../../../project/context/flowr-file';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { FlowrConfigOptions } from '../../../config';
8
+ import type { FlowrConfig } from '../../../config';
9
9
  import type { CommandCompletions } from '../../../cli/repl/core';
10
10
  /**
11
11
  * Returns the content(s) of all files matching the given pattern.
@@ -24,8 +24,8 @@ export interface FileQueryInfo<T = object> {
24
24
  export interface FilesQueryResult extends BaseQueryResult {
25
25
  files: FileQueryInfo[];
26
26
  }
27
- declare function filesQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'files'>;
28
- declare function filesQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions): CommandCompletions;
27
+ declare function filesQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'files'>;
28
+ declare function filesQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfig): CommandCompletions;
29
29
  export declare const FilesQueryDefinition: {
30
30
  readonly executor: typeof executeFileQuery;
31
31
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -4,7 +4,7 @@ import type { ParsedQueryLine } from '../../query';
4
4
  import { executeExceptionQuery } from './inspect-exception-query-executor';
5
5
  import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
6
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
7
- import type { FlowrConfigOptions } from '../../../config';
7
+ import type { FlowrConfig } from '../../../config';
8
8
  import type { ExceptionPoint } from '../../../dataflow/fn/exceptions-of-function';
9
9
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
10
10
  /**
@@ -23,7 +23,7 @@ export interface InspectExceptionQueryResult extends BaseQueryResult {
23
23
  */
24
24
  readonly exceptions: Record<NodeId, ExceptionPoint[]>;
25
25
  }
26
- declare function inspectExceptionLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'inspect-exception'>;
26
+ declare function inspectExceptionLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'inspect-exception'>;
27
27
  export declare const InspectExceptionQueryDefinition: {
28
28
  readonly executor: typeof executeExceptionQuery;
29
29
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
@@ -5,7 +5,7 @@ import { executeHigherOrderQuery } from './inspect-higher-order-query-executor';
5
5
  import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
6
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { FlowrConfigOptions } from '../../../config';
8
+ import type { FlowrConfig } from '../../../config';
9
9
  /**
10
10
  * Either returns all function definitions alongside whether they are higher-order functions,
11
11
  * or just those matching the filters.
@@ -17,7 +17,7 @@ export interface InspectHigherOrderQuery extends BaseQueryFormat {
17
17
  export interface InspectHigherOrderQueryResult extends BaseQueryResult {
18
18
  readonly higherOrder: Record<NodeId, boolean>;
19
19
  }
20
- declare function inspectHoLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'inspect-higher-order'>;
20
+ declare function inspectHoLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'inspect-higher-order'>;
21
21
  export declare const InspectHigherOrderQueryDefinition: {
22
22
  readonly executor: typeof executeHigherOrderQuery;
23
23
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
@@ -5,7 +5,7 @@ import { executeRecursionQuery } from './inspect-recursion-query-executor';
5
5
  import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
6
6
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { FlowrConfigOptions } from '../../../config';
8
+ import type { FlowrConfig } from '../../../config';
9
9
  /**
10
10
  * Either returns all function definitions alongside whether they are recursive,
11
11
  * or just those matching the filters.
@@ -17,7 +17,7 @@ export interface InspectRecursionQuery extends BaseQueryFormat {
17
17
  export interface InspectRecursionQueryResult extends BaseQueryResult {
18
18
  readonly recursive: Record<NodeId, boolean>;
19
19
  }
20
- declare function inspectRecLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'inspect-recursion'>;
20
+ declare function inspectRecLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'inspect-recursion'>;
21
21
  export declare const InspectRecursionQueryDefinition: {
22
22
  readonly executor: typeof executeRecursionQuery;
23
23
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
@@ -4,7 +4,7 @@ import Joi from 'joi';
4
4
  import { executeLinterQuery } from './linter-query-executor';
5
5
  import { type LintingRuleNames } from '../../../linter/linter-rules';
6
6
  import { type ConfiguredLintingRule, LintingResults } from '../../../linter/linter-format';
7
- import type { FlowrConfigOptions } from '../../../config';
7
+ import type { FlowrConfig } from '../../../config';
8
8
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
9
9
  import type { CommandCompletions } from '../../../cli/repl/core';
10
10
  export interface LinterQuery extends BaseQueryFormat {
@@ -23,8 +23,8 @@ export interface LinterQueryResult extends BaseQueryResult {
23
23
  [L in LintingRuleNames]?: LintingResults<L>;
24
24
  };
25
25
  }
26
- declare function linterQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'linter'>;
27
- declare function linterQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions): CommandCompletions;
26
+ declare function linterQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'linter'>;
27
+ declare function linterQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfig): CommandCompletions;
28
28
  export declare const LinterQueryDefinition: {
29
29
  readonly executor: typeof executeLinterQuery;
30
30
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -6,7 +6,7 @@ import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/nod
6
6
  import type { SourceRange } from '../../../util/range';
7
7
  import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
8
8
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
9
- import type { FlowrConfigOptions } from '../../../config';
9
+ import type { FlowrConfig } from '../../../config';
10
10
  import type { ParsedQueryLine } from '../../query';
11
11
  export interface LocationMapQuery extends BaseQueryFormat {
12
12
  readonly type: 'location-map';
@@ -25,7 +25,7 @@ export interface LocationMapQueryResult extends BaseQueryResult {
25
25
  ids: Record<NodeId, [FileId, SourceRange]>;
26
26
  };
27
27
  }
28
- declare function locationMapLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'location-map'>;
28
+ declare function locationMapLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'location-map'>;
29
29
  export declare const LocationMapQueryDefinition: {
30
30
  readonly executor: typeof executeLocationMapQuery;
31
31
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
@@ -6,7 +6,7 @@ import { executeResolveValueQuery } from './origin-query-executor';
6
6
  import type { Origin } from '../../../dataflow/origin/dfg-get-origin';
7
7
  import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
8
8
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
9
- import type { FlowrConfigOptions } from '../../../config';
9
+ import type { FlowrConfig } from '../../../config';
10
10
  export interface OriginQuery extends BaseQueryFormat {
11
11
  readonly type: 'origin';
12
12
  /** The slicing criteria to use */
@@ -15,7 +15,7 @@ export interface OriginQuery extends BaseQueryFormat {
15
15
  export interface OriginQueryResult extends BaseQueryResult {
16
16
  results: Record<SingleSlicingCriterion, Origin[] | undefined>;
17
17
  }
18
- declare function originQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'origin'>;
18
+ declare function originQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'origin'>;
19
19
  export declare const OriginQueryDefinition: {
20
20
  readonly executor: typeof executeResolveValueQuery;
21
21
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -18,15 +18,15 @@ async function executeResolveValueQuery({ analyzer }, queries) {
18
18
  const start = Date.now();
19
19
  const results = {};
20
20
  const graph = (await analyzer.dataflow()).graph;
21
- const ast = await analyzer.normalize();
21
+ const idMap = (await analyzer.normalize()).idMap;
22
22
  for (const query of queries) {
23
23
  const key = fingerPrintOfQuery(query);
24
24
  if (results[key]) {
25
25
  log_1.log.warn(`Duplicate Key for resolve-value-query: ${key}, skipping...`);
26
26
  }
27
27
  const values = query.criteria
28
- .map(criteria => (0, parse_1.slicingCriterionToId)(criteria, ast.idMap))
29
- .flatMap(ident => (0, alias_tracking_1.resolveIdToValue)(ident, { graph, full: true, idMap: ast.idMap, resolve: analyzer.flowrConfig.solver.variables, ctx: analyzer.inspectContext() }));
28
+ .map(criteria => (0, parse_1.slicingCriterionToId)(criteria, idMap))
29
+ .flatMap(ident => (0, alias_tracking_1.resolveIdToValue)(ident, { graph, full: true, idMap, resolve: analyzer.flowrConfig.solver.variables, ctx: analyzer.inspectContext() }));
30
30
  results[key] = {
31
31
  values: values
32
32
  };
@@ -5,7 +5,7 @@ import Joi from 'joi';
5
5
  import { executeResolveValueQuery } from './resolve-value-query-executor';
6
6
  import type { ResolveResult } from '../../../dataflow/eval/resolve/alias-tracking';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { FlowrConfigOptions } from '../../../config';
8
+ import type { FlowrConfig } from '../../../config';
9
9
  export interface ResolveValueQuery extends BaseQueryFormat {
10
10
  readonly type: 'resolve-value';
11
11
  /** The slicing criteria to use */
@@ -16,7 +16,7 @@ export interface ResolveValueQueryResult extends BaseQueryResult {
16
16
  values: ResolveResult[];
17
17
  }>;
18
18
  }
19
- declare function resolveValueLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'resolve-value'>;
19
+ declare function resolveValueLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'resolve-value'>;
20
20
  export declare const ResolveValueQueryDefinition: {
21
21
  readonly executor: typeof executeResolveValueQuery;
22
22
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -30,6 +30,10 @@ exports.ResolveValueQueryDefinition = {
30
30
  executor: resolve_value_query_executor_1.executeResolveValueQuery,
31
31
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
32
32
  const out = queryResults;
33
+ if (out === undefined || typeof out !== 'object' || !('.meta' in out)) {
34
+ result.push(formatter.format('Resolve value failed (maybe your criterion does not exist?)!', { color: 1 /* Colors.Red */, effect: ansi_1.ColorEffect.Foreground, style: 1 /* FontStyles.Bold */ }));
35
+ return true;
36
+ }
33
37
  result.push(`Query: ${(0, ansi_1.bold)('resolve-value', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
34
38
  for (const [fingerprint, obj] of Object.entries(out.results)) {
35
39
  const { criteria } = JSON.parse(fingerprint);
@@ -8,7 +8,7 @@ import { executeStaticSliceQuery } from './static-slice-query-executor';
8
8
  import { SliceDirection } from '../../../core/steps/all/static-slicing/00-slice';
9
9
  import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
10
10
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
11
- import type { FlowrConfigOptions } from '../../../config';
11
+ import type { FlowrConfig } from '../../../config';
12
12
  /** Calculates and returns all clusters encountered in the dataflow graph. */
13
13
  export interface StaticSliceQuery extends BaseQueryFormat {
14
14
  readonly type: 'static-slice';
@@ -31,7 +31,7 @@ export interface StaticSliceQueryResult extends BaseQueryResult {
31
31
  */
32
32
  results: Record<string, Omit<PipelineOutput<typeof DEFAULT_SLICING_PIPELINE>, keyof PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>> | Omit<PipelineOutput<typeof DEFAULT_SLICE_WITHOUT_RECONSTRUCT_PIPELINE>, keyof PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>>>;
33
33
  }
34
- declare function sliceQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions): ParsedQueryLine<'static-slice'>;
34
+ declare function sliceQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'static-slice'>;
35
35
  export declare const StaticSliceQueryDefinition: {
36
36
  readonly executor: typeof executeStaticSliceQuery;
37
37
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
@@ -23,7 +23,7 @@ import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
23
23
  import { type ControlFlowQuery } from './catalog/control-flow-query/control-flow-query-format';
24
24
  import { type DfShapeQuery } from './catalog/df-shape-query/df-shape-query-format';
25
25
  import type { AsyncOrSync } from 'ts-essentials';
26
- import type { FlowrConfigOptions } from '../config';
26
+ import type { FlowrConfig } from '../config';
27
27
  import { type InspectHigherOrderQuery } from './catalog/inspect-higher-order-query/inspect-higher-order-query-format';
28
28
  import type { ReadonlyFlowrAnalysisProvider } from '../project/flowr-analyzer';
29
29
  import type { ReplOutput } from '../cli/repl/commands/repl-main';
@@ -53,9 +53,9 @@ export interface ParsedQueryLine<QueryType extends BaseQueryFormat['type']> {
53
53
  export interface SupportedQuery<QueryType extends BaseQueryFormat['type'] = BaseQueryFormat['type']> {
54
54
  executor: QueryExecutor<QueryArgumentsWithType<QueryType>, Promise<BaseQueryResult>>;
55
55
  /** optional completion in, e.g., the repl */
56
- completer?: (splitLine: readonly string[], startingNewArg: boolean, config: FlowrConfigOptions) => CommandCompletions;
56
+ completer?: (splitLine: readonly string[], startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
57
57
  /** optional query construction from an, e.g., repl line */
58
- fromLine?: (output: ReplOutput, splitLine: readonly string[], config: FlowrConfigOptions) => ParsedQueryLine<QueryType>;
58
+ fromLine?: (output: ReplOutput, splitLine: readonly string[], config: FlowrConfig) => ParsedQueryLine<QueryType>;
59
59
  /**
60
60
  * Generates an ASCII summary of the query result to be printed in, e.g., the REPL.
61
61
  * @returns whether a summary was produced (`true` if so, `false` if not, in this case a default/generic summary will be created)
@@ -79,8 +79,8 @@ export declare const SupportedQueries: {
79
79
  readonly config: {
80
80
  readonly executor: typeof import("./catalog/config-query/config-query-executor").executeConfigQuery;
81
81
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
82
- readonly completer: (partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfigOptions) => CommandCompletions;
83
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"config">;
82
+ readonly completer: (partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
83
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"config">;
84
84
  readonly schema: Joi.ObjectSchema<any>;
85
85
  readonly flattenInvolvedNodes: () => never[];
86
86
  };
@@ -105,7 +105,7 @@ export declare const SupportedQueries: {
105
105
  readonly 'does-call': {
106
106
  readonly executor: typeof import("./catalog/does-call-query/does-call-query-executor").executeDoesCallQuery;
107
107
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
108
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"does-call">;
108
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"does-call">;
109
109
  readonly schema: Joi.ObjectSchema<any>;
110
110
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
111
111
  };
@@ -119,15 +119,15 @@ export declare const SupportedQueries: {
119
119
  readonly executor: typeof import("./catalog/df-shape-query/df-shape-query-executor").executeDfShapeQuery;
120
120
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
121
121
  readonly jsonFormatter: (queryResults: BaseQueryResult) => object;
122
- readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"df-shape">;
122
+ readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"df-shape">;
123
123
  readonly schema: Joi.ObjectSchema<any>;
124
124
  readonly flattenInvolvedNodes: () => never[];
125
125
  };
126
126
  readonly files: {
127
127
  readonly executor: typeof import("./catalog/files-query/files-query-executor").executeFileQuery;
128
128
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
129
- readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions) => CommandCompletions;
130
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"files">;
129
+ readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
130
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"files">;
131
131
  readonly schema: Joi.ObjectSchema<any>;
132
132
  readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
133
133
  };
@@ -152,7 +152,7 @@ export declare const SupportedQueries: {
152
152
  readonly 'static-slice': {
153
153
  readonly executor: typeof import("./catalog/static-slice-query/static-slice-query-executor").executeStaticSliceQuery;
154
154
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
155
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"static-slice">;
155
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"static-slice">;
156
156
  readonly schema: Joi.ObjectSchema<any>;
157
157
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
158
158
  };
@@ -165,7 +165,7 @@ export declare const SupportedQueries: {
165
165
  readonly 'location-map': {
166
166
  readonly executor: typeof import("./catalog/location-map-query/location-map-query-executor").executeLocationMapQuery;
167
167
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
168
- readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"location-map">;
168
+ readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"location-map">;
169
169
  readonly schema: Joi.ObjectSchema<any>;
170
170
  readonly flattenInvolvedNodes: () => never[];
171
171
  };
@@ -184,28 +184,28 @@ export declare const SupportedQueries: {
184
184
  readonly 'inspect-exception': {
185
185
  readonly executor: typeof import("./catalog/inspect-exceptions-query/inspect-exception-query-executor").executeExceptionQuery;
186
186
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
187
- readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"inspect-exception">;
187
+ readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-exception">;
188
188
  readonly schema: Joi.ObjectSchema<any>;
189
189
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
190
190
  };
191
191
  readonly 'inspect-higher-order': {
192
192
  readonly executor: typeof import("./catalog/inspect-higher-order-query/inspect-higher-order-query-executor").executeHigherOrderQuery;
193
193
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
194
- readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"inspect-higher-order">;
194
+ readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-higher-order">;
195
195
  readonly schema: Joi.ObjectSchema<any>;
196
196
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
197
197
  };
198
198
  readonly 'inspect-recursion': {
199
199
  readonly executor: typeof import("./catalog/inspect-recursion-query/inspect-recursion-query-executor").executeRecursionQuery;
200
200
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
201
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"inspect-recursion">;
201
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-recursion">;
202
202
  readonly schema: Joi.ObjectSchema<any>;
203
203
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
204
204
  };
205
205
  readonly 'resolve-value': {
206
206
  readonly executor: typeof import("./catalog/resolve-value-query/resolve-value-query-executor").executeResolveValueQuery;
207
207
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
208
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"resolve-value">;
208
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"resolve-value">;
209
209
  readonly schema: Joi.ObjectSchema<any>;
210
210
  readonly flattenInvolvedNodes: () => never[];
211
211
  };
@@ -218,15 +218,15 @@ export declare const SupportedQueries: {
218
218
  readonly origin: {
219
219
  readonly executor: typeof import("./catalog/origin-query/origin-query-executor").executeResolveValueQuery;
220
220
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
221
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"origin">;
221
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"origin">;
222
222
  readonly schema: Joi.ObjectSchema<any>;
223
223
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
224
224
  };
225
225
  readonly linter: {
226
226
  readonly executor: typeof import("./catalog/linter-query/linter-query-executor").executeLinterQuery;
227
227
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
228
- readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfigOptions) => CommandCompletions;
229
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfigOptions) => ParsedQueryLine<"linter">;
228
+ readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
229
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"linter">;
230
230
  readonly schema: Joi.ObjectSchema<any>;
231
231
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => ((string & {
232
232
  __brand?: "node-id";
@@ -258,13 +258,18 @@ export declare const RNode: {
258
258
  * Returns the direct parent of a node.
259
259
  * Usually, only root nodes do not have a parent, and you can assume that there is a
260
260
  * linear chain of parents leading to the root node.
261
+ * @see {@link iterateParents} - to get all parents of a node
261
262
  */
262
- readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: Map<NodeId, RNode<OtherInfo>>) => RNode<OtherInfo> | undefined;
263
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: Map<NodeId, RNode<OtherInfo & ParentInformation>>) => RNode<OtherInfo & ParentInformation> | undefined;
264
+ /**
265
+ * Returns an iterable of all parents of a node, starting with the direct parent and ending with the root node.
266
+ */
267
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: Map<NodeId, RNode<OtherInfo & ParentInformation>>) => Generator<RNode<OtherInfo & ParentInformation>>;
263
268
  /**
264
269
  * In contrast to the nesting stored in the {@link RNode} structure,
265
270
  * this function calculates the depth of a node by counting the number of parents until the root node is reached.
266
271
  */
267
- readonly depth: (this: void, node: RNode, idMap: Map<NodeId, RNode>) => number;
272
+ readonly depth: (this: void, node: RNode<ParentInformation>, idMap: Map<NodeId, RNode<ParentInformation>>) => number;
268
273
  /**
269
274
  * Collects all node ids within a tree given by a respective root node, but stops collecting at nodes where the given `stop` function returns `true`.
270
275
  * <p>