@eagleoutice/flowr 2.9.14 → 2.10.2
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 +52 -29
- package/abstract-interpretation/absint-visitor.d.ts +13 -8
- package/abstract-interpretation/absint-visitor.js +35 -26
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +1 -2
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -15
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +2 -15
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +11 -17
- package/abstract-interpretation/data-frame/mappers/arguments.js +18 -18
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +41 -15
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +74 -48
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +2 -1
- package/abstract-interpretation/data-frame/semantics.d.ts +1 -1
- package/abstract-interpretation/data-frame/semantics.js +31 -35
- package/abstract-interpretation/data-frame/shape-inference.js +1 -1
- package/abstract-interpretation/domains/interval-domain.d.ts +1 -0
- package/abstract-interpretation/domains/interval-domain.js +3 -0
- package/abstract-interpretation/domains/product-domain.d.ts +9 -0
- package/abstract-interpretation/domains/product-domain.js +26 -6
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +36 -22
- package/abstract-interpretation/domains/state-abstract-domain.js +169 -62
- package/abstract-interpretation/unsupported-functions.d.ts +10 -0
- package/abstract-interpretation/unsupported-functions.js +45 -0
- package/benchmark/slicer.js +10 -13
- package/benchmark/stats/stats.d.ts +2 -2
- package/cli/flowr.js +1 -1
- package/cli/repl/parser/slice-query-parser.d.ts +2 -2
- package/config.d.ts +4 -0
- package/config.js +5 -3
- package/control-flow/control-flow-graph.js +13 -9
- package/control-flow/semantic-cfg-guided-visitor.d.ts +6 -0
- package/control-flow/semantic-cfg-guided-visitor.js +6 -0
- package/dataflow/environments/built-in-proc-name.d.ts +6 -0
- package/dataflow/environments/built-in-proc-name.js +6 -0
- package/dataflow/environments/built-in.d.ts +7 -5
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +442 -6
- package/dataflow/environments/default-builtin-config.js +158 -3
- package/dataflow/environments/identifier.d.ts +4 -0
- package/dataflow/environments/identifier.js +17 -0
- package/dataflow/environments/overwrite.js +2 -5
- package/dataflow/graph/call-graph.d.ts +4 -7
- package/dataflow/graph/call-graph.js +0 -22
- package/dataflow/graph/df-helper.d.ts +23 -12
- package/dataflow/graph/df-helper.js +44 -7
- package/dataflow/graph/graph-helper.d.ts +9 -4
- package/dataflow/graph/graph-helper.js +26 -3
- package/dataflow/graph/graph.d.ts +23 -2
- package/dataflow/graph/graph.js +38 -4
- package/dataflow/graph/vertex.d.ts +2 -0
- package/dataflow/instrument/instrument-dataflow-count.d.ts +10 -0
- package/dataflow/instrument/instrument-dataflow-count.js +10 -0
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +8 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +23 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +80 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +41 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +179 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +7 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +62 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.d.ts +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +15 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/common.d.ts +2 -2
- package/dataflow/internal/process/functions/call/common.js +6 -4
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -2
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +1 -1
- package/documentation/doc-readme.js +2 -1
- package/documentation/wiki-absint.js +6 -5
- package/documentation/wiki-analyzer.js +0 -2
- package/documentation/wiki-linter.js +6 -0
- package/documentation/wiki-normalized-ast.js +7 -7
- package/linter/linter-rules.d.ts +49 -1
- package/linter/linter-rules.js +5 -1
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +3 -4
- package/linter/rules/problematic-eval.d.ts +44 -0
- package/linter/rules/problematic-eval.js +83 -0
- package/linter/rules/roxygen-arguments.d.ts +35 -0
- package/linter/rules/roxygen-arguments.js +100 -0
- package/package.json +8 -9
- package/project/context/flowr-analyzer-context.d.ts +1 -8
- package/project/context/flowr-analyzer-context.js +1 -7
- package/project/context/flowr-analyzer-environment-context.d.ts +5 -0
- package/project/context/flowr-analyzer-environment-context.js +6 -0
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +4 -2
- package/project/flowr-analyzer-builder.js +1 -4
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +10 -5
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/library-functions.js +2 -0
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -3
- package/queries/catalog/df-shape-query/df-shape-query-format.js +7 -2
- package/queries/catalog/does-call-query/does-call-query-executor.js +1 -1
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +2 -2
- package/queries/catalog/files-query/files-query-executor.js +0 -1
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +3 -3
- package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +6 -0
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +66 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +36 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +63 -0
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +92 -0
- package/queries/catalog/input-sources-query/simple-input-classifier.js +310 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +2 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -2
- package/queries/catalog/location-map-query/location-map-query-executor.js +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -2
- package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
- package/queries/catalog/origin-query/origin-query-executor.js +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +3 -3
- package/queries/catalog/provenance-query/provenance-query-executor.d.ts +1 -4
- package/queries/catalog/provenance-query/provenance-query-executor.js +3 -6
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +1 -1
- package/queries/query.d.ts +9 -1
- package/queries/query.js +2 -0
- package/r-bridge/data/data.d.ts +2 -2
- package/r-bridge/data/data.js +2 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/model.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +29 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +16 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +19 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +16 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +25 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/versions.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/versions.js +3 -1
- package/r-bridge/roxygen2/documentation-provider.js +15 -6
- package/r-bridge/roxygen2/roxygen-ast.d.ts +3 -1
- package/search/flowr-search-builder.js +3 -2
- package/search/search-executor/search-generators.js +1 -1
- package/slicing/criterion/parse.d.ts +11 -10
- package/slicing/criterion/parse.js +9 -8
- package/slicing/static/static-slicer.js +24 -1
- package/util/collections/arrays.d.ts +4 -0
- package/util/collections/arrays.js +7 -0
- package/util/mermaid/ast.js +2 -1
- package/util/mermaid/dfg.js +2 -1
- package/util/record.d.ts +23 -0
- package/util/record.js +33 -0
- package/util/version.js +1 -1
- package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +0 -41
- package/abstract-interpretation/domains/mapped-abstract-domain.js +0 -213
package/config.js
CHANGED
|
@@ -93,7 +93,8 @@ exports.FlowrConfig = {
|
|
|
93
93
|
dataflowExtractors: undefined
|
|
94
94
|
},
|
|
95
95
|
slicer: {
|
|
96
|
-
threshold: 50
|
|
96
|
+
threshold: 50,
|
|
97
|
+
autoExtend: false
|
|
97
98
|
}
|
|
98
99
|
},
|
|
99
100
|
abstractInterpretation: {
|
|
@@ -153,7 +154,8 @@ exports.FlowrConfig = {
|
|
|
153
154
|
applyReplacements: joi_1.default.array().items(joi_1.default.object()).description('Provide name replacements for loaded files')
|
|
154
155
|
}).optional().description('If lax source calls are active, flowR searches for sourced files much more freely, based on the configurations you give it. This option is only in effect if `ignoreSourceCalls` is set to false.'),
|
|
155
156
|
slicer: joi_1.default.object({
|
|
156
|
-
threshold: joi_1.default.number().optional().description('The maximum number of iterations to perform on a single function call during slicing.')
|
|
157
|
+
threshold: joi_1.default.number().optional().description('The maximum number of iterations to perform on a single function call during slicing.'),
|
|
158
|
+
autoExtend: joi_1.default.boolean().optional().description('If set, the slicer will gain an additional post-pass.')
|
|
157
159
|
}).optional().description('The configuration for the slicer.')
|
|
158
160
|
}).description('How to resolve constants, constraints, cells, ...'),
|
|
159
161
|
abstractInterpretation: joi_1.default.object({
|
|
@@ -250,7 +252,7 @@ exports.FlowrConfig = {
|
|
|
250
252
|
*/
|
|
251
253
|
setInConfigInPlace(config, key, value) {
|
|
252
254
|
object_path_1.default.set(config, key, value);
|
|
253
|
-
}
|
|
255
|
+
},
|
|
254
256
|
};
|
|
255
257
|
function loadConfigFromFile(configFile, workingDirectory) {
|
|
256
258
|
if (configFile !== undefined) {
|
|
@@ -589,16 +589,20 @@ class ControlFlowGraph {
|
|
|
589
589
|
* @see {@link ControlFlowGraph#addEdges|addEdges()} - to add multiple edges at once
|
|
590
590
|
*/
|
|
591
591
|
addEdge(from, to, edge) {
|
|
592
|
-
const edgesFrom = this.edgeInfos.get(from)
|
|
593
|
-
if (!
|
|
594
|
-
this.edgeInfos.set(from,
|
|
592
|
+
const edgesFrom = this.edgeInfos.get(from);
|
|
593
|
+
if (!edgesFrom) {
|
|
594
|
+
this.edgeInfos.set(from, new Map([[to, edge]]));
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
edgesFrom.set(to, edge);
|
|
595
598
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
599
|
+
const edgesTo = this.revEdgeInfos.get(to);
|
|
600
|
+
if (!edgesTo) {
|
|
601
|
+
this.revEdgeInfos.set(to, new Map([[from, edge]]));
|
|
602
|
+
}
|
|
603
|
+
else {
|
|
604
|
+
edgesTo.set(from, edge);
|
|
600
605
|
}
|
|
601
|
-
edgesTo.set(from, edge);
|
|
602
606
|
return this;
|
|
603
607
|
}
|
|
604
608
|
/**
|
|
@@ -762,7 +766,7 @@ class ControlFlowGraph {
|
|
|
762
766
|
const roots = other.roots;
|
|
763
767
|
if (this._mayBB) {
|
|
764
768
|
for (const [id, node] of other.vtxInfos) {
|
|
765
|
-
this.addVertex(node, forceNested
|
|
769
|
+
this.addVertex(node, !forceNested && roots.has(id));
|
|
766
770
|
}
|
|
767
771
|
}
|
|
768
772
|
else {
|
|
@@ -566,4 +566,10 @@ export declare class SemanticCfgGuidedVisitor<OtherInfo = NoInfo, ControlFlow ex
|
|
|
566
566
|
protected onRecallCall(_data: {
|
|
567
567
|
call: DataflowGraphVertexFunctionCall;
|
|
568
568
|
}): void;
|
|
569
|
+
/**
|
|
570
|
+
* This event triggers for any purr formula as in `map(df, ~ .x + 1)`
|
|
571
|
+
*/
|
|
572
|
+
protected onPurrFormulaCall(_data: {
|
|
573
|
+
call: DataflowGraphVertexFunctionCall;
|
|
574
|
+
}): void;
|
|
569
575
|
}
|
|
@@ -278,6 +278,8 @@ class SemanticCfgGuidedVisitor extends dfg_cfg_guided_visitor_1.DataflowAwareCfg
|
|
|
278
278
|
return this.onUnnamedCall({ call });
|
|
279
279
|
case built_in_proc_name_1.BuiltInProcName.Recall:
|
|
280
280
|
return this.onRecallCall({ call });
|
|
281
|
+
case built_in_proc_name_1.BuiltInProcName.PurrrFormula:
|
|
282
|
+
return this.onPurrFormulaCall({ call });
|
|
281
283
|
case built_in_proc_name_1.BuiltInProcName.Default:
|
|
282
284
|
case built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs:
|
|
283
285
|
case built_in_proc_name_1.BuiltInProcName.Function:
|
|
@@ -640,6 +642,10 @@ class SemanticCfgGuidedVisitor extends dfg_cfg_guided_visitor_1.DataflowAwareCfg
|
|
|
640
642
|
* @protected
|
|
641
643
|
*/
|
|
642
644
|
onRecallCall(_data) { }
|
|
645
|
+
/**
|
|
646
|
+
* This event triggers for any purr formula as in `map(df, ~ .x + 1)`
|
|
647
|
+
*/
|
|
648
|
+
onPurrFormulaCall(_data) { }
|
|
643
649
|
}
|
|
644
650
|
exports.SemanticCfgGuidedVisitor = SemanticCfgGuidedVisitor;
|
|
645
651
|
//# sourceMappingURL=semantic-cfg-guided-visitor.js.map
|
|
@@ -38,6 +38,12 @@ export declare enum BuiltInProcName {
|
|
|
38
38
|
Local = "builtin:local",
|
|
39
39
|
/** for the pipe operators, see {@link processPipe} */
|
|
40
40
|
Pipe = "builtin:pipe",
|
|
41
|
+
/**
|
|
42
|
+
* Support for purrr's functional style of formulas with implicit arguments,
|
|
43
|
+
* for example, supports `map(g, ~ .x + 2)`
|
|
44
|
+
* @see {@link processPurrrFormula}
|
|
45
|
+
*/
|
|
46
|
+
PurrrFormula = "builtin:purrr-formula",
|
|
41
47
|
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
42
48
|
Quote = "builtin:quote",
|
|
43
49
|
/**
|
|
@@ -42,6 +42,12 @@ var BuiltInProcName;
|
|
|
42
42
|
BuiltInProcName["Local"] = "builtin:local";
|
|
43
43
|
/** for the pipe operators, see {@link processPipe} */
|
|
44
44
|
BuiltInProcName["Pipe"] = "builtin:pipe";
|
|
45
|
+
/**
|
|
46
|
+
* Support for purrr's functional style of formulas with implicit arguments,
|
|
47
|
+
* for example, supports `map(g, ~ .x + 2)`
|
|
48
|
+
* @see {@link processPurrrFormula}
|
|
49
|
+
*/
|
|
50
|
+
BuiltInProcName["PurrrFormula"] = "builtin:purrr-formula";
|
|
45
51
|
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
46
52
|
BuiltInProcName["Quote"] = "builtin:quote";
|
|
47
53
|
/**
|
|
@@ -15,7 +15,7 @@ import { processFunctionDefinition } from '../internal/process/functions/call/bu
|
|
|
15
15
|
import { processExpressionList } from '../internal/process/functions/call/built-in/built-in-expression-list';
|
|
16
16
|
import { processGet } from '../internal/process/functions/call/built-in/built-in-get';
|
|
17
17
|
import type { AstIdMap, ParentInformation, RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
18
|
-
import { type
|
|
18
|
+
import { type PotentiallyEmptyRArgument } from '../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
19
19
|
import { RSymbol } from '../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
20
20
|
import { type BuiltIn, NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
21
21
|
import { processLibrary } from '../internal/process/functions/call/built-in/built-in-library';
|
|
@@ -43,8 +43,9 @@ import { processRecall } from '../internal/process/functions/call/built-in/built
|
|
|
43
43
|
import { processS7NewGeneric } from '../internal/process/functions/call/built-in/built-in-s-seven-new-generic';
|
|
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
|
-
|
|
47
|
-
export type
|
|
46
|
+
import { processPurrrFormula } from '../internal/process/functions/call/built-in/built-in-purrr-formula';
|
|
47
|
+
export type BuiltInIdentifierProcessor = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>) => DataflowInformation;
|
|
48
|
+
export type BuiltInIdentifierProcessorWithConfig<Config> = <OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: Config) => DataflowInformation;
|
|
48
49
|
export interface BuiltInIdentifierDefinition extends IdentifierReference {
|
|
49
50
|
type: ReferenceType.BuiltInFunction;
|
|
50
51
|
definedAt: BuiltIn;
|
|
@@ -81,8 +82,8 @@ export interface BuiltInEvalHandlerArgs {
|
|
|
81
82
|
blocked?: Set<NodeId>;
|
|
82
83
|
}
|
|
83
84
|
export type BuiltInEvalHandler = (args: BuiltInEvalHandlerArgs) => Value;
|
|
84
|
-
declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly
|
|
85
|
-
declare function defaultBuiltInProcessorReadallArgs<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly
|
|
85
|
+
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
|
+
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;
|
|
86
87
|
export declare const BuiltInProcessorMapper: {
|
|
87
88
|
readonly "builtin:access": typeof processAccess;
|
|
88
89
|
readonly "builtin:apply": typeof processApply;
|
|
@@ -100,6 +101,7 @@ export declare const BuiltInProcessorMapper: {
|
|
|
100
101
|
readonly "builtin:list": typeof processList;
|
|
101
102
|
readonly "builtin:local": typeof processLocal;
|
|
102
103
|
readonly "builtin:pipe": typeof processPipe;
|
|
104
|
+
readonly "builtin:purrr-formula": typeof processPurrrFormula;
|
|
103
105
|
readonly "builtin:quote": typeof processQuote;
|
|
104
106
|
readonly "builtin:recall": typeof processRecall;
|
|
105
107
|
readonly "builtin:register-hook": typeof processRegisterHook;
|
|
@@ -41,6 +41,7 @@ const built_in_s_seven_new_generic_1 = require("../internal/process/functions/ca
|
|
|
41
41
|
const built_in_s_seven_dispatch_1 = require("../internal/process/functions/call/built-in/built-in-s-seven-dispatch");
|
|
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
|
+
const built_in_purrr_formula_1 = require("../internal/process/functions/call/built-in/built-in-purrr-formula");
|
|
44
45
|
function defaultBuiltInProcessor(name, args, rootId, data, { returnsNthArgument, useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }) {
|
|
45
46
|
const { information: res, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs, origin: useAsProcessor });
|
|
46
47
|
if (returnsNthArgument !== undefined) {
|
|
@@ -127,6 +128,7 @@ exports.BuiltInProcessorMapper = {
|
|
|
127
128
|
[built_in_proc_name_1.BuiltInProcName.List]: built_in_list_1.processList,
|
|
128
129
|
[built_in_proc_name_1.BuiltInProcName.Local]: built_in_local_1.processLocal,
|
|
129
130
|
[built_in_proc_name_1.BuiltInProcName.Pipe]: built_in_pipe_1.processPipe,
|
|
131
|
+
[built_in_proc_name_1.BuiltInProcName.PurrrFormula]: built_in_purrr_formula_1.processPurrrFormula,
|
|
130
132
|
[built_in_proc_name_1.BuiltInProcName.Quote]: built_in_quote_1.processQuote,
|
|
131
133
|
[built_in_proc_name_1.BuiltInProcName.Recall]: built_in_recall_1.processRecall,
|
|
132
134
|
[built_in_proc_name_1.BuiltInProcName.RegisterHook]: built_in_register_hook_1.processRegisterHook,
|