@eagleoutice/flowr 2.10.4 → 2.10.5
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 +37 -20
- package/abstract-interpretation/absint-visitor.d.ts +17 -21
- package/abstract-interpretation/absint-visitor.js +47 -48
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +0 -3
- package/abstract-interpretation/data-frame/shape-inference.d.ts +2 -1
- package/abstract-interpretation/data-frame/shape-inference.js +5 -4
- package/abstract-interpretation/domains/abstract-domain.d.ts +17 -16
- package/abstract-interpretation/domains/abstract-domain.js +25 -27
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
- package/abstract-interpretation/domains/multi-value-state-domain.d.ts +32 -0
- package/abstract-interpretation/domains/multi-value-state-domain.js +60 -0
- package/abstract-interpretation/domains/partial-product-domain.d.ts +43 -0
- package/abstract-interpretation/domains/partial-product-domain.js +163 -0
- package/abstract-interpretation/domains/product-domain.d.ts +2 -29
- package/abstract-interpretation/domains/product-domain.js +6 -123
- package/abstract-interpretation/domains/set-range-domain.js +3 -3
- package/abstract-interpretation/domains/set-upper-bound-domain.js +1 -1
- package/abstract-interpretation/domains/singleton-domain.js +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +13 -28
- package/abstract-interpretation/domains/state-abstract-domain.js +16 -38
- package/abstract-interpretation/domains/state-domain-like.d.ts +36 -0
- package/abstract-interpretation/domains/state-domain-like.js +3 -0
- package/cli/flowr.js +11 -1
- package/config.d.ts +7 -0
- package/config.js +22 -3
- package/control-flow/semantic-cfg-guided-visitor.d.ts +4 -0
- package/control-flow/semantic-cfg-guided-visitor.js +20 -32
- package/dataflow/environments/default-builtin-config.d.ts +10 -0
- package/dataflow/environments/default-builtin-config.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +38 -21
- package/documentation/doc-readme.js +13 -2
- package/documentation/wiki-absint.d.ts +1 -2
- package/documentation/wiki-absint.js +34 -10
- package/documentation/wiki-analyzer.js +3 -4
- package/documentation/wiki-interface.js +21 -16
- package/linter/linter-rules.d.ts +2 -2
- package/linter/rules/problematic-inputs.d.ts +4 -3
- package/linter/rules/problematic-inputs.js +3 -4
- package/package.json +3 -3
- package/project/flowr-analyzer-builder.d.ts +6 -3
- package/project/flowr-analyzer-builder.js +12 -5
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +4 -3
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +17 -4
- package/project/plugins/flowr-analyzer-plugin.d.ts +1 -1
- package/project/plugins/flowr-analyzer-plugin.js +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +6 -0
- package/queries/catalog/input-sources-query/input-source-functions.js +50 -0
- package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +19 -53
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -1
- package/queries/catalog/input-sources-query/input-sources-query-format.js +26 -11
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +18 -41
- package/queries/catalog/input-sources-query/simple-input-classifier.js +165 -103
- package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -3
- package/util/record.d.ts +18 -3
- package/util/record.js +22 -1
- package/util/version.js +1 -1
- package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +0 -5
- package/project/plugins/flowr-analyzer-plugin-defaults.js +0 -37
|
@@ -11,18 +11,106 @@ const identifier_1 = require("../../../dataflow/environments/identifier");
|
|
|
11
11
|
const assert_1 = require("../../../util/assert");
|
|
12
12
|
const arrays_1 = require("../../../util/collections/arrays");
|
|
13
13
|
const built_in_proc_name_1 = require("../../../dataflow/environments/built-in-proc-name");
|
|
14
|
+
const record_1 = require("../../../util/record");
|
|
15
|
+
const r_number_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-number");
|
|
16
|
+
const r_string_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
17
|
+
const r_logical_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-logical");
|
|
18
|
+
const r_symbol_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol");
|
|
19
|
+
const convert_values_1 = require("../../../r-bridge/lang-4.x/convert-values");
|
|
20
|
+
function isConstantLike(type) {
|
|
21
|
+
return type === InputType.Constant || type === InputType.DerivedConstant;
|
|
22
|
+
}
|
|
23
|
+
/** Returns the common value shared by all defined entries, or `undefined` if they disagree or all are `undefined`. */
|
|
24
|
+
function singleValue(values) {
|
|
25
|
+
let result;
|
|
26
|
+
let seen = false;
|
|
27
|
+
for (const v of values) {
|
|
28
|
+
if (v === undefined) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (!seen) {
|
|
32
|
+
result = v;
|
|
33
|
+
seen = true;
|
|
34
|
+
}
|
|
35
|
+
else if (v !== result) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Accumulates types, control-dependency types, values, and purity while traversing origin
|
|
43
|
+
* chains. Call {@link build} to produce the resulting {@link InputSource}.
|
|
44
|
+
*/
|
|
45
|
+
class ClassificationAccumulator {
|
|
46
|
+
types = [];
|
|
47
|
+
cds = [];
|
|
48
|
+
values = [];
|
|
49
|
+
allPure = true;
|
|
50
|
+
merge(c) {
|
|
51
|
+
this.types.push(...c.types);
|
|
52
|
+
this.values.push(c.value);
|
|
53
|
+
if (c.cds) {
|
|
54
|
+
this.cds.push(...c.cds);
|
|
55
|
+
}
|
|
56
|
+
if (c.trace !== InputTraceType.Pure) {
|
|
57
|
+
this.allPure = false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
pushUnknown() {
|
|
61
|
+
this.types.push(InputType.Unknown);
|
|
62
|
+
this.values.push(undefined);
|
|
63
|
+
}
|
|
64
|
+
build(id) {
|
|
65
|
+
const types = this.types.length === 0 ? [InputType.Unknown] : (0, arrays_1.uniqueArray)(this.types);
|
|
66
|
+
const trace = this.allPure ? InputTraceType.Pure : InputTraceType.Alias;
|
|
67
|
+
const src = { id, types, trace };
|
|
68
|
+
const cds = this.cds.length === 0 ? undefined : (0, arrays_1.uniqueArray)(this.cds);
|
|
69
|
+
if (cds) {
|
|
70
|
+
src.cds = cds;
|
|
71
|
+
}
|
|
72
|
+
if (types.every(isConstantLike)) {
|
|
73
|
+
const v = singleValue(this.values);
|
|
74
|
+
if (v !== undefined) {
|
|
75
|
+
src.value = v;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return src;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
14
81
|
class InputClassifier {
|
|
15
82
|
dfg;
|
|
16
83
|
config;
|
|
17
84
|
cache = new Map();
|
|
18
|
-
|
|
85
|
+
fullDfg;
|
|
86
|
+
constructor(dfg, config, fullDfg) {
|
|
19
87
|
this.dfg = dfg;
|
|
20
88
|
this.config = config;
|
|
89
|
+
this.fullDfg = fullDfg;
|
|
21
90
|
}
|
|
22
91
|
isDefinedByOnCall(id) {
|
|
23
|
-
const out = (this.
|
|
92
|
+
const out = (this.fullDfg ?? this.dfg).outgoingEdges(id) ?? new Map();
|
|
24
93
|
return out.values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.DefinedByOnCall));
|
|
25
94
|
}
|
|
95
|
+
extractConstantValue(id) {
|
|
96
|
+
const node = this.dfg.idMap?.get(id);
|
|
97
|
+
if (node === undefined) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
if (r_number_1.RNumber.is(node)) {
|
|
101
|
+
return node.content.num;
|
|
102
|
+
}
|
|
103
|
+
if (r_string_1.RString.is(node)) {
|
|
104
|
+
return node.content.str;
|
|
105
|
+
}
|
|
106
|
+
if (r_logical_1.RLogical.is(node)) {
|
|
107
|
+
return node.content;
|
|
108
|
+
}
|
|
109
|
+
if (r_symbol_1.RSymbol.is(node) && node.content === convert_values_1.RNull) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
26
114
|
classifyEntry(vertex) {
|
|
27
115
|
const cached = this.cache.get(vertex.id);
|
|
28
116
|
if (cached) {
|
|
@@ -31,8 +119,14 @@ class InputClassifier {
|
|
|
31
119
|
// insert temporary unknown to break cycles
|
|
32
120
|
this.cache.set(vertex.id, { id: vertex.id, types: [InputType.Unknown], trace: InputTraceType.Unknown });
|
|
33
121
|
switch (vertex.tag) {
|
|
34
|
-
case vertex_1.VertexType.Value:
|
|
35
|
-
|
|
122
|
+
case vertex_1.VertexType.Value: {
|
|
123
|
+
const src = { id: vertex.id, types: [InputType.Constant], trace: InputTraceType.Unknown };
|
|
124
|
+
const v = this.extractConstantValue(vertex.id);
|
|
125
|
+
if (v !== undefined) {
|
|
126
|
+
src.value = v;
|
|
127
|
+
}
|
|
128
|
+
return this.classifyCdsAndReturn(vertex, src);
|
|
129
|
+
}
|
|
36
130
|
case vertex_1.VertexType.FunctionCall:
|
|
37
131
|
return this.classifyFunctionCall(vertex);
|
|
38
132
|
case vertex_1.VertexType.VariableDefinition:
|
|
@@ -62,32 +156,18 @@ class InputClassifier {
|
|
|
62
156
|
}
|
|
63
157
|
}
|
|
64
158
|
}
|
|
65
|
-
if (!matchesList(call, this.config.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
else if (matchesList(call, this.config.randomFns)) {
|
|
73
|
-
return this.classifyCdsAndReturn(call, { id: call.id, types: [InputType.Random], trace: InputTraceType.Unknown });
|
|
74
|
-
}
|
|
75
|
-
else if (matchesList(call, this.config.systemFns)) {
|
|
76
|
-
return this.classifyCdsAndReturn(call, { id: call.id, types: [InputType.System], trace: InputTraceType.Unknown });
|
|
77
|
-
}
|
|
78
|
-
else if (matchesList(call, this.config.ffiFns)) {
|
|
79
|
-
return this.classifyCdsAndReturn(call, { id: call.id, types: [InputType.Ffi], trace: InputTraceType.Unknown });
|
|
80
|
-
}
|
|
81
|
-
else if (matchesList(call, this.config.langFns)) {
|
|
82
|
-
return this.classifyCdsAndReturn(call, { id: call.id, types: [InputType.Lang], trace: InputTraceType.Unknown });
|
|
83
|
-
}
|
|
84
|
-
else if (matchesList(call, this.config.optionsFns)) {
|
|
85
|
-
return this.classifyCdsAndReturn(call, { id: call.id, types: [InputType.Options], trace: InputTraceType.Unknown });
|
|
159
|
+
if (!matchesList(call, this.config.pure)) {
|
|
160
|
+
const types = [];
|
|
161
|
+
for (const [type, entry] of record_1.Record.entries(this.config)) {
|
|
162
|
+
if (record_1.Record.values(InputType).includes(type) && matchesList(call, entry)) {
|
|
163
|
+
types.push(type);
|
|
164
|
+
}
|
|
86
165
|
}
|
|
87
|
-
|
|
166
|
+
if (types.length === 0) {
|
|
88
167
|
// if it is not pure, we cannot classify based on the inputs, in that case we do not know!
|
|
89
|
-
|
|
168
|
+
types.push(InputType.Unknown);
|
|
90
169
|
}
|
|
170
|
+
return this.classifyCdsAndReturn(call, { id: call.id, types, trace: InputTraceType.Unknown });
|
|
91
171
|
}
|
|
92
172
|
// Otherwise, classify by arguments; pure functions get Known/Pure handling
|
|
93
173
|
const argTypes = [];
|
|
@@ -115,7 +195,7 @@ class InputClassifier {
|
|
|
115
195
|
}
|
|
116
196
|
const cds = cdTypes.length > 0 ? (0, arrays_1.uniqueArray)(cdTypes) : undefined;
|
|
117
197
|
// all arguments only contain constant-like types -> derived constant
|
|
118
|
-
const allConstLike = argTypes.length > 0 && argTypes.every(
|
|
198
|
+
const allConstLike = argTypes.length > 0 && argTypes.every(isConstantLike);
|
|
119
199
|
if (allConstLike) {
|
|
120
200
|
return this.classifyCdsAndReturn(call, (0, objects_1.compactRecord)({ id: call.id, types: [InputType.DerivedConstant], trace: InputTraceType.Pure, cds }));
|
|
121
201
|
}
|
|
@@ -127,65 +207,57 @@ class InputClassifier {
|
|
|
127
207
|
if (origins === undefined) {
|
|
128
208
|
return this.classifyCdsAndReturn(vtx, { id: vtx.id, types: this.isDefinedByOnCall(vtx.id) ? [InputType.Scope] : [InputType.Unknown], trace: InputTraceType.Unknown });
|
|
129
209
|
}
|
|
130
|
-
const
|
|
131
|
-
const cds = [];
|
|
132
|
-
let allPure = true;
|
|
210
|
+
const acc = new ClassificationAccumulator();
|
|
133
211
|
for (const o of origins) {
|
|
134
212
|
if (o.type === 4 /* OriginType.ConstantOrigin */) {
|
|
135
|
-
types.push(InputType.DerivedConstant);
|
|
136
|
-
|
|
213
|
+
acc.types.push(InputType.DerivedConstant);
|
|
214
|
+
acc.values.push(this.extractConstantValue(o.id));
|
|
137
215
|
}
|
|
138
|
-
if (o.type === 0 /* OriginType.ReadVariableOrigin */ || o.type === 1 /* OriginType.WriteVariableOrigin */) {
|
|
139
|
-
|
|
140
|
-
if (v) {
|
|
141
|
-
// if the referenced definition is linked via defined-by-on-call to another
|
|
142
|
-
// id (e.g., a parameter linked to a caller argument), mark it as a Scope origin
|
|
143
|
-
if (this.isDefinedByOnCall(v.id)) {
|
|
144
|
-
types.push(InputType.Scope);
|
|
145
|
-
allPure = false;
|
|
146
|
-
}
|
|
147
|
-
// if this is a variable definition that is a parameter, classify as Parameter
|
|
148
|
-
if (v.tag === vertex_1.VertexType.VariableDefinition && this.dfg.idMap?.get(v.id)?.info.role === "param-n" /* RoleInParent.ParameterName */) {
|
|
149
|
-
types.push(InputType.Parameter);
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
const c = this.classifyEntry(v);
|
|
153
|
-
types.push(...c.types);
|
|
154
|
-
if (c.cds) {
|
|
155
|
-
cds.push(...c.cds);
|
|
156
|
-
}
|
|
157
|
-
if (c.trace !== InputTraceType.Pure) {
|
|
158
|
-
allPure = false;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
types.push(InputType.Unknown);
|
|
163
|
-
}
|
|
164
|
-
continue;
|
|
216
|
+
else if (o.type === 0 /* OriginType.ReadVariableOrigin */ || o.type === 1 /* OriginType.WriteVariableOrigin */) {
|
|
217
|
+
this.classifyVariableOrigin(o.id, acc);
|
|
165
218
|
}
|
|
166
|
-
if (o.type === 2 /* OriginType.FunctionCallOrigin */ || o.type === 3 /* OriginType.BuiltInFunctionOrigin */) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (c.cds) {
|
|
172
|
-
cds.push(...c.cds);
|
|
173
|
-
}
|
|
174
|
-
if (c.trace !== InputTraceType.Pure) {
|
|
175
|
-
allPure = false;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
types.push(InputType.Unknown);
|
|
180
|
-
}
|
|
181
|
-
continue;
|
|
219
|
+
else if (o.type === 2 /* OriginType.FunctionCallOrigin */ || o.type === 3 /* OriginType.BuiltInFunctionOrigin */) {
|
|
220
|
+
this.classifyByVertex(o.id, acc);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
acc.pushUnknown();
|
|
182
224
|
}
|
|
183
|
-
// unknown origin type
|
|
184
|
-
types.push(InputType.Unknown);
|
|
185
225
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
226
|
+
return this.classifyCdsAndReturn(vtx, acc.build(vtx.id));
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Resolves a variable definition or use origin, handling the special cases of
|
|
230
|
+
* scope-escaped variables (DefinedByOnCall) and parameter definitions.
|
|
231
|
+
*/
|
|
232
|
+
classifyVariableOrigin(definitionId, acc) {
|
|
233
|
+
const v = this.dfg.getVertex(definitionId);
|
|
234
|
+
if (!v) {
|
|
235
|
+
acc.pushUnknown();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
// if the referenced definition is linked via defined-by-on-call to another
|
|
239
|
+
// id (e.g., a parameter linked to a caller argument), mark it as a Scope origin
|
|
240
|
+
if (this.isDefinedByOnCall(v.id)) {
|
|
241
|
+
acc.types.push(InputType.Scope);
|
|
242
|
+
acc.values.push(undefined);
|
|
243
|
+
acc.allPure = false;
|
|
244
|
+
}
|
|
245
|
+
// if this is a variable definition that is a parameter, classify as Parameter
|
|
246
|
+
if (v.tag === vertex_1.VertexType.VariableDefinition && this.dfg.idMap?.get(v.id)?.info.role === "param-n" /* RoleInParent.ParameterName */) {
|
|
247
|
+
acc.types.push(InputType.Parameter);
|
|
248
|
+
acc.values.push(undefined);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
acc.merge(this.classifyEntry(v));
|
|
252
|
+
}
|
|
253
|
+
classifyByVertex(id, acc) {
|
|
254
|
+
const v = this.dfg.getVertex(id);
|
|
255
|
+
if (v) {
|
|
256
|
+
acc.merge(this.classifyEntry(v));
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
acc.pushUnknown();
|
|
260
|
+
}
|
|
189
261
|
}
|
|
190
262
|
classifyVariableDefinition(vtx) {
|
|
191
263
|
// parameter definitions are classified as Parameter
|
|
@@ -197,28 +269,17 @@ class InputClassifier {
|
|
|
197
269
|
// fallback to unknown if we cannot find the value
|
|
198
270
|
return this.classifyCdsAndReturn(vtx, { id: vtx.id, types: [InputType.Unknown], trace: InputTraceType.Unknown });
|
|
199
271
|
}
|
|
200
|
-
const
|
|
201
|
-
const cds = [];
|
|
202
|
-
let allPure = true;
|
|
272
|
+
const acc = new ClassificationAccumulator();
|
|
203
273
|
for (const tid of sources) {
|
|
204
274
|
const tv = this.dfg.getVertex(tid);
|
|
205
275
|
if (tv) {
|
|
206
|
-
|
|
207
|
-
types.push(...c.types);
|
|
208
|
-
if (c.cds) {
|
|
209
|
-
cds.push(...c.cds);
|
|
210
|
-
}
|
|
211
|
-
if (c.trace !== InputTraceType.Pure) {
|
|
212
|
-
allPure = false;
|
|
213
|
-
}
|
|
276
|
+
acc.merge(this.classifyEntry(tv));
|
|
214
277
|
}
|
|
215
278
|
else {
|
|
216
|
-
|
|
279
|
+
acc.pushUnknown();
|
|
217
280
|
}
|
|
218
281
|
}
|
|
219
|
-
|
|
220
|
-
const trace = allPure ? InputTraceType.Pure : InputTraceType.Alias;
|
|
221
|
-
return this.classifyCdsAndReturn(vtx, { id: vtx.id, types: t, trace, cds: cds.length === 0 ? undefined : (0, arrays_1.uniqueArray)(cds) });
|
|
282
|
+
return this.classifyCdsAndReturn(vtx, acc.build(vtx.id));
|
|
222
283
|
}
|
|
223
284
|
classifyCdsAndReturn(vtx, src) {
|
|
224
285
|
if (vtx.cds) {
|
|
@@ -265,7 +326,7 @@ var InputType;
|
|
|
265
326
|
InputType["Random"] = "rand";
|
|
266
327
|
/** Calls to system/system2 and similar */
|
|
267
328
|
InputType["System"] = "system";
|
|
268
|
-
/** Calls to .C / Fortran interfaces */
|
|
329
|
+
/** Calls to .C / Fortran interfaces (foreign function interfaces) */
|
|
269
330
|
InputType["Ffi"] = "ffi";
|
|
270
331
|
/** Language objects (quote/substitute/etc.) */
|
|
271
332
|
InputType["Lang"] = "lang";
|
|
@@ -290,11 +351,11 @@ var InputTraceType;
|
|
|
290
351
|
InputTraceType["Unknown"] = "unknown";
|
|
291
352
|
})(InputTraceType || (exports.InputTraceType = InputTraceType = {}));
|
|
292
353
|
function matchesList(fn, list) {
|
|
293
|
-
if (
|
|
354
|
+
if (list === undefined || list.length === 0) {
|
|
294
355
|
return false;
|
|
295
356
|
}
|
|
296
357
|
for (const id of list) {
|
|
297
|
-
if (fn.id === id || identifier_1.Identifier.matches(id, fn.name)) {
|
|
358
|
+
if (fn.id === id || (identifier_1.Identifier.is(id) && identifier_1.Identifier.matches(id, fn.name))) {
|
|
298
359
|
return true;
|
|
299
360
|
}
|
|
300
361
|
}
|
|
@@ -303,16 +364,17 @@ function matchesList(fn, list) {
|
|
|
303
364
|
/**
|
|
304
365
|
* Takes the given id which is expected to either be:
|
|
305
366
|
* - a function call - in this case all arguments are considered to be inputs (additionally to all read edges from the function call in the dataflow graph)
|
|
306
|
-
* - anything else - in that case the node itself is considered as an "input" - please note that in these scenarios the *return* value will only contain one mapping - that for the id you
|
|
367
|
+
* - anything else - in that case the node itself is considered as an "input" - please note that in these scenarios the *return* value will only contain one mapping - that for the id you passed in.
|
|
307
368
|
*
|
|
308
|
-
* This method traces the dependencies in the dataflow graph using the specification of functions passed in
|
|
369
|
+
* This method traces the dependencies in the dataflow graph using the specification of functions passed in.
|
|
370
|
+
* For the scope escape analysis, pass on the full, non-reduced DFG as `fullDfg`.
|
|
309
371
|
*/
|
|
310
|
-
function classifyInput(id, dfg, config) {
|
|
372
|
+
function classifyInput(id, dfg, config, fullDfg) {
|
|
311
373
|
const vtx = dfg.getVertex(id);
|
|
312
374
|
if (!vtx) {
|
|
313
375
|
return [];
|
|
314
376
|
}
|
|
315
|
-
const c = new InputClassifier(dfg, config);
|
|
377
|
+
const c = new InputClassifier(dfg, config, fullDfg);
|
|
316
378
|
if (vtx.tag === vertex_1.VertexType.FunctionCall) {
|
|
317
379
|
const ret = [];
|
|
318
380
|
const args = vtx.args;
|
|
@@ -24,7 +24,7 @@ import type { RUnaryOp } from './nodes/r-unary-op';
|
|
|
24
24
|
import type { RBinaryOp } from './nodes/r-binary-op';
|
|
25
25
|
import type { RPipe } from './nodes/r-pipe';
|
|
26
26
|
import type { RDelimiter } from './nodes/info/r-delimiter';
|
|
27
|
-
import type { ParentInformation } from './processing/decorate';
|
|
27
|
+
import type { AstIdMap, ParentInformation } from './processing/decorate';
|
|
28
28
|
import type { NodeId } from './processing/node-id';
|
|
29
29
|
import type { OnEnter, OnExit } from './processing/visitor';
|
|
30
30
|
import type { SingleOrArrayOrNothing } from '../../../../abstract-interpretation/normalized-ast-fold';
|
|
@@ -264,16 +264,16 @@ export declare const RNode: {
|
|
|
264
264
|
* linear chain of parents leading to the root node.
|
|
265
265
|
* @see {@link iterateParents} - to get all parents of a node
|
|
266
266
|
*/
|
|
267
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap:
|
|
267
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: AstIdMap<OtherInfo & ParentInformation>) => RNode<OtherInfo & ParentInformation> | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* Returns an iterable of all parents of a node, starting with the direct parent and ending with the root node.
|
|
270
270
|
*/
|
|
271
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap:
|
|
271
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: AstIdMap<OtherInfo & ParentInformation>) => Generator<RNode<OtherInfo & ParentInformation>>;
|
|
272
272
|
/**
|
|
273
273
|
* In contrast to the nesting stored in the {@link RNode} structure,
|
|
274
274
|
* this function calculates the depth of a node by counting the number of parents until the root node is reached.
|
|
275
275
|
*/
|
|
276
|
-
readonly depth: (this: void, node: RNode<ParentInformation>, idMap:
|
|
276
|
+
readonly depth: (this: void, node: RNode<ParentInformation>, idMap: AstIdMap<ParentInformation>) => number;
|
|
277
277
|
/**
|
|
278
278
|
* 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`.
|
|
279
279
|
* <p>
|
|
@@ -49,9 +49,9 @@ export declare const RAccess: {
|
|
|
49
49
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
50
50
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
51
51
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
|
|
52
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
53
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
54
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
52
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
53
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
54
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
55
55
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
56
56
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
57
57
|
lexeme: string;
|
|
@@ -68,9 +68,9 @@ export declare const RArgument: {
|
|
|
68
68
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
69
69
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>) => Set<NodeId>;
|
|
70
70
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
|
|
71
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap:
|
|
72
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap:
|
|
73
|
-
readonly depth: (this: void, node: RNode<ParentInformation>, idMap:
|
|
71
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & ParentInformation>) => RNode<OtherInfo & ParentInformation> | undefined;
|
|
72
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & ParentInformation>) => Generator<RNode<OtherInfo & ParentInformation>>;
|
|
73
|
+
readonly depth: (this: void, node: RNode<ParentInformation>, idMap: import("../processing/decorate").AstIdMap<ParentInformation>) => number;
|
|
74
74
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>, stop: (node: RNode<OtherInfo & ParentInformation>) => boolean) => Set<NodeId>;
|
|
75
75
|
readonly lexeme: <R extends RNode<ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
76
76
|
lexeme: string;
|
|
@@ -30,9 +30,9 @@ export declare const RBinaryOp: {
|
|
|
30
30
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
31
31
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
32
32
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
33
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
34
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
35
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
33
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
34
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
35
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
36
36
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
37
37
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
38
38
|
lexeme: string;
|
|
@@ -22,9 +22,9 @@ export declare const RBreak: {
|
|
|
22
22
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
23
23
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
24
24
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
25
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
26
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
27
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
25
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
26
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
27
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
28
28
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
29
29
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
30
30
|
lexeme: string;
|
|
@@ -24,9 +24,9 @@ export declare const RComment: {
|
|
|
24
24
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
25
25
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
26
26
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
27
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
28
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
29
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
27
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
28
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
29
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
30
30
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
31
31
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
32
32
|
lexeme: string;
|
|
@@ -38,9 +38,9 @@ export declare const RExpressionList: {
|
|
|
38
38
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
39
39
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
40
40
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
41
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
42
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
43
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
41
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
42
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
43
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
44
44
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
45
45
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
46
46
|
lexeme: string;
|
|
@@ -32,9 +32,9 @@ export declare const RForLoop: {
|
|
|
32
32
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
33
33
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
34
34
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
35
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
36
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
37
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
35
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
36
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
37
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
38
38
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
39
39
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
40
40
|
lexeme: string;
|
|
@@ -53,9 +53,9 @@ export declare const RFunctionCall: {
|
|
|
53
53
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
54
54
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
55
55
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
|
|
56
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
57
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
58
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
56
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
57
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
58
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
59
59
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
60
60
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
61
61
|
lexeme: string;
|
|
@@ -45,9 +45,9 @@ export declare const RFunctionDefinition: {
|
|
|
45
45
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
46
46
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
47
47
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
48
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap:
|
|
49
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap:
|
|
50
|
-
readonly depth: (this: void, node: RNode<ParentInformation>, idMap:
|
|
48
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: AstIdMap<OtherInfo & ParentInformation>) => RNode<OtherInfo & ParentInformation> | undefined;
|
|
49
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: AstIdMap<OtherInfo & ParentInformation>) => Generator<RNode<OtherInfo & ParentInformation>>;
|
|
50
|
+
readonly depth: (this: void, node: RNode<ParentInformation>, idMap: AstIdMap<ParentInformation>) => number;
|
|
51
51
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>, stop: (node: RNode<OtherInfo & ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
52
52
|
readonly lexeme: <R extends RNode<ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
53
53
|
lexeme: string;
|
|
@@ -28,9 +28,9 @@ export declare const RIfThenElse: {
|
|
|
28
28
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
29
29
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
30
30
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
31
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
32
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
33
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
31
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
32
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
33
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
34
34
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
35
35
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
36
36
|
lexeme: string;
|
|
@@ -24,9 +24,9 @@ export declare const RLineDirective: {
|
|
|
24
24
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
25
25
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
26
26
|
readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
|
|
27
|
-
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap:
|
|
28
|
-
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap:
|
|
29
|
-
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap:
|
|
27
|
+
readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
|
|
28
|
+
readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
|
|
29
|
+
readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<import("../processing/decorate").ParentInformation>) => number;
|
|
30
30
|
readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
|
|
31
31
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
32
32
|
lexeme: string;
|