@eagleoutice/flowr 2.15.10 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -26
- package/abstract-interpretation/data-frame/arguments.js +11 -7
- package/control-flow/happens-before.d.ts +5 -0
- package/control-flow/happens-before.js +48 -34
- package/control-flow/useless-loop.d.ts +1 -1
- package/control-flow/useless-loop.js +29 -42
- package/dataflow/environments/built-in-props.d.ts +9 -0
- package/dataflow/environments/built-in-props.js +25 -19
- package/dataflow/environments/built-in.d.ts +2 -2
- package/dataflow/environments/built-in.js +41 -77
- package/dataflow/environments/default-builtin-config.d.ts +181 -29
- package/dataflow/environments/default-builtin-config.js +38 -24
- package/dataflow/environments/environment.d.ts +6 -4
- package/dataflow/environments/environment.js +54 -121
- package/dataflow/environments/identifier.d.ts +4 -2
- package/dataflow/environments/identifier.js +23 -69
- package/dataflow/environments/reference-to-maybe.d.ts +9 -0
- package/dataflow/environments/reference-to-maybe.js +23 -51
- package/dataflow/environments/resolve-by-name.js +37 -76
- package/dataflow/eval/resolve/resolve-argument.d.ts +3 -1
- package/dataflow/eval/resolve/resolve-argument.js +61 -64
- package/dataflow/eval/resolve/resolve-working-directory.d.ts +8 -2
- package/dataflow/eval/resolve/resolve-working-directory.js +12 -20
- package/dataflow/eval/resolve/resolve.d.ts +4 -0
- package/dataflow/eval/resolve/resolve.js +23 -14
- package/dataflow/extractor.js +176 -59
- package/dataflow/fn/class-declaration.d.ts +8 -2
- package/dataflow/fn/class-declaration.js +96 -97
- package/dataflow/fn/exceptions-of-function.js +68 -37
- package/dataflow/fn/frame-reflection.d.ts +12 -4
- package/dataflow/fn/frame-reflection.js +51 -41
- package/dataflow/fn/function-props.js +15 -33
- package/dataflow/fn/function-semantics.d.ts +11 -3
- package/dataflow/fn/function-semantics.js +6 -0
- package/dataflow/fn/higher-order-function.js +13 -17
- package/dataflow/fn/strict-function.d.ts +13 -0
- package/dataflow/fn/strict-function.js +285 -122
- package/dataflow/graph/call-graph.d.ts +7 -6
- package/dataflow/graph/call-graph.js +35 -46
- package/dataflow/graph/graph.d.ts +6 -1
- package/dataflow/graph/graph.js +57 -66
- package/dataflow/info.d.ts +8 -1
- package/dataflow/info.js +24 -30
- package/dataflow/internal/control-flow.d.ts +31 -4
- package/dataflow/internal/control-flow.js +61 -39
- package/dataflow/internal/linker.d.ts +15 -9
- package/dataflow/internal/linker.js +253 -241
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +80 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +446 -78
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +51 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +119 -185
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +7 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +122 -147
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +55 -25
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +289 -251
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +30 -32
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +68 -67
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +72 -126
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +10 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +8 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +12 -28
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +40 -118
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +16 -24
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +93 -102
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +173 -114
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +22 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +34 -9
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +119 -93
- package/dataflow/internal/process/functions/call/common.d.ts +1 -3
- package/dataflow/internal/process/functions/call/common.js +36 -76
- package/dataflow/internal/process/functions/call/deferred.d.ts +6 -2
- package/dataflow/internal/process/functions/call/deferred.js +54 -57
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +65 -68
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +3 -5
- package/dataflow/internal/process/functions/call/named-call-handling.js +35 -21
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
- package/dataflow/internal/process/functions/call/quoted.js +162 -172
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +17 -38
- package/dataflow/internal/process/functions/process-parameter.js +25 -32
- package/dataflow/internal/process/process-symbol.js +3 -6
- package/dataflow/internal/program-order.d.ts +26 -0
- package/dataflow/internal/program-order.js +49 -0
- package/documentation/wiki-setup.js +23 -0
- package/linter/linter-rules.d.ts +17 -8
- package/linter/rules/absolute-path.js +63 -87
- package/linter/rules/file-path-validity.d.ts +4 -2
- package/linter/rules/file-path-validity.js +114 -80
- package/linter/rules/namespace-access.js +21 -33
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +60 -48
- package/linter/rules/network-functions.js +11 -7
- package/linter/rules/no-leaked-credentials.js +15 -18
- package/linter/rules/problematic-inputs.d.ts +2 -1
- package/linter/rules/problematic-inputs.js +39 -59
- package/linter/rules/roxygen-arguments.d.ts +9 -4
- package/linter/rules/roxygen-arguments.js +29 -48
- package/linter/rules/seeded-randomness.d.ts +7 -4
- package/linter/rules/seeded-randomness.js +128 -89
- package/linter/rules/stop-with-call-arg.d.ts +4 -2
- package/linter/rules/stop-with-call-arg.js +25 -22
- package/linter/rules/unclosed-connection.js +31 -24
- package/linter/rules/undefined-symbol.d.ts +4 -6
- package/linter/rules/undefined-symbol.js +58 -75
- package/linter/rules/unescaped-arguments.js +18 -44
- package/linter/rules/unused-definition.d.ts +6 -0
- package/linter/rules/unused-definition.js +105 -145
- package/linter/rules/unused-import.d.ts +3 -0
- package/linter/rules/unused-import.js +25 -43
- package/package.json +5 -2
- package/project/flowr-analyzer.js +6 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +8 -12
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +7 -5
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +34 -56
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +16 -41
- package/queries/base-query-format.js +1 -2
- package/queries/catalog/absint-query/absint-query-format.js +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +4 -7
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +50 -114
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +5 -9
- package/queries/catalog/dependencies-query/function-info/library-functions.js +6 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/write-functions.js +7 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +4 -4
- package/queries/catalog/input-sources-query/simple-input-classifier.js +192 -301
- package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -1
- package/r-bridge/lang-4.x/ast/model/model.js +19 -43
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -12
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/roxygen2/roxygen-parse.js +28 -42
- package/r-bridge/shell.js +6 -0
- package/search/search-executor/search-enrichers.js +25 -37
- package/slicing/static/slice-call.d.ts +4 -3
- package/slicing/static/slice-call.js +56 -88
- package/slicing/static/static-slicer.js +115 -79
- package/slicing/static/visiting-queue.d.ts +4 -6
- package/slicing/static/visiting-queue.js +9 -13
- package/util/proc.js +2 -1
- package/util/r-base-packages.d.ts +2 -0
- package/util/r-base-packages.js +23 -13
- package/util/text/playground-link.d.ts +12 -3
- package/util/text/playground-link.js +18 -27
- package/util/version.js +4 -10
|
@@ -8,7 +8,6 @@ const search_enrichers_1 = require("../../search/search-executor/search-enricher
|
|
|
8
8
|
const identifier_1 = require("../../dataflow/environments/identifier");
|
|
9
9
|
const flowr_search_filters_1 = require("../../search/flowr-search-filters");
|
|
10
10
|
const graph_1 = require("../../dataflow/graph/graph");
|
|
11
|
-
const cascade_action_1 = require("../../queries/catalog/call-context-query/cascade-action");
|
|
12
11
|
const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
13
12
|
const linter_tags_1 = require("../linter-tags");
|
|
14
13
|
const node_value_1 = require("../../dataflow/eval/resolve/node-value");
|
|
@@ -18,14 +17,16 @@ const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-fun
|
|
|
18
17
|
const r_value_1 = require("../../dataflow/eval/values/r-value");
|
|
19
18
|
const info_1 = require("../../dataflow/info");
|
|
20
19
|
const built_in_proc_name_1 = require("../../dataflow/environments/built-in-proc-name");
|
|
20
|
+
const edge_1 = require("../../dataflow/graph/edge");
|
|
21
|
+
const frame_reflection_1 = require("../../dataflow/fn/frame-reflection");
|
|
22
|
+
const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
|
|
23
|
+
const function_semantics_1 = require("../../dataflow/fn/function-semantics");
|
|
24
|
+
const logic_1 = require("../../util/logic");
|
|
25
|
+
const r_function_definition_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
21
26
|
const built_in_props_1 = require("../../dataflow/environments/built-in-props");
|
|
22
27
|
const resolve_helper_1 = require("../../dataflow/environments/resolve-helper");
|
|
23
|
-
const RandomnessProducers = [
|
|
24
|
-
{ type: 'function', name: 'set.seed' },
|
|
25
|
-
{ type: 'assignment', name: '.Random.seed' }
|
|
26
|
-
];
|
|
27
28
|
exports.SEEDED_RANDOMNESS = {
|
|
28
|
-
createSearch:
|
|
29
|
+
createSearch: config => flowr_search_builder_1.Q.all().filter(vertex_1.VertexType.FunctionCall)
|
|
29
30
|
.with(search_enrichers_1.Enrichment.CallTargets, {
|
|
30
31
|
onlyBuiltin: true,
|
|
31
32
|
qualifyNames: false // we don't use qualified names for this rule yet
|
|
@@ -34,19 +35,16 @@ exports.SEEDED_RANDOMNESS = {
|
|
|
34
35
|
name: flowr_search_filters_1.FlowrFilter.MatchesEnrichment,
|
|
35
36
|
args: {
|
|
36
37
|
enrichment: search_enrichers_1.Enrichment.CallTargets,
|
|
37
|
-
test: {
|
|
38
|
-
targets: identifier_1.Identifier.regex(...config.randomnessConsumers)
|
|
39
|
-
}
|
|
38
|
+
test: { targets: identifier_1.Identifier.regex(...config.randomnessConsumers) }
|
|
40
39
|
}
|
|
41
|
-
})
|
|
42
|
-
.with(search_enrichers_1.Enrichment.LastCall, [
|
|
43
|
-
{ callName: config.randomnessProducers.filter(p => p.type === 'function').map(p => p.name) },
|
|
44
|
-
{ callName: data.inspectContext().env.deriveFromDefinitions(getDefaultAssignments).flatMap(b => b.names).map(identifier_1.Identifier.getName), cascadeIf: () => cascade_action_1.CascadeAction.Continue }
|
|
45
|
-
]),
|
|
40
|
+
}),
|
|
46
41
|
processSearchResult: async (elements, config, data) => {
|
|
47
|
-
const
|
|
42
|
+
const { graph } = await data.dataflow();
|
|
43
|
+
const ctx = data.inspectContext();
|
|
44
|
+
const functionProducers = new Set(config.randomnessProducers.filter(p => p.type === 'function').map(p => p.name));
|
|
48
45
|
const assignmentProducers = new Set(config.randomnessProducers.filter(p => p.type === 'assignment').map(p => p.name));
|
|
49
|
-
const
|
|
46
|
+
const consumers = new Set(config.randomnessConsumers);
|
|
47
|
+
const assignmentArgIndexes = ctx.env.deriveFromDefinitions(assignmentTargetIndexes);
|
|
50
48
|
const metadata = {
|
|
51
49
|
consumerCalls: 0,
|
|
52
50
|
callsWithFunctionProducers: 0,
|
|
@@ -54,92 +52,124 @@ exports.SEEDED_RANDOMNESS = {
|
|
|
54
52
|
callsWithNonConstantProducers: 0,
|
|
55
53
|
callsWithOtherBranchProducers: 0
|
|
56
54
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
55
|
+
const writerKind = (vertex) => {
|
|
56
|
+
const name = identifier_1.Identifier.getName(vertex.name);
|
|
57
|
+
if (functionProducers.has(name)) {
|
|
58
|
+
return { kind: 'function', constant: isConstantArgument(graph, vertex, 0, ctx) };
|
|
59
|
+
}
|
|
60
|
+
const argIdx = assignmentArgIndexes.get(name);
|
|
61
|
+
if (argIdx === undefined) {
|
|
62
|
+
return consumers.has(name) ? 'draw' : undefined;
|
|
63
|
+
}
|
|
64
|
+
const dest = graph_1.FunctionArgument.getReference(vertex.args[argIdx]);
|
|
65
|
+
if (dest === undefined || !assignmentProducers.has(node_id_1.NodeId.recoverName(dest, graph.idMap))) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
/* we either have arg index 0 or 1 for the destination, so the value is at 1-argIdx */
|
|
69
|
+
return { kind: 'assignment', constant: isConstantArgument(graph, vertex, 1 - argIdx, ctx) };
|
|
70
|
+
};
|
|
71
|
+
const idMap = graph.idMap;
|
|
72
|
+
const forcing = function_semantics_1.FunctionSemantics.promiseForcing(graph, { ctx });
|
|
73
|
+
const at = (n) => idMap?.get(n)?.location ?? [0, 0, 0, 0];
|
|
74
|
+
/** whether `writer` follows `reader` within a loop both run under, so it reaches the reader from the second iteration on */
|
|
75
|
+
const loopCarried = (reader, writer) => {
|
|
76
|
+
if (range_1.SourceRange.compare(at(writer), at(reader)) <= 0) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const writerCds = graph.getVertex(writer)?.cds;
|
|
80
|
+
const loops = graph.getVertex(reader)?.cds?.filter(cd => info_1.ControlDependency.isIterated(cd, idMap)) ?? [];
|
|
81
|
+
return loops.some(loop => writerCds?.some(cd => info_1.ControlDependency.same(cd, loop)));
|
|
82
|
+
};
|
|
83
|
+
/** the writes a draw reads the generator state from: its own, and those of the calls running the function it sits in, which link what was written before them */
|
|
84
|
+
const statesReadBy = (id) => {
|
|
85
|
+
const within = idMap === undefined ? undefined : model_1.RNode.findEnclosing(id, idMap, r_function_definition_1.RFunctionDefinition.is);
|
|
86
|
+
const callers = within === undefined ? [] : (0, frame_reflection_1.edgeSources)(graph, within, edge_1.EdgeType.Calls);
|
|
87
|
+
const ownReads = (0, frame_reflection_1.edgeTargets)(graph, id, edge_1.EdgeType.Reads | edge_1.EdgeType.DefinedByOnCall);
|
|
88
|
+
return [...ownReads, ...callers.flatMap(c => (0, frame_reflection_1.edgeTargets)(graph, c, edge_1.EdgeType.DefinedByOnCall))];
|
|
89
|
+
};
|
|
90
|
+
/** follows the draws behind the generator state `id` reads back to where it was seeded */
|
|
91
|
+
const collectSeeding = (id, visiting, seeding) => {
|
|
92
|
+
const own = new Set(graph.getVertex(id)?.cds);
|
|
93
|
+
const cds = [];
|
|
94
|
+
let written = false;
|
|
95
|
+
let always = false;
|
|
96
|
+
for (const target of statesReadBy(id)) {
|
|
97
|
+
const writer = graph.getVertex(target);
|
|
98
|
+
const kind = vertex_1.DfgVertex.isFunctionCall(writer) && !visiting.has(target) ? writerKind(writer) : undefined;
|
|
99
|
+
if (kind === undefined) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
/* a write later in the same loop body reaches the call from the second iteration on only */
|
|
103
|
+
if (loopCarried(id, target)) {
|
|
104
|
+
seeding.otherBranch = seeding.unseeded = true;
|
|
95
105
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const argIdx = assignmentArgIndexes.get(identifier_1.Identifier.getName(a.name));
|
|
99
|
-
const dest = graph_1.FunctionArgument.getReference(a.args[argIdx]);
|
|
100
|
-
if (dest !== undefined && assignmentProducers.has(node_id_1.NodeId.recoverName(dest, dataflow.graph.idMap))) {
|
|
101
|
-
// we either have arg index 0 or 1 for the assignmentProducers destination, so we select the assignment value as 1-argIdx here
|
|
102
|
-
if (isConstantArgument(dataflow.graph, a, 1 - argIdx, data.inspectContext())) {
|
|
103
|
-
const aCds = new Set(a.cds).difference(cds);
|
|
104
|
-
if (aCds.size <= 0 || (0, info_1.happensInEveryBranchSet)(aCds)) {
|
|
105
|
-
metadata.callsWithAssignmentProducers++;
|
|
106
|
-
return [];
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
for (const f of aCds) {
|
|
110
|
-
cdsOfProduces.add(f);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
106
|
+
else {
|
|
107
|
+
written = true;
|
|
115
108
|
}
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
/* a promise surely forced is no condition */
|
|
110
|
+
const conditions = new Set(writer?.cds?.filter(cd => cd.byPromise !== true || forcing(cd.id, target) !== logic_1.Ternary.Always)).difference(own);
|
|
111
|
+
always ||= conditions.size === 0;
|
|
112
|
+
cds.push(...conditions);
|
|
113
|
+
if (kind === 'draw') {
|
|
114
|
+
collectSeeding(target, new Set([...visiting, id]), seeding);
|
|
115
|
+
}
|
|
116
|
+
else if (kind.constant) {
|
|
117
|
+
seeding.seeds[kind.kind].add(target);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
seeding.nonConstant = seeding.unseeded = true;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/* the state the program starts with is seen wherever no write reaches for sure */
|
|
124
|
+
if (!written) {
|
|
125
|
+
seeding.unseeded = true;
|
|
126
|
+
}
|
|
127
|
+
else if (!always && !(0, info_1.happensInEveryBranch)(cds)) {
|
|
128
|
+
seeding.otherBranch = seeding.unseeded = true;
|
|
129
|
+
}
|
|
130
|
+
return seeding;
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
results: elements.getElements().flatMap(element => (0, search_enrichers_1.enrichmentContent)(element, search_enrichers_1.Enrichment.CallTargets).targets.flatMap(target => {
|
|
134
|
+
metadata.consumerCalls++;
|
|
135
|
+
const id = element.node.info.id;
|
|
136
|
+
const seeding = collectSeeding(id, new Set(), {
|
|
137
|
+
seeds: { function: new Set(), assignment: new Set() },
|
|
138
|
+
nonConstant: false,
|
|
139
|
+
otherBranch: false,
|
|
140
|
+
unseeded: false
|
|
141
|
+
});
|
|
142
|
+
metadata.callsWithFunctionProducers += seeding.seeds.function.size;
|
|
143
|
+
metadata.callsWithAssignmentProducers += seeding.seeds.assignment.size;
|
|
144
|
+
if (!seeding.unseeded) {
|
|
118
145
|
return [];
|
|
119
146
|
}
|
|
120
|
-
if (nonConstant) {
|
|
147
|
+
if (seeding.nonConstant) {
|
|
121
148
|
metadata.callsWithNonConstantProducers++;
|
|
122
149
|
}
|
|
123
|
-
if (
|
|
150
|
+
if (seeding.otherBranch) {
|
|
124
151
|
metadata.callsWithOtherBranchProducers++;
|
|
125
152
|
}
|
|
126
|
-
/* a call
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
153
|
+
/* a call in a function body is seeded by what its callers did first (`set.seed(1); sapply(1:3, function(i) runif(1))`),
|
|
154
|
+
so only a call the program itself reaches can be unseeded for certain */
|
|
155
|
+
const nested = !graph.isRoot(id);
|
|
156
|
+
const someSeed = seeding.seeds.function.size + seeding.seeds.assignment.size > 0;
|
|
130
157
|
return [{
|
|
131
|
-
involvedId:
|
|
132
|
-
certainty:
|
|
133
|
-
function:
|
|
134
|
-
loc: element.
|
|
158
|
+
involvedId: id,
|
|
159
|
+
certainty: someSeed || nested ? linter_format_1.LintingResultCertainty.Uncertain : linter_format_1.LintingResultCertainty.Certain,
|
|
160
|
+
function: target,
|
|
161
|
+
loc: range_1.SourceLocation.fromNode(element.node) ?? range_1.SourceLocation.invalid()
|
|
135
162
|
}];
|
|
136
|
-
}),
|
|
163
|
+
})),
|
|
137
164
|
'.meta': metadata
|
|
138
165
|
};
|
|
139
166
|
},
|
|
140
167
|
info: {
|
|
141
168
|
defaultConfig: ctx => ({
|
|
142
|
-
randomnessProducers:
|
|
169
|
+
randomnessProducers: [
|
|
170
|
+
...ctx.env.deriveFromIndex(randomnessSetters).map(name => ({ type: 'function', name })),
|
|
171
|
+
{ type: 'assignment', name: '.Random.seed' }
|
|
172
|
+
],
|
|
143
173
|
randomnessConsumers: [
|
|
144
174
|
...ctx.env.deriveFromIndex(randomnessConsumers),
|
|
145
175
|
'princomp', 'pointLabel', 'rbernoulli', 'rdunif', 'generateSeedVectors', 'rvonmises',
|
|
@@ -161,9 +191,18 @@ exports.SEEDED_RANDOMNESS = {
|
|
|
161
191
|
function getDefaultAssignments(definitions) {
|
|
162
192
|
return definitions.filter((b) => b.type === 'function' && (b.processor === built_in_proc_name_1.BuiltInProcName.Assignment || b.processor === built_in_proc_name_1.BuiltInProcName.AssignmentLike));
|
|
163
193
|
}
|
|
194
|
+
function assignmentTargetIndexes(definitions) {
|
|
195
|
+
return new Map(getDefaultAssignments(definitions).flatMap(a => {
|
|
196
|
+
const targetIndex = a.config?.swapSourceAndTarget ? 1 : 0;
|
|
197
|
+
return a.names.map(n => [identifier_1.Identifier.getName(n), targetIndex]);
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
function randomnessSetters(index) {
|
|
201
|
+
return index.withAll([built_in_props_1.SemanticCallTag.Random, built_in_props_1.CallProp.Configures]).map(identifier_1.Identifier.getName);
|
|
202
|
+
}
|
|
164
203
|
function randomnessConsumers(index) {
|
|
165
|
-
|
|
166
|
-
|
|
204
|
+
const setters = new Set(randomnessSetters(index));
|
|
205
|
+
return index.with(built_in_props_1.SemanticCallTag.Random).map(identifier_1.Identifier.getName).filter(n => !setters.has(n));
|
|
167
206
|
}
|
|
168
207
|
function isConstantArgument(graph, call, argIndex, ctx) {
|
|
169
208
|
const args = call.args.filter(arg => arg !== r_function_call_1.EmptyArgument && !arg.name).map(graph_1.FunctionArgument.getReference);
|
|
@@ -2,14 +2,16 @@ import { type LintingResult, LintingRuleCertainty } from '../linter-format';
|
|
|
2
2
|
import type { MergeableRecord } from '../../util/objects';
|
|
3
3
|
import { LintingRuleTag } from '../linter-tags';
|
|
4
4
|
import type { Writable } from 'ts-essentials';
|
|
5
|
+
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
6
|
+
import type { ReadonlyFlowrAnalysisProvider } from '../../project/flowr-analyzer';
|
|
5
7
|
export type StopWithCallResult = LintingResult;
|
|
6
8
|
export type StopWithCallConfig = MergeableRecord;
|
|
7
9
|
export interface StopWithCallMetadata extends MergeableRecord {
|
|
8
10
|
consideredNodes: number;
|
|
9
11
|
}
|
|
10
12
|
export declare const STOP_WITH_CALL_ARG: {
|
|
11
|
-
readonly createSearch: () => import("../../search/flowr-search-builder").FlowrSearchBuilder<"
|
|
12
|
-
readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<
|
|
13
|
+
readonly createSearch: () => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<ParentInformation, [] | import("../../search/flowr-search").FlowrSearchElement<ParentInformation>[]>>>;
|
|
14
|
+
readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, import("../../search/flowr-search").FlowrSearchElement<ParentInformation>[]>, _config: MergeableRecord, data: ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
|
|
13
15
|
results: Writable<StopWithCallResult>[];
|
|
14
16
|
'.meta': StopWithCallMetadata;
|
|
15
17
|
}>;
|
|
@@ -8,6 +8,7 @@ const flowr_search_builder_1 = require("../../search/flowr-search-builder");
|
|
|
8
8
|
const linter_tags_1 = require("../linter-tags");
|
|
9
9
|
const assert_1 = require("../../util/assert");
|
|
10
10
|
const vertex_1 = require("../../dataflow/graph/vertex");
|
|
11
|
+
const resolve_argument_1 = require("../../dataflow/eval/resolve/resolve-argument");
|
|
11
12
|
const general_1 = require("../../dataflow/eval/values/general");
|
|
12
13
|
const resolve_helper_1 = require("../../dataflow/environments/resolve-helper");
|
|
13
14
|
const df_helper_1 = require("../../dataflow/graph/df-helper");
|
|
@@ -16,8 +17,17 @@ const r_function_definition_1 = require("../../r-bridge/lang-4.x/ast/model/nodes
|
|
|
16
17
|
const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
17
18
|
const identifier_1 = require("../../dataflow/environments/identifier");
|
|
18
19
|
const ConditionConstructors = new Set(['simpleCondition', 'simpleError', 'simpleWarning', 'simpleMessage', 'errorCondition', 'warningCondition']);
|
|
20
|
+
/** whether the call builds a condition object, for which `stop` ignores `call.`: a constructor, or a class naming `condition` */
|
|
21
|
+
function isConditionObject(signaled, graph, data) {
|
|
22
|
+
if (ConditionConstructors.has(identifier_1.Identifier.getName(signaled.functionName.content))) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
const vertex = graph.getVertex(signaled.info.id);
|
|
26
|
+
const classes = vertex_1.DfgVertex.isFunctionCall(vertex) ? (0, resolve_argument_1.getArgumentStringValue)(data.flowrConfig.solver.variables, graph, vertex, undefined, 'class', true, data.inspectContext()) : undefined;
|
|
27
|
+
return classes?.values().some(c => c.has('condition')) ?? false;
|
|
28
|
+
}
|
|
19
29
|
exports.STOP_WITH_CALL_ARG = {
|
|
20
|
-
createSearch: () => flowr_search_builder_1.Q.
|
|
30
|
+
createSearch: () => flowr_search_builder_1.Q.all().filter(vertex_1.VertexType.FunctionCall),
|
|
21
31
|
processSearchResult: async (elements, _config, data) => {
|
|
22
32
|
const dataflow = await data.dataflow();
|
|
23
33
|
const meta = {
|
|
@@ -27,37 +37,30 @@ exports.STOP_WITH_CALL_ARG = {
|
|
|
27
37
|
results: elements.getElements()
|
|
28
38
|
.filter(element => {
|
|
29
39
|
const idMap = dataflow.graph.idMap;
|
|
40
|
+
const fCall = dataflow.graph.getVertex(element.node.info.id);
|
|
41
|
+
/* a call that hands over `stop` itself, like `do.call(stop, args)`, states its arguments elsewhere */
|
|
42
|
+
if (!r_function_call_1.RFunctionCall.is(element.node) || identifier_1.Identifier.getName(fCall.name) !== 'stop') {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
30
45
|
if (idMap !== undefined && model_1.RNode.findEnclosing(element.node.info.id, idMap, r_function_definition_1.RFunctionDefinition.is) === undefined) {
|
|
31
46
|
return false;
|
|
32
47
|
}
|
|
33
|
-
//only built-in functions
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const builtIn = origins.every(e => e.type === 3 /* OriginType.BuiltInFunctionOrigin */);
|
|
37
|
-
if (!builtIn) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
48
|
+
// only built-in functions
|
|
49
|
+
if (df_helper_1.Dataflow.origin(dataflow.graph, element.node.info.id)?.some(e => e.type !== 3 /* OriginType.BuiltInFunctionOrigin */)) {
|
|
50
|
+
return false;
|
|
40
51
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const stopParamMap = {
|
|
44
|
-
'...': '...',
|
|
45
|
-
'call.': 'call.',
|
|
46
|
-
'domain': 'domain'
|
|
47
|
-
};
|
|
52
|
+
// filter out function calls with argument "call." set to false
|
|
53
|
+
const stopParamMap = { '...': '...', 'call.': 'call.', 'domain': 'domain' };
|
|
48
54
|
const mapping = function_semantics_1.FunctionSemantics.call.match.toSpec(fCall.args, stopParamMap);
|
|
49
55
|
const signaled = idMap?.get(mapping.get('...')?.[0]);
|
|
50
|
-
if (r_function_call_1.RFunctionCall.isNamed(signaled) &&
|
|
56
|
+
if (r_function_call_1.RFunctionCall.isNamed(signaled) && isConditionObject(signaled, dataflow.graph, data)) {
|
|
51
57
|
return false;
|
|
52
58
|
}
|
|
53
|
-
const
|
|
54
|
-
for (const argId of mappedToStop) {
|
|
59
|
+
for (const argId of mapping.get('call.') ?? []) {
|
|
55
60
|
const res = resolve_helper_1.Resolve.toValue(argId, { graph: dataflow.graph, environment: fCall.environment, ctx: data.inspectContext() });
|
|
56
61
|
const values = (0, general_1.valueSetGuard)(res);
|
|
57
|
-
if (values?.type === 'set' && values.elements.length !== 0) {
|
|
58
|
-
|
|
59
|
-
return values.elements[0].value;
|
|
60
|
-
}
|
|
62
|
+
if (values?.type === 'set' && values.elements.length !== 0 && values.elements[0].type === 'logical') {
|
|
63
|
+
return values.elements[0].value;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
return true;
|
|
@@ -11,12 +11,16 @@ const info_1 = require("../../dataflow/info");
|
|
|
11
11
|
const built_in_props_1 = require("../../dataflow/environments/built-in-props");
|
|
12
12
|
const query_fn_props_1 = require("../../dataflow/environments/query-fn-props");
|
|
13
13
|
const identifier_1 = require("../../dataflow/environments/identifier");
|
|
14
|
+
const frame_reflection_1 = require("../../dataflow/fn/frame-reflection");
|
|
14
15
|
const flowr_search_builder_1 = require("../../search/flowr-search-builder");
|
|
15
16
|
const range_1 = require("../../util/range");
|
|
16
17
|
const assert_1 = require("../../util/assert");
|
|
17
18
|
const linter_format_1 = require("../linter-format");
|
|
18
19
|
const linter_tags_1 = require("../linter-tags");
|
|
19
20
|
const r_expression_list_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-expression-list");
|
|
21
|
+
const r_argument_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
22
|
+
const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
23
|
+
const resolve_argument_1 = require("../../dataflow/eval/resolve/resolve-argument");
|
|
20
24
|
/** the edges the connection flows along, from the call opening it to the argument of the call closing it */
|
|
21
25
|
const ConnectionFlow = edge_1.EdgeType.Reads | edge_1.EdgeType.DefinedBy | edge_1.EdgeType.DefinedByOnCall | edge_1.EdgeType.Returns | edge_1.EdgeType.Argument;
|
|
22
26
|
/** The arguments holding the handle the call acts on, all of them if it does not state which. */
|
|
@@ -48,24 +52,15 @@ function openCallsReaching(graph, start, opens, out) {
|
|
|
48
52
|
}
|
|
49
53
|
/** The variable definition the opened connection is bound to, if it is bound to one. */
|
|
50
54
|
function bindingOf(graph, open) {
|
|
51
|
-
|
|
52
|
-
if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.DefinedBy) && vertex_1.DfgVertex.isVariableDefinition(graph.getVertex(source))) {
|
|
53
|
-
return source;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return undefined;
|
|
55
|
+
return (0, frame_reflection_1.edgeSources)(graph, open, edge_1.EdgeType.DefinedBy).find(source => vertex_1.DfgVertex.isVariableDefinition(graph.getVertex(source)));
|
|
57
56
|
}
|
|
58
57
|
/** The statement `id` belongs to, i.e. the ancestor that is an element of an expression list. */
|
|
59
58
|
function enclosingStatement(idMap, id) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
node = parent;
|
|
67
|
-
}
|
|
68
|
-
return undefined;
|
|
59
|
+
const statement = model_1.RNode.findEnclosing(id, idMap, n => {
|
|
60
|
+
const parent = model_1.RNode.directParent(n, idMap);
|
|
61
|
+
return parent === undefined || r_expression_list_1.RExpressionList.is(parent);
|
|
62
|
+
});
|
|
63
|
+
return statement === undefined ? undefined : idMap.get(statement);
|
|
69
64
|
}
|
|
70
65
|
function liftedOutOfLoops(idMap, id, definition) {
|
|
71
66
|
let lifted = id;
|
|
@@ -84,8 +79,7 @@ function closeFix(graph, open) {
|
|
|
84
79
|
if (idMap === undefined || definition === undefined || name === undefined) {
|
|
85
80
|
return undefined;
|
|
86
81
|
}
|
|
87
|
-
const reads = (
|
|
88
|
-
.filter(([, edge]) => edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Reads)).map(([source]) => source);
|
|
82
|
+
const reads = (0, frame_reflection_1.edgeSources)(graph, definition, edge_1.EdgeType.Reads);
|
|
89
83
|
const statements = [definition, ...reads]
|
|
90
84
|
.map(id => range_1.SourceLocation.fromNode(enclosingStatement(idMap, liftedOutOfLoops(idMap, id, definition))))
|
|
91
85
|
.filter(assert_1.isNotUndefined);
|
|
@@ -128,6 +122,22 @@ function unclosedCertainty(graph, open, closes) {
|
|
|
128
122
|
/* the closes may still cover every branch between them, as in `if(p) close(c) else close(c)` */
|
|
129
123
|
return uncovered.size > 0 && info_1.ControlDependency.happensInEveryBranchSet(uncovered) ? undefined : linter_format_1.LintingResultCertainty.Uncertain;
|
|
130
124
|
}
|
|
125
|
+
/** Whether the call creates its connection unopened and hands it straight to a call reading or writing it, which opens and closes it. */
|
|
126
|
+
function consumedInPlace(dataflow, open, ctx) {
|
|
127
|
+
const { graph } = dataflow;
|
|
128
|
+
const vertex = graph.getVertex(open);
|
|
129
|
+
const node = graph.idMap?.get(open);
|
|
130
|
+
const arg = node && graph.idMap ? model_1.RNode.directParent(node, graph.idMap) : undefined;
|
|
131
|
+
const consumer = r_argument_1.RArgument.is(arg) && graph.idMap ? model_1.RNode.directParent(arg, graph.idMap) : undefined;
|
|
132
|
+
if (!vertex_1.DfgVertex.isFunctionCall(vertex) || !r_function_call_1.RFunctionCall.is(consumer)) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
const mode = (0, resolve_argument_1.boundArgumentIndex)(graph, vertex, undefined, 'open', ctx);
|
|
136
|
+
const stated = (0, query_fn_props_1.callFnProps)(consumer.info.id, dataflow);
|
|
137
|
+
return (mode === undefined ? vertex.args.length <= 1 : mode >= vertex.args.length)
|
|
138
|
+
&& function_semantics_1.FunctionSemantics.call.props.hasAny(stated, [built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.Writes])
|
|
139
|
+
&& !function_semantics_1.FunctionSemantics.call.props.hasAny(stated, built_in_props_1.SemanticCallTag.Opens);
|
|
140
|
+
}
|
|
131
141
|
/** The calls opening and the calls closing a connection, as the props state and the configuration adds. */
|
|
132
142
|
function connectionCalls(elements, dataflow, config) {
|
|
133
143
|
const opensByName = config.openFns.length > 0 ? identifier_1.Identifier.regex(...config.openFns) : undefined;
|
|
@@ -170,17 +180,14 @@ exports.UNCLOSED_CONNECTION = {
|
|
|
170
180
|
}
|
|
171
181
|
}
|
|
172
182
|
for (const open of reached) {
|
|
173
|
-
|
|
174
|
-
if (known) {
|
|
175
|
-
known.push(close.id);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
closedBy.set(open, [close.id]);
|
|
179
|
-
}
|
|
183
|
+
closedBy.set(open, [...(closedBy.get(open) ?? []), close.id]);
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
const results = [];
|
|
183
187
|
for (const [open, loc] of opens) {
|
|
188
|
+
if (consumedInPlace(dataflow, open, data.inspectContext())) {
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
184
191
|
const certainty = unclosedCertainty(graph, open, closedBy.get(open));
|
|
185
192
|
if (certainty === undefined) {
|
|
186
193
|
continue;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { MergeableRecord } from '../../util/objects';
|
|
2
|
-
import type { FlowrSearchElement } from '../../search/flowr-search';
|
|
3
|
-
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
4
2
|
import { type LintingResult, LintingRuleCertainty } from '../linter-format';
|
|
5
3
|
import { LintingRuleTag } from '../linter-tags';
|
|
6
4
|
/** whether the flagged symbol is used in a function-call position or as a plain variable */
|
|
@@ -12,8 +10,6 @@ export interface UndefinedSymbolResult extends LintingResult {
|
|
|
12
10
|
kind: UndefinedSymbolKind;
|
|
13
11
|
/** packages that export this name - a hint that a `library()`/`::` might be missing (empty if none known) */
|
|
14
12
|
availableInPackages?: readonly string[];
|
|
15
|
-
/** an unresolved `library()` is in scope that could define this name; treat as low-confidence */
|
|
16
|
-
mayBeProvidedByUnresolvedLibrary?: boolean;
|
|
17
13
|
}
|
|
18
14
|
export interface UndefinedSymbolConfig extends MergeableRecord {
|
|
19
15
|
/** flag names used in a function-call position that cannot be resolved (default `true`) */
|
|
@@ -42,6 +38,8 @@ export interface SuppressionCounts {
|
|
|
42
38
|
nonStandardEval: number;
|
|
43
39
|
/** used as a `[`/`[[` subscript (muted `data.table`-style column masking) */
|
|
44
40
|
subscript: number;
|
|
41
|
+
/** a bare name a `library()` flowR could not resolve may export */
|
|
42
|
+
unresolvedLibrary: number;
|
|
45
43
|
}
|
|
46
44
|
export interface UndefinedSymbolMetadata extends MergeableRecord {
|
|
47
45
|
totalFunctionCalls: number;
|
|
@@ -57,8 +55,8 @@ export interface UndefinedSymbolMetadata extends MergeableRecord {
|
|
|
57
55
|
* as a hint. Over-approximative: NSE beyond what flowR models can still cause false positives.
|
|
58
56
|
*/
|
|
59
57
|
export declare const UNDEFINED_SYMBOL: {
|
|
60
|
-
readonly createSearch: (_config: UndefinedSymbolConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<ParentInformation, [] | FlowrSearchElement<ParentInformation>[]>>>;
|
|
61
|
-
readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, config: UndefinedSymbolConfig, data: import("../..").ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
|
|
58
|
+
readonly createSearch: (_config: UndefinedSymbolConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
|
|
59
|
+
readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: UndefinedSymbolConfig, data: import("../..").ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
|
|
62
60
|
results: UndefinedSymbolResult[];
|
|
63
61
|
'.meta': UndefinedSymbolMetadata;
|
|
64
62
|
}>;
|