@eagleoutice/flowr 1.3.14 → 1.4.1
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/abstract-interpretation/domain.d.ts +27 -0
- package/abstract-interpretation/domain.js +146 -0
- package/abstract-interpretation/handler/binop/binop.d.ts +16 -0
- package/abstract-interpretation/handler/binop/binop.js +40 -0
- package/abstract-interpretation/handler/binop/operators.d.ts +2 -0
- package/abstract-interpretation/handler/binop/operators.js +42 -0
- package/abstract-interpretation/handler/handler.d.ts +6 -0
- package/abstract-interpretation/handler/handler.js +3 -0
- package/abstract-interpretation/processor.d.ts +10 -0
- package/abstract-interpretation/processor.js +78 -0
- package/benchmark/slicer.d.ts +6 -5
- package/benchmark/slicer.js +2 -0
- package/benchmark/stats/print.d.ts +1 -1
- package/benchmark/stats/stats.d.ts +4 -4
- package/benchmark/stats/stats.js +1 -1
- package/cli/common/features.d.ts +1 -1
- package/cli/common/options.d.ts +1 -1
- package/cli/common/script.d.ts +1 -1
- package/cli/common/scripts-info.d.ts +2 -2
- package/cli/repl/commands/cfg.d.ts +1 -1
- package/cli/repl/commands/cfg.js +1 -1
- package/cli/repl/commands/commands.d.ts +1 -1
- package/cli/repl/commands/dataflow.d.ts +1 -1
- package/cli/repl/commands/execute.d.ts +2 -2
- package/cli/repl/commands/main.d.ts +2 -2
- package/cli/repl/commands/normalize.d.ts +1 -1
- package/cli/repl/commands/parse.d.ts +1 -1
- package/cli/repl/commands/quit.d.ts +1 -1
- package/cli/repl/commands/version.d.ts +1 -1
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/execute.d.ts +1 -1
- package/cli/repl/server/connection.d.ts +2 -2
- package/cli/repl/server/connection.js +3 -2
- package/cli/repl/server/messages/analysis.d.ts +3 -3
- package/cli/repl/server/messages/analysis.js +12 -32
- package/cli/repl/server/messages/error.d.ts +1 -1
- package/cli/repl/server/messages/hello.d.ts +2 -2
- package/cli/repl/server/messages/messages.d.ts +5 -5
- package/cli/repl/server/messages/repl.d.ts +1 -1
- package/cli/repl/server/messages/slice.d.ts +3 -3
- package/cli/repl/server/net.d.ts +16 -0
- package/cli/repl/server/net.js +40 -1
- package/cli/repl/server/send.d.ts +2 -2
- package/cli/repl/server/server.d.ts +2 -2
- package/cli/repl/server/validate.d.ts +3 -3
- package/cli/statistics-helper-app.js +2 -2
- package/core/input.d.ts +6 -6
- package/core/output.d.ts +3 -2
- package/core/print/dataflow-printer.d.ts +3 -3
- package/core/print/normalize-printer.d.ts +2 -2
- package/core/print/parse-printer.d.ts +2 -2
- package/core/print/print.d.ts +1 -1
- package/core/print/slice-diff-ansi.d.ts +1 -1
- package/core/slicer.d.ts +5 -4
- package/core/slicer.js +6 -2
- package/core/steps.d.ts +22 -4
- package/core/steps.js +10 -2
- package/dataflow/environments/append.d.ts +1 -1
- package/dataflow/environments/environment.d.ts +4 -4
- package/dataflow/environments/overwrite.d.ts +1 -1
- package/dataflow/environments/register.d.ts +2 -2
- package/dataflow/environments/resolve-by-name.d.ts +2 -2
- package/dataflow/environments/scoping.d.ts +1 -1
- package/dataflow/extractor.d.ts +4 -4
- package/dataflow/graph/diff.d.ts +3 -3
- package/dataflow/graph/graph.d.ts +8 -7
- package/dataflow/graph/quads.d.ts +2 -2
- package/dataflow/graph/vertex.d.ts +5 -5
- package/dataflow/internal/info.d.ts +2 -2
- package/dataflow/internal/linker.d.ts +3 -3
- package/dataflow/internal/process/access.d.ts +3 -3
- package/dataflow/internal/process/expression-list.d.ts +3 -3
- package/dataflow/internal/process/expression-list.js +0 -4
- package/dataflow/internal/process/functions/argument.d.ts +4 -4
- package/dataflow/internal/process/functions/exit-points.d.ts +1 -1
- package/dataflow/internal/process/functions/function-call.d.ts +3 -3
- package/dataflow/internal/process/functions/function-definition.d.ts +3 -3
- package/dataflow/internal/process/functions/parameter.d.ts +3 -3
- package/dataflow/internal/process/if-then-else.d.ts +3 -3
- package/dataflow/internal/process/loops/for-loop.d.ts +3 -3
- package/dataflow/internal/process/loops/repeat-loop.d.ts +3 -3
- package/dataflow/internal/process/loops/while-loop.d.ts +3 -3
- package/dataflow/internal/process/operators/assignment.d.ts +3 -3
- package/dataflow/internal/process/operators/non-assignment-binary-op.d.ts +3 -3
- package/dataflow/internal/process/operators/pipe.d.ts +3 -3
- package/dataflow/internal/process/operators/unary-op.d.ts +3 -3
- package/dataflow/internal/process/symbol.d.ts +3 -3
- package/dataflow/internal/process/uninteresting-leaf.d.ts +2 -2
- package/dataflow/processor.d.ts +3 -3
- package/flowr.d.ts +3 -2
- package/flowr.js +5 -3
- package/package.json +11 -2
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +6 -6
- package/r-bridge/lang-4.x/ast/model/nodes/info/index.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +3 -3
- 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 +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +4 -4
- 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 +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/r-bridge/lang-4.x/ast/model/operators.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/config.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/xml/data.d.ts +5 -5
- package/r-bridge/lang-4.x/ast/parser/xml/hooks.d.ts +5 -5
- package/r-bridge/lang-4.x/ast/parser/xml/input-format.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/internal/access.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then-else.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/expression/expression.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/argument.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/call.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/definition.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/parameter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/break.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/for.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/next.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/repeat.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/while.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/meta.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/binary.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/special.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/unary.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/other/comment.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/other/line-directive.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/elements.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/root.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/single-element.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/number.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/string.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/symbol.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/xml-to-json.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/xml/parser.d.ts +4 -4
- package/r-bridge/retriever.d.ts +2 -2
- package/r-bridge/shell-executor.d.ts +25 -0
- package/r-bridge/shell-executor.js +119 -0
- package/r-bridge/shell.d.ts +8 -5
- package/r-bridge/shell.js +6 -3
- package/reconstruct/reconstruct.d.ts +1 -1
- package/slicing/criterion/collect-all.d.ts +3 -3
- package/slicing/criterion/filters/all-variables.d.ts +1 -1
- package/slicing/criterion/parse.d.ts +1 -1
- package/slicing/static/static-slicer.d.ts +3 -3
- package/statistics/features/common-syntax-probability.d.ts +3 -2
- package/statistics/features/common-syntax-probability.js +0 -3
- package/statistics/features/feature.d.ts +6 -6
- package/statistics/features/post-processing.d.ts +2 -2
- package/statistics/features/supported/assignments/assignments.d.ts +2 -2
- package/statistics/features/supported/assignments/post-process.d.ts +2 -2
- package/statistics/features/supported/comments/comments.d.ts +2 -2
- package/statistics/features/supported/comments/post-process.d.ts +2 -2
- package/statistics/features/supported/control-flow/control-flow.d.ts +2 -2
- package/statistics/features/supported/control-flow/post-process.d.ts +2 -2
- package/statistics/features/supported/data-access/data-access.d.ts +3 -3
- package/statistics/features/supported/data-access/post-process.d.ts +2 -2
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +4 -4
- package/statistics/features/supported/defined-functions/post-process.d.ts +2 -2
- package/statistics/features/supported/expression-list/expression-list.d.ts +2 -2
- package/statistics/features/supported/expression-list/post-process.d.ts +2 -2
- package/statistics/features/supported/loops/loops.d.ts +2 -2
- package/statistics/features/supported/loops/post-process.d.ts +2 -2
- package/statistics/features/supported/used-functions/post-process.d.ts +2 -2
- package/statistics/features/supported/used-functions/used-functions.d.ts +3 -3
- package/statistics/features/supported/used-packages/post-process.d.ts +2 -2
- package/statistics/features/supported/used-packages/used-packages.d.ts +2 -2
- package/statistics/features/supported/values/post-process.d.ts +2 -2
- package/statistics/features/supported/values/values.d.ts +2 -2
- package/statistics/features/supported/variables/post-process.d.ts +3 -3
- package/statistics/features/supported/variables/variables.d.ts +2 -2
- package/statistics/meta-statistics.d.ts +1 -1
- package/statistics/output/print-stats.d.ts +2 -2
- package/statistics/output/statistics-file.d.ts +1 -1
- package/statistics/statistics.d.ts +4 -4
- package/util/{cfg.d.ts → cfg/cfg.d.ts} +18 -6
- package/util/{cfg.js → cfg/cfg.js} +42 -37
- package/util/cfg/visitor.d.ts +14 -0
- package/util/cfg/visitor.js +64 -0
- package/util/diff.d.ts +1 -1
- package/util/files.d.ts +1 -1
- package/util/mermaid/ast.d.ts +1 -1
- package/util/mermaid/cfg.d.ts +2 -2
- package/util/mermaid/dfg.d.ts +3 -3
- package/util/objects.d.ts +1 -1
- package/util/quads.d.ts +2 -2
- package/util/summarizer/benchmark/data.d.ts +1 -1
- package/util/summarizer/benchmark/first-phase/process.d.ts +3 -3
- package/util/summarizer/benchmark/second-phase/graph.d.ts +1 -1
- package/util/summarizer/benchmark/second-phase/process.d.ts +1 -1
- package/util/summarizer/benchmark/summarizer.d.ts +3 -2
- package/util/summarizer/benchmark/summarizer.js +0 -4
- package/util/summarizer/statistics/post-process/clusterer.d.ts +2 -2
- package/util/summarizer/statistics/post-process/file-based-count.d.ts +1 -1
- package/util/summarizer/statistics/post-process/histogram.d.ts +2 -2
- package/util/summarizer/statistics/post-process/post-process-output.d.ts +2 -2
- package/util/summarizer/statistics/second-phase/process.d.ts +2 -2
- package/util/summarizer/statistics/summarizer.d.ts +3 -2
- package/util/summarizer/summarizer.d.ts +1 -1
|
@@ -1,41 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.requestAnalysisMessage = void 0;
|
|
27
|
-
const
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
28
8
|
exports.requestAnalysisMessage = {
|
|
29
9
|
type: 'request-file-analysis',
|
|
30
|
-
schema:
|
|
31
|
-
type:
|
|
32
|
-
id:
|
|
33
|
-
filetoken:
|
|
34
|
-
filename:
|
|
35
|
-
content:
|
|
36
|
-
filepath:
|
|
37
|
-
cfg:
|
|
38
|
-
format:
|
|
10
|
+
schema: joi_1.default.object({
|
|
11
|
+
type: joi_1.default.string().valid('request-file-analysis').required(),
|
|
12
|
+
id: joi_1.default.string().optional(),
|
|
13
|
+
filetoken: joi_1.default.string().optional(),
|
|
14
|
+
filename: joi_1.default.string().optional(),
|
|
15
|
+
content: joi_1.default.string().optional(),
|
|
16
|
+
filepath: joi_1.default.string().optional(),
|
|
17
|
+
cfg: joi_1.default.boolean().optional(),
|
|
18
|
+
format: joi_1.default.string().valid('json', 'n-quads').optional()
|
|
39
19
|
}).xor('content', 'filepath')
|
|
40
20
|
};
|
|
41
21
|
//# sourceMappingURL=analysis.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VersionInformation } from '../../commands/version';
|
|
2
|
-
import { IdMessageBase } from './messages';
|
|
1
|
+
import type { VersionInformation } from '../../commands/version';
|
|
2
|
+
import type { IdMessageBase } from './messages';
|
|
3
3
|
/**
|
|
4
4
|
* The hello message is automatically send by the sever upon connection.
|
|
5
5
|
*/
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import * as Joi from 'joi';
|
|
7
|
-
import { FlowrHelloResponseMessage } from './hello';
|
|
8
|
-
import { FileAnalysisRequestMessage, FileAnalysisResponseMessageJson } from './analysis';
|
|
9
|
-
import { ExecuteEndMessage, ExecuteIntermediateResponseMessage, ExecuteRequestMessage } from './repl';
|
|
10
|
-
import { SliceRequestMessage, SliceResponseMessage } from './slice';
|
|
11
|
-
import { FlowrErrorMessage } from './error';
|
|
7
|
+
import type { FlowrHelloResponseMessage } from './hello';
|
|
8
|
+
import type { FileAnalysisRequestMessage, FileAnalysisResponseMessageJson } from './analysis';
|
|
9
|
+
import type { ExecuteEndMessage, ExecuteIntermediateResponseMessage, ExecuteRequestMessage } from './repl';
|
|
10
|
+
import type { SliceRequestMessage, SliceResponseMessage } from './slice';
|
|
11
|
+
import type { FlowrErrorMessage } from './error';
|
|
12
12
|
/**
|
|
13
13
|
* If you send a message it must *not* contain a newline but the message must be terminated by a newline.
|
|
14
14
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdMessageBase, MessageDefinition } from './messages';
|
|
1
|
+
import type { IdMessageBase, MessageDefinition } from './messages';
|
|
2
2
|
/**
|
|
3
3
|
* Request the execution of the given expression as a REPL statement.
|
|
4
4
|
* We strongly recommend that you make use of a unique {@link IdMessageBase#id}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SlicingCriteria } from '../../../../slicing';
|
|
2
|
-
import { LAST_PER_FILE_STEP, LAST_STEP, StepResults } from '../../../../core';
|
|
3
|
-
import { IdMessageBase, MessageDefinition } from './messages';
|
|
1
|
+
import type { SlicingCriteria } from '../../../../slicing';
|
|
2
|
+
import type { LAST_PER_FILE_STEP, LAST_STEP, StepResults } from '../../../../core';
|
|
3
|
+
import type { IdMessageBase, MessageDefinition } from './messages';
|
|
4
4
|
/**
|
|
5
5
|
* Can only be sent after you have sent the {@link FileAnalysisRequestMessage}.
|
|
6
6
|
* Using the same `filetoken` as in the {@link FileAnalysisRequestMessage} you
|
package/cli/repl/server/net.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import type WebSocket from 'ws';
|
|
2
3
|
/** Function handler that should be triggered when the respective socket connects */
|
|
3
4
|
export type OnConnect = (c: Socket) => void;
|
|
4
5
|
/**
|
|
@@ -12,6 +13,12 @@ export interface Server {
|
|
|
12
13
|
onConnect(handler: OnConnect): void;
|
|
13
14
|
start(port: number): void;
|
|
14
15
|
}
|
|
16
|
+
export declare class WebSocketServerWrapper implements Server {
|
|
17
|
+
private server;
|
|
18
|
+
private connectHandler;
|
|
19
|
+
onConnect(handler: OnConnect): void;
|
|
20
|
+
start(port: number): void;
|
|
21
|
+
}
|
|
15
22
|
/**
|
|
16
23
|
* The socket abstraction of *flowR*.
|
|
17
24
|
* Essentially a subset of what the default `net.Socket` of `node` provides.
|
|
@@ -25,6 +32,15 @@ export interface Socket {
|
|
|
25
32
|
write(data: string): void;
|
|
26
33
|
end(): void;
|
|
27
34
|
}
|
|
35
|
+
export declare class WebSocketWrapper implements Socket {
|
|
36
|
+
private readonly socket;
|
|
37
|
+
remoteAddress?: string;
|
|
38
|
+
remotePort?: number;
|
|
39
|
+
constructor(socket: WebSocket);
|
|
40
|
+
write(data: string): void;
|
|
41
|
+
end(): void;
|
|
42
|
+
on(event: 'data' | 'close' | 'error', listener: (data: Buffer) => void): void;
|
|
43
|
+
}
|
|
28
44
|
export declare class NetServer implements Server {
|
|
29
45
|
private readonly server;
|
|
30
46
|
constructor();
|
package/cli/repl/server/net.js
CHANGED
|
@@ -3,11 +3,50 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NetServer = void 0;
|
|
6
|
+
exports.NetServer = exports.WebSocketWrapper = exports.WebSocketServerWrapper = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* This is just a simple layer to allow me to mock the server's behavior in tests.
|
|
9
9
|
*/
|
|
10
10
|
const node_net_1 = __importDefault(require("node:net"));
|
|
11
|
+
const ws_1 = require("ws");
|
|
12
|
+
const server_1 = require("./server");
|
|
13
|
+
class WebSocketServerWrapper {
|
|
14
|
+
server;
|
|
15
|
+
connectHandler;
|
|
16
|
+
onConnect(handler) {
|
|
17
|
+
this.connectHandler = handler;
|
|
18
|
+
}
|
|
19
|
+
start(port) {
|
|
20
|
+
this.server = new ws_1.WebSocketServer({ port });
|
|
21
|
+
server_1.serverLog.info('WebSocket-Server wrapper is active!');
|
|
22
|
+
this.server.on('connection', c => this.connectHandler?.(new WebSocketWrapper(c)));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.WebSocketServerWrapper = WebSocketServerWrapper;
|
|
26
|
+
class WebSocketWrapper {
|
|
27
|
+
socket;
|
|
28
|
+
remoteAddress;
|
|
29
|
+
remotePort;
|
|
30
|
+
constructor(socket) {
|
|
31
|
+
this.socket = socket;
|
|
32
|
+
this.remoteAddress = socket.url;
|
|
33
|
+
}
|
|
34
|
+
write(data) {
|
|
35
|
+
this.socket.send(data);
|
|
36
|
+
}
|
|
37
|
+
end() {
|
|
38
|
+
this.socket.close();
|
|
39
|
+
}
|
|
40
|
+
on(event, listener) {
|
|
41
|
+
if (event === 'data') {
|
|
42
|
+
this.socket.on('message', listener);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.socket.on(event, listener);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.WebSocketWrapper = WebSocketWrapper;
|
|
11
50
|
class NetServer {
|
|
12
51
|
server;
|
|
13
52
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdMessageBase } from './messages/messages';
|
|
2
|
-
import { Socket } from './net';
|
|
1
|
+
import type { IdMessageBase } from './messages/messages';
|
|
2
|
+
import type { Socket } from './net';
|
|
3
3
|
export declare function getUnnamedSocketName(c: Socket): string;
|
|
4
4
|
export declare function sendMessage<T extends IdMessageBase>(c: Socket, message: T): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RShell } from '../../../r-bridge';
|
|
2
|
-
import { Server } from './net';
|
|
1
|
+
import type { RShell } from '../../../r-bridge';
|
|
2
|
+
import type { Server } from './net';
|
|
3
3
|
import { FlowrLogger } from '../../../util/log';
|
|
4
4
|
export declare const serverLog: FlowrLogger;
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as Joi from 'joi';
|
|
2
|
-
import { FlowrMessage, IdMessageBase, MessageDefinition } from './messages/messages';
|
|
3
|
-
import { Socket } from './net';
|
|
1
|
+
import type * as Joi from 'joi';
|
|
2
|
+
import type { FlowrMessage, IdMessageBase, MessageDefinition } from './messages/messages';
|
|
3
|
+
import type { Socket } from './net';
|
|
4
4
|
export interface ValidationErrorResult {
|
|
5
5
|
type: 'error';
|
|
6
6
|
reason: Joi.ValidationError | Error;
|
|
@@ -8,13 +8,13 @@ const statistics_1 = require("../statistics");
|
|
|
8
8
|
const log_1 = require("../util/log");
|
|
9
9
|
const common_1 = require("./common");
|
|
10
10
|
const json_1 = require("../util/json");
|
|
11
|
-
const cfg_1 = require("../util/cfg");
|
|
12
|
-
const tar_1 = require("tar");
|
|
13
11
|
const fs_1 = __importDefault(require("fs"));
|
|
14
12
|
const assert_1 = require("../util/assert");
|
|
15
13
|
const features_1 = require("./common/features");
|
|
16
14
|
const core_1 = require("../core");
|
|
17
15
|
const time_1 = require("../util/time");
|
|
16
|
+
const tar_1 = require("tar");
|
|
17
|
+
const cfg_1 = require("../util/cfg/cfg");
|
|
18
18
|
const options = (0, common_1.processCommandLineArgs)('stats-helper', [], {
|
|
19
19
|
subtitle: 'Given a single input file, this will collect usage statistics for the given features and write them to a file',
|
|
20
20
|
examples: [
|
package/core/input.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MergeableRecord } from '../util/objects';
|
|
2
|
-
import { IdGenerator, NoInfo, RParseRequest, RShell, XmlParserHooks } from '../r-bridge';
|
|
3
|
-
import { DeepPartial } from 'ts-essentials';
|
|
4
|
-
import { AutoSelectPredicate, SlicingCriteria } from '../slicing';
|
|
5
|
-
import { STEPS_PER_SLICE, StepName, STEPS_PER_FILE } from './steps';
|
|
1
|
+
import type { MergeableRecord } from '../util/objects';
|
|
2
|
+
import type { IdGenerator, NoInfo, RParseRequest, RShell, XmlParserHooks } from '../r-bridge';
|
|
3
|
+
import type { DeepPartial } from 'ts-essentials';
|
|
4
|
+
import type { AutoSelectPredicate, SlicingCriteria } from '../slicing';
|
|
5
|
+
import type { STEPS_PER_SLICE, StepName, STEPS_PER_FILE } from './steps';
|
|
6
6
|
/**
|
|
7
7
|
* We split the types, as if you are only interested in what can be done per-file, you do not need a slicing criterion.
|
|
8
8
|
* Furthermore, if you are only interested in the parse result, you do not require the token map and you can not pass hooks
|
|
@@ -27,7 +27,7 @@ interface BaseSteppingSlicerInput<InterestedIn extends StepName | undefined> ext
|
|
|
27
27
|
/** If you want to auto-select something in the reconstruction add it here, otherwise, it will use the default defined alongside {@link reconstructToCode}*/
|
|
28
28
|
autoSelectIf?: AutoSelectPredicate;
|
|
29
29
|
}
|
|
30
|
-
interface NormalizeSteppingSlicerInput<InterestedIn extends 'dataflow' | 'normalize'> extends BaseSteppingSlicerInput<InterestedIn> {
|
|
30
|
+
interface NormalizeSteppingSlicerInput<InterestedIn extends 'ai' | 'dataflow' | 'normalize'> extends BaseSteppingSlicerInput<InterestedIn> {
|
|
31
31
|
stepOfInterest: InterestedIn;
|
|
32
32
|
}
|
|
33
33
|
interface SliceSteppingSlicerInput<InterestedIn extends 'reconstruct' | 'slice' | undefined> extends BaseSteppingSlicerInput<InterestedIn> {
|
package/core/output.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LAST_STEP, StepName, StepResult } from './steps';
|
|
1
|
+
import type { LAST_STEP, StepName, StepResult } from './steps';
|
|
2
2
|
/** Represents the return value of the processor linked to the step with the name 'K' */
|
|
3
3
|
type Out<K extends StepName> = Record<K, StepResult<K>>;
|
|
4
4
|
/**
|
|
@@ -9,7 +9,8 @@ type StepResultsHelper<InterestedIn extends StepName> = {
|
|
|
9
9
|
'parse': Out<'parse'>;
|
|
10
10
|
'normalize': StepResultsHelper<'parse'> & Out<'normalize'>;
|
|
11
11
|
'dataflow': StepResultsHelper<'normalize'> & Out<'dataflow'>;
|
|
12
|
-
'
|
|
12
|
+
'ai': StepResultsHelper<'dataflow'> & Out<'ai'>;
|
|
13
|
+
'slice': StepResultsHelper<'ai'> & Out<'slice'>;
|
|
13
14
|
'reconstruct': StepResultsHelper<'slice'> & Out<'reconstruct'>;
|
|
14
15
|
}[InterestedIn];
|
|
15
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../dataflow/internal/info';
|
|
2
|
-
import { QuadSerializationConfiguration } from '../../util/quads';
|
|
3
|
-
import { DataflowMap } from '../../dataflow';
|
|
1
|
+
import type { DataflowInformation } from '../../dataflow/internal/info';
|
|
2
|
+
import type { QuadSerializationConfiguration } from '../../util/quads';
|
|
3
|
+
import type { DataflowMap } from '../../dataflow';
|
|
4
4
|
/** Should work with larger things as well */
|
|
5
5
|
export declare function dataflowGraphToJson(df: DataflowInformation): string;
|
|
6
6
|
export declare function dataflowGraphToMermaid(df: DataflowInformation, idMap: DataflowMap): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NormalizedAst } from '../../r-bridge';
|
|
2
|
-
import { QuadSerializationConfiguration } from '../../util/quads';
|
|
1
|
+
import type { NormalizedAst } from '../../r-bridge';
|
|
2
|
+
import type { QuadSerializationConfiguration } from '../../util/quads';
|
|
3
3
|
/** Should work with larger things as well */
|
|
4
4
|
export declare function normalizedAstToJson(ast: NormalizedAst): string;
|
|
5
5
|
export declare function normalizedAstToQuads(ast: NormalizedAst, config: QuadSerializationConfiguration): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { QuadSerializationConfiguration } from '../../util/quads';
|
|
2
|
-
import { XmlParserConfig } from '../../r-bridge';
|
|
1
|
+
import type { QuadSerializationConfiguration } from '../../util/quads';
|
|
2
|
+
import type { XmlParserConfig } from '../../r-bridge';
|
|
3
3
|
export declare function parseToQuads(code: string, config: QuadSerializationConfiguration, parseConfig: XmlParserConfig): Promise<string>;
|
package/core/print/print.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeId, NormalizedAst } from '../../r-bridge';
|
|
1
|
+
import type { NodeId, NormalizedAst } from '../../r-bridge';
|
|
2
2
|
export declare function sliceDiffAnsi(slice: Set<NodeId>, normalized: NormalizedAst, criteriaIds: Set<NodeId>, originalCode: string): string;
|
package/core/slicer.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LAST_PER_FILE_STEP,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { LAST_PER_FILE_STEP, StepRequired, StepName, StepResult } from './steps';
|
|
2
|
+
import { LAST_STEP, STEPS_PER_SLICE } from './steps';
|
|
3
|
+
import type { SlicingCriteria } from '../slicing';
|
|
4
|
+
import type { SteppingSlicerInput } from './input';
|
|
5
|
+
import type { StepResults } from './output';
|
|
5
6
|
/**
|
|
6
7
|
* This is ultimately the root of flowR's static slicing procedure.
|
|
7
8
|
* It clearly defines the steps that are to be executed and splits them into two stages.
|
package/core/slicer.js
CHANGED
|
@@ -169,11 +169,15 @@ class SteppingSlicer {
|
|
|
169
169
|
result = (0, steps_1.executeSingleSubStep)(step, this.results.normalize);
|
|
170
170
|
break;
|
|
171
171
|
case 3:
|
|
172
|
+
step = guardStep('ai');
|
|
173
|
+
result = (0, steps_1.executeSingleSubStep)(step, this.results.normalize, this.results.dataflow);
|
|
174
|
+
break;
|
|
175
|
+
case 4:
|
|
172
176
|
(0, assert_1.guard)(this.criterion !== undefined, 'Cannot decode criteria without a criterion');
|
|
173
177
|
step = guardStep('slice');
|
|
174
|
-
result = (0, steps_1.executeSingleSubStep)(step, this.results.
|
|
178
|
+
result = (0, steps_1.executeSingleSubStep)(step, this.results.ai.graph, this.results.normalize, this.criterion);
|
|
175
179
|
break;
|
|
176
|
-
case
|
|
180
|
+
case 5:
|
|
177
181
|
step = guardStep('reconstruct');
|
|
178
182
|
result = (0, steps_1.executeSingleSubStep)(step, this.results.normalize, this.results.slice.result);
|
|
179
183
|
break;
|
package/core/steps.d.ts
CHANGED
|
@@ -12,14 +12,16 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
import { MergeableRecord } from '../util/objects';
|
|
15
|
+
import type { MergeableRecord } from '../util/objects';
|
|
16
16
|
import { normalize, retrieveXmlFromRCode } from '../r-bridge';
|
|
17
17
|
import { produceDataFlowGraph } from '../dataflow';
|
|
18
18
|
import { reconstructToCode, staticSlicing } from '../slicing';
|
|
19
|
-
import {
|
|
19
|
+
import type { IStepPrinter } from './print/print';
|
|
20
|
+
import { internalPrinter, StepOutputFormat } from './print/print';
|
|
20
21
|
import { normalizedAstToJson, normalizedAstToQuads, printNormalizedAstToMermaid, printNormalizedAstToMermaidUrl } from './print/normalize-printer';
|
|
21
|
-
import { dataflowGraphToJson, dataflowGraphToMermaid, dataflowGraphToMermaidUrl, dataflowGraphToQuads } from './print/dataflow-printer';
|
|
22
22
|
import { parseToQuads } from './print/parse-printer';
|
|
23
|
+
import { dataflowGraphToJson, dataflowGraphToMermaid, dataflowGraphToMermaidUrl, dataflowGraphToQuads } from './print/dataflow-printer';
|
|
24
|
+
import type { DataflowInformation } from '../dataflow/internal/info';
|
|
23
25
|
/**
|
|
24
26
|
* This represents close a function that we know completely nothing about.
|
|
25
27
|
* Nevertheless, this is the basis of what a step processor should look like.
|
|
@@ -79,6 +81,14 @@ export declare const STEPS_PER_FILE: {
|
|
|
79
81
|
4: typeof dataflowGraphToMermaidUrl;
|
|
80
82
|
};
|
|
81
83
|
};
|
|
84
|
+
readonly ai: {
|
|
85
|
+
description: string;
|
|
86
|
+
processor: (_: import("../r-bridge").NormalizedAst<import("../r-bridge").ParentInformation>, dfInfo: DataflowInformation) => DataflowInformation;
|
|
87
|
+
required: "once-per-file";
|
|
88
|
+
printer: {
|
|
89
|
+
0: typeof internalPrinter;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
82
92
|
};
|
|
83
93
|
export declare const STEPS_PER_SLICE: {
|
|
84
94
|
readonly slice: {
|
|
@@ -149,8 +159,16 @@ export declare const STEPS: {
|
|
|
149
159
|
4: typeof dataflowGraphToMermaidUrl;
|
|
150
160
|
};
|
|
151
161
|
};
|
|
162
|
+
readonly ai: {
|
|
163
|
+
description: string;
|
|
164
|
+
processor: (_: import("../r-bridge").NormalizedAst<import("../r-bridge").ParentInformation>, dfInfo: DataflowInformation) => DataflowInformation;
|
|
165
|
+
required: "once-per-file";
|
|
166
|
+
printer: {
|
|
167
|
+
0: typeof internalPrinter;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
152
170
|
};
|
|
153
|
-
export declare const LAST_PER_FILE_STEP: "
|
|
171
|
+
export declare const LAST_PER_FILE_STEP: "ai";
|
|
154
172
|
export declare const LAST_STEP: "reconstruct";
|
|
155
173
|
export type StepName = keyof typeof STEPS;
|
|
156
174
|
export type Step<Name extends StepName> = typeof STEPS[Name];
|
package/core/steps.js
CHANGED
|
@@ -21,8 +21,8 @@ const slicing_1 = require("../slicing");
|
|
|
21
21
|
const print_1 = require("./print/print");
|
|
22
22
|
const normalize_printer_1 = require("./print/normalize-printer");
|
|
23
23
|
const assert_1 = require("../util/assert");
|
|
24
|
-
const dataflow_printer_1 = require("./print/dataflow-printer");
|
|
25
24
|
const parse_printer_1 = require("./print/parse-printer");
|
|
25
|
+
const dataflow_printer_1 = require("./print/dataflow-printer");
|
|
26
26
|
exports.STEPS_PER_FILE = {
|
|
27
27
|
'parse': {
|
|
28
28
|
description: 'Parse the given R code into an AST',
|
|
@@ -57,6 +57,14 @@ exports.STEPS_PER_FILE = {
|
|
|
57
57
|
[3 /* StepOutputFormat.Mermaid */]: dataflow_printer_1.dataflowGraphToMermaid,
|
|
58
58
|
[4 /* StepOutputFormat.MermaidUrl */]: dataflow_printer_1.dataflowGraphToMermaidUrl
|
|
59
59
|
}
|
|
60
|
+
},
|
|
61
|
+
'ai': {
|
|
62
|
+
description: 'Run abstract interpretation',
|
|
63
|
+
processor: (_, dfInfo) => dfInfo, // Use runAbstractInterpretation here when it's ready
|
|
64
|
+
required: 'once-per-file',
|
|
65
|
+
printer: {
|
|
66
|
+
[0 /* StepOutputFormat.Internal */]: print_1.internalPrinter
|
|
67
|
+
}
|
|
60
68
|
}
|
|
61
69
|
};
|
|
62
70
|
exports.STEPS_PER_SLICE = {
|
|
@@ -78,7 +86,7 @@ exports.STEPS_PER_SLICE = {
|
|
|
78
86
|
}
|
|
79
87
|
};
|
|
80
88
|
exports.STEPS = { ...exports.STEPS_PER_FILE, ...exports.STEPS_PER_SLICE };
|
|
81
|
-
exports.LAST_PER_FILE_STEP = '
|
|
89
|
+
exports.LAST_PER_FILE_STEP = 'ai';
|
|
82
90
|
exports.LAST_STEP = 'reconstruct';
|
|
83
91
|
function executeSingleSubStep(subStep, ...input) {
|
|
84
92
|
// @ts-expect-error - this is safe, as we know that the function arguments are correct by 'satisfies', this saves an explicit cast with 'as'
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
|
-
import { NodeId } from '../../r-bridge';
|
|
8
|
-
import { DataflowGraph, DataflowGraphEdgeAttribute } from '../graph';
|
|
9
|
-
import { DataflowScopeName } from './scopes';
|
|
10
|
-
import { GenericDifferenceInformation } from '../../util/diff';
|
|
7
|
+
import type { NodeId } from '../../r-bridge';
|
|
8
|
+
import type { DataflowGraph, DataflowGraphEdgeAttribute } from '../graph';
|
|
9
|
+
import type { DataflowScopeName } from './scopes';
|
|
10
|
+
import type { GenericDifferenceInformation } from '../../util/diff';
|
|
11
11
|
/** identifiers are branded to avoid confusion with other string-like types */
|
|
12
12
|
export type Identifier = string & {
|
|
13
13
|
__brand?: 'identifier';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { REnvironmentInformation, IEnvironment } from './environment';
|
|
1
|
+
import type { REnvironmentInformation, IEnvironment } from './environment';
|
|
2
2
|
export declare function overwriteIEnvironmentWith(base: IEnvironment | undefined, next: IEnvironment | undefined, includeParent?: boolean): IEnvironment;
|
|
3
3
|
export declare function overwriteEnvironments(base: REnvironmentInformation, next: REnvironmentInformation | undefined): REnvironmentInformation;
|
|
4
4
|
export declare function overwriteEnvironments(base: REnvironmentInformation | undefined, next: REnvironmentInformation): REnvironmentInformation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IdentifierDefinition, REnvironmentInformation } from './environment';
|
|
2
|
-
import { DataflowScopeName } from './scopes';
|
|
1
|
+
import type { IdentifierDefinition, REnvironmentInformation } from './environment';
|
|
2
|
+
import type { DataflowScopeName } from './scopes';
|
|
3
3
|
/**
|
|
4
4
|
* Insert the given `definition` --- defined within the given scope --- into the passed along `environments` will take care of propagation.
|
|
5
5
|
* Does not modify the passed along `environments` in-place! It returns the new reference.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Identifier, IdentifierDefinition, REnvironmentInformation } from './environment';
|
|
2
|
-
import { DataflowScopeName } from './scopes';
|
|
1
|
+
import type { Identifier, IdentifierDefinition, REnvironmentInformation } from './environment';
|
|
2
|
+
import type { DataflowScopeName } from './scopes';
|
|
3
3
|
/**
|
|
4
4
|
* Resolves a given identifier name to a list of its possible definition location using R scoping and resolving rules.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { REnvironmentInformation } from './environment';
|
|
1
|
+
import type { REnvironmentInformation } from './environment';
|
|
2
2
|
/** Add a new local environment scope to the stack, returns the modified variant - sharing the original environments in the stack (no deep-clone) */
|
|
3
3
|
export declare function pushLocalEnvironment(base: REnvironmentInformation): REnvironmentInformation;
|
|
4
4
|
export declare function popLocalEnvironment(base: REnvironmentInformation): REnvironmentInformation;
|
package/dataflow/extractor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NormalizedAst, ParentInformation, RBinaryOp } from '../r-bridge';
|
|
2
|
-
import { DataflowInformation } from './internal/info';
|
|
3
|
-
import { DataflowProcessorInformation } from './processor';
|
|
4
|
-
import { DataflowScopeName } from './environments';
|
|
1
|
+
import type { NormalizedAst, ParentInformation, RBinaryOp } from '../r-bridge';
|
|
2
|
+
import type { DataflowInformation } from './internal/info';
|
|
3
|
+
import type { DataflowProcessorInformation } from './processor';
|
|
4
|
+
import type { DataflowScopeName } from './environments';
|
|
5
5
|
export declare function produceDataFlowGraph<OtherInfo>(ast: NormalizedAst<OtherInfo & ParentInformation>, initialScope?: DataflowScopeName): DataflowInformation;
|
|
6
6
|
export declare function processBinaryOp<OtherInfo>(node: RBinaryOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
package/dataflow/graph/diff.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodeId } from '../../r-bridge';
|
|
2
|
-
import { DataflowGraph, FunctionArgument, OutgoingEdges } from './graph';
|
|
3
|
-
import { GenericDifferenceInformation, DifferenceReport } from '../../util/diff';
|
|
1
|
+
import type { NodeId } from '../../r-bridge';
|
|
2
|
+
import type { DataflowGraph, FunctionArgument, OutgoingEdges } from './graph';
|
|
3
|
+
import type { GenericDifferenceInformation, DifferenceReport } from '../../util/diff';
|
|
4
4
|
export interface NamedGraph {
|
|
5
5
|
name: string;
|
|
6
6
|
graph: DataflowGraph;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { NodeId, NoInfo, RNodeWithParent } from '../../r-bridge';
|
|
2
|
-
import { IdentifierDefinition, IdentifierReference } from '../environments';
|
|
3
|
-
import { BiMap } from '../../util/bimap';
|
|
4
|
-
import { DataflowGraphEdge, DataflowGraphEdgeAttribute
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import type { NodeId, NoInfo, RNodeWithParent } from '../../r-bridge';
|
|
2
|
+
import type { IdentifierDefinition, IdentifierReference } from '../environments';
|
|
3
|
+
import type { BiMap } from '../../util/bimap';
|
|
4
|
+
import type { DataflowGraphEdge, DataflowGraphEdgeAttribute } from './edge';
|
|
5
|
+
import { EdgeType } from './edge';
|
|
6
|
+
import type { DataflowInformation } from '../internal/info';
|
|
7
|
+
import type { DataflowGraphVertexArgument, DataflowGraphVertexInfo } from './vertex';
|
|
8
|
+
import type { DifferenceReport } from '../../util/diff';
|
|
8
9
|
/** Used to get an entry point for every id, after that it allows reference-chasing of the graph */
|
|
9
10
|
export type DataflowMap<OtherInfo = NoInfo> = BiMap<NodeId, RNodeWithParent<OtherInfo>>;
|
|
10
11
|
export type DataflowFunctionFlowInformation = Omit<DataflowInformation, 'graph'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QuadSerializationConfiguration } from '../../util/quads';
|
|
2
|
-
import { DataflowGraph } from './graph';
|
|
1
|
+
import type { QuadSerializationConfiguration } from '../../util/quads';
|
|
2
|
+
import type { DataflowGraph } from './graph';
|
|
3
3
|
/**
|
|
4
4
|
* @see cfg2quads
|
|
5
5
|
* @see serialize2quads
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MergeableRecord } from '../../util/objects';
|
|
2
|
-
import { NodeId } from '../../r-bridge';
|
|
3
|
-
import { DataflowScopeName, REnvironmentInformation } from '../environments';
|
|
4
|
-
import { DataflowGraphEdgeAttribute } from './edge';
|
|
5
|
-
import { DataflowFunctionFlowInformation, FunctionArgument } from './graph';
|
|
1
|
+
import type { MergeableRecord } from '../../util/objects';
|
|
2
|
+
import type { NodeId } from '../../r-bridge';
|
|
3
|
+
import type { DataflowScopeName, REnvironmentInformation } from '../environments';
|
|
4
|
+
import type { DataflowGraphEdgeAttribute } from './edge';
|
|
5
|
+
import type { DataflowFunctionFlowInformation, FunctionArgument } from './graph';
|
|
6
6
|
export type DataflowGraphVertices = Map<NodeId, DataflowGraphVertexInfo>;
|
|
7
7
|
/**
|
|
8
8
|
* Arguments required to construct a vertex in the dataflow graph.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataflowGraph } from '../graph';
|
|
2
|
-
import { REnvironmentInformation, IdentifierReference, DataflowScopeName } from '../environments';
|
|
3
|
-
import { DataflowProcessorInformation } from '../processor';
|
|
2
|
+
import type { REnvironmentInformation, IdentifierReference, DataflowScopeName } from '../environments';
|
|
3
|
+
import type { DataflowProcessorInformation } from '../processor';
|
|
4
4
|
/**
|
|
5
5
|
* Continuously updated during the dataflow analysis to hold the current state.
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataflowGraph, DataflowGraphVertexInfo, FunctionArgument } from '../graph';
|
|
2
|
-
import { DataflowScopeName, IdentifierReference, REnvironmentInformation } from '../environments';
|
|
1
|
+
import type { DataflowGraph, DataflowGraphVertexInfo, FunctionArgument } from '../graph';
|
|
2
|
+
import type { DataflowScopeName, IdentifierReference, REnvironmentInformation } from '../environments';
|
|
3
3
|
import { DefaultMap } from '../../util/defaultmap';
|
|
4
|
-
import { DecoratedAstMap, NodeId, ParentInformation, RParameter } from '../../r-bridge';
|
|
4
|
+
import type { DecoratedAstMap, NodeId, ParentInformation, RParameter } from '../../r-bridge';
|
|
5
5
|
export declare function linkIngoingVariablesInSameScope(graph: DataflowGraph, references: IdentifierReference[]): void;
|
|
6
6
|
export type NameIdMap = DefaultMap<string, IdentifierReference[]>;
|
|
7
7
|
export declare function produceNameSharedIdMap(references: IdentifierReference[]): NameIdMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParentInformation, RAccess } from '../../../r-bridge';
|
|
2
|
-
import { DataflowInformation } from '../info';
|
|
3
|
-
import { DataflowProcessorInformation } from '../../processor';
|
|
1
|
+
import type { ParentInformation, RAccess } from '../../../r-bridge';
|
|
2
|
+
import type { DataflowInformation } from '../info';
|
|
3
|
+
import type { DataflowProcessorInformation } from '../../processor';
|
|
4
4
|
export declare function processAccess<OtherInfo>(node: RAccess<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Processes a list of expressions joining their dataflow graphs accordingly.
|
|
3
3
|
* @module
|
|
4
4
|
*/
|
|
5
|
-
import { DataflowInformation } from '../info';
|
|
6
|
-
import { ParentInformation, RExpressionList } from '../../../r-bridge';
|
|
7
|
-
import { DataflowProcessorInformation } from '../../processor';
|
|
5
|
+
import type { DataflowInformation } from '../info';
|
|
6
|
+
import type { ParentInformation, RExpressionList } from '../../../r-bridge';
|
|
7
|
+
import type { DataflowProcessorInformation } from '../../processor';
|
|
8
8
|
export declare function processExpressionList<OtherInfo>(exprList: RExpressionList<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|