@eagleoutice/flowr 2.2.9 → 2.2.10
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 +4 -4
- package/dataflow/environments/default-builtin-config.js +12 -1
- package/dataflow/graph/resolve-graph.js +8 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +7 -9
- package/package.json +1 -1
- package/util/version.js +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ It offers a wide variety of features, for example:
|
|
|
48
48
|
|
|
49
49
|
```shell
|
|
50
50
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
51
|
-
flowR repl using flowR v2.2.
|
|
51
|
+
flowR repl using flowR v2.2.9, R v4.4.0 (r-shell engine)
|
|
52
52
|
R> :slicer test/testfiles/example.R --criterion "11@sum"
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -95,7 +95,7 @@ It offers a wide variety of features, for example:
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
* 🚀 **fast data- and control-flow graphs**\
|
|
98
|
-
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
98
|
+
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">122.2 ms</span></i> (as of Feb 21, 2025),
|
|
99
99
|
_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,
|
|
100
100
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
|
|
101
101
|
|
|
@@ -131,7 +131,7 @@ It offers a wide variety of features, for example:
|
|
|
131
131
|
|
|
132
132
|
```shell
|
|
133
133
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
134
|
-
flowR repl using flowR v2.2.
|
|
134
|
+
flowR repl using flowR v2.2.9, R v4.4.0 (r-shell engine)
|
|
135
135
|
R> :dataflow* test/testfiles/example.R
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -377,7 +377,7 @@ It offers a wide variety of features, for example:
|
|
|
377
377
|
```
|
|
378
378
|
|
|
379
379
|
|
|
380
|
-
(The analysis required
|
|
380
|
+
(The analysis required _21.60 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
|
|
@@ -114,10 +114,21 @@ exports.DefaultBuiltinConfig = [
|
|
|
114
114
|
{ type: 'function', names: ['while'], processor: 'builtin:while-loop', config: {}, assumePrimitive: true },
|
|
115
115
|
{ type: 'function', names: ['do.call'], processor: 'builtin:apply', config: { indexOfFunction: 0, unquoteFunction: true }, assumePrimitive: true },
|
|
116
116
|
{ type: 'function', names: ['list'], processor: 'builtin:list', config: {}, assumePrimitive: true },
|
|
117
|
+
{
|
|
118
|
+
type: 'function',
|
|
119
|
+
names: ['setnames', 'setNames', 'setkey', 'setkeyv', 'setindex', 'setindexv', 'setattr'],
|
|
120
|
+
processor: 'builtin:assignment',
|
|
121
|
+
config: {
|
|
122
|
+
canBeReplacement: false,
|
|
123
|
+
targetVariable: false,
|
|
124
|
+
makeMaybe: true,
|
|
125
|
+
mayHaveMoreArgs: true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
117
128
|
{
|
|
118
129
|
type: 'function',
|
|
119
130
|
names: [
|
|
120
|
-
'on.exit', 'sys.on.exit', 'par', '
|
|
131
|
+
'on.exit', 'sys.on.exit', 'par', 'sink',
|
|
121
132
|
/* library and require is handled above */
|
|
122
133
|
'requireNamespace', 'loadNamespace', 'attachNamespace', 'asNamespace',
|
|
123
134
|
/* downloader and installer functions (R, devtools, BiocManager) */
|
|
@@ -46,6 +46,14 @@ function resolveDataflowGraph(graph, idMap) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
+
for (const unknown of graph.unknownSideEffects) {
|
|
50
|
+
if (typeof unknown === 'object') {
|
|
51
|
+
resultGraph.markIdForUnknownSideEffects(resolve(unknown.id), unknown.linkTo);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
resultGraph.markIdForUnknownSideEffects(resolve(unknown));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
return resultGraph;
|
|
50
58
|
}
|
|
51
59
|
//# sourceMappingURL=resolve-graph.js.map
|
|
@@ -20,6 +20,7 @@ export interface AssignmentConfiguration extends ForceArguments {
|
|
|
20
20
|
/** is the target a variable pointing at the actual name? */
|
|
21
21
|
readonly targetVariable?: boolean;
|
|
22
22
|
readonly indicesCollection?: ContainerIndicesCollection;
|
|
23
|
+
readonly mayHaveMoreArgs?: boolean;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Processes an assignment, i.e., `<target> <- <source>`.
|
|
@@ -53,7 +53,7 @@ function findRootAccess(node) {
|
|
|
53
53
|
function processAssignment(name,
|
|
54
54
|
/* we expect them to be ordered in the sense that we have (source, target): `<source> <- <target>` */
|
|
55
55
|
args, rootId, data, config) {
|
|
56
|
-
if (args.length
|
|
56
|
+
if (!config.mayHaveMoreArgs && args.length !== 2) {
|
|
57
57
|
logger_1.dataflowLogger.warn(`Assignment ${name.content} has something else than 2 arguments, skipping`);
|
|
58
58
|
return (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs: config.forceArgs }).information;
|
|
59
59
|
}
|
|
@@ -217,14 +217,12 @@ function markAsAssignment(information, nodeToDefine, sourceIds, rootIdOfAssignme
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
information.graph.addEdge(nodeToDefine, rootIdOfAssignment, edge_1.EdgeType.DefinedBy);
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
out?.delete(id);
|
|
227
|
-
}
|
|
220
|
+
// kinda dirty, but we have to remove existing read edges for the symbol, added by the child
|
|
221
|
+
const out = information.graph.outgoingEdges(nodeToDefine.nodeId);
|
|
222
|
+
for (const [id, edge] of (out ?? [])) {
|
|
223
|
+
edge.types &= ~edge_1.EdgeType.Reads;
|
|
224
|
+
if (edge.types === 0) {
|
|
225
|
+
out?.delete(id);
|
|
228
226
|
}
|
|
229
227
|
}
|
|
230
228
|
}
|
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.2.
|
|
6
|
+
const version = '2.2.10';
|
|
7
7
|
function flowrVersion() {
|
|
8
8
|
return new semver_1.SemVer(version);
|
|
9
9
|
}
|