@eagleoutice/flowr 1.3.11 → 1.3.12
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/cli/common/scripts-info.d.ts +1 -1
- package/package.json +1 -1
- package/benchmark/benchmark-slicer.js +0 -223
- package/core/pipeline-executor.js +0 -221
- package/core/stepping-slicer.js +0 -160
- package/core/steps/all/00-parse.js +0 -19
- package/core/steps/all/10-normalize.js +0 -21
- package/core/steps/all/20-dataflow.js +0 -21
- package/core/steps/all/30-slice.js +0 -16
- package/core/steps/all/40-reconstruct.js +0 -16
- package/core/steps/all/core/00-parse.js +0 -24
- package/core/steps/all/core/10-normalize.js +0 -46
- package/core/steps/all/core/20-dataflow.js +0 -39
- package/core/steps/all/static-slicing/00-slice.js +0 -21
- package/core/steps/all/static-slicing/10-reconstruct.js +0 -21
- package/core/steps/index.js +0 -21
- package/core/steps/input.js +0 -3
- package/core/steps/output.js +0 -3
- package/core/steps/pipeline/create.js +0 -130
- package/core/steps/pipeline/default.js +0 -15
- package/core/steps/pipeline/dependency-checker.js +0 -76
- package/core/steps/pipeline/index.js +0 -20
- package/core/steps/pipeline/invalid-pipeline-error.js +0 -14
- package/core/steps/pipeline/pipeline.js +0 -28
- package/core/steps/step.js +0 -8
- package/core/steps/steps-provider.js +0 -3
- package/core/steps/steps.js +0 -35
- package/dataflow/common/environments/append.js +0 -48
- package/dataflow/common/environments/environment.js +0 -165
- package/dataflow/common/environments/index.js +0 -23
- package/dataflow/common/environments/overwrite.js +0 -82
- package/dataflow/common/environments/register.js +0 -49
- package/dataflow/common/environments/resolve-by-name.js +0 -35
- package/dataflow/common/environments/scopes.js +0 -6
- package/dataflow/common/environments/scoping.js +0 -27
- package/dataflow/graph/equal.js +0 -127
- package/dataflow/v1/extractor.js +0 -60
- package/dataflow/v1/graph/diff.js +0 -206
- package/dataflow/v1/graph/edge.js +0 -32
- package/dataflow/v1/graph/graph.js +0 -298
- package/dataflow/v1/graph/index.js +0 -21
- package/dataflow/v1/graph/quads.js +0 -27
- package/dataflow/v1/graph/vertex.js +0 -3
- package/dataflow/v1/index.js +0 -24
- package/dataflow/v1/internal/info.js +0 -16
- package/dataflow/v1/internal/linker.js +0 -255
- package/dataflow/v1/internal/process/access.js +0 -54
- package/dataflow/v1/internal/process/expression-list.js +0 -154
- package/dataflow/v1/internal/process/functions/argument.js +0 -46
- package/dataflow/v1/internal/process/functions/exit-points.js +0 -125
- package/dataflow/v1/internal/process/functions/function-call.js +0 -99
- package/dataflow/v1/internal/process/functions/function-definition.js +0 -176
- package/dataflow/v1/internal/process/functions/parameter.js +0 -47
- package/dataflow/v1/internal/process/if-then-else.js +0 -57
- package/dataflow/v1/internal/process/loops/for-loop.js +0 -54
- package/dataflow/v1/internal/process/loops/repeat-loop.js +0 -21
- package/dataflow/v1/internal/process/loops/while-loop.js +0 -31
- package/dataflow/v1/internal/process/operators/assignment.js +0 -129
- package/dataflow/v1/internal/process/operators/non-assignment-binary-op.js +0 -25
- package/dataflow/v1/internal/process/operators/pipe.js +0 -46
- package/dataflow/v1/internal/process/operators/unary-op.js +0 -10
- package/dataflow/v1/internal/process/symbol.js +0 -21
- package/dataflow/v1/internal/process/uninteresting-leaf.js +0 -9
- package/dataflow/v1/processor.js +0 -20
- package/dataflow/v2/entry.js +0 -11
- package/flowr-1.3.7.tgz +0 -0
- package/r-bridge/lang-4.x/ast/parser/xml/common/config.js +0 -16
- package/r-bridge/lang-4.x/ast/parser/xml/common/input-format.js +0 -42
- package/r-bridge/lang-4.x/ast/parser/xml/common/meta.js +0 -118
- package/r-bridge/lang-4.x/ast/parser/xml/common/xml-to-json.js +0 -58
- package/r-bridge/lang-4.x/ast/parser/xml/v1/data.js +0 -3
- package/r-bridge/lang-4.x/ast/parser/xml/v1/hooks.js +0 -136
- package/r-bridge/lang-4.x/ast/parser/xml/v1/index.js +0 -22
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/access.js +0 -107
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/control/if-then-else.js +0 -32
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/control/if-then.js +0 -46
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/control/index.js +0 -19
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/expression/expression.js +0 -65
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/expression/index.js +0 -18
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/functions/argument.js +0 -74
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/functions/call.js +0 -149
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/functions/definition.js +0 -60
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/functions/index.js +0 -20
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/functions/parameter.js +0 -64
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/index.js +0 -27
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/break.js +0 -24
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/for.js +0 -72
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/index.js +0 -22
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/next.js +0 -24
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/repeat.js +0 -42
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/loops/while.js +0 -45
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/operators/binary.js +0 -162
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/operators/index.js +0 -20
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/operators/special.js +0 -24
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/operators/unary.js +0 -59
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/other/comment.js +0 -34
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/other/index.js +0 -18
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/other/line-directive.js +0 -55
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/structure/elements.js +0 -159
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/structure/index.js +0 -20
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/structure/root.js +0 -34
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/structure/single-element.js +0 -64
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/values/index.js +0 -20
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/values/number.js +0 -56
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/values/string.js +0 -41
- package/r-bridge/lang-4.x/ast/parser/xml/v1/internal/values/symbol.js +0 -56
- package/r-bridge/lang-4.x/ast/parser/xml/v1/normalize.js +0 -30
- package/r-bridge/lang-4.x/ast/parser/xml/v2/data.js +0 -3
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/access.js +0 -95
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/expression.js +0 -99
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/functions/argument.js +0 -71
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/operators/binary.js +0 -30
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/operators/index.js +0 -19
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/operators/unary.js +0 -35
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/other/comment.js +0 -25
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/other/index.js +0 -18
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/other/line-directive.js +0 -38
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/root.js +0 -26
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/single-element.js +0 -63
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/values/index.js +0 -18
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/values/number.js +0 -46
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/values/string.js +0 -33
- package/r-bridge/lang-4.x/ast/parser/xml/v2/internal/values/symbol.js +0 -63
- package/r-bridge/lang-4.x/ast/parser/xml/v2/normalize.js +0 -25
- package/util/summarizer/benchmark/benchmark-summarizer.js +0 -208
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.diffEdges = exports.diffVertices = exports.diffFunctionArguments = exports.equalFunctionArguments = exports.equalExitPoints = exports.diffOfDataflowGraphs = void 0;
|
|
4
|
-
const environments_1 = require("../../common/environments");
|
|
5
|
-
const assert_1 = require("../../../util/assert");
|
|
6
|
-
const diff_1 = require("../../../util/diff");
|
|
7
|
-
const json_1 = require("../../../util/json");
|
|
8
|
-
class DataflowDifferenceReport {
|
|
9
|
-
_comments = undefined;
|
|
10
|
-
addComment(comment) {
|
|
11
|
-
if (this._comments === undefined) {
|
|
12
|
-
this._comments = [comment];
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
this._comments.push(comment);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
comments() {
|
|
19
|
-
return this._comments;
|
|
20
|
-
}
|
|
21
|
-
isEqual() {
|
|
22
|
-
return this._comments === undefined;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function initDiffContext(left, right) {
|
|
26
|
-
return {
|
|
27
|
-
left: left.graph,
|
|
28
|
-
leftname: left.name,
|
|
29
|
-
right: right.graph,
|
|
30
|
-
rightname: right.name,
|
|
31
|
-
report: new DataflowDifferenceReport(),
|
|
32
|
-
position: ''
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function diff(ctx) {
|
|
36
|
-
diffRootVertices(ctx);
|
|
37
|
-
diffVertices(ctx);
|
|
38
|
-
diffOutgoingEdges(ctx);
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
function diffOutgoingEdges(ctx) {
|
|
42
|
-
const lEdges = new Map(ctx.left.edges());
|
|
43
|
-
const rEdges = new Map(ctx.right.edges());
|
|
44
|
-
if (lEdges.size !== rEdges.size) {
|
|
45
|
-
ctx.report.addComment(`Detected different number of edges! ${ctx.leftname} has ${lEdges.size}, ${ctx.rightname} has ${rEdges.size}`);
|
|
46
|
-
}
|
|
47
|
-
for (const [id, edge] of lEdges) {
|
|
48
|
-
diffEdges(ctx, id, edge, rEdges.get(id));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function diffRootVertices(ctx) {
|
|
52
|
-
(0, diff_1.setDifference)(ctx.left.rootIds(), ctx.right.rootIds(), { ...ctx, position: `${ctx.position}Root vertices differ in graphs. ` });
|
|
53
|
-
}
|
|
54
|
-
function diffOfDataflowGraphs(left, right) {
|
|
55
|
-
if (left.graph === right.graph) {
|
|
56
|
-
return new DataflowDifferenceReport();
|
|
57
|
-
}
|
|
58
|
-
const ctx = initDiffContext(left, right);
|
|
59
|
-
diff(ctx);
|
|
60
|
-
return ctx.report;
|
|
61
|
-
}
|
|
62
|
-
exports.diffOfDataflowGraphs = diffOfDataflowGraphs;
|
|
63
|
-
function diffFunctionArgumentsReferences(a, b, ctx) {
|
|
64
|
-
if (a === '<value>' || b === '<value>') {
|
|
65
|
-
if (a !== b) {
|
|
66
|
-
ctx.report.addComment(`${ctx.position}${ctx.leftname}: ${JSON.stringify(a, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(b, json_1.jsonReplacer)}`);
|
|
67
|
-
}
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
(0, environments_1.diffIdentifierReferences)(a, b, ctx);
|
|
71
|
-
}
|
|
72
|
-
function equalExitPoints(a, b) {
|
|
73
|
-
if (a === undefined || b === undefined) {
|
|
74
|
-
return a === b;
|
|
75
|
-
}
|
|
76
|
-
if (a.length !== b.length) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
for (let i = 0; i < a.length; ++i) {
|
|
80
|
-
if (a[i] !== b[i]) {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
exports.equalExitPoints = equalExitPoints;
|
|
87
|
-
function equalFunctionArguments(a, b) {
|
|
88
|
-
const ctx = {
|
|
89
|
-
report: new DataflowDifferenceReport(),
|
|
90
|
-
leftname: 'left',
|
|
91
|
-
rightname: 'right',
|
|
92
|
-
position: ''
|
|
93
|
-
};
|
|
94
|
-
diffFunctionArguments(a, b, ctx);
|
|
95
|
-
return ctx.report.isEqual();
|
|
96
|
-
}
|
|
97
|
-
exports.equalFunctionArguments = equalFunctionArguments;
|
|
98
|
-
function diffFunctionArguments(a, b, ctx) {
|
|
99
|
-
if (a === false || b === false) {
|
|
100
|
-
if (a !== b) {
|
|
101
|
-
ctx.report.addComment(`${ctx.position}${ctx.leftname}: ${JSON.stringify(a, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(b, json_1.jsonReplacer)}`);
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
else if (a.length !== b.length) {
|
|
106
|
-
ctx.report.addComment(`${ctx.position}Differs in number of arguments. ${ctx.leftname}: ${JSON.stringify(a, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(b, json_1.jsonReplacer)}`);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
for (let i = 0; i < a.length; ++i) {
|
|
110
|
-
const aArg = a[i];
|
|
111
|
-
const bArg = b[i];
|
|
112
|
-
if (Array.isArray(aArg) && Array.isArray(bArg)) {
|
|
113
|
-
// must have same name
|
|
114
|
-
if (aArg[0] !== bArg[0]) {
|
|
115
|
-
ctx.report.addComment(`${ctx.position}In the ${i}th argument (of ${ctx.leftname}, named) the name differs: ${aArg[0]} vs ${bArg[0]}.`);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
diffFunctionArgumentsReferences(aArg[1], bArg[1], {
|
|
119
|
-
...ctx,
|
|
120
|
-
position: `${ctx.position} In the ${i}th argument (of ${ctx.leftname}, named). `
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
diffFunctionArgumentsReferences(aArg, bArg, { ...ctx, position: `${ctx.position} In the ${i}th argument (of ${ctx.leftname}, unnamed).` });
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
exports.diffFunctionArguments = diffFunctionArguments;
|
|
129
|
-
function diffVertices(ctx) {
|
|
130
|
-
// collect vertices from both sides
|
|
131
|
-
const lVert = [...ctx.left.vertices(true)];
|
|
132
|
-
const rVert = [...ctx.right.vertices(true)];
|
|
133
|
-
if (lVert.length !== rVert.length) {
|
|
134
|
-
ctx.report.addComment(`Detected different number of vertices! ${ctx.leftname} has ${lVert.length}, ${ctx.rightname} has ${rVert.length}`);
|
|
135
|
-
}
|
|
136
|
-
for (const [id, lInfo] of lVert) {
|
|
137
|
-
const rInfoMay = ctx.right.get(id);
|
|
138
|
-
if (rInfoMay === undefined) {
|
|
139
|
-
ctx.report.addComment(`Vertex ${id} is not present in ${ctx.rightname}`);
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const [rInfo] = rInfoMay;
|
|
143
|
-
if (lInfo.tag !== rInfo.tag) {
|
|
144
|
-
ctx.report.addComment(`Vertex ${id} has different tags. ${ctx.leftname}: ${lInfo.tag} vs. ${ctx.rightname}: ${rInfo.tag}`);
|
|
145
|
-
}
|
|
146
|
-
if (lInfo.name !== rInfo.name) {
|
|
147
|
-
ctx.report.addComment(`Vertex ${id} has different names. ${ctx.leftname}: ${lInfo.name} vs ${ctx.rightname}: ${rInfo.name}`);
|
|
148
|
-
}
|
|
149
|
-
if (lInfo.tag === 'variable-definition' || lInfo.tag === 'function-definition') {
|
|
150
|
-
(0, assert_1.guard)(lInfo.tag === rInfo.tag, () => `node ${id} does not match on tag (${lInfo.tag} vs ${rInfo.tag})`);
|
|
151
|
-
if (lInfo.scope !== rInfo.scope) {
|
|
152
|
-
ctx.report.addComment(`Vertex ${id} has different scopes. ${ctx.leftname}: ${lInfo.scope} vs ${ctx.rightname}: ${rInfo.scope}`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (lInfo.when !== rInfo.when) {
|
|
156
|
-
ctx.report.addComment(`Vertex ${id} has different when. ${ctx.leftname}: ${lInfo.when} vs ${ctx.rightname}: ${rInfo.when}`);
|
|
157
|
-
}
|
|
158
|
-
(0, environments_1.diffEnvironments)(lInfo.environment, rInfo.environment, { ...ctx, position: `${ctx.position}Vertex ${id} differs in environments. ` });
|
|
159
|
-
if (lInfo.tag === 'function-call') {
|
|
160
|
-
(0, assert_1.guard)(rInfo.tag === 'function-call', 'otherInfo must be a function call as well');
|
|
161
|
-
diffFunctionArguments(lInfo.args, rInfo.args, { ...ctx, position: `${ctx.position}Vertex ${id} (function call) differs in arguments. ` });
|
|
162
|
-
}
|
|
163
|
-
if (lInfo.tag === 'function-definition') {
|
|
164
|
-
(0, assert_1.guard)(rInfo.tag === 'function-definition', 'otherInfo must be a function definition as well');
|
|
165
|
-
if (!equalExitPoints(lInfo.exitPoints, rInfo.exitPoints)) {
|
|
166
|
-
ctx.report.addComment(`Vertex ${id} has different exit points. ${ctx.leftname}: ${JSON.stringify(lInfo.exitPoints, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(rInfo.exitPoints, json_1.jsonReplacer)}`);
|
|
167
|
-
}
|
|
168
|
-
if (lInfo.subflow.scope !== rInfo.subflow.scope) {
|
|
169
|
-
ctx.report.addComment(`Vertex ${id} has different subflow scope. ${ctx.leftname}: ${JSON.stringify(lInfo.subflow, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(rInfo.subflow, json_1.jsonReplacer)}`);
|
|
170
|
-
}
|
|
171
|
-
(0, environments_1.diffEnvironments)(lInfo.subflow.environments, rInfo.subflow.environments, { ...ctx, position: `${ctx.position}Vertex ${id} (function definition) differs in subflow environments. ` });
|
|
172
|
-
(0, diff_1.setDifference)(lInfo.subflow.graph, rInfo.subflow.graph, { ...ctx, position: `${ctx.position}Vertex ${id} differs in subflow graph. ` });
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
exports.diffVertices = diffVertices;
|
|
177
|
-
function diffEdges(ctx, id, lEdges, rEdges) {
|
|
178
|
-
if (lEdges === undefined || rEdges === undefined) {
|
|
179
|
-
if (lEdges !== rEdges) {
|
|
180
|
-
ctx.report.addComment(`Vertex ${id} has undefined outgoing edges. ${ctx.leftname}: ${JSON.stringify(lEdges, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(rEdges, json_1.jsonReplacer)}`);
|
|
181
|
-
}
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (lEdges.size !== rEdges.size) {
|
|
185
|
-
ctx.report.addComment(`Vertex ${id} has different number of outgoing edges. ${ctx.leftname}: ${JSON.stringify(lEdges, json_1.jsonReplacer)} vs ${ctx.rightname}: ${JSON.stringify(rEdges, json_1.jsonReplacer)}`);
|
|
186
|
-
}
|
|
187
|
-
// order independent compare
|
|
188
|
-
for (const [target, edge] of lEdges) {
|
|
189
|
-
const otherEdge = rEdges.get(target);
|
|
190
|
-
if (otherEdge === undefined) {
|
|
191
|
-
ctx.report.addComment(`Target of ${id}->${target} in ${ctx.leftname} is not present in ${ctx.rightname}`);
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
if (edge.types.size !== otherEdge.types.size) {
|
|
195
|
-
ctx.report.addComment(`Target of ${id}->${target} in ${ctx.leftname} has different number of edge types: ${JSON.stringify([...edge.types])} vs ${JSON.stringify([...otherEdge.types])}`);
|
|
196
|
-
}
|
|
197
|
-
if ([...edge.types].some(e => !otherEdge.types.has(e))) {
|
|
198
|
-
ctx.report.addComment(`Target of ${id}->${target} in ${ctx.leftname} has different edge types: ${JSON.stringify([...edge.types])} vs ${JSON.stringify([...otherEdge.types])}`);
|
|
199
|
-
}
|
|
200
|
-
if (edge.attribute !== otherEdge.attribute) {
|
|
201
|
-
ctx.report.addComment(`Target of ${id}->${target} in ${ctx.leftname} has different attributes: ${JSON.stringify(edge.attribute)} vs ${JSON.stringify(otherEdge.attribute)}`);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
exports.diffEdges = diffEdges;
|
|
206
|
-
//# sourceMappingURL=diff.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EdgeType = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Represents the relationship between the source and the target vertex in the dataflow graph.
|
|
6
|
-
*/
|
|
7
|
-
var EdgeType;
|
|
8
|
-
(function (EdgeType) {
|
|
9
|
-
/** The edge determines that source reads target */
|
|
10
|
-
EdgeType["Reads"] = "reads";
|
|
11
|
-
/** The edge determines that source is defined by target */
|
|
12
|
-
EdgeType["DefinedBy"] = "defined-by";
|
|
13
|
-
/** The edge determines that both nodes reference the same variable in a lexical/scoping sense, source and target are interchangeable (reads for at construction unbound variables) */
|
|
14
|
-
EdgeType["SameReadRead"] = "same-read-read";
|
|
15
|
-
/** Similar to `same-read-read` but for def-def constructs without a read in-between */
|
|
16
|
-
EdgeType["SameDefDef"] = "same-def-def";
|
|
17
|
-
/** The edge determines that the source calls the target */
|
|
18
|
-
EdgeType["Calls"] = "calls";
|
|
19
|
-
/** The source returns target on call */
|
|
20
|
-
EdgeType["Returns"] = "returns";
|
|
21
|
-
/** The edge determines that source (probably argument) defines the target (probably parameter), currently automatically created by `addEdge` */
|
|
22
|
-
EdgeType["DefinesOnCall"] = "defines-on-call";
|
|
23
|
-
/** Inverse of `defines-on-call` currently only needed to get better results when slicing complex function calls */
|
|
24
|
-
EdgeType["DefinedByOnCall"] = "defined-by-on-call";
|
|
25
|
-
/** Formal used as argument to a function call */
|
|
26
|
-
EdgeType["Argument"] = "argument";
|
|
27
|
-
/** The edge determines that the source is a side effect that happens when the target is called */
|
|
28
|
-
EdgeType["SideEffectOnCall"] = "side-effect-on-call";
|
|
29
|
-
/** The source and edge relate to each other bidirectionally */
|
|
30
|
-
EdgeType["Relates"] = "relates";
|
|
31
|
-
})(EdgeType || (exports.EdgeType = EdgeType = {}));
|
|
32
|
-
//# sourceMappingURL=edge.js.map
|
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataflowGraph = void 0;
|
|
4
|
-
const assert_1 = require("../../../util/assert");
|
|
5
|
-
const environments_1 = require("../../common/environments");
|
|
6
|
-
const log_1 = require("../../../util/log");
|
|
7
|
-
const edge_1 = require("./edge");
|
|
8
|
-
const diff_1 = require("./diff");
|
|
9
|
-
/**
|
|
10
|
-
* The dataflow graph holds the dataflow information found within the given AST.
|
|
11
|
-
* We differentiate the directed edges in {@link EdgeType} and the vertices indicated by {@link DataflowGraphVertexArgument}
|
|
12
|
-
*
|
|
13
|
-
* The vertices of the graph are organized in a hierarchical fashion, with a function-definition node containing the node ids of its subgraph.
|
|
14
|
-
* However, all *edges* are hoisted at the top level in the form of an (attributed) adjacency list.
|
|
15
|
-
* After the dataflow analysis, all sources and targets of the edges *must* be part of the vertices.
|
|
16
|
-
* However, this does not have to hold during the construction as edges may point from or to vertices which are yet to be constructed.
|
|
17
|
-
*
|
|
18
|
-
* All methods return the modified graph to allow for chaining.
|
|
19
|
-
*/
|
|
20
|
-
class DataflowGraph {
|
|
21
|
-
static DEFAULT_ENVIRONMENT = (0, environments_1.initializeCleanEnvironments)();
|
|
22
|
-
/** Contains the vertices of the root level graph (i.e., included those vertices from the complete graph, that are nested within function definitions) */
|
|
23
|
-
rootVertices = new Set();
|
|
24
|
-
/** All vertices in the complete graph (including those nested in function definition) */
|
|
25
|
-
vertexInformation = new Map();
|
|
26
|
-
/** All edges in the complete graph (including those nested in function definition) */
|
|
27
|
-
edgeInformation = new Map();
|
|
28
|
-
/**
|
|
29
|
-
* Get the {@link DataflowGraphVertexInfo} attached to a node as well as all outgoing edges.
|
|
30
|
-
*
|
|
31
|
-
* @param id - The id of the node to get
|
|
32
|
-
* @param includeDefinedFunctions - If true this will search function definitions as well and not just the toplevel
|
|
33
|
-
* @returns the node info for the given id (if it exists)
|
|
34
|
-
*/
|
|
35
|
-
get(id, includeDefinedFunctions = true) {
|
|
36
|
-
// if we do not want to include function definitions, only retrieve the value if the id is part of the root vertices
|
|
37
|
-
const vertex = includeDefinedFunctions || this.rootVertices.has(id) ? this.vertexInformation.get(id) : undefined;
|
|
38
|
-
return vertex === undefined ? undefined : [vertex, this.outgoingEdges(id) ?? new Map()];
|
|
39
|
-
}
|
|
40
|
-
outgoingEdges(id) {
|
|
41
|
-
return this.edgeInformation.get(id);
|
|
42
|
-
}
|
|
43
|
-
ingoingEdges(id) {
|
|
44
|
-
const edges = new Map();
|
|
45
|
-
for (const [source, outgoing] of this.edgeInformation.entries()) {
|
|
46
|
-
if (outgoing.has(id)) {
|
|
47
|
-
edges.set(source, outgoing.get(id));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return edges;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @param includeDefinedFunctions - If true this will iterate over function definitions as well and not just the toplevel
|
|
54
|
-
* @returns the ids of all toplevel vertices in the graph together with their vertex information
|
|
55
|
-
*
|
|
56
|
-
* @see #edges
|
|
57
|
-
*/
|
|
58
|
-
*vertices(includeDefinedFunctions) {
|
|
59
|
-
if (includeDefinedFunctions) {
|
|
60
|
-
yield* this.vertexInformation.entries();
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
for (const id of this.rootVertices) {
|
|
64
|
-
yield [id, this.vertexInformation.get(id)];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @returns the ids of all edges in the graph together with their edge information
|
|
70
|
-
*
|
|
71
|
-
* @see #vertices
|
|
72
|
-
*/
|
|
73
|
-
*edges() {
|
|
74
|
-
yield* this.edgeInformation.entries();
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Returns true if the graph contains a node with the given id.
|
|
78
|
-
*
|
|
79
|
-
* @param id - The id to check for
|
|
80
|
-
* @param includeDefinedFunctions - If true this will check function definitions as well and not just the toplevel
|
|
81
|
-
*/
|
|
82
|
-
hasNode(id, includeDefinedFunctions) {
|
|
83
|
-
return includeDefinedFunctions ? this.vertexInformation.has(id) : this.rootVertices.has(id);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Returns true if the root level of the graph contains a node with the given id.
|
|
87
|
-
*/
|
|
88
|
-
isRoot(id) {
|
|
89
|
-
return this.rootVertices.has(id);
|
|
90
|
-
}
|
|
91
|
-
rootIds() {
|
|
92
|
-
return this.rootVertices;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Adds a new vertex to the graph, for ease of use, some arguments are optional and filled automatically.
|
|
96
|
-
*
|
|
97
|
-
* @param vertex - The vertex to add
|
|
98
|
-
* @param asRoot - If false, this will only add the vertex but do not add it to the {@link rootIds | root vertices} of the graph.
|
|
99
|
-
* This is probably only of use, when you construct dataflow graphs for tests.
|
|
100
|
-
*
|
|
101
|
-
* @see DataflowGraphVertexInfo
|
|
102
|
-
* @see DataflowGraphVertexArgument
|
|
103
|
-
*/
|
|
104
|
-
addVertex(vertex, asRoot = true) {
|
|
105
|
-
const oldVertex = this.vertexInformation.get(vertex.id);
|
|
106
|
-
if (oldVertex !== undefined) {
|
|
107
|
-
(0, assert_1.guard)(oldVertex.name === vertex.name, 'vertex names must match for the same id if added');
|
|
108
|
-
return this;
|
|
109
|
-
}
|
|
110
|
-
// keep a clone of the original environment
|
|
111
|
-
const environment = vertex.environment === undefined ? DataflowGraph.DEFAULT_ENVIRONMENT : (0, environments_1.cloneEnvironments)(vertex.environment);
|
|
112
|
-
this.vertexInformation.set(vertex.id, {
|
|
113
|
-
...vertex,
|
|
114
|
-
when: vertex.when ?? 'always',
|
|
115
|
-
environment
|
|
116
|
-
});
|
|
117
|
-
if (asRoot) {
|
|
118
|
-
this.rootVertices.add(vertex.id);
|
|
119
|
-
}
|
|
120
|
-
return this;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Will insert a new edge into the graph,
|
|
124
|
-
* if the direction of the edge is of no importance (`same-read-read` or `same-def-def`), source
|
|
125
|
-
* and target will be sorted so that `from` has the lower, and `to` the higher id (default ordering).
|
|
126
|
-
* <p>
|
|
127
|
-
* If you omit the last argument but set promote, this will make the edge `maybe` if at least one of the {@link IdentifierReference | references} or {@link DataflowGraphVertexInfo | nodes} has a used flag of `maybe`.
|
|
128
|
-
* Promote will probably only be used internally and not by tests etc.
|
|
129
|
-
*/
|
|
130
|
-
addEdge(from, to, type, attribute, promote = false) {
|
|
131
|
-
const fromId = typeof from === 'object' ? from.nodeId : from;
|
|
132
|
-
const toId = typeof to === 'object' ? to.nodeId : to;
|
|
133
|
-
if (fromId === toId) {
|
|
134
|
-
log_1.log.trace(`ignoring self-edge from ${fromId} to ${toId} (${type}, ${attribute ?? '?'}, ${promote ? 'y' : 'n'})`);
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
if (promote) {
|
|
138
|
-
attribute ??= from.used === 'maybe' ? 'maybe' : to.used;
|
|
139
|
-
// reduce the load on attribute checks
|
|
140
|
-
if (attribute !== 'maybe') {
|
|
141
|
-
const fromInfo = this.get(fromId, true);
|
|
142
|
-
if (fromInfo?.[0].when === 'maybe') {
|
|
143
|
-
log_1.log.trace(`automatically promoting edge from ${fromId} to ${toId} as maybe because at least one of the nodes is maybe`);
|
|
144
|
-
attribute = 'maybe';
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
const toInfo = this.get(toId, true);
|
|
148
|
-
if (toInfo?.[0].when === 'maybe') {
|
|
149
|
-
log_1.log.trace(`automatically promoting edge from ${fromId} to ${toId} as maybe because at least one of the nodes is maybe`);
|
|
150
|
-
attribute = 'maybe';
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
(0, assert_1.guard)(attribute !== undefined, 'attribute must be set');
|
|
156
|
-
const edge = { types: new Set([type]), attribute };
|
|
157
|
-
const existingFrom = this.edgeInformation.get(fromId);
|
|
158
|
-
const edgeInFrom = existingFrom?.get(toId);
|
|
159
|
-
if (edgeInFrom === undefined) {
|
|
160
|
-
if (existingFrom === undefined) {
|
|
161
|
-
this.edgeInformation.set(fromId, new Map([[toId, edge]]));
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
existingFrom.set(toId, edge);
|
|
165
|
-
}
|
|
166
|
-
// sort (on id so that sorting is the same, independent of the attribute)
|
|
167
|
-
const bidirectional = type === 'same-read-read' || type === 'same-def-def' || type === 'relates';
|
|
168
|
-
if (bidirectional) {
|
|
169
|
-
const existingTo = this.edgeInformation.get(toId);
|
|
170
|
-
if (existingTo === undefined) {
|
|
171
|
-
this.edgeInformation.set(toId, new Map([[fromId, edge]]));
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
existingTo.set(fromId, edge);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else if (type === 'defines-on-call') {
|
|
178
|
-
const otherEdge = { ...edge,
|
|
179
|
-
types: new Set([edge_1.EdgeType.DefinedByOnCall])
|
|
180
|
-
};
|
|
181
|
-
const existingTo = this.edgeInformation.get(toId);
|
|
182
|
-
if (existingTo === undefined) {
|
|
183
|
-
this.edgeInformation.set(toId, new Map([[fromId, otherEdge]]));
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
existingTo.set(fromId, otherEdge);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
if (attribute === 'maybe') {
|
|
192
|
-
// as the data is shared, we can just set it for one direction
|
|
193
|
-
edgeInFrom.attribute = 'maybe';
|
|
194
|
-
}
|
|
195
|
-
if (!edgeInFrom.types.has(type)) {
|
|
196
|
-
// adding the type
|
|
197
|
-
edgeInFrom.types.add(type);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return this;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Merges the other graph into *this* one (in-place). The return value is only for convenience.
|
|
204
|
-
*
|
|
205
|
-
* @param otherGraph - The graph to merge into this one
|
|
206
|
-
* @param mergeRootVertices - If false, this will only merge the vertices and edges but exclude the root vertices this is probably only of use
|
|
207
|
-
* in the context of function definitions
|
|
208
|
-
*/
|
|
209
|
-
mergeWith(otherGraph, mergeRootVertices = true) {
|
|
210
|
-
if (otherGraph === undefined) {
|
|
211
|
-
return this;
|
|
212
|
-
}
|
|
213
|
-
// merge root ids
|
|
214
|
-
if (mergeRootVertices) {
|
|
215
|
-
for (const root of otherGraph.rootVertices) {
|
|
216
|
-
this.rootVertices.add(root);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
for (const [id, info] of otherGraph.vertexInformation) {
|
|
220
|
-
const currentInfo = this.vertexInformation.get(id);
|
|
221
|
-
this.vertexInformation.set(id, currentInfo === undefined ? info : mergeNodeInfos(currentInfo, info));
|
|
222
|
-
}
|
|
223
|
-
this.mergeEdges(otherGraph);
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
mergeEdges(otherGraph) {
|
|
227
|
-
for (const [id, edges] of otherGraph.edgeInformation.entries()) {
|
|
228
|
-
for (const [target, edge] of edges) {
|
|
229
|
-
const existing = this.edgeInformation.get(id);
|
|
230
|
-
if (existing === undefined) {
|
|
231
|
-
this.edgeInformation.set(id, new Map([[target, edge]]));
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
const get = existing.get(target);
|
|
235
|
-
if (get === undefined) {
|
|
236
|
-
existing.set(target, edge);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
get.types = new Set([...get.types, ...edge.types]);
|
|
240
|
-
if (edge.attribute === 'maybe') {
|
|
241
|
-
get.attribute = 'maybe';
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
equals(other, diff = false, names = { left: 'left', right: 'right' }) {
|
|
249
|
-
const report = (0, diff_1.diffOfDataflowGraphs)({ name: names.left, graph: this }, { name: names.right, graph: other });
|
|
250
|
-
if (diff) {
|
|
251
|
-
return report;
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
return report.isEqual();
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Marks a vertex in the graph to be a definition
|
|
259
|
-
* @param reference - The reference to the vertex to mark as definition
|
|
260
|
-
*/
|
|
261
|
-
setDefinitionOfVertex(reference) {
|
|
262
|
-
const got = this.get(reference.nodeId, true);
|
|
263
|
-
(0, assert_1.guard)(got !== undefined, () => `node must be defined for ${JSON.stringify(reference)} to set definition scope to ${reference.scope}`);
|
|
264
|
-
const [node] = got;
|
|
265
|
-
if (node.tag === 'function-definition' || node.tag === 'variable-definition') {
|
|
266
|
-
(0, assert_1.guard)(node.scope === reference.scope, () => `node ${JSON.stringify(node)} must not be previously defined at position or have same scope for ${JSON.stringify(reference)}`);
|
|
267
|
-
(0, assert_1.guard)(node.when === reference.used || node.when === 'maybe' || reference.used === 'maybe', () => `node ${JSON.stringify(node)} must not be previously defined at position or have same scope for ${JSON.stringify(reference)}`);
|
|
268
|
-
node.scope = reference.scope;
|
|
269
|
-
node.when = reference.used === 'maybe' ? 'maybe' : node.when;
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
this.vertexInformation.set(reference.nodeId, {
|
|
273
|
-
...node,
|
|
274
|
-
tag: 'variable-definition',
|
|
275
|
-
scope: reference.scope,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
exports.DataflowGraph = DataflowGraph;
|
|
281
|
-
function mergeNodeInfos(current, next) {
|
|
282
|
-
(0, assert_1.guard)(current.tag === next.tag, () => `nodes to be joined for the same id must have the same tag, but ${JSON.stringify(current)} vs ${JSON.stringify(next)}`);
|
|
283
|
-
(0, assert_1.guard)(current.name === next.name, () => `nodes to be joined for the same id must have the same name, but ${JSON.stringify(current)} vs ${JSON.stringify(next)}`);
|
|
284
|
-
(0, assert_1.guard)(current.environment === next.environment, 'nodes to be joined for the same id must have the same environment');
|
|
285
|
-
if (current.tag === 'variable-definition') {
|
|
286
|
-
(0, assert_1.guard)(current.scope === next.scope, 'nodes to be joined for the same id must have the same scope');
|
|
287
|
-
}
|
|
288
|
-
else if (current.tag === 'function-call') {
|
|
289
|
-
(0, assert_1.guard)((0, diff_1.equalFunctionArguments)(current.args, next.args), 'nodes to be joined for the same id must have the same function call information');
|
|
290
|
-
}
|
|
291
|
-
else if (current.tag === 'function-definition') {
|
|
292
|
-
(0, assert_1.guard)(current.scope === next.scope, 'nodes to be joined for the same id must have the same scope');
|
|
293
|
-
(0, assert_1.guard)((0, diff_1.equalExitPoints)(current.exitPoints, next.exitPoints), 'nodes to be joined must have same exist points');
|
|
294
|
-
}
|
|
295
|
-
// make a copy
|
|
296
|
-
return { ...current };
|
|
297
|
-
}
|
|
298
|
-
//# sourceMappingURL=graph.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./graph"), exports);
|
|
18
|
-
__exportStar(require("./edge"), exports);
|
|
19
|
-
__exportStar(require("./vertex"), exports);
|
|
20
|
-
__exportStar(require("./diff"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.df2quads = void 0;
|
|
4
|
-
const quads_1 = require("../../../util/quads");
|
|
5
|
-
/**
|
|
6
|
-
* @see cfg2quads
|
|
7
|
-
* @see serialize2quads
|
|
8
|
-
* @see graph2quads
|
|
9
|
-
*/
|
|
10
|
-
function df2quads(graph, config) {
|
|
11
|
-
return (0, quads_1.graph2quads)({
|
|
12
|
-
rootIds: [...graph.rootIds()],
|
|
13
|
-
vertices: [...graph.vertices(true)]
|
|
14
|
-
.map(([id, v]) => ({
|
|
15
|
-
...v,
|
|
16
|
-
id
|
|
17
|
-
})),
|
|
18
|
-
edges: [...graph.edges()].flatMap(([fromId, targets]) => [...targets].map(([toId, info]) => ({
|
|
19
|
-
from: fromId,
|
|
20
|
-
to: toId,
|
|
21
|
-
type: [...info.types],
|
|
22
|
-
when: info.attribute
|
|
23
|
-
})))
|
|
24
|
-
}, config);
|
|
25
|
-
}
|
|
26
|
-
exports.df2quads = df2quads;
|
|
27
|
-
//# sourceMappingURL=quads.js.map
|
package/dataflow/v1/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.dataflowLogger = void 0;
|
|
18
|
-
const log_1 = require("../../util/log");
|
|
19
|
-
exports.dataflowLogger = log_1.log.getSubLogger({ name: 'dataflow' });
|
|
20
|
-
__exportStar(require("./graph"), exports);
|
|
21
|
-
__exportStar(require("./extractor"), exports);
|
|
22
|
-
__exportStar(require("../common/environments/environment"), exports);
|
|
23
|
-
__exportStar(require("../../util/mermaid/dfg"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initializeCleanDataflowInformation = void 0;
|
|
4
|
-
const graph_1 = require("../graph");
|
|
5
|
-
function initializeCleanDataflowInformation(data) {
|
|
6
|
-
return {
|
|
7
|
-
unknownReferences: [],
|
|
8
|
-
in: [],
|
|
9
|
-
out: [],
|
|
10
|
-
scope: data.activeScope,
|
|
11
|
-
environments: data.environments,
|
|
12
|
-
graph: new graph_1.DataflowGraph()
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.initializeCleanDataflowInformation = initializeCleanDataflowInformation;
|
|
16
|
-
//# sourceMappingURL=info.js.map
|