@eagleoutice/flowr 2.1.12 → 2.2.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/README.md +0 -1
- package/benchmark/slicer.d.ts +5 -12
- package/benchmark/slicer.js +46 -28
- package/cli/benchmark-app.d.ts +2 -0
- package/cli/benchmark-app.js +2 -1
- package/cli/benchmark-helper-app.d.ts +2 -0
- package/cli/benchmark-helper-app.js +2 -2
- package/cli/common/options.js +3 -1
- package/cli/flowr-main-options.js +36 -2
- package/cli/flowr.d.ts +6 -0
- package/cli/flowr.js +51 -24
- package/cli/repl/commands/repl-cfg.js +2 -4
- package/cli/repl/commands/repl-dataflow.js +2 -4
- package/cli/repl/commands/repl-execute.d.ts +2 -2
- package/cli/repl/commands/repl-execute.js +15 -5
- package/cli/repl/commands/repl-lineage.js +2 -4
- package/cli/repl/commands/repl-main.d.ts +2 -2
- package/cli/repl/commands/repl-normalize.js +2 -4
- package/cli/repl/commands/repl-parse.js +2 -4
- package/cli/repl/commands/repl-query.js +6 -8
- package/cli/repl/commands/repl-version.d.ts +5 -4
- package/cli/repl/commands/repl-version.js +10 -9
- package/cli/repl/core.d.ts +5 -5
- package/cli/repl/core.js +8 -12
- package/cli/repl/print-version.d.ts +2 -2
- package/cli/repl/print-version.js +3 -3
- package/cli/repl/server/connection.d.ts +3 -3
- package/cli/repl/server/connection.js +5 -7
- package/cli/repl/server/messages/message-hello.js +2 -1
- package/cli/repl/server/server.d.ts +4 -3
- package/cli/repl/server/server.js +7 -5
- package/cli/slicer-app.js +1 -1
- package/config.d.ts +36 -4
- package/config.js +30 -1
- package/core/pipeline-executor.d.ts +1 -1
- package/core/pipeline-executor.js +1 -1
- package/core/steps/all/core/00-parse.d.ts +4 -18
- package/core/steps/all/core/00-parse.js +2 -11
- package/core/steps/all/core/01-parse-tree-sitter.d.ts +23 -0
- package/core/steps/all/core/01-parse-tree-sitter.js +19 -0
- package/core/steps/all/core/10-normalize.d.ts +3 -2
- package/core/steps/all/core/10-normalize.js +1 -0
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +25 -0
- package/core/steps/all/core/11-normalize-tree-sitter.js +27 -0
- package/core/steps/all/core/20-dataflow.d.ts +2 -0
- package/core/steps/all/core/20-dataflow.js +1 -1
- package/core/steps/pipeline/default-pipelines.d.ts +368 -23
- package/core/steps/pipeline/default-pipelines.js +42 -4
- package/dataflow/environments/resolve-by-name.js +5 -4
- package/dataflow/extractor.d.ts +2 -1
- package/dataflow/extractor.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +6 -5
- package/dataflow/processor.d.ts +2 -0
- package/documentation/doc-util/doc-auto-gen.js +2 -1
- package/documentation/doc-util/doc-cfg.js +1 -1
- package/documentation/doc-util/doc-dfg.js +2 -2
- package/documentation/doc-util/doc-files.d.ts +1 -0
- package/documentation/doc-util/doc-files.js +4 -0
- package/documentation/doc-util/doc-normalized-ast.js +2 -3
- package/documentation/doc-util/doc-query.js +1 -1
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/doc-util/doc-types.js +2 -2
- package/documentation/print-dataflow-graph-wiki.js +15 -15
- package/documentation/print-engines-wiki.d.ts +1 -0
- package/documentation/print-engines-wiki.js +82 -0
- package/documentation/print-interface-wiki.js +6 -7
- package/documentation/print-normalized-ast-wiki.js +1 -1
- package/documentation/print-query-wiki.js +24 -0
- package/package.json +9 -5
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -4
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -4
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +5 -4
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +3 -0
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +36 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +71 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +27 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -4
- package/queries/catalog/lineage-query/lineage-query-format.d.ts +5 -4
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -4
- package/queries/catalog/search-query/search-query-executor.js +0 -4
- package/queries/catalog/search-query/search-query-format.d.ts +5 -4
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +5 -4
- package/queries/query.d.ts +100 -33
- package/queries/query.js +3 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +4 -2
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +5 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +18 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +57 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +541 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-types.d.ts +35 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-types.js +40 -0
- package/r-bridge/parser.d.ts +32 -0
- package/r-bridge/parser.js +14 -0
- package/r-bridge/shell-executor.d.ts +37 -1
- package/r-bridge/shell-executor.js +39 -0
- package/r-bridge/shell.d.ts +12 -6
- package/r-bridge/shell.js +15 -6
- package/search/search-optimizer/search-optimizer.js +1 -1
- package/statistics/statistics.js +1 -1
- package/util/cfg/cfg.d.ts +2 -0
- package/util/cfg/cfg.js +8 -8
- package/util/cfg/happens-before.d.ts +7 -0
- package/util/cfg/happens-before.js +32 -0
- package/util/logic.d.ts +4 -4
- package/util/logic.js +8 -0
- package/util/version.js +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PipelineStepStage } from '../../pipeline-step';
|
|
2
|
+
import { internalPrinter } from '../../../print/print';
|
|
3
|
+
import type { Tree } from 'web-tree-sitter';
|
|
4
|
+
import type { ParseRequiredInput } from '../../../../r-bridge/parser';
|
|
5
|
+
export interface ParseStepOutputTS {
|
|
6
|
+
readonly parsed: Tree;
|
|
7
|
+
}
|
|
8
|
+
export declare const PARSE_WITH_TREE_SITTER_STEP: {
|
|
9
|
+
readonly name: "parse";
|
|
10
|
+
readonly humanReadableName: "parse with tree-sitter";
|
|
11
|
+
readonly description: "Parse the given R code into an AST using tree-sitter";
|
|
12
|
+
readonly processor: (_results: unknown, input: Partial<ParseRequiredInput<Tree>>) => Promise<import("../../../../r-bridge/parser").ParseStepOutput<Tree>>;
|
|
13
|
+
readonly executed: PipelineStepStage.OncePerFile;
|
|
14
|
+
readonly printer: {
|
|
15
|
+
readonly 0: typeof internalPrinter;
|
|
16
|
+
readonly 2: {
|
|
17
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
18
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly dependencies: readonly [];
|
|
22
|
+
readonly requiredInput: ParseRequiredInput<Tree>;
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PARSE_WITH_TREE_SITTER_STEP = void 0;
|
|
4
|
+
const print_1 = require("../../../print/print");
|
|
5
|
+
const parser_1 = require("../../../../r-bridge/parser");
|
|
6
|
+
exports.PARSE_WITH_TREE_SITTER_STEP = {
|
|
7
|
+
name: 'parse',
|
|
8
|
+
humanReadableName: 'parse with tree-sitter',
|
|
9
|
+
description: 'Parse the given R code into an AST using tree-sitter',
|
|
10
|
+
processor: (parser_1.parseRequests),
|
|
11
|
+
executed: 0 /* PipelineStepStage.OncePerFile */,
|
|
12
|
+
printer: {
|
|
13
|
+
[0 /* StepOutputFormat.Internal */]: print_1.internalPrinter,
|
|
14
|
+
[2 /* StepOutputFormat.Json */]: JSON.stringify
|
|
15
|
+
},
|
|
16
|
+
dependencies: [],
|
|
17
|
+
requiredInput: undefined
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=01-parse-tree-sitter.js.map
|
|
@@ -3,15 +3,16 @@ import { normalizedAstToJson, normalizedAstToQuads, printNormalizedAstToMermaid,
|
|
|
3
3
|
import { PipelineStepStage } from '../../pipeline-step';
|
|
4
4
|
import type { IdGenerator } from '../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
5
5
|
import type { NoInfo } from '../../../../r-bridge/lang-4.x/ast/model/model';
|
|
6
|
-
import type { ParseStepOutput } from './00-parse';
|
|
7
6
|
import type { RParseRequests } from '../../../../r-bridge/retriever';
|
|
7
|
+
import type { ParseStepOutput } from '../../../../r-bridge/parser';
|
|
8
8
|
export interface NormalizeRequiredInput {
|
|
9
9
|
/** This id generator is only necessary if you want to retrieve a dataflow from the parsed R AST, it determines the id generator to use and by default uses the {@link deterministicCountingIdGenerator}*/
|
|
10
10
|
readonly getId?: IdGenerator<NoInfo>;
|
|
11
11
|
readonly request: RParseRequests;
|
|
12
12
|
}
|
|
13
|
+
export declare function getCurrentRequestFile(request: RParseRequests | undefined): string | undefined;
|
|
13
14
|
declare function processor(results: {
|
|
14
|
-
parse?: ParseStepOutput
|
|
15
|
+
parse?: ParseStepOutput<string>;
|
|
15
16
|
}, input: Partial<NormalizeRequiredInput>): import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
16
17
|
export declare const NORMALIZE: {
|
|
17
18
|
readonly name: "normalize";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NORMALIZE = void 0;
|
|
4
|
+
exports.getCurrentRequestFile = getCurrentRequestFile;
|
|
4
5
|
const print_1 = require("../../../print/print");
|
|
5
6
|
const normalize_printer_1 = require("../../../print/normalize-printer");
|
|
6
7
|
const parser_1 = require("../../../../r-bridge/lang-4.x/ast/parser/json/parser");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { internalPrinter } from '../../../print/print';
|
|
2
|
+
import { normalizedAstToJson, normalizedAstToQuads, printNormalizedAstToMermaid, printNormalizedAstToMermaidUrl } from '../../../print/normalize-printer';
|
|
3
|
+
import { PipelineStepStage } from '../../pipeline-step';
|
|
4
|
+
import type { NormalizeRequiredInput } from './10-normalize';
|
|
5
|
+
import type { ParseStepOutputTS } from './01-parse-tree-sitter';
|
|
6
|
+
declare function processor(results: {
|
|
7
|
+
'parse'?: ParseStepOutputTS;
|
|
8
|
+
}, input: Partial<NormalizeRequiredInput>): import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
9
|
+
export declare const NORMALIZE_TREE_SITTER: {
|
|
10
|
+
readonly name: "normalize";
|
|
11
|
+
readonly humanReadableName: "normalize tree-sitter tree";
|
|
12
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
13
|
+
readonly processor: typeof processor;
|
|
14
|
+
readonly executed: PipelineStepStage.OncePerFile;
|
|
15
|
+
readonly printer: {
|
|
16
|
+
readonly 0: typeof internalPrinter;
|
|
17
|
+
readonly 2: typeof normalizedAstToJson;
|
|
18
|
+
readonly 5: typeof normalizedAstToQuads;
|
|
19
|
+
readonly 3: typeof printNormalizedAstToMermaid;
|
|
20
|
+
readonly 4: typeof printNormalizedAstToMermaidUrl;
|
|
21
|
+
};
|
|
22
|
+
readonly dependencies: readonly ["parse"];
|
|
23
|
+
readonly requiredInput: NormalizeRequiredInput;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NORMALIZE_TREE_SITTER = void 0;
|
|
4
|
+
const print_1 = require("../../../print/print");
|
|
5
|
+
const normalize_printer_1 = require("../../../print/normalize-printer");
|
|
6
|
+
const parser_1 = require("../../../../r-bridge/lang-4.x/ast/parser/json/parser");
|
|
7
|
+
const _10_normalize_1 = require("./10-normalize");
|
|
8
|
+
function processor(results, input) {
|
|
9
|
+
return (0, parser_1.normalizeTreeSitter)(results['parse'], input.getId, (0, _10_normalize_1.getCurrentRequestFile)(input.request));
|
|
10
|
+
}
|
|
11
|
+
exports.NORMALIZE_TREE_SITTER = {
|
|
12
|
+
name: 'normalize',
|
|
13
|
+
humanReadableName: 'normalize tree-sitter tree',
|
|
14
|
+
description: 'Normalize the AST to flowR\'s AST',
|
|
15
|
+
processor,
|
|
16
|
+
executed: 0 /* PipelineStepStage.OncePerFile */,
|
|
17
|
+
printer: {
|
|
18
|
+
[0 /* StepOutputFormat.Internal */]: print_1.internalPrinter,
|
|
19
|
+
[2 /* StepOutputFormat.Json */]: normalize_printer_1.normalizedAstToJson,
|
|
20
|
+
[5 /* StepOutputFormat.RdfQuads */]: normalize_printer_1.normalizedAstToQuads,
|
|
21
|
+
[3 /* StepOutputFormat.Mermaid */]: normalize_printer_1.printNormalizedAstToMermaid,
|
|
22
|
+
[4 /* StepOutputFormat.MermaidUrl */]: normalize_printer_1.printNormalizedAstToMermaidUrl
|
|
23
|
+
},
|
|
24
|
+
dependencies: ['parse'],
|
|
25
|
+
requiredInput: undefined
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=11-normalize-tree-sitter.js.map
|
|
@@ -3,10 +3,12 @@ import { PipelineStepStage } from '../../pipeline-step';
|
|
|
3
3
|
import { dataflowGraphToJson, dataflowGraphToMermaid, dataflowGraphToMermaidUrl, dataflowGraphToQuads } from '../../../print/dataflow-printer';
|
|
4
4
|
import type { NormalizedAst } from '../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
5
5
|
import type { RParseRequests } from '../../../../r-bridge/retriever';
|
|
6
|
+
import type { KnownParserType, Parser } from '../../../../r-bridge/parser';
|
|
6
7
|
declare function processor(results: {
|
|
7
8
|
normalize?: NormalizedAst;
|
|
8
9
|
}, input: {
|
|
9
10
|
request?: RParseRequests;
|
|
11
|
+
parser?: Parser<KnownParserType>;
|
|
10
12
|
}): import("../../../../dataflow/info").DataflowInformation;
|
|
11
13
|
export declare const STATIC_DATAFLOW: {
|
|
12
14
|
readonly humanReadableName: "dataflow";
|
|
@@ -18,7 +18,7 @@ const staticDataflowCommon = {
|
|
|
18
18
|
dependencies: ['normalize'],
|
|
19
19
|
};
|
|
20
20
|
function processor(results, input) {
|
|
21
|
-
return (0, extractor_1.produceDataFlowGraph)(input.request, results.normalize);
|
|
21
|
+
return (0, extractor_1.produceDataFlowGraph)(input.parser, input.request, results.normalize);
|
|
22
22
|
}
|
|
23
23
|
exports.STATIC_DATAFLOW = {
|
|
24
24
|
...staticDataflowCommon,
|