@eagleoutice/flowr 2.9.4 → 2.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
|
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
26
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
27
|
-
flowR repl using flowR v2.9.
|
|
27
|
+
flowR repl using flowR v2.9.4, R grammar v14 (tree-sitter engine)
|
|
28
28
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -39,7 +39,7 @@ It offers a wide variety of features, for example:
|
|
|
39
39
|
╰ File Path Validity (file-path-validity):
|
|
40
40
|
╰ certain:
|
|
41
41
|
╰ Path `/root/x.txt` at 1.1-23
|
|
42
|
-
╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs:
|
|
42
|
+
╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0
|
|
43
43
|
╰ Seeded Randomness (seeded-randomness):
|
|
44
44
|
╰ Metadata: consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0
|
|
45
45
|
╰ Absolute Paths (absolute-file-paths):
|
|
@@ -47,7 +47,7 @@ It offers a wide variety of features, for example:
|
|
|
47
47
|
╰ Path `/root/x.txt` at 1.1-23
|
|
48
48
|
╰ Metadata: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0
|
|
49
49
|
╰ Unused Definitions (unused-definitions):
|
|
50
|
-
╰ Metadata: totalConsidered: 0, searchTimeMs: 0, processTimeMs:
|
|
50
|
+
╰ Metadata: totalConsidered: 0, searchTimeMs: 0, processTimeMs: 1
|
|
51
51
|
╰ Naming Convention (naming-convention):
|
|
52
52
|
╰ Metadata: numMatches: 0, numBreak: 0, searchTimeMs: 0, processTimeMs: 0
|
|
53
53
|
╰ Network Functions (network-functions):
|
|
@@ -55,7 +55,7 @@ It offers a wide variety of features, for example:
|
|
|
55
55
|
╰ Dataframe Access Validation (dataframe-access-validation):
|
|
56
56
|
╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 0
|
|
57
57
|
╰ Dead Code (dead-code):
|
|
58
|
-
╰ Metadata: consideredNodes: 5, searchTimeMs:
|
|
58
|
+
╰ Metadata: consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0
|
|
59
59
|
╰ Useless Loops (useless-loop):
|
|
60
60
|
╰ Metadata: numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0
|
|
61
61
|
All queries together required ≈2 ms (1ms accuracy, total 3 ms)
|
|
@@ -82,17 +82,17 @@ It offers a wide variety of features, for example:
|
|
|
82
82
|
|
|
83
83
|
Query: **linter** (3 ms)\
|
|
84
84
|
╰ **Deprecated Functions** (deprecated-functions):\
|
|
85
|
-
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs:
|
|
85
|
+
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
86
86
|
╰ **File Path Validity** (file-path-validity):\
|
|
87
87
|
╰ certain:\
|
|
88
88
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
89
|
-
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs:
|
|
89
|
+
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0</code>\
|
|
90
90
|
╰ **Seeded Randomness** (seeded-randomness):\
|
|
91
|
-
╰ _Metadata_: <code>consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs:
|
|
91
|
+
╰ _Metadata_: <code>consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
92
92
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
93
93
|
╰ certain:\
|
|
94
94
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
95
|
-
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs:
|
|
95
|
+
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs: 1, processTimeMs: 0</code>\
|
|
96
96
|
╰ **Unused Definitions** (unused-definitions):\
|
|
97
97
|
╰ _Metadata_: <code>totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
98
98
|
╰ **Naming Convention** (naming-convention):\
|
|
@@ -100,16 +100,16 @@ It offers a wide variety of features, for example:
|
|
|
100
100
|
╰ **Network Functions** (network-functions):\
|
|
101
101
|
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
102
102
|
╰ **Dataframe Access Validation** (dataframe-access-validation):\
|
|
103
|
-
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs:
|
|
103
|
+
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1</code>\
|
|
104
104
|
╰ **Dead Code** (dead-code):\
|
|
105
|
-
╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs:
|
|
105
|
+
╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
106
106
|
╰ **Useless Loops** (useless-loop):\
|
|
107
107
|
╰ _Metadata_: <code>numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
108
108
|
_All queries together required ≈3 ms (1ms accuracy, total 3 ms)_
|
|
109
109
|
|
|
110
110
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
111
111
|
|
|
112
|
-
The analysis required
|
|
112
|
+
The analysis required _3.5 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
113
113
|
|
|
114
114
|
In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
|
|
115
115
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -126,7 +126,7 @@ It offers a wide variety of features, for example:
|
|
|
126
126
|
".meta": {
|
|
127
127
|
"totalCalls": 0,
|
|
128
128
|
"totalFunctionDefinitions": 0,
|
|
129
|
-
"searchTimeMs":
|
|
129
|
+
"searchTimeMs": 0,
|
|
130
130
|
"processTimeMs": 0
|
|
131
131
|
}
|
|
132
132
|
},
|
|
@@ -149,7 +149,7 @@ It offers a wide variety of features, for example:
|
|
|
149
149
|
"totalUnknown": 0,
|
|
150
150
|
"totalWritesBeforeAlways": 0,
|
|
151
151
|
"totalValid": 0,
|
|
152
|
-
"searchTimeMs":
|
|
152
|
+
"searchTimeMs": 1,
|
|
153
153
|
"processTimeMs": 0
|
|
154
154
|
}
|
|
155
155
|
},
|
|
@@ -162,7 +162,7 @@ It offers a wide variety of features, for example:
|
|
|
162
162
|
"callsWithNonConstantProducers": 0,
|
|
163
163
|
"callsWithOtherBranchProducers": 0,
|
|
164
164
|
"searchTimeMs": 0,
|
|
165
|
-
"processTimeMs":
|
|
165
|
+
"processTimeMs": 0
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
"absolute-file-paths": {
|
|
@@ -181,7 +181,7 @@ It offers a wide variety of features, for example:
|
|
|
181
181
|
".meta": {
|
|
182
182
|
"totalConsidered": 1,
|
|
183
183
|
"totalUnknown": 0,
|
|
184
|
-
"searchTimeMs":
|
|
184
|
+
"searchTimeMs": 1,
|
|
185
185
|
"processTimeMs": 0
|
|
186
186
|
}
|
|
187
187
|
},
|
|
@@ -218,14 +218,14 @@ It offers a wide variety of features, for example:
|
|
|
218
218
|
"numAccesses": 0,
|
|
219
219
|
"totalAccessed": 0,
|
|
220
220
|
"searchTimeMs": 0,
|
|
221
|
-
"processTimeMs":
|
|
221
|
+
"processTimeMs": 1
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
"dead-code": {
|
|
225
225
|
"results": [],
|
|
226
226
|
".meta": {
|
|
227
227
|
"consideredNodes": 5,
|
|
228
|
-
"searchTimeMs":
|
|
228
|
+
"searchTimeMs": 0,
|
|
229
229
|
"processTimeMs": 0
|
|
230
230
|
}
|
|
231
231
|
},
|
|
@@ -308,7 +308,7 @@ It offers a wide variety of features, for example:
|
|
|
308
308
|
|
|
309
309
|
```shell
|
|
310
310
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
311
|
-
flowR repl using flowR v2.9.
|
|
311
|
+
flowR repl using flowR v2.9.4, R grammar v14 (tree-sitter engine)
|
|
312
312
|
R> :query @static-slice (11@sum) file://test/testfiles/example.R
|
|
313
313
|
```
|
|
314
314
|
|
|
@@ -322,7 +322,7 @@ It offers a wide variety of features, for example:
|
|
|
322
322
|
N <- 10
|
|
323
323
|
for(i in 1:(N-1)) sum <- sum + i + w
|
|
324
324
|
sum
|
|
325
|
-
All queries together required ≈
|
|
325
|
+
All queries together required ≈3 ms (1ms accuracy, total 4 ms)
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
|
|
@@ -356,7 +356,7 @@ It offers a wide variety of features, for example:
|
|
|
356
356
|
|
|
357
357
|
|
|
358
358
|
* 🚀 **fast call-graph, data-, and control-flow graphs**\
|
|
359
|
-
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
359
|
+
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">111.1 ms</span></i> (as of Feb 5, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
|
|
360
360
|
_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,
|
|
361
361
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/wiki/dataflow-graph) for more details on the dataflow graphs as well as call graphs.
|
|
362
362
|
|
|
@@ -392,7 +392,7 @@ It offers a wide variety of features, for example:
|
|
|
392
392
|
|
|
393
393
|
```shell
|
|
394
394
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
395
|
-
flowR repl using flowR v2.9.
|
|
395
|
+
flowR repl using flowR v2.9.4, R grammar v14 (tree-sitter engine)
|
|
396
396
|
R> :dataflow* test/testfiles/example.R
|
|
397
397
|
```
|
|
398
398
|
|
|
@@ -697,7 +697,7 @@ It offers a wide variety of features, for example:
|
|
|
697
697
|
```
|
|
698
698
|
|
|
699
699
|
|
|
700
|
-
(The analysis required
|
|
700
|
+
(The analysis required _4.5 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
701
701
|
|
|
702
702
|
|
|
703
703
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uniqueMergeValuesInDefinitions = uniqueMergeValuesInDefinitions;
|
|
4
4
|
exports.appendEnvironment = appendEnvironment;
|
|
5
|
-
const
|
|
5
|
+
const scoping_1 = require("./scoping");
|
|
6
6
|
/**
|
|
7
7
|
* Merges two arrays of identifier definitions, ensuring uniqueness based on `nodeId` and `definedAt`.
|
|
8
8
|
*/
|
|
@@ -23,7 +23,14 @@ function appendEnvironment(base, next) {
|
|
|
23
23
|
else if (next === undefined) {
|
|
24
24
|
return base;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
if (base.level !== next.level) {
|
|
27
|
+
while (next.level < base.level) {
|
|
28
|
+
next = (0, scoping_1.pushLocalEnvironment)(next);
|
|
29
|
+
}
|
|
30
|
+
while (next.level > base.level) {
|
|
31
|
+
base = (0, scoping_1.pushLocalEnvironment)(base);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
27
34
|
return {
|
|
28
35
|
current: base.current.append(next.current),
|
|
29
36
|
level: base.level,
|
|
@@ -164,7 +164,7 @@ class Environment {
|
|
|
164
164
|
* This always recurses parents.
|
|
165
165
|
*/
|
|
166
166
|
overwrite(other, applyCds) {
|
|
167
|
-
if (this.builtInEnv || this === other || !other) {
|
|
167
|
+
if (this.builtInEnv || this === other || !other || this.n !== other.n) {
|
|
168
168
|
return this;
|
|
169
169
|
}
|
|
170
170
|
const map = new Map(this.memory);
|
|
@@ -211,7 +211,7 @@ class Environment {
|
|
|
211
211
|
* This always recurses parents.
|
|
212
212
|
*/
|
|
213
213
|
append(other) {
|
|
214
|
-
if (!other || this.builtInEnv) {
|
|
214
|
+
if (!other || this.builtInEnv || this === other || this.n !== other.n) {
|
|
215
215
|
return this;
|
|
216
216
|
}
|
|
217
217
|
const map = new Map(this.memory);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.overwriteEnvironment = overwriteEnvironment;
|
|
4
|
-
const
|
|
4
|
+
const scoping_1 = require("./scoping");
|
|
5
5
|
/**
|
|
6
6
|
* Assumes, that all definitions within next replace those within base (given the same name).
|
|
7
7
|
* <b>But</b> if all definitions within next are maybe, then they are appended to the base definitions (updating them to be `maybe` from now on as well), similar to {@link appendEnvironment}.
|
|
@@ -14,7 +14,14 @@ function overwriteEnvironment(base, next, applyCds) {
|
|
|
14
14
|
else if (next === undefined) {
|
|
15
15
|
return base;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
if (base.level !== next.level) {
|
|
18
|
+
while (next.level < base.level) {
|
|
19
|
+
next = (0, scoping_1.pushLocalEnvironment)(next);
|
|
20
|
+
}
|
|
21
|
+
while (next.level > base.level) {
|
|
22
|
+
base = (0, scoping_1.pushLocalEnvironment)(base);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
return {
|
|
19
26
|
current: base.current.overwrite(next.current, applyCds),
|
|
20
27
|
level: base.level
|
package/package.json
CHANGED
package/util/version.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
|
|
|
6
6
|
const semver_1 = require("semver");
|
|
7
7
|
const assert_1 = require("./assert");
|
|
8
8
|
// this is automatically replaced with the current version by release-it
|
|
9
|
-
const version = '2.9.
|
|
9
|
+
const version = '2.9.5';
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
12
12
|
*/
|