@eagleoutice/flowr 2.4.4 → 2.4.6
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 +28 -28
- package/abstract-interpretation/data-frame/absint-visitor.js +2 -3
- package/benchmark/summarizer/first-phase/process.js +1 -1
- package/linter/rules/dataframe-access-validation.js +0 -2
- package/linter/rules/unused-definition.js +1 -1
- package/package.json +1 -1
- package/util/version.js +1 -1
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.4.
|
|
27
|
+
flowR repl using flowR v2.4.5, R v4.5.0 (r-shell engine)
|
|
28
28
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ It offers a wide variety of features, for example:
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
Query: [;1mlinter[0m (
|
|
36
|
+
Query: [;1mlinter[0m (3 ms)
|
|
37
37
|
╰ **Deprecated Functions** (deprecated-functions):
|
|
38
38
|
╰ _Metadata_: <code>{"totalDeprecatedCalls":0,"totalDeprecatedFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
39
39
|
╰ **File Path Validity** (file-path-validity):
|
|
@@ -55,8 +55,8 @@ It offers a wide variety of features, for example:
|
|
|
55
55
|
╰ **Dead Code** (dead-code):
|
|
56
56
|
╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
57
57
|
╰ **Useless Loops** (useless-loop):
|
|
58
|
-
╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":
|
|
59
|
-
[;3mAll queries together required ≈
|
|
58
|
+
╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":1}</code>
|
|
59
|
+
[;3mAll queries together required ≈3 ms (1ms accuracy, total 9 ms)[0m[0m
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
|
|
@@ -78,34 +78,34 @@ It offers a wide variety of features, for example:
|
|
|
78
78
|
|
|
79
79
|
_Results (prettified and summarized):_
|
|
80
80
|
|
|
81
|
-
Query: **linter** (
|
|
81
|
+
Query: **linter** (13 ms)\
|
|
82
82
|
╰ **Deprecated Functions** (deprecated-functions):\
|
|
83
|
-
╰ _Metadata_: <code>{"totalDeprecatedCalls":0,"totalDeprecatedFunctionDefinitions":0,"searchTimeMs":
|
|
83
|
+
╰ _Metadata_: <code>{"totalDeprecatedCalls":0,"totalDeprecatedFunctionDefinitions":0,"searchTimeMs":2,"processTimeMs":0}</code>\
|
|
84
84
|
╰ **File Path Validity** (file-path-validity):\
|
|
85
85
|
╰ certain:\
|
|
86
86
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
87
|
-
╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":
|
|
87
|
+
╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":4,"processTimeMs":1}</code>\
|
|
88
88
|
╰ **Seeded Randomness** (seeded-randomness):\
|
|
89
|
-
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":
|
|
89
|
+
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
90
90
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
91
91
|
╰ certain:\
|
|
92
92
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
93
|
-
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":
|
|
93
|
+
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":2,"processTimeMs":0}</code>\
|
|
94
94
|
╰ **Unused Definitions** (unused-definitions):\
|
|
95
95
|
╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
96
96
|
╰ **Naming Convention** (naming-convention):\
|
|
97
97
|
╰ _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
98
98
|
╰ **Dataframe Access Validation** (dataframe-access-validation):\
|
|
99
|
-
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":
|
|
99
|
+
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":2}</code>\
|
|
100
100
|
╰ **Dead Code** (dead-code):\
|
|
101
|
-
╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":
|
|
101
|
+
╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":1,"processTimeMs":0}</code>\
|
|
102
102
|
╰ **Useless Loops** (useless-loop):\
|
|
103
|
-
╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":
|
|
104
|
-
_All queries together required ≈14 ms (1ms accuracy, total
|
|
103
|
+
╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
104
|
+
_All queries together required ≈14 ms (1ms accuracy, total 209 ms)_
|
|
105
105
|
|
|
106
106
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
107
107
|
|
|
108
|
-
The analysis required
|
|
108
|
+
The analysis required _209.4 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
109
109
|
|
|
110
110
|
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.
|
|
111
111
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -122,7 +122,7 @@ It offers a wide variety of features, for example:
|
|
|
122
122
|
".meta": {
|
|
123
123
|
"totalDeprecatedCalls": 0,
|
|
124
124
|
"totalDeprecatedFunctionDefinitions": 0,
|
|
125
|
-
"searchTimeMs":
|
|
125
|
+
"searchTimeMs": 2,
|
|
126
126
|
"processTimeMs": 0
|
|
127
127
|
}
|
|
128
128
|
},
|
|
@@ -144,8 +144,8 @@ It offers a wide variety of features, for example:
|
|
|
144
144
|
"totalUnknown": 0,
|
|
145
145
|
"totalWritesBeforeAlways": 0,
|
|
146
146
|
"totalValid": 0,
|
|
147
|
-
"searchTimeMs":
|
|
148
|
-
"processTimeMs":
|
|
147
|
+
"searchTimeMs": 4,
|
|
148
|
+
"processTimeMs": 1
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
"seeded-randomness": {
|
|
@@ -155,7 +155,7 @@ It offers a wide variety of features, for example:
|
|
|
155
155
|
"callsWithFunctionProducers": 0,
|
|
156
156
|
"callsWithAssignmentProducers": 0,
|
|
157
157
|
"callsWithNonConstantProducers": 0,
|
|
158
|
-
"searchTimeMs":
|
|
158
|
+
"searchTimeMs": 0,
|
|
159
159
|
"processTimeMs": 0
|
|
160
160
|
}
|
|
161
161
|
},
|
|
@@ -175,8 +175,8 @@ It offers a wide variety of features, for example:
|
|
|
175
175
|
".meta": {
|
|
176
176
|
"totalConsidered": 1,
|
|
177
177
|
"totalUnknown": 0,
|
|
178
|
-
"searchTimeMs":
|
|
179
|
-
"processTimeMs":
|
|
178
|
+
"searchTimeMs": 2,
|
|
179
|
+
"processTimeMs": 0
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
182
|
"unused-definitions": {
|
|
@@ -203,14 +203,14 @@ It offers a wide variety of features, for example:
|
|
|
203
203
|
"numAccesses": 0,
|
|
204
204
|
"totalAccessed": 0,
|
|
205
205
|
"searchTimeMs": 0,
|
|
206
|
-
"processTimeMs":
|
|
206
|
+
"processTimeMs": 2
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
209
|
"dead-code": {
|
|
210
210
|
"results": [],
|
|
211
211
|
".meta": {
|
|
212
212
|
"consideredNodes": 5,
|
|
213
|
-
"searchTimeMs":
|
|
213
|
+
"searchTimeMs": 1,
|
|
214
214
|
"processTimeMs": 0
|
|
215
215
|
}
|
|
216
216
|
},
|
|
@@ -218,13 +218,13 @@ It offers a wide variety of features, for example:
|
|
|
218
218
|
"results": [],
|
|
219
219
|
".meta": {
|
|
220
220
|
"numOfUselessLoops": 0,
|
|
221
|
-
"searchTimeMs":
|
|
221
|
+
"searchTimeMs": 0,
|
|
222
222
|
"processTimeMs": 0
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
".meta": {
|
|
227
|
-
"timing":
|
|
227
|
+
"timing": 13
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
".meta": {
|
|
@@ -295,7 +295,7 @@ It offers a wide variety of features, for example:
|
|
|
295
295
|
|
|
296
296
|
```shell
|
|
297
297
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
298
|
-
flowR repl using flowR v2.4.
|
|
298
|
+
flowR repl using flowR v2.4.5, R v4.5.0 (r-shell engine)
|
|
299
299
|
R> :slicer test/testfiles/example.R --criterion "11@sum"
|
|
300
300
|
```
|
|
301
301
|
|
|
@@ -342,7 +342,7 @@ It offers a wide variety of features, for example:
|
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
* 🚀 **fast data- and control-flow graphs**\
|
|
345
|
-
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
345
|
+
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">135.6 ms</span></i> (as of Aug 20, 2025),
|
|
346
346
|
_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,
|
|
347
347
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
|
|
348
348
|
|
|
@@ -378,7 +378,7 @@ It offers a wide variety of features, for example:
|
|
|
378
378
|
|
|
379
379
|
```shell
|
|
380
380
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
381
|
-
flowR repl using flowR v2.4.
|
|
381
|
+
flowR repl using flowR v2.4.5, R v4.5.0 (r-shell engine)
|
|
382
382
|
R> :dataflow* test/testfiles/example.R
|
|
383
383
|
```
|
|
384
384
|
|
|
@@ -679,7 +679,7 @@ It offers a wide variety of features, for example:
|
|
|
679
679
|
```
|
|
680
680
|
|
|
681
681
|
|
|
682
|
-
(The analysis required _14.
|
|
682
|
+
(The analysis required _14.5 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
683
683
|
|
|
684
684
|
|
|
685
685
|
|
|
@@ -137,7 +137,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
137
137
|
}
|
|
138
138
|
/** Get all AST nodes for the predecessor vertices that are leaf nodes and exit vertices */
|
|
139
139
|
getPredecessorNodes(vertexId) {
|
|
140
|
-
return this.config.controlFlow.graph.outgoingEdges(vertexId)?.keys() // outgoing dependency edges are incoming CFG edges
|
|
140
|
+
return [...this.config.controlFlow.graph.outgoingEdges(vertexId)?.keys() ?? []] // outgoing dependency edges are incoming CFG edges
|
|
141
141
|
.map(id => this.getCfgVertex(id))
|
|
142
142
|
.flatMap(vertex => {
|
|
143
143
|
if (vertex === undefined) {
|
|
@@ -150,8 +150,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
150
150
|
return [this.getNormalizedAst((0, control_flow_graph_1.getVertexRootId)(vertex))];
|
|
151
151
|
}
|
|
152
152
|
})
|
|
153
|
-
.filter(assert_1.isNotUndefined)
|
|
154
|
-
.toArray() ?? [];
|
|
153
|
+
.filter(assert_1.isNotUndefined);
|
|
155
154
|
}
|
|
156
155
|
shouldWiden(vertex) {
|
|
157
156
|
return (this.visited.get(vertex.id) ?? 0) >= this.config.flowrConfig.abstractInterpretation.dataFrame.wideningThreshold;
|
|
@@ -256,7 +256,7 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
function summarizeDfShapeStats({ perNodeStats, ...stats }) {
|
|
259
|
-
const nodeStats = perNodeStats.values()
|
|
259
|
+
const nodeStats = [...perNodeStats.values()];
|
|
260
260
|
const isTop = (value) => value === 'top';
|
|
261
261
|
const isInfinite = (value) => value === 'infinite';
|
|
262
262
|
const isBottom = (value) => value === 'bottom';
|
|
@@ -13,8 +13,6 @@ const dfg_1 = require("../../util/mermaid/dfg");
|
|
|
13
13
|
const range_1 = require("../../util/range");
|
|
14
14
|
const linter_format_1 = require("../linter-format");
|
|
15
15
|
const linter_tags_1 = require("../linter-tags");
|
|
16
|
-
;
|
|
17
|
-
;
|
|
18
16
|
exports.DATA_FRAME_ACCESS_VALIDATION = {
|
|
19
17
|
createSearch: () => flowr_search_builder_1.Q.all().with(search_enrichers_1.Enrichment.CallTargets, { onlyBuiltin: true }),
|
|
20
18
|
processSearchResult: (elements, config, data) => {
|
|
@@ -73,7 +73,7 @@ exports.UNUSED_DEFINITION = {
|
|
|
73
73
|
}
|
|
74
74
|
const ingoingEdges = data.dataflow.graph.ingoingEdges(dfgVertex.id);
|
|
75
75
|
const interestedIn = (0, vertex_1.isVariableDefinitionVertex)(dfgVertex) ? InterestingEdgesVariable : InterestingEdgesFunction;
|
|
76
|
-
const ingoingInteresting = ingoingEdges?.values().some(e => (0, edge_1.edgeIncludesType)(e.types, interestedIn));
|
|
76
|
+
const ingoingInteresting = [...ingoingEdges?.values() ?? []].some(e => (0, edge_1.edgeIncludesType)(e.types, interestedIn));
|
|
77
77
|
if (ingoingInteresting) {
|
|
78
78
|
return undefined;
|
|
79
79
|
}
|
package/package.json
CHANGED
package/util/version.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.flowrVersion = flowrVersion;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
// this is automatically replaced with the current version by release-it
|
|
6
|
-
const version = '2.4.
|
|
6
|
+
const version = '2.4.6';
|
|
7
7
|
function flowrVersion() {
|
|
8
8
|
return new semver_1.SemVer(version);
|
|
9
9
|
}
|