@eagleoutice/flowr 2.16.7 → 2.16.8
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 +9 -9
- package/dataflow/environments/identifier.d.ts +1 -1
- package/dataflow/environments/reference-to-maybe.js +1 -6
- package/dataflow/graph/dataflowgraph-builder.d.ts +4 -4
- package/dataflow/graph/graph.js +3 -10
- package/dataflow/graph/vertex.d.ts +1 -1
- package/dataflow/hooks.d.ts +1 -1
- package/dataflow/info.d.ts +3 -3
- package/dataflow/internal/linker.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +1 -7
- package/dataflow/processor.d.ts +1 -1
- package/package.json +1 -1
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ It offers a wide variety of features, for example:
|
|
|
38
38
|
|
|
39
39
|
```shell
|
|
40
40
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
41
|
-
flowR repl v2.16.
|
|
41
|
+
flowR repl v2.16.7, R grammar v14 (tree-sitter engine)
|
|
42
42
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ It offers a wide variety of features, for example:
|
|
|
46
46
|
<summary style='color:gray'>Output</summary>
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
Query: linter (
|
|
49
|
+
Query: linter (16 ms)
|
|
50
50
|
╰ Deprecated Functions (deprecated-functions): no findings
|
|
51
51
|
╰ File Path Validity (file-path-validity):
|
|
52
52
|
╰ certain:
|
|
@@ -70,7 +70,7 @@ It offers a wide variety of features, for example:
|
|
|
70
70
|
╰ Overwritten File (overwritten-file): no findings
|
|
71
71
|
╰ Unescaped Arguments (unescaped-arguments): no findings
|
|
72
72
|
╰ Namespace Access Validity (namespace-access): no findings
|
|
73
|
-
All queries together required ≈
|
|
73
|
+
All queries together required ≈16 ms (1ms accuracy, total 16 ms)
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
The linter will analyze the code and return any issues found.
|
|
@@ -84,7 +84,7 @@ It offers a wide variety of features, for example:
|
|
|
84
84
|
|
|
85
85
|
_Results (prettified and summarized):_
|
|
86
86
|
|
|
87
|
-
Query: **linter** (
|
|
87
|
+
Query: **linter** (31 ms)\
|
|
88
88
|
╰ **Deprecated Functions** (deprecated-functions): _no findings_\
|
|
89
89
|
╰ **File Path Validity** (file-path-validity):\
|
|
90
90
|
╰ certain:\
|
|
@@ -108,7 +108,7 @@ It offers a wide variety of features, for example:
|
|
|
108
108
|
╰ **Overwritten File** (overwritten-file): _no findings_\
|
|
109
109
|
╰ **Unescaped Arguments** (unescaped-arguments): _no findings_\
|
|
110
110
|
╰ **Namespace Access Validity** (namespace-access): _no findings_\
|
|
111
|
-
_All queries together required ≈
|
|
111
|
+
_All queries together required ≈31 ms (1ms accuracy, total 31 ms)_
|
|
112
112
|
|
|
113
113
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
114
114
|
|
|
@@ -199,7 +199,7 @@ It offers a wide variety of features, for example:
|
|
|
199
199
|
|
|
200
200
|
```shell
|
|
201
201
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
202
|
-
flowR repl v2.16.
|
|
202
|
+
flowR repl v2.16.7, R grammar v14 (tree-sitter engine)
|
|
203
203
|
R> :query @static-slice (11@sum) file://test/testfiles/example.R
|
|
204
204
|
```
|
|
205
205
|
|
|
@@ -212,7 +212,7 @@ It offers a wide variety of features, for example:
|
|
|
212
212
|
N <- 10
|
|
213
213
|
for(i in 1:(N-1)) sum <- sum + i + w
|
|
214
214
|
sum
|
|
215
|
-
All queries together required ≈
|
|
215
|
+
All queries together required ≈3 ms (1ms accuracy, total 3 ms)
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
</details>
|
|
@@ -220,7 +220,7 @@ It offers a wide variety of features, for example:
|
|
|
220
220
|
</details>
|
|
221
221
|
|
|
222
222
|
* 🚀 **fast call-graph, data-, and control-flow graphs**\
|
|
223
|
-
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
223
|
+
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">104.2 ms</span></i> (as of Oct 27, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
|
|
224
224
|
_flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
|
|
225
225
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the [dataflow graphs](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) as well as [call graphs](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph#perspectives-cg).
|
|
226
226
|
( [▶ Explore in Browser](https://flowr-analysis.github.io/flowr/wiki/playground/#c=zDYSwRgTghhCeAUATADsWECUAoLBnAxlMAKYD6ALgPakC2UAHgAQA8AtIwGYCuAdvuSEo949DIyYB6RnXojsWaAHdGKlW0aIo5KADoO0GsXghEjALyMAjAC4AbABpGANyJdi5xvngBmRwA5HAHZHACZHAE5HABYMbHwSKB5VdQ4QYHJiCHglRxdgN0YAPkYQuISeABICImJTdWqSCmoZeHjiRIq8t3lcLho6OFJcbXJcFnZe-pgQXCM2xMdDRI8l4Qba2KxeLlnEJu1gNQm%2B7KhFTtdieUUIEAydfFwneEmB2CGR3EcAIleYWAeT2%2B2FQlHIrXKVUIJEQIMoIB4owh7UqJgwQA&p=13:1 "run this script in flowR's playground, no setup") )
|
|
@@ -251,7 +251,7 @@ It offers a wide variety of features, for example:
|
|
|
251
251
|
|
|
252
252
|
```shell
|
|
253
253
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
254
|
-
flowR repl v2.16.
|
|
254
|
+
flowR repl v2.16.7, R grammar v14 (tree-sitter engine)
|
|
255
255
|
R> :dataflow* test/testfiles/example.R
|
|
256
256
|
```
|
|
257
257
|
|
|
@@ -458,7 +458,7 @@ export interface IdentifierReference {
|
|
|
458
458
|
* If the reference is only effective, if, for example, an if-then-else condition is true, this references the root of the `if`.
|
|
459
459
|
* As a hacky intermediate solution (until we have pointer-analysis), an empty array may indicate a `maybe` which is due to pointer access (e.g., in `a[x] <- 3`).
|
|
460
460
|
*/
|
|
461
|
-
cds?: ControlDependency[] | undefined;
|
|
461
|
+
cds?: readonly ControlDependency[] | undefined;
|
|
462
462
|
}
|
|
463
463
|
/**
|
|
464
464
|
* The definition of an {@link Identifier|identifier} within the {@link DataflowGraph|graph}.
|
|
@@ -53,12 +53,7 @@ function applyCdsToDefinitions(environments, name, type, definitions, nodeId, de
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
function addCds(target, cds) {
|
|
56
|
-
|
|
57
|
-
(0, info_1.appendCds)(target.cds, cds);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
target.cds = cds ? Array.from(cds) : [];
|
|
61
|
-
}
|
|
56
|
+
target.cds = (0, info_1.withCds)(target.cds, cds);
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Marks the reference as maybe (i.e., as controlled by a set of {@link IdentifierReference#cds|control dependencies}).
|
|
@@ -34,7 +34,7 @@ export declare class DataflowGraphBuilder<Vertex extends DataflowGraphVertexInfo
|
|
|
34
34
|
}, info?: {
|
|
35
35
|
environment?: REnvironmentInformation;
|
|
36
36
|
builtInEnvironment?: IEnvironment;
|
|
37
|
-
cds?: ControlDependency[];
|
|
37
|
+
cds?: readonly ControlDependency[];
|
|
38
38
|
readParams?: [NodeId, boolean][];
|
|
39
39
|
mode?: DataflowGraphVertexFunctionDefinition['mode'];
|
|
40
40
|
}, asRoot?: boolean): this;
|
|
@@ -53,7 +53,7 @@ export declare class DataflowGraphBuilder<Vertex extends DataflowGraphVertexInfo
|
|
|
53
53
|
onlyBuiltIn?: boolean;
|
|
54
54
|
environment?: REnvironmentInformation;
|
|
55
55
|
builtInEnvironment?: IEnvironment;
|
|
56
|
-
cds?: ControlDependency[];
|
|
56
|
+
cds?: readonly ControlDependency[];
|
|
57
57
|
origin?: FunctionOriginInformation[];
|
|
58
58
|
link?: DataflowGraphVertexAstLink;
|
|
59
59
|
omitArgs?: boolean;
|
|
@@ -69,7 +69,7 @@ export declare class DataflowGraphBuilder<Vertex extends DataflowGraphVertexInfo
|
|
|
69
69
|
* (i.e., be a valid entry point), or is it nested (e.g., as part of a function definition)
|
|
70
70
|
*/
|
|
71
71
|
defineVariable(id: NodeId, name?: string, info?: {
|
|
72
|
-
cds?: ControlDependency[];
|
|
72
|
+
cds?: readonly ControlDependency[];
|
|
73
73
|
definedBy?: NodeId[];
|
|
74
74
|
}, asRoot?: boolean): this;
|
|
75
75
|
/**
|
|
@@ -89,7 +89,7 @@ export declare class DataflowGraphBuilder<Vertex extends DataflowGraphVertexInfo
|
|
|
89
89
|
* (i.e., be a valid entry point), or is it nested (e.g., as part of a function definition)
|
|
90
90
|
*/
|
|
91
91
|
constant(id: NodeId, options?: {
|
|
92
|
-
cds?: ControlDependency[];
|
|
92
|
+
cds?: readonly ControlDependency[];
|
|
93
93
|
}, asRoot?: boolean): this;
|
|
94
94
|
private edgeHelper;
|
|
95
95
|
/**
|
package/dataflow/graph/graph.js
CHANGED
|
@@ -608,17 +608,10 @@ class DataflowGraph {
|
|
|
608
608
|
to = node_id_1.NodeId.normalize(to);
|
|
609
609
|
const vertex = this.getVertex(from);
|
|
610
610
|
(0, assert_1.guard)(vertex !== undefined, () => `node must be defined for ${from} to add control dependency`);
|
|
611
|
-
if (vertex.cds) {
|
|
612
|
-
|
|
613
|
-
if (id === to && when !== cond) {
|
|
614
|
-
return this;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
vertex.cds = [];
|
|
611
|
+
if (vertex.cds?.some(c => c.id === to && c.when !== when)) {
|
|
612
|
+
return this;
|
|
620
613
|
}
|
|
621
|
-
vertex.cds.
|
|
614
|
+
vertex.cds = [...vertex.cds ?? [], { id: to, when }];
|
|
622
615
|
return this;
|
|
623
616
|
}
|
|
624
617
|
/** Marks the given node as having unknown side effects */
|
|
@@ -42,7 +42,7 @@ interface DataflowGraphVertexBase extends MergeableRecord {
|
|
|
42
42
|
/**
|
|
43
43
|
* @see {@link ControlDependency} - the collection of control dependencies which have an influence on whether the vertex is executed.
|
|
44
44
|
*/
|
|
45
|
-
cds: ControlDependency[] | undefined;
|
|
45
|
+
cds: readonly ControlDependency[] | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Describes the collection of AST vertices that contributed to this vertex.
|
|
48
48
|
* For example, this is useful with replacement operators, telling you which assignment operator caused them
|
package/dataflow/hooks.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface HookInformation {
|
|
|
13
13
|
/** The id of the function definition which is added by the hook */
|
|
14
14
|
id: NodeId;
|
|
15
15
|
/** Control dependencies under which the hook was registered */
|
|
16
|
-
cds?: ControlDependency[];
|
|
16
|
+
cds?: readonly ControlDependency[];
|
|
17
17
|
/** Whether the hook is added on top of existing ones (true) or replaces them (false) */
|
|
18
18
|
add?: boolean;
|
|
19
19
|
/** Whether the hook is executed after existing ones (true) or before (false) */
|
package/dataflow/info.d.ts
CHANGED
|
@@ -102,14 +102,14 @@ export interface ExitPoint {
|
|
|
102
102
|
* (e.g., if the `return` is contained within an `if` statement).
|
|
103
103
|
* @see {@link happensInEveryBranch} - to check whether control dependencies are exhaustive
|
|
104
104
|
*/
|
|
105
|
-
readonly cds?: ControlDependency[];
|
|
105
|
+
readonly cds?: readonly ControlDependency[];
|
|
106
106
|
}
|
|
107
107
|
/** `exit` leaving through the construct `rootId`, which keeps the jump it stands for. */
|
|
108
108
|
export declare function leaveThrough(exit: ExitPoint, rootId: NodeId): ExitPoint;
|
|
109
109
|
/**
|
|
110
110
|
* Adds all non-default exit points to the existing list and updates the `invertExitCds` accordingly.
|
|
111
111
|
*/
|
|
112
|
-
export declare function addNonDefaultExitPoints(existing: ExitPoint[], invertExitCds: ControlDependency[], activeCds: ControlDependency[] | undefined, add: readonly ExitPoint[]): void;
|
|
112
|
+
export declare function addNonDefaultExitPoints(existing: ExitPoint[], invertExitCds: ControlDependency[], activeCds: readonly ControlDependency[] | undefined, add: readonly ExitPoint[]): void;
|
|
113
113
|
/**
|
|
114
114
|
* Overwrites the existing exit points with the given ones, taking care of cds:
|
|
115
115
|
* the existing ones stay if the replacements only happen in some branches.
|
|
@@ -246,5 +246,5 @@ export declare function diffControlDependency<Report extends WriteableDifference
|
|
|
246
246
|
/**
|
|
247
247
|
* Calculates the difference between two lists of control dependencies.
|
|
248
248
|
*/
|
|
249
|
-
export declare function diffControlDependencies<Report extends WriteableDifferenceReport>(a: ControlDependency[] | undefined, b: ControlDependency[] | undefined, info: GenericDifferenceInformation<Report>): void;
|
|
249
|
+
export declare function diffControlDependencies<Report extends WriteableDifferenceReport>(a: readonly ControlDependency[] | undefined, b: readonly ControlDependency[] | undefined, info: GenericDifferenceInformation<Report>): void;
|
|
250
250
|
export {};
|
|
@@ -17,9 +17,9 @@ export declare function hidesBody(definition: IdentifierDefinition): boolean;
|
|
|
17
17
|
/** A call into code flowR cannot see may read any option, draw random numbers (with `draws` advancing the generator), and with `graphics` draw on the device. */
|
|
18
18
|
export declare function readsAllAmbientState<OtherInfo>(res: DataflowInformation, rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, graphics: boolean, draws?: boolean): DataflowInformation;
|
|
19
19
|
/** What an assignment writes beyond its target: only a global `.Random.seed` sets {@link AmbientStateName.rng}. */
|
|
20
|
-
export declare function ambientWritesOfAssignment(environment: REnvironmentInformation, target: Identifier, rootId: NodeId, cds: ControlDependency[] | undefined, global: boolean): REnvironmentInformation;
|
|
20
|
+
export declare function ambientWritesOfAssignment(environment: REnvironmentInformation, target: Identifier, rootId: NodeId, cds: readonly ControlDependency[] | undefined, global: boolean): REnvironmentInformation;
|
|
21
21
|
/** Rebinding or removing the names (all of them if `undefined`) may release an object a finalizer is registered for. */
|
|
22
|
-
export declare function ambientWritesOfRelease(environment: REnvironmentInformation, names: readonly Identifier[] | undefined, rootId: NodeId, cds: ControlDependency[] | undefined): REnvironmentInformation;
|
|
22
|
+
export declare function ambientWritesOfRelease(environment: REnvironmentInformation, names: readonly Identifier[] | undefined, rootId: NodeId, cds: readonly ControlDependency[] | undefined): REnvironmentInformation;
|
|
23
23
|
/** Ambient writes stay out of `out` (see {@link withAccess}), so a part that only maybe runs marks its writes as maybe in `target` here. */
|
|
24
24
|
export declare function makeAmbientWritesMaybe(after: REnvironmentInformation, before: REnvironmentInformation, target: REnvironmentInformation, cds: readonly ControlDependency[]): void;
|
|
25
25
|
/** The states written in `after` that `before` does not hold, as by a promise (`delayedAssign`) whose writes only happen once a read forces it. */
|
|
@@ -39,7 +39,7 @@ interface AttachSpec {
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function processLibrary<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config?: LibraryProcessorConfig): DataflowInformation;
|
|
41
41
|
/** Materialize the empty built-in function-definition vertex for a package export (idempotent). */
|
|
42
|
-
export declare function attachExportVertex(graph: DataflowGraph, builtInId: NodeId, environment: REnvironmentInformation, ctx: FlowrAnalyzerContext, cds?: ControlDependency[]): void;
|
|
42
|
+
export declare function attachExportVertex(graph: DataflowGraph, builtInId: NodeId, environment: REnvironmentInformation, ctx: FlowrAnalyzerContext, cds?: readonly ControlDependency[]): void;
|
|
43
43
|
/**
|
|
44
44
|
* The load calls (`library()`/`require()`) that brought package `pack` into scope without a database, collected from
|
|
45
45
|
* the {@link libraryLoadMarker} of every matching {@link EnvType.LoadedNamespace} layer below the global environment.
|
|
@@ -353,12 +353,6 @@ function constrainExitPoints(exitPoints, constrain) {
|
|
|
353
353
|
return exitPoints;
|
|
354
354
|
}
|
|
355
355
|
const cds = Array.from(constrain, id => ({ id, when: true }));
|
|
356
|
-
return exitPoints.map(e => {
|
|
357
|
-
if (e.cds) {
|
|
358
|
-
e.cds.push(...cds);
|
|
359
|
-
return e;
|
|
360
|
-
}
|
|
361
|
-
return { ...e, cds };
|
|
362
|
-
});
|
|
356
|
+
return exitPoints.map(e => ({ ...e, cds: e.cds ? [...e.cds, ...cds] : cds }));
|
|
363
357
|
}
|
|
364
358
|
//# sourceMappingURL=built-in-try-catch.js.map
|
package/dataflow/processor.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface DataflowProcessorInformation<OtherInfo> {
|
|
|
33
33
|
/**
|
|
34
34
|
* The chain of control-flow {@link NodeId}s that lead to the current node (e.g., of known ifs).
|
|
35
35
|
*/
|
|
36
|
-
readonly cds: ControlDependency[] | undefined;
|
|
36
|
+
readonly cds: readonly ControlDependency[] | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* The flowr context used for environment seeding, files, and precision control, ...
|
|
39
39
|
*/
|
package/package.json
CHANGED
package/util/flowr-version.d.ts
CHANGED
package/util/flowr-version.js
CHANGED
|
@@ -8,9 +8,9 @@ exports.flowrVersion = flowrVersion;
|
|
|
8
8
|
*/
|
|
9
9
|
const semver_1 = require("semver");
|
|
10
10
|
// this is automatically replaced with the current version by release-it
|
|
11
|
-
const version = '2.16.
|
|
11
|
+
const version = '2.16.8';
|
|
12
12
|
// this is automatically replaced with the release date by release-it (scripts/bump-version.ts)
|
|
13
|
-
exports.versionDate = '2026-10-
|
|
13
|
+
exports.versionDate = '2026-10-30T07:17:04Z';
|
|
14
14
|
/**
|
|
15
15
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
16
16
|
*/
|