@eagleoutice/flowr 2.10.5 → 2.10.7
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 +21 -21
- package/abstract-interpretation/absint-visitor.d.ts +1 -2
- package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
- package/config.d.ts +6 -0
- package/config.js +2 -0
- package/control-flow/basic-cfg-guided-visitor.d.ts +1 -1
- package/control-flow/semantic-cfg-guided-visitor.js +4 -0
- package/dataflow/environments/built-in-proc-name.d.ts +27 -19
- package/dataflow/environments/built-in-proc-name.js +27 -19
- package/dataflow/environments/built-in.d.ts +24 -18
- package/dataflow/environments/built-in.js +6 -0
- package/dataflow/environments/default-builtin-config.d.ts +53 -1
- package/dataflow/environments/default-builtin-config.js +13 -3
- package/dataflow/environments/identifier.d.ts +19 -0
- package/dataflow/environments/reference-to-maybe.js +32 -6
- package/dataflow/eval/resolve/alias-tracking.js +5 -0
- package/dataflow/graph/graph.js +51 -30
- package/dataflow/graph/vertex.d.ts +18 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +6 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +145 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +15 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +54 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +75 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +196 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +22 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +57 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +27 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +14 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +27 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +97 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +23 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +90 -0
- package/documentation/doc-util/doc-types.d.ts +11 -2
- package/documentation/doc-util/doc-types.js +31 -9
- package/documentation/wiki-absint.d.ts +16 -0
- package/documentation/wiki-absint.js +50 -15
- package/documentation/wiki-interface.js +1 -0
- package/documentation/wiki-mk/doc-context.d.ts +14 -1
- package/documentation/wiki-mk/doc-context.js +6 -0
- package/documentation/wiki-normalized-ast.d.ts +0 -9
- package/documentation/wiki-normalized-ast.js +9 -60
- package/linter/linter-format.d.ts +4 -0
- package/linter/linter-rules.d.ts +7 -6
- package/linter/rules/absolute-path.d.ts +0 -2
- package/linter/rules/dataframe-access-validation.d.ts +4 -7
- package/linter/rules/dataframe-access-validation.js +3 -3
- package/linter/rules/dead-code.d.ts +4 -7
- package/linter/rules/file-path-validity.d.ts +0 -2
- package/linter/rules/function-finder-util.d.ts +1 -3
- package/linter/rules/function-finder-util.js +2 -2
- package/linter/rules/naming-convention.d.ts +0 -2
- package/linter/rules/network-functions.js +4 -1
- package/linter/rules/problematic-inputs.d.ts +9 -6
- package/linter/rules/problematic-inputs.js +108 -58
- package/linter/rules/roxygen-arguments.d.ts +0 -2
- package/linter/rules/seeded-randomness.d.ts +0 -2
- package/linter/rules/stop-with-call-arg.d.ts +3 -6
- package/linter/rules/unused-definition.d.ts +0 -2
- package/linter/rules/useless-loop.d.ts +0 -2
- package/package.json +4 -4
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +6 -2
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +2 -0
- package/queries/catalog/dependencies-query/function-info/source-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/write-functions.js +1 -0
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -0
- package/queries/catalog/input-sources-query/input-source-functions.js +7 -1
- package/queries/catalog/input-sources-query/input-sources-query-format.js +3 -1
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +3 -1
- package/queries/catalog/input-sources-query/simple-input-classifier.js +3 -1
- package/r-bridge/data/data.d.ts +28 -2
- package/r-bridge/data/data.js +34 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/model.js +0 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +16 -16
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +6 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +8 -0
- package/search/flowr-search-builder.d.ts +16 -2
- package/search/flowr-search-builder.js +10 -1
- package/search/flowr-search.d.ts +9 -0
- package/search/search-executor/search-generators.d.ts +1 -1
- package/search/search-executor/search-generators.js +28 -2
- package/slicing/static/static-slicer.js +2 -2
- package/util/range.d.ts +13 -1
- package/util/range.js +32 -2
- package/util/version.js +1 -1
- package/abstract-interpretation/normalized-ast-fold.d.ts +0 -119
- package/abstract-interpretation/normalized-ast-fold.js +0 -181
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.10.
|
|
27
|
+
flowR repl using flowR v2.10.6, R grammar v14 (tree-sitter engine)
|
|
28
28
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -35,7 +35,7 @@ It offers a wide variety of features, for example:
|
|
|
35
35
|
```text
|
|
36
36
|
Query: linter (2 ms)
|
|
37
37
|
╰ Deprecated Functions (deprecated-functions):
|
|
38
|
-
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs:
|
|
38
|
+
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0
|
|
39
39
|
╰ File Path Validity (file-path-validity):
|
|
40
40
|
╰ certain:
|
|
41
41
|
╰ Path `/root/x.txt` at 1.1-23
|
|
@@ -45,7 +45,7 @@ It offers a wide variety of features, for example:
|
|
|
45
45
|
╰ Absolute Paths (absolute-file-paths):
|
|
46
46
|
╰ certain:
|
|
47
47
|
╰ Path `/root/x.txt` at 1.1-23
|
|
48
|
-
╰ Metadata: totalConsidered: 1, totalUnknown: 0, searchTimeMs:
|
|
48
|
+
╰ Metadata: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0
|
|
49
49
|
╰ Unused Definitions (unused-definitions):
|
|
50
50
|
╰ Metadata: totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0
|
|
51
51
|
╰ Naming Convention (naming-convention):
|
|
@@ -53,7 +53,7 @@ It offers a wide variety of features, for example:
|
|
|
53
53
|
╰ Network Functions (network-functions):
|
|
54
54
|
╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
|
|
55
55
|
╰ Dataframe Access Validation (dataframe-access-validation):
|
|
56
|
-
╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs:
|
|
56
|
+
╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1
|
|
57
57
|
╰ Dead Code (dead-code):
|
|
58
58
|
╰ Metadata: consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0
|
|
59
59
|
╰ Useless Loops (useless-loop):
|
|
@@ -61,10 +61,10 @@ It offers a wide variety of features, for example:
|
|
|
61
61
|
╰ Problematic inputs (problematic-inputs):
|
|
62
62
|
╰ Metadata: searchTimeMs: 0, processTimeMs: 0
|
|
63
63
|
╰ Stop without call.=False argument (stop-call):
|
|
64
|
-
╰ Metadata: consideredNodes: 0, searchTimeMs:
|
|
64
|
+
╰ Metadata: consideredNodes: 0, searchTimeMs: 0, processTimeMs: 0
|
|
65
65
|
╰ Roxygen Arguments (roxygen-arguments):
|
|
66
66
|
╰ Metadata: searchTimeMs: 0, processTimeMs: 0
|
|
67
|
-
All queries together required ≈2 ms (1ms accuracy, total
|
|
67
|
+
All queries together required ≈2 ms (1ms accuracy, total 2 ms)
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
|
|
@@ -88,17 +88,17 @@ It offers a wide variety of features, for example:
|
|
|
88
88
|
|
|
89
89
|
Query: **linter** (2 ms)\
|
|
90
90
|
╰ **Deprecated Functions** (deprecated-functions):\
|
|
91
|
-
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs:
|
|
91
|
+
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
92
92
|
╰ **File Path Validity** (file-path-validity):\
|
|
93
93
|
╰ certain:\
|
|
94
94
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
95
|
-
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs:
|
|
95
|
+
╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0</code>\
|
|
96
96
|
╰ **Seeded Randomness** (seeded-randomness):\
|
|
97
97
|
╰ _Metadata_: <code>consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
98
98
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
99
99
|
╰ certain:\
|
|
100
100
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
101
|
-
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs:
|
|
101
|
+
╰ _Metadata_: <code>totalConsidered: 1, totalUnknown: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
102
102
|
╰ **Unused Definitions** (unused-definitions):\
|
|
103
103
|
╰ _Metadata_: <code>totalConsidered: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
104
104
|
╰ **Naming Convention** (naming-convention):\
|
|
@@ -106,7 +106,7 @@ It offers a wide variety of features, for example:
|
|
|
106
106
|
╰ **Network Functions** (network-functions):\
|
|
107
107
|
╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
108
108
|
╰ **Dataframe Access Validation** (dataframe-access-validation):\
|
|
109
|
-
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs:
|
|
109
|
+
╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1</code>\
|
|
110
110
|
╰ **Dead Code** (dead-code):\
|
|
111
111
|
╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
112
112
|
╰ **Useless Loops** (useless-loop):\
|
|
@@ -117,11 +117,11 @@ It offers a wide variety of features, for example:
|
|
|
117
117
|
╰ _Metadata_: <code>consideredNodes: 0, searchTimeMs: 0, processTimeMs: 0</code>\
|
|
118
118
|
╰ **Roxygen Arguments** (roxygen-arguments):\
|
|
119
119
|
╰ _Metadata_: <code>searchTimeMs: 0, processTimeMs: 0</code>\
|
|
120
|
-
_All queries together required ≈2 ms (1ms accuracy, total
|
|
120
|
+
_All queries together required ≈2 ms (1ms accuracy, total 3 ms)_
|
|
121
121
|
|
|
122
122
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
123
123
|
|
|
124
|
-
The analysis required _2.
|
|
124
|
+
The analysis required _2.6 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
125
125
|
|
|
126
126
|
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.
|
|
127
127
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -138,7 +138,7 @@ It offers a wide variety of features, for example:
|
|
|
138
138
|
".meta": {
|
|
139
139
|
"totalCalls": 0,
|
|
140
140
|
"totalFunctionDefinitions": 0,
|
|
141
|
-
"searchTimeMs":
|
|
141
|
+
"searchTimeMs": 0,
|
|
142
142
|
"processTimeMs": 0
|
|
143
143
|
}
|
|
144
144
|
},
|
|
@@ -161,7 +161,7 @@ It offers a wide variety of features, for example:
|
|
|
161
161
|
"totalUnknown": 0,
|
|
162
162
|
"totalWritesBeforeAlways": 0,
|
|
163
163
|
"totalValid": 0,
|
|
164
|
-
"searchTimeMs":
|
|
164
|
+
"searchTimeMs": 1,
|
|
165
165
|
"processTimeMs": 0
|
|
166
166
|
}
|
|
167
167
|
},
|
|
@@ -193,7 +193,7 @@ It offers a wide variety of features, for example:
|
|
|
193
193
|
".meta": {
|
|
194
194
|
"totalConsidered": 1,
|
|
195
195
|
"totalUnknown": 0,
|
|
196
|
-
"searchTimeMs":
|
|
196
|
+
"searchTimeMs": 0,
|
|
197
197
|
"processTimeMs": 0
|
|
198
198
|
}
|
|
199
199
|
},
|
|
@@ -230,7 +230,7 @@ It offers a wide variety of features, for example:
|
|
|
230
230
|
"numAccesses": 0,
|
|
231
231
|
"totalAccessed": 0,
|
|
232
232
|
"searchTimeMs": 0,
|
|
233
|
-
"processTimeMs":
|
|
233
|
+
"processTimeMs": 1
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
"dead-code": {
|
|
@@ -342,7 +342,7 @@ It offers a wide variety of features, for example:
|
|
|
342
342
|
|
|
343
343
|
```shell
|
|
344
344
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
345
|
-
flowR repl using flowR v2.10.
|
|
345
|
+
flowR repl using flowR v2.10.6, R grammar v14 (tree-sitter engine)
|
|
346
346
|
R> :query @static-slice (11@sum) file://test/testfiles/example.R
|
|
347
347
|
```
|
|
348
348
|
|
|
@@ -356,7 +356,7 @@ It offers a wide variety of features, for example:
|
|
|
356
356
|
N <- 10
|
|
357
357
|
for(i in 1:(N-1)) sum <- sum + i + w
|
|
358
358
|
sum
|
|
359
|
-
All queries together required ≈
|
|
359
|
+
All queries together required ≈2 ms (1ms accuracy, total 2 ms)
|
|
360
360
|
```
|
|
361
361
|
|
|
362
362
|
|
|
@@ -390,7 +390,7 @@ It offers a wide variety of features, for example:
|
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
* 🚀 **fast call-graph, data-, and control-flow graphs**\
|
|
393
|
-
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
393
|
+
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">104.7 ms</span></i> (as of May 29, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
|
|
394
394
|
_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,
|
|
395
395
|
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).
|
|
396
396
|
|
|
@@ -426,7 +426,7 @@ It offers a wide variety of features, for example:
|
|
|
426
426
|
|
|
427
427
|
```shell
|
|
428
428
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
429
|
-
flowR repl using flowR v2.10.
|
|
429
|
+
flowR repl using flowR v2.10.6, R grammar v14 (tree-sitter engine)
|
|
430
430
|
R> :dataflow* test/testfiles/example.R
|
|
431
431
|
```
|
|
432
432
|
|
|
@@ -734,7 +734,7 @@ It offers a wide variety of features, for example:
|
|
|
734
734
|
```
|
|
735
735
|
|
|
736
736
|
|
|
737
|
-
(The analysis required
|
|
737
|
+
(The analysis required _2.0 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
738
738
|
|
|
739
739
|
|
|
740
740
|
|
|
@@ -6,7 +6,6 @@ import { type DataflowGraphVertexFunctionCall, type DataflowGraphVertexVariableD
|
|
|
6
6
|
import { type NoInfo, RNode } from '../r-bridge/lang-4.x/ast/model/model';
|
|
7
7
|
import type { NormalizedAst, ParentInformation } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
8
8
|
import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
9
|
-
import { type AnyAbstractDomain } from './domains/abstract-domain';
|
|
10
9
|
import type { AnyStateDomain, ValueDomain } from './domains/state-domain-like';
|
|
11
10
|
export type AbsintVisitorConfiguration = Omit<SemanticCfgGuidedVisitorConfiguration<NoInfo, ControlFlowInformation, NormalizedAst>, 'defaultVisitingOrder' | 'defaultVisitingType'>;
|
|
12
11
|
/**
|
|
@@ -14,7 +13,7 @@ export type AbsintVisitorConfiguration = Omit<SemanticCfgGuidedVisitorConfigurat
|
|
|
14
13
|
*
|
|
15
14
|
* However, the visitor does not yet support inter-procedural abstract interpretation and abstract condition semantics.
|
|
16
15
|
*/
|
|
17
|
-
export declare abstract class AbstractInterpretationVisitor<StateDomain extends AnyStateDomain
|
|
16
|
+
export declare abstract class AbstractInterpretationVisitor<StateDomain extends AnyStateDomain, Config extends AbsintVisitorConfiguration = AbsintVisitorConfiguration> extends SemanticCfgGuidedVisitor<NoInfo, ControlFlowInformation, NormalizedAst, DataflowGraph, Config & {
|
|
18
17
|
defaultVisitingOrder: 'forward';
|
|
19
18
|
defaultVisitingType: 'exit';
|
|
20
19
|
}> {
|
|
@@ -28,9 +28,9 @@ export interface StateDomainLike<Domain extends AnyAbstractDomain> {
|
|
|
28
28
|
/**
|
|
29
29
|
* A type representing any state abstract domain that stores abstract values for AST nodes.
|
|
30
30
|
*/
|
|
31
|
-
export type AnyStateDomain<Domain extends AnyAbstractDomain> = AnyAbstractDomain & StateDomainLike<Domain>;
|
|
31
|
+
export type AnyStateDomain<Domain extends AnyAbstractDomain = AnyAbstractDomain> = AnyAbstractDomain & StateDomainLike<Domain>;
|
|
32
32
|
/**
|
|
33
33
|
* The type of the value abstract domain of a state abstract domain.
|
|
34
34
|
* @template StateDomain - The state abstract domain to get the value abstract domain type for
|
|
35
35
|
*/
|
|
36
|
-
export type ValueDomain<StateDomain extends AnyStateDomain
|
|
36
|
+
export type ValueDomain<StateDomain extends AnyStateDomain> = StateDomain extends AnyStateDomain<infer Domain> ? Domain : never;
|
package/config.d.ts
CHANGED
|
@@ -142,6 +142,12 @@ export interface FlowrConfig extends MergeableRecord {
|
|
|
142
142
|
* Should we include eval(parse(text="...")) calls in the dataflow graph?
|
|
143
143
|
*/
|
|
144
144
|
readonly evalStrings: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Track user-created environments (`new.env()`, `assign(..., envir=e)`, `get(..., envir=e)`,
|
|
147
|
+
* `local({}, envir=e)`, `e$x <- v`, `attach(e)`) with precise per-variable envState.
|
|
148
|
+
* When disabled all envir-style calls fall through to the conservative global treatment.
|
|
149
|
+
*/
|
|
150
|
+
readonly trackEnvironments: boolean;
|
|
145
151
|
/** These keys are only intended for use within code, allowing to instrument the dataflow analyzer! */
|
|
146
152
|
readonly instrument: {
|
|
147
153
|
/**
|
package/config.js
CHANGED
|
@@ -99,6 +99,7 @@ exports.FlowrConfig = {
|
|
|
99
99
|
solver: {
|
|
100
100
|
variables: VariableResolve.Alias,
|
|
101
101
|
evalStrings: true,
|
|
102
|
+
trackEnvironments: true,
|
|
102
103
|
resolveSource: {
|
|
103
104
|
dropPaths: DropPathsOption.No,
|
|
104
105
|
ignoreCapitalization: true,
|
|
@@ -161,6 +162,7 @@ exports.FlowrConfig = {
|
|
|
161
162
|
solver: joi_1.default.object({
|
|
162
163
|
variables: joi_1.default.string().valid(...Object.values(VariableResolve)).description('How to resolve variables and their values.'),
|
|
163
164
|
evalStrings: joi_1.default.boolean().description('Should we include eval(parse(text="...")) calls in the dataflow graph?'),
|
|
165
|
+
trackEnvironments: joi_1.default.boolean().optional().description('Track user-created environments (new.env, assign/get/local with envir=, dollar-assign, attach). When false, all envir-style calls fall through conservatively.'),
|
|
164
166
|
instrument: joi_1.default.object({
|
|
165
167
|
dataflowExtractors: joi_1.default.any().optional().description('These keys are only intended for use within code, allowing to instrument the dataflow analyzer!')
|
|
166
168
|
}),
|
|
@@ -12,7 +12,7 @@ export interface BasicCfgGuidedVisitorConfiguration<ControlFlow extends ControlF
|
|
|
12
12
|
* Use {@link BasicCfgGuidedVisitor#start} to start the traversal.
|
|
13
13
|
*/
|
|
14
14
|
export declare class BasicCfgGuidedVisitor<ControlFlow extends ControlFlowInformation = ControlFlowInformation, Config extends BasicCfgGuidedVisitorConfiguration<ControlFlow> = BasicCfgGuidedVisitorConfiguration<ControlFlow>> {
|
|
15
|
-
|
|
15
|
+
readonly config: Config;
|
|
16
16
|
protected readonly visited: Map<NodeId, number>;
|
|
17
17
|
constructor(config: Config);
|
|
18
18
|
/**
|
|
@@ -199,6 +199,7 @@ class SemanticCfgGuidedVisitor extends dfg_cfg_guided_visitor_1.DataflowAwareCfg
|
|
|
199
199
|
case built_in_proc_name_1.BuiltInProcName.Vector:
|
|
200
200
|
return this.onVectorCall({ call });
|
|
201
201
|
case built_in_proc_name_1.BuiltInProcName.Assignment:
|
|
202
|
+
case built_in_proc_name_1.BuiltInProcName.SuperAssignment:
|
|
202
203
|
case built_in_proc_name_1.BuiltInProcName.AssignmentLike:
|
|
203
204
|
case built_in_proc_name_1.BuiltInProcName.TableAssignment:
|
|
204
205
|
return this.onAssignmentCall({ call, ...this.getSourceAndTarget(call) });
|
|
@@ -252,6 +253,9 @@ class SemanticCfgGuidedVisitor extends dfg_cfg_guided_visitor_1.DataflowAwareCfg
|
|
|
252
253
|
return this.onRecallCall({ call });
|
|
253
254
|
case built_in_proc_name_1.BuiltInProcName.PurrrFormula:
|
|
254
255
|
return this.onPurrFormulaCall({ call });
|
|
256
|
+
case built_in_proc_name_1.BuiltInProcName.NewEnv:
|
|
257
|
+
case built_in_proc_name_1.BuiltInProcName.With:
|
|
258
|
+
case built_in_proc_name_1.BuiltInProcName.Attach:
|
|
255
259
|
case built_in_proc_name_1.BuiltInProcName.Default:
|
|
256
260
|
case built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs:
|
|
257
261
|
case built_in_proc_name_1.BuiltInProcName.Function:
|
|
@@ -3,35 +3,37 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum BuiltInProcName {
|
|
5
5
|
/** for subsetting operations, see {@link processAccess} */
|
|
6
|
-
Access = "builtin:
|
|
6
|
+
Access = "builtin:acc",
|
|
7
7
|
/** for the `*apply` family, see {@link processApply} */
|
|
8
|
-
Apply = "builtin:
|
|
8
|
+
Apply = "builtin:app",
|
|
9
9
|
/** for assignments like `<-` and `=`, see {@link processAssignment} */
|
|
10
|
-
Assignment = "builtin:
|
|
10
|
+
Assignment = "builtin:assign",
|
|
11
11
|
/** for assignment like functions that may do additional work, see {@link processAssignmentLike} */
|
|
12
|
-
AssignmentLike = "builtin:
|
|
12
|
+
AssignmentLike = "builtin:assign-l",
|
|
13
|
+
/** for super-assignments like `<<-` and `->>`, see {@link processAssignment} */
|
|
14
|
+
SuperAssignment = "builtin:s-assign",
|
|
13
15
|
/** for `break` calls */
|
|
14
16
|
Break = "builtin:break",
|
|
15
17
|
/** the default built-in processor, see {@link defaultBuiltInProcessor} */
|
|
16
|
-
Default = "builtin:
|
|
18
|
+
Default = "builtin:d",
|
|
17
19
|
/** Just a more performant variant of the default processor for built-ins that need to read all their arguments, see {@link defaultBuiltInProcessor}, this will still produce the origin `BuiltIn.Default` */
|
|
18
|
-
DefaultReadAllArgs = "builtin:
|
|
20
|
+
DefaultReadAllArgs = "builtin:d-ra",
|
|
19
21
|
/** for `eval` calls, see {@link processEvalCall} */
|
|
20
22
|
Eval = "builtin:eval",
|
|
21
23
|
/** for expression lists, see {@link processExpressionList} */
|
|
22
|
-
ExpressionList = "builtin:
|
|
24
|
+
ExpressionList = "builtin:el",
|
|
23
25
|
/** for `for` loops, see {@link processForLoop} */
|
|
24
|
-
ForLoop = "builtin:
|
|
26
|
+
ForLoop = "builtin:fl",
|
|
25
27
|
/** We resolved a function call, similar to {@link BuiltInProcName#Default} */
|
|
26
28
|
Function = "function",
|
|
27
29
|
/** for function definitions, see {@link processFunctionDefinition} */
|
|
28
|
-
FunctionDefinition = "builtin:
|
|
30
|
+
FunctionDefinition = "builtin:f-def",
|
|
29
31
|
/** for `get` calls, see {@link processGet} */
|
|
30
32
|
Get = "builtin:get",
|
|
31
33
|
/** for `if-then-else` constructs, see {@link processIfThenElse} */
|
|
32
|
-
IfThenElse = "builtin:
|
|
34
|
+
IfThenElse = "builtin:ite",
|
|
33
35
|
/** for `library` and `require` calls, see {@link processLibrary} */
|
|
34
|
-
Library = "builtin:
|
|
36
|
+
Library = "builtin:lib",
|
|
35
37
|
/** for `list` calls, see {@link processList} */
|
|
36
38
|
List = "builtin:list",
|
|
37
39
|
/** for `local` calls, see {@link processLocal} */
|
|
@@ -43,7 +45,7 @@ export declare enum BuiltInProcName {
|
|
|
43
45
|
* for example, supports `map(g, ~ .x + 2)`
|
|
44
46
|
* @see {@link processPurrrFormula}
|
|
45
47
|
*/
|
|
46
|
-
PurrrFormula = "builtin:purrr-
|
|
48
|
+
PurrrFormula = "builtin:purrr-f",
|
|
47
49
|
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
48
50
|
Quote = "builtin:quote",
|
|
49
51
|
/**
|
|
@@ -51,19 +53,19 @@ export declare enum BuiltInProcName {
|
|
|
51
53
|
*/
|
|
52
54
|
Recall = "builtin:recall",
|
|
53
55
|
/** for `on.exìt` and other hooks, see {@link processRegisterHook} */
|
|
54
|
-
RegisterHook = "builtin:
|
|
56
|
+
RegisterHook = "builtin:r-hook",
|
|
55
57
|
/** for `repeat` loops, see {@link processRepeatLoop} */
|
|
56
|
-
RepeatLoop = "builtin:
|
|
58
|
+
RepeatLoop = "builtin:rl",
|
|
57
59
|
/** for replacement functions like `names<-`, see {@link processReplacementFunction} */
|
|
58
|
-
Replacement = "builtin:
|
|
60
|
+
Replacement = "builtin:repl",
|
|
59
61
|
/** for `return` calls */
|
|
60
62
|
Return = "builtin:return",
|
|
61
63
|
/** for `rm` calls, see {@link processRm} */
|
|
62
64
|
Rm = "builtin:rm",
|
|
63
65
|
/** for `UseMethod` calls, see {@link processS3Dispatch} */
|
|
64
|
-
S3Dispatch = "builtin:s3-
|
|
66
|
+
S3Dispatch = "builtin:s3-dp",
|
|
65
67
|
/** for `NextMethod` calls, see {@link processS3Dispatch} */
|
|
66
|
-
S3DispatchNext = "builtin:s3-
|
|
68
|
+
S3DispatchNext = "builtin:s3-dp-next",
|
|
67
69
|
/** for `new.generic` calls, see {@link processS7NewGeneric} */
|
|
68
70
|
S7NewGeneric = "builtin:s7-new-generic",
|
|
69
71
|
/** for `S7_dispatch` calls (and their implicit creations), see {@link processS7Dispatch} */
|
|
@@ -71,7 +73,7 @@ export declare enum BuiltInProcName {
|
|
|
71
73
|
/** for `source` calls, see {@link processSourceCall} */
|
|
72
74
|
Source = "builtin:source",
|
|
73
75
|
/** for special binary operators like `%x%`, see {@link processSpecialBinOp} */
|
|
74
|
-
SpecialBinOp = "builtin:
|
|
76
|
+
SpecialBinOp = "builtin:s-bop",
|
|
75
77
|
/** for `stop` calls */
|
|
76
78
|
Stop = "builtin:stop",
|
|
77
79
|
/** for `stopifnot` calls, see {@link processStopIfNot} */
|
|
@@ -80,10 +82,16 @@ export declare enum BuiltInProcName {
|
|
|
80
82
|
TableAssignment = "table:assign",
|
|
81
83
|
/** for `try` calls, see {@link processTryCatch} */
|
|
82
84
|
Try = "builtin:try",
|
|
85
|
+
/** for `attach` calls that inject environment contents into the search path, see {@link processAttach} */
|
|
86
|
+
Attach = "builtin:attach",
|
|
87
|
+
/** for `new.env` and related environment-creation calls, see {@link processNewEnv} */
|
|
88
|
+
NewEnv = "builtin:nenv",
|
|
83
89
|
/** for unnamed directly-linked function calls */
|
|
84
90
|
Unnamed = "unnamed",
|
|
85
91
|
/** for vector construction calls, see {@link processVector} */
|
|
86
92
|
Vector = "builtin:vector",
|
|
87
93
|
/** for `while` loops, see {@link processWhileLoop} */
|
|
88
|
-
WhileLoop = "builtin:
|
|
94
|
+
WhileLoop = "builtin:wl",
|
|
95
|
+
/** for `with` calls that evaluate an expression inside a named environment, see {@link processWithEnv} */
|
|
96
|
+
With = "builtin:with"
|
|
89
97
|
}
|
|
@@ -7,35 +7,37 @@ exports.BuiltInProcName = void 0;
|
|
|
7
7
|
var BuiltInProcName;
|
|
8
8
|
(function (BuiltInProcName) {
|
|
9
9
|
/** for subsetting operations, see {@link processAccess} */
|
|
10
|
-
BuiltInProcName["Access"] = "builtin:
|
|
10
|
+
BuiltInProcName["Access"] = "builtin:acc";
|
|
11
11
|
/** for the `*apply` family, see {@link processApply} */
|
|
12
|
-
BuiltInProcName["Apply"] = "builtin:
|
|
12
|
+
BuiltInProcName["Apply"] = "builtin:app";
|
|
13
13
|
/** for assignments like `<-` and `=`, see {@link processAssignment} */
|
|
14
|
-
BuiltInProcName["Assignment"] = "builtin:
|
|
14
|
+
BuiltInProcName["Assignment"] = "builtin:assign";
|
|
15
15
|
/** for assignment like functions that may do additional work, see {@link processAssignmentLike} */
|
|
16
|
-
BuiltInProcName["AssignmentLike"] = "builtin:
|
|
16
|
+
BuiltInProcName["AssignmentLike"] = "builtin:assign-l";
|
|
17
|
+
/** for super-assignments like `<<-` and `->>`, see {@link processAssignment} */
|
|
18
|
+
BuiltInProcName["SuperAssignment"] = "builtin:s-assign";
|
|
17
19
|
/** for `break` calls */
|
|
18
20
|
BuiltInProcName["Break"] = "builtin:break";
|
|
19
21
|
/** the default built-in processor, see {@link defaultBuiltInProcessor} */
|
|
20
|
-
BuiltInProcName["Default"] = "builtin:
|
|
22
|
+
BuiltInProcName["Default"] = "builtin:d";
|
|
21
23
|
/** Just a more performant variant of the default processor for built-ins that need to read all their arguments, see {@link defaultBuiltInProcessor}, this will still produce the origin `BuiltIn.Default` */
|
|
22
|
-
BuiltInProcName["DefaultReadAllArgs"] = "builtin:
|
|
24
|
+
BuiltInProcName["DefaultReadAllArgs"] = "builtin:d-ra";
|
|
23
25
|
/** for `eval` calls, see {@link processEvalCall} */
|
|
24
26
|
BuiltInProcName["Eval"] = "builtin:eval";
|
|
25
27
|
/** for expression lists, see {@link processExpressionList} */
|
|
26
|
-
BuiltInProcName["ExpressionList"] = "builtin:
|
|
28
|
+
BuiltInProcName["ExpressionList"] = "builtin:el";
|
|
27
29
|
/** for `for` loops, see {@link processForLoop} */
|
|
28
|
-
BuiltInProcName["ForLoop"] = "builtin:
|
|
30
|
+
BuiltInProcName["ForLoop"] = "builtin:fl";
|
|
29
31
|
/** We resolved a function call, similar to {@link BuiltInProcName#Default} */
|
|
30
32
|
BuiltInProcName["Function"] = "function";
|
|
31
33
|
/** for function definitions, see {@link processFunctionDefinition} */
|
|
32
|
-
BuiltInProcName["FunctionDefinition"] = "builtin:
|
|
34
|
+
BuiltInProcName["FunctionDefinition"] = "builtin:f-def";
|
|
33
35
|
/** for `get` calls, see {@link processGet} */
|
|
34
36
|
BuiltInProcName["Get"] = "builtin:get";
|
|
35
37
|
/** for `if-then-else` constructs, see {@link processIfThenElse} */
|
|
36
|
-
BuiltInProcName["IfThenElse"] = "builtin:
|
|
38
|
+
BuiltInProcName["IfThenElse"] = "builtin:ite";
|
|
37
39
|
/** for `library` and `require` calls, see {@link processLibrary} */
|
|
38
|
-
BuiltInProcName["Library"] = "builtin:
|
|
40
|
+
BuiltInProcName["Library"] = "builtin:lib";
|
|
39
41
|
/** for `list` calls, see {@link processList} */
|
|
40
42
|
BuiltInProcName["List"] = "builtin:list";
|
|
41
43
|
/** for `local` calls, see {@link processLocal} */
|
|
@@ -47,7 +49,7 @@ var BuiltInProcName;
|
|
|
47
49
|
* for example, supports `map(g, ~ .x + 2)`
|
|
48
50
|
* @see {@link processPurrrFormula}
|
|
49
51
|
*/
|
|
50
|
-
BuiltInProcName["PurrrFormula"] = "builtin:purrr-
|
|
52
|
+
BuiltInProcName["PurrrFormula"] = "builtin:purrr-f";
|
|
51
53
|
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
52
54
|
BuiltInProcName["Quote"] = "builtin:quote";
|
|
53
55
|
/**
|
|
@@ -55,19 +57,19 @@ var BuiltInProcName;
|
|
|
55
57
|
*/
|
|
56
58
|
BuiltInProcName["Recall"] = "builtin:recall";
|
|
57
59
|
/** for `on.exìt` and other hooks, see {@link processRegisterHook} */
|
|
58
|
-
BuiltInProcName["RegisterHook"] = "builtin:
|
|
60
|
+
BuiltInProcName["RegisterHook"] = "builtin:r-hook";
|
|
59
61
|
/** for `repeat` loops, see {@link processRepeatLoop} */
|
|
60
|
-
BuiltInProcName["RepeatLoop"] = "builtin:
|
|
62
|
+
BuiltInProcName["RepeatLoop"] = "builtin:rl";
|
|
61
63
|
/** for replacement functions like `names<-`, see {@link processReplacementFunction} */
|
|
62
|
-
BuiltInProcName["Replacement"] = "builtin:
|
|
64
|
+
BuiltInProcName["Replacement"] = "builtin:repl";
|
|
63
65
|
/** for `return` calls */
|
|
64
66
|
BuiltInProcName["Return"] = "builtin:return";
|
|
65
67
|
/** for `rm` calls, see {@link processRm} */
|
|
66
68
|
BuiltInProcName["Rm"] = "builtin:rm";
|
|
67
69
|
/** for `UseMethod` calls, see {@link processS3Dispatch} */
|
|
68
|
-
BuiltInProcName["S3Dispatch"] = "builtin:s3-
|
|
70
|
+
BuiltInProcName["S3Dispatch"] = "builtin:s3-dp";
|
|
69
71
|
/** for `NextMethod` calls, see {@link processS3Dispatch} */
|
|
70
|
-
BuiltInProcName["S3DispatchNext"] = "builtin:s3-
|
|
72
|
+
BuiltInProcName["S3DispatchNext"] = "builtin:s3-dp-next";
|
|
71
73
|
/** for `new.generic` calls, see {@link processS7NewGeneric} */
|
|
72
74
|
BuiltInProcName["S7NewGeneric"] = "builtin:s7-new-generic";
|
|
73
75
|
/** for `S7_dispatch` calls (and their implicit creations), see {@link processS7Dispatch} */
|
|
@@ -75,7 +77,7 @@ var BuiltInProcName;
|
|
|
75
77
|
/** for `source` calls, see {@link processSourceCall} */
|
|
76
78
|
BuiltInProcName["Source"] = "builtin:source";
|
|
77
79
|
/** for special binary operators like `%x%`, see {@link processSpecialBinOp} */
|
|
78
|
-
BuiltInProcName["SpecialBinOp"] = "builtin:
|
|
80
|
+
BuiltInProcName["SpecialBinOp"] = "builtin:s-bop";
|
|
79
81
|
/** for `stop` calls */
|
|
80
82
|
BuiltInProcName["Stop"] = "builtin:stop";
|
|
81
83
|
/** for `stopifnot` calls, see {@link processStopIfNot} */
|
|
@@ -84,11 +86,17 @@ var BuiltInProcName;
|
|
|
84
86
|
BuiltInProcName["TableAssignment"] = "table:assign";
|
|
85
87
|
/** for `try` calls, see {@link processTryCatch} */
|
|
86
88
|
BuiltInProcName["Try"] = "builtin:try";
|
|
89
|
+
/** for `attach` calls that inject environment contents into the search path, see {@link processAttach} */
|
|
90
|
+
BuiltInProcName["Attach"] = "builtin:attach";
|
|
91
|
+
/** for `new.env` and related environment-creation calls, see {@link processNewEnv} */
|
|
92
|
+
BuiltInProcName["NewEnv"] = "builtin:nenv";
|
|
87
93
|
/** for unnamed directly-linked function calls */
|
|
88
94
|
BuiltInProcName["Unnamed"] = "unnamed";
|
|
89
95
|
/** for vector construction calls, see {@link processVector} */
|
|
90
96
|
BuiltInProcName["Vector"] = "builtin:vector";
|
|
91
97
|
/** for `while` loops, see {@link processWhileLoop} */
|
|
92
|
-
BuiltInProcName["WhileLoop"] = "builtin:
|
|
98
|
+
BuiltInProcName["WhileLoop"] = "builtin:wl";
|
|
99
|
+
/** for `with` calls that evaluate an expression inside a named environment, see {@link processWithEnv} */
|
|
100
|
+
BuiltInProcName["With"] = "builtin:with";
|
|
93
101
|
})(BuiltInProcName || (exports.BuiltInProcName = BuiltInProcName = {}));
|
|
94
102
|
//# sourceMappingURL=built-in-proc-name.js.map
|
|
@@ -44,6 +44,9 @@ import { processS7NewGeneric } from '../internal/process/functions/call/built-in
|
|
|
44
44
|
import { processS7Dispatch } from '../internal/process/functions/call/built-in/built-in-s-seven-dispatch';
|
|
45
45
|
import { BuiltInProcName } from './built-in-proc-name';
|
|
46
46
|
import { processPurrrFormula } from '../internal/process/functions/call/built-in/built-in-purrr-formula';
|
|
47
|
+
import { processNewEnv } from '../internal/process/functions/call/built-in/built-in-new-env';
|
|
48
|
+
import { processAttach } from '../internal/process/functions/call/built-in/built-in-attach';
|
|
49
|
+
import { processWithEnv } from '../internal/process/functions/call/built-in/built-in-with';
|
|
47
50
|
export type BuiltInIdentifierProcessor = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>) => DataflowInformation;
|
|
48
51
|
export type BuiltInIdentifierProcessorWithConfig<Config> = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: Config) => DataflowInformation;
|
|
49
52
|
export interface BuiltInIdentifierDefinition extends IdentifierReference {
|
|
@@ -85,38 +88,41 @@ export type BuiltInEvalHandler = (args: BuiltInEvalHandlerArgs) => Value;
|
|
|
85
88
|
declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { returnsNthArgument, useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
|
|
86
89
|
declare function defaultBuiltInProcessorReadallArgs<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, forceArgs }: Pick<DefaultBuiltInProcessorConfiguration, 'useAsProcessor' | 'forceArgs'>): DataflowInformation;
|
|
87
90
|
export declare const BuiltInProcessorMapper: {
|
|
88
|
-
readonly "builtin:
|
|
89
|
-
readonly "builtin:
|
|
90
|
-
readonly "builtin:
|
|
91
|
-
readonly "builtin:
|
|
92
|
-
readonly "builtin:
|
|
93
|
-
readonly "builtin:
|
|
91
|
+
readonly "builtin:acc": typeof processAccess;
|
|
92
|
+
readonly "builtin:app": typeof processApply;
|
|
93
|
+
readonly "builtin:assign": typeof processAssignment;
|
|
94
|
+
readonly "builtin:assign-l": typeof processAssignmentLike;
|
|
95
|
+
readonly "builtin:d": typeof defaultBuiltInProcessor;
|
|
96
|
+
readonly "builtin:d-ra": typeof defaultBuiltInProcessorReadallArgs;
|
|
94
97
|
readonly "builtin:eval": typeof processEvalCall;
|
|
95
|
-
readonly "builtin:
|
|
96
|
-
readonly "builtin:
|
|
97
|
-
readonly "builtin:
|
|
98
|
+
readonly "builtin:el": typeof processExpressionList;
|
|
99
|
+
readonly "builtin:fl": typeof processForLoop;
|
|
100
|
+
readonly "builtin:f-def": typeof processFunctionDefinition;
|
|
98
101
|
readonly "builtin:get": typeof processGet;
|
|
99
|
-
readonly "builtin:
|
|
100
|
-
readonly "builtin:
|
|
102
|
+
readonly "builtin:ite": typeof processIfThenElse;
|
|
103
|
+
readonly "builtin:lib": typeof processLibrary;
|
|
101
104
|
readonly "builtin:list": typeof processList;
|
|
102
105
|
readonly "builtin:local": typeof processLocal;
|
|
103
106
|
readonly "builtin:pipe": typeof processPipe;
|
|
104
|
-
readonly "builtin:purrr-
|
|
107
|
+
readonly "builtin:purrr-f": typeof processPurrrFormula;
|
|
105
108
|
readonly "builtin:quote": typeof processQuote;
|
|
106
109
|
readonly "builtin:recall": typeof processRecall;
|
|
107
|
-
readonly "builtin:
|
|
108
|
-
readonly "builtin:
|
|
109
|
-
readonly "builtin:
|
|
110
|
+
readonly "builtin:r-hook": typeof processRegisterHook;
|
|
111
|
+
readonly "builtin:rl": typeof processRepeatLoop;
|
|
112
|
+
readonly "builtin:repl": typeof processReplacementFunction;
|
|
110
113
|
readonly "builtin:rm": typeof processRm;
|
|
111
|
-
readonly "builtin:s3-
|
|
114
|
+
readonly "builtin:s3-dp": typeof processS3Dispatch;
|
|
112
115
|
readonly "builtin:s7-new-generic": typeof processS7NewGeneric;
|
|
113
116
|
readonly "builtin:s7-dispatch": typeof processS7Dispatch;
|
|
114
117
|
readonly "builtin:source": typeof processSourceCall;
|
|
115
|
-
readonly "builtin:
|
|
118
|
+
readonly "builtin:s-bop": typeof processSpecialBinOp;
|
|
116
119
|
readonly "builtin:stopifnot": typeof processStopIfNot;
|
|
117
120
|
readonly "builtin:try": typeof processTryCatch;
|
|
121
|
+
readonly "builtin:attach": typeof processAttach;
|
|
122
|
+
readonly "builtin:nenv": typeof processNewEnv;
|
|
123
|
+
readonly "builtin:with": typeof processWithEnv;
|
|
118
124
|
readonly "builtin:vector": typeof processVector;
|
|
119
|
-
readonly "builtin:
|
|
125
|
+
readonly "builtin:wl": typeof processWhileLoop;
|
|
120
126
|
};
|
|
121
127
|
export declare const BuiltInEvalHandlerMapper: {
|
|
122
128
|
readonly 'built-in:c': typeof resolveAsVector;
|
|
@@ -42,6 +42,9 @@ const built_in_s_seven_dispatch_1 = require("../internal/process/functions/call/
|
|
|
42
42
|
const r_string_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
43
43
|
const built_in_proc_name_1 = require("./built-in-proc-name");
|
|
44
44
|
const built_in_purrr_formula_1 = require("../internal/process/functions/call/built-in/built-in-purrr-formula");
|
|
45
|
+
const built_in_new_env_1 = require("../internal/process/functions/call/built-in/built-in-new-env");
|
|
46
|
+
const built_in_attach_1 = require("../internal/process/functions/call/built-in/built-in-attach");
|
|
47
|
+
const built_in_with_1 = require("../internal/process/functions/call/built-in/built-in-with");
|
|
45
48
|
function defaultBuiltInProcessor(name, args, rootId, data, { returnsNthArgument, useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }) {
|
|
46
49
|
const { information: res, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs, origin: useAsProcessor });
|
|
47
50
|
if (returnsNthArgument !== undefined) {
|
|
@@ -142,6 +145,9 @@ exports.BuiltInProcessorMapper = {
|
|
|
142
145
|
[built_in_proc_name_1.BuiltInProcName.SpecialBinOp]: built_in_special_bin_op_1.processSpecialBinOp,
|
|
143
146
|
[built_in_proc_name_1.BuiltInProcName.StopIfNot]: built_in_stop_if_not_1.processStopIfNot,
|
|
144
147
|
[built_in_proc_name_1.BuiltInProcName.Try]: built_in_try_catch_1.processTryCatch,
|
|
148
|
+
[built_in_proc_name_1.BuiltInProcName.Attach]: built_in_attach_1.processAttach,
|
|
149
|
+
[built_in_proc_name_1.BuiltInProcName.NewEnv]: built_in_new_env_1.processNewEnv,
|
|
150
|
+
[built_in_proc_name_1.BuiltInProcName.With]: built_in_with_1.processWithEnv,
|
|
145
151
|
[built_in_proc_name_1.BuiltInProcName.Vector]: built_in_vector_1.processVector,
|
|
146
152
|
[built_in_proc_name_1.BuiltInProcName.WhileLoop]: built_in_while_loop_1.processWhileLoop,
|
|
147
153
|
};
|