@eagleoutice/flowr 2.2.16 → 2.3.0

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.
Files changed (78) hide show
  1. package/README.md +35 -19
  2. package/abstract-interpretation/data-frame/absint-info.d.ts +109 -0
  3. package/abstract-interpretation/data-frame/absint-info.js +31 -0
  4. package/abstract-interpretation/data-frame/absint-visitor.d.ts +59 -0
  5. package/abstract-interpretation/data-frame/absint-visitor.js +173 -0
  6. package/abstract-interpretation/data-frame/domain.d.ts +107 -0
  7. package/abstract-interpretation/data-frame/domain.js +315 -0
  8. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +17 -0
  9. package/abstract-interpretation/data-frame/mappers/access-mapper.js +166 -0
  10. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +117 -0
  11. package/abstract-interpretation/data-frame/mappers/arguments.js +188 -0
  12. package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +20 -0
  13. package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +34 -0
  14. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +261 -0
  15. package/abstract-interpretation/data-frame/mappers/function-mapper.js +1219 -0
  16. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +12 -0
  17. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +206 -0
  18. package/abstract-interpretation/data-frame/resolve-args.d.ts +42 -0
  19. package/abstract-interpretation/data-frame/resolve-args.js +118 -0
  20. package/abstract-interpretation/data-frame/semantics.d.ts +213 -0
  21. package/abstract-interpretation/data-frame/semantics.js +366 -0
  22. package/abstract-interpretation/data-frame/shape-inference.d.ts +38 -0
  23. package/abstract-interpretation/data-frame/shape-inference.js +117 -0
  24. package/benchmark/slicer.d.ts +15 -1
  25. package/benchmark/slicer.js +135 -0
  26. package/benchmark/stats/print.js +123 -45
  27. package/benchmark/stats/size-of.d.ts +7 -0
  28. package/benchmark/stats/size-of.js +1 -0
  29. package/benchmark/stats/stats.d.ts +30 -1
  30. package/benchmark/stats/stats.js +4 -2
  31. package/benchmark/summarizer/data.d.ts +33 -2
  32. package/benchmark/summarizer/first-phase/input.js +5 -1
  33. package/benchmark/summarizer/first-phase/process.js +47 -1
  34. package/benchmark/summarizer/second-phase/process.js +101 -3
  35. package/cli/benchmark-app.d.ts +1 -0
  36. package/cli/benchmark-app.js +1 -0
  37. package/cli/benchmark-helper-app.d.ts +1 -0
  38. package/cli/benchmark-helper-app.js +8 -2
  39. package/cli/common/options.js +2 -0
  40. package/config.d.ts +31 -0
  41. package/config.js +21 -1
  42. package/control-flow/control-flow-graph.d.ts +1 -0
  43. package/control-flow/control-flow-graph.js +4 -0
  44. package/control-flow/dfg-cfg-guided-visitor.js +1 -1
  45. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  46. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  47. package/dataflow/environments/built-in.d.ts +5 -3
  48. package/dataflow/environments/built-in.js +3 -1
  49. package/dataflow/eval/resolve/alias-tracking.js +2 -2
  50. package/dataflow/eval/resolve/resolve.d.ts +53 -9
  51. package/dataflow/eval/resolve/resolve.js +132 -38
  52. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -0
  53. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +4 -0
  54. package/documentation/doc-util/doc-query.js +10 -0
  55. package/documentation/print-interface-wiki.js +11 -0
  56. package/documentation/print-linter-wiki.js +4 -0
  57. package/documentation/print-query-wiki.js +17 -0
  58. package/linter/linter-rules.d.ts +25 -2
  59. package/linter/linter-rules.js +3 -1
  60. package/linter/rules/absolute-path.d.ts +1 -1
  61. package/linter/rules/dataframe-access-validation.d.ts +53 -0
  62. package/linter/rules/dataframe-access-validation.js +116 -0
  63. package/linter/rules/naming-convention.d.ts +1 -1
  64. package/linter/rules/naming-convention.js +5 -1
  65. package/package.json +2 -2
  66. package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +3 -0
  67. package/queries/catalog/df-shape-query/df-shape-query-executor.js +46 -0
  68. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +72 -0
  69. package/queries/catalog/df-shape-query/df-shape-query-format.js +31 -0
  70. package/queries/query.d.ts +61 -1
  71. package/queries/query.js +2 -0
  72. package/util/files.d.ts +8 -2
  73. package/util/files.js +22 -4
  74. package/util/r-value.d.ts +23 -0
  75. package/util/r-value.js +113 -0
  76. package/util/version.js +1 -1
  77. package/util/cfg/cfg.d.ts +0 -0
  78. package/util/cfg/cfg.js +0 -2
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeRegExp = escapeRegExp;
4
+ exports.filterValidNames = filterValidNames;
5
+ exports.getArgumentValue = getArgumentValue;
6
+ exports.getEffectiveArgs = getEffectiveArgs;
7
+ exports.getFunctionArgument = getFunctionArgument;
8
+ exports.getFunctionArguments = getFunctionArguments;
9
+ exports.getUnresolvedSymbolsInExpression = getUnresolvedSymbolsInExpression;
10
+ exports.hasCriticalArgument = hasCriticalArgument;
11
+ exports.isDataFrameArgument = isDataFrameArgument;
12
+ exports.isNamedArgument = isNamedArgument;
13
+ exports.isRNull = isRNull;
14
+ exports.isValidColName = isValidColName;
15
+ const vertex_1 = require("../../../dataflow/graph/vertex");
16
+ const make_argument_1 = require("../../../dataflow/internal/process/functions/call/argument/make-argument");
17
+ const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
18
+ const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
19
+ const convert_values_1 = require("../../../r-bridge/lang-4.x/convert-values");
20
+ const shape_inference_1 = require("../shape-inference");
21
+ const resolve_args_1 = require("../resolve-args");
22
+ const visitor_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/visitor");
23
+ /** Regular expression representing valid columns names, e.g. for `data.frame` */
24
+ const ColNamesRegex = /^[A-Za-z.][A-Za-z0-9_.]*$/;
25
+ /**
26
+ * Escapes a regular expression given as string by escaping all special regular expression characters.
27
+ *
28
+ * @param text - The text to escape
29
+ * @param allowTokens - Whether to allow and keep unescaped tokens like `\s`, `\t`, or `\n`
30
+ * @returns The escaped text
31
+ */
32
+ function escapeRegExp(text, allowTokens = false) {
33
+ if (allowTokens) { // only allow and keep the tokens `\s`, `\t`, and `\n` in the text
34
+ return text.replace(/[.*+?^${}()|[\]]|\\[^stn]/g, '\\$&');
35
+ }
36
+ else {
37
+ return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
38
+ }
39
+ }
40
+ /**
41
+ * Maps all invalid, duplicate, or empty column names to top depending on the provided arguments.
42
+ *
43
+ * @param colnames - The columns names to filter
44
+ * @param checkNames - Whether to map all invalid column names to top (`undefined`)
45
+ * @param noDupNames - Whether to map all duplicate column names to top (`undefined`)
46
+ * @param noEmptyNames - Whether to map all empty column names to top (`undefined`)
47
+ * @returns The filtered column names
48
+ */
49
+ function filterValidNames(colnames, checkNames, noDupNames, noEmptyNames) {
50
+ if (checkNames) { // map all invalid column names to top
51
+ colnames = colnames?.map(entry => isValidColName(entry) ? entry : undefined);
52
+ }
53
+ if (noDupNames) { // map all duplicate column names to top
54
+ colnames = colnames?.map((entry, _, list) => entry !== undefined && list.filter(other => other === entry).length === 1 ? entry : undefined);
55
+ }
56
+ if (noEmptyNames) { // map all empty column names to top
57
+ colnames = colnames?.map(entry => entry?.length === 0 ? undefined : entry);
58
+ }
59
+ return colnames;
60
+ }
61
+ /**
62
+ * Gets the value of an argument that specified as {@link FunctionParameterLocation}.
63
+ *
64
+ * @param args - The arguments to get the requested argument from
65
+ * @param argument - The specification of the argument to get the value for
66
+ * @param info - Argument resolve information
67
+ * @returns The resolved value of the argument or `undefined`
68
+ */
69
+ function getArgumentValue(args, argument, info) {
70
+ const arg = getFunctionArgument(args, argument, info);
71
+ const defaultValue = typeof argument !== 'string' ? argument.default : undefined;
72
+ return arg !== undefined ? (0, resolve_args_1.resolveIdToArgValue)(arg, info) : defaultValue;
73
+ }
74
+ /**
75
+ * Gets all effective argument from a list of arguments by removing all arguments whose names should be excluded.
76
+ *
77
+ * @param args - The list of arguments to filter
78
+ * @param excluded - The names of the arguments to exclude
79
+ * @returns The filtered list of arguments
80
+ */
81
+ function getEffectiveArgs(args, excluded) {
82
+ return args.filter(arg => arg === r_function_call_1.EmptyArgument || arg.name === undefined || !excluded.includes((0, resolve_args_1.unquoteArgument)(arg.name.content)));
83
+ }
84
+ /**
85
+ * Gets an argument specified as {@link FunctionParameterLocation} from a list of arguments.
86
+ *
87
+ * @param args - The arguments to get the requested argument from
88
+ * @param argument - The specification of the argument to get
89
+ * @param info - Argument resolve information
90
+ * @returns An argument matching the specified `argument` or `undefined`
91
+ */
92
+ function getFunctionArgument(args, argument, info) {
93
+ const pos = typeof argument !== 'string' ? argument.pos : -1;
94
+ const name = typeof argument !== 'string' ? argument.name : argument;
95
+ let arg = undefined;
96
+ if (name !== undefined) {
97
+ arg = args.find(arg => (0, resolve_args_1.resolveIdToArgName)(arg, info) === name);
98
+ }
99
+ const hasArgPos = arg === undefined && pos >= 0 && pos < args.length && args[pos] !== r_function_call_1.EmptyArgument && args[pos].name === undefined;
100
+ if (hasArgPos) {
101
+ arg = args[pos];
102
+ }
103
+ return arg;
104
+ }
105
+ /**
106
+ * Get all function arguments of a function call node in the data flow graph.
107
+ *
108
+ * @param node - The function call node to get the arguments for
109
+ * @param dfg - The data flow graph for retrieving the arguments
110
+ * @returns The arguments of the function call in the data flow graph
111
+ */
112
+ function getFunctionArguments(node, dfg) {
113
+ const vertex = dfg.getVertex(node.info.id);
114
+ if (vertex?.tag === vertex_1.VertexType.FunctionCall && dfg.idMap !== undefined) {
115
+ const idMap = dfg.idMap;
116
+ return vertex.args
117
+ .map(arg => arg === r_function_call_1.EmptyArgument ? arg : idMap.get(arg.nodeId))
118
+ .map(arg => arg === r_function_call_1.EmptyArgument || arg?.type === type_1.RType.Argument ? arg : (0, make_argument_1.toUnnamedArgument)(arg, idMap));
119
+ }
120
+ return node.arguments;
121
+ }
122
+ /**
123
+ * Gets all nested symbols in an expression that have no outgoing edges in the data flow graph.
124
+ * @param expression - The expression to get the symbols from
125
+ * @param dfg - The data flow graph for checking the outgoing edges
126
+ * @returns The name of all unresolved symbols in the expression
127
+ */
128
+ function getUnresolvedSymbolsInExpression(expression, dfg) {
129
+ if (expression === undefined || expression === r_function_call_1.EmptyArgument || dfg === undefined) {
130
+ return [];
131
+ }
132
+ const unresolvedSymbols = [];
133
+ (0, visitor_1.visitAst)(expression, node => {
134
+ if (node.type === type_1.RType.Symbol) {
135
+ const vertex = dfg.get(node.info.id);
136
+ if ((0, vertex_1.isUseVertex)(vertex?.[0]) && vertex[1].size === 0) {
137
+ unresolvedSymbols.push((0, resolve_args_1.unquoteArgument)(node.content));
138
+ }
139
+ }
140
+ });
141
+ return unresolvedSymbols;
142
+ }
143
+ /**
144
+ * Checks whether a list of arguments contains any critical argument.
145
+ *
146
+ * @param args - The list of arguments to check
147
+ * @param critical - The critical arguments to search for (as string or {@link FunctionParameterLocation}s)
148
+ * @param info - Argument resolve information
149
+ * @returns Whether the arguments contain any critical argument
150
+ */
151
+ function hasCriticalArgument(args, critical, info) {
152
+ for (const param of critical ?? []) {
153
+ const arg = getFunctionArgument(args, param, info);
154
+ if (arg === undefined) {
155
+ continue;
156
+ }
157
+ else if (typeof param !== 'string' && param.default !== undefined) {
158
+ const value = (0, resolve_args_1.resolveIdToArgValue)(arg, info);
159
+ if (value !== undefined && value === param.default) {
160
+ continue;
161
+ }
162
+ }
163
+ return true;
164
+ }
165
+ return false;
166
+ }
167
+ function isDataFrameArgument(arg, info) {
168
+ return arg !== r_function_call_1.EmptyArgument && (0, shape_inference_1.resolveIdToDataFrameShape)(arg, info.graph) !== undefined;
169
+ }
170
+ /**
171
+ * Checks whether a function argument is a names argument.
172
+ */
173
+ function isNamedArgument(arg) {
174
+ return arg !== r_function_call_1.EmptyArgument && arg?.name !== undefined;
175
+ }
176
+ function isRNull(node) {
177
+ if (node === r_function_call_1.EmptyArgument || node?.type === type_1.RType.Argument) {
178
+ return node !== r_function_call_1.EmptyArgument && isRNull(node.value);
179
+ }
180
+ return node?.type === type_1.RType.Symbol && node.content === convert_values_1.RNull;
181
+ }
182
+ /**
183
+ * Checks whether a string is a valid columns name according to the flag `check.names` in R.
184
+ */
185
+ function isValidColName(colname) {
186
+ return colname !== undefined && ColNamesRegex.test(colname);
187
+ }
188
+ //# sourceMappingURL=arguments.js.map
@@ -0,0 +1,20 @@
1
+ import type { DataflowGraph } from '../../../dataflow/graph/graph';
2
+ import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model';
3
+ import type { RString } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-string';
4
+ import type { RSymbol } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
5
+ import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
6
+ import type { DataFrameAssignmentInfo } from '../absint-info';
7
+ /**
8
+ * Maps a concrete data frame assignment to data frame assignment info containing the ids of the identifier and assigned expression.
9
+ * We currently do not support function assignments dealing with data frames.
10
+ *
11
+ * @param identifier - The R node of the variable identifier
12
+ * @param expression - The R node of the assigned expression
13
+ * @param dfg - The data flow graph for resolving the arguments
14
+ * @returns Data frame assignment info containing the IDs of the identifier and expression, or `undefined` if the node does not represent a data frame assignment
15
+ */
16
+ export declare function mapDataFrameVariableAssignment(identifier: RSymbol<ParentInformation> | RString<ParentInformation>, expression: RNode<ParentInformation>, dfg: DataflowGraph): DataFrameAssignmentInfo | undefined;
17
+ /**
18
+ * Checks whether a R node represents an assignment target, i.e. is a `RSymbol` or `RString`.
19
+ */
20
+ export declare function isAssignmentTarget(node: RNode<ParentInformation> | undefined): node is RSymbol<ParentInformation> | RString<ParentInformation>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapDataFrameVariableAssignment = mapDataFrameVariableAssignment;
4
+ exports.isAssignmentTarget = isAssignmentTarget;
5
+ const config_1 = require("../../../config");
6
+ const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
7
+ const arguments_1 = require("./arguments");
8
+ /**
9
+ * Maps a concrete data frame assignment to data frame assignment info containing the ids of the identifier and assigned expression.
10
+ * We currently do not support function assignments dealing with data frames.
11
+ *
12
+ * @param identifier - The R node of the variable identifier
13
+ * @param expression - The R node of the assigned expression
14
+ * @param dfg - The data flow graph for resolving the arguments
15
+ * @returns Data frame assignment info containing the IDs of the identifier and expression, or `undefined` if the node does not represent a data frame assignment
16
+ */
17
+ function mapDataFrameVariableAssignment(identifier, expression, dfg) {
18
+ const resolveInfo = { graph: dfg, idMap: dfg.idMap, full: true, resolve: config_1.VariableResolve.Alias };
19
+ if (!(0, arguments_1.isDataFrameArgument)(expression, resolveInfo)) {
20
+ return;
21
+ }
22
+ return {
23
+ type: 'assignment',
24
+ identifier: identifier.info.id,
25
+ expression: expression.info.id
26
+ };
27
+ }
28
+ /**
29
+ * Checks whether a R node represents an assignment target, i.e. is a `RSymbol` or `RString`.
30
+ */
31
+ function isAssignmentTarget(node) {
32
+ return node?.type === type_1.RType.Symbol || node?.type === type_1.RType.String;
33
+ }
34
+ //# sourceMappingURL=assignment-mapper.js.map
@@ -0,0 +1,261 @@
1
+ import type { FlowrConfigOptions } from '../../../config';
2
+ import { type ResolveInfo } from '../../../dataflow/eval/resolve/alias-tracking';
3
+ import type { DataflowGraph } from '../../../dataflow/graph/graph';
4
+ import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model';
5
+ import type { RFunctionArgument } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
6
+ import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
+ import type { DataFrameExpressionInfo, DataFrameOperation } from '../absint-info';
8
+ import type { FunctionParameterLocation } from './arguments';
9
+ /**
10
+ * Represents the different types of data frames in R
11
+ */
12
+ declare enum DataFrameType {
13
+ DataFrame = "data.frame",
14
+ Tibble = "tibble",
15
+ DataTable = "data.table"
16
+ }
17
+ /**
18
+ * Mapper for mapping the supported concrete data frame functions to mapper functions,
19
+ * including information about the origin library of the functions and the type of the returned data frame.
20
+ */
21
+ declare const DataFrameFunctionMapper: {
22
+ readonly 'data.frame': {
23
+ readonly mapper: typeof mapDataFrameCreate;
24
+ readonly library: "base";
25
+ readonly returnType: DataFrameType.DataFrame;
26
+ };
27
+ readonly 'as.data.frame': {
28
+ readonly mapper: typeof mapDataFrameConvert;
29
+ readonly library: "base";
30
+ readonly returnType: DataFrameType.DataFrame;
31
+ };
32
+ readonly 'read.table': {
33
+ readonly mapper: typeof mapDataFrameRead;
34
+ readonly library: "utils";
35
+ readonly returnType: DataFrameType.DataFrame;
36
+ };
37
+ readonly 'read.csv': {
38
+ readonly mapper: typeof mapDataFrameRead;
39
+ readonly library: "utils";
40
+ readonly returnType: DataFrameType.DataFrame;
41
+ };
42
+ readonly 'read.csv2': {
43
+ readonly mapper: typeof mapDataFrameRead;
44
+ readonly library: "utils";
45
+ readonly returnType: DataFrameType.DataFrame;
46
+ };
47
+ readonly 'read.delim': {
48
+ readonly mapper: typeof mapDataFrameRead;
49
+ readonly library: "utils";
50
+ readonly returnType: DataFrameType.DataFrame;
51
+ };
52
+ readonly 'read.delim2': {
53
+ readonly mapper: typeof mapDataFrameRead;
54
+ readonly library: "utils";
55
+ readonly returnType: DataFrameType.DataFrame;
56
+ };
57
+ readonly read_table: {
58
+ readonly mapper: typeof mapDataFrameRead;
59
+ readonly library: "readr";
60
+ readonly returnType: DataFrameType.Tibble;
61
+ };
62
+ readonly read_csv: {
63
+ readonly mapper: typeof mapDataFrameRead;
64
+ readonly library: "readr";
65
+ readonly returnType: DataFrameType.Tibble;
66
+ };
67
+ readonly read_csv2: {
68
+ readonly mapper: typeof mapDataFrameRead;
69
+ readonly library: "readr";
70
+ readonly returnType: DataFrameType.Tibble;
71
+ };
72
+ readonly read_tsv: {
73
+ readonly mapper: typeof mapDataFrameRead;
74
+ readonly library: "readr";
75
+ readonly returnType: DataFrameType.Tibble;
76
+ };
77
+ readonly read_delim: {
78
+ readonly mapper: typeof mapDataFrameRead;
79
+ readonly library: "readr";
80
+ readonly returnType: DataFrameType.Tibble;
81
+ };
82
+ readonly cbind: {
83
+ readonly mapper: typeof mapDataFrameColBind;
84
+ readonly library: "base";
85
+ readonly returnType: DataFrameType.DataFrame;
86
+ };
87
+ readonly rbind: {
88
+ readonly mapper: typeof mapDataFrameRowBind;
89
+ readonly library: "base";
90
+ readonly returnType: DataFrameType.DataFrame;
91
+ };
92
+ readonly head: {
93
+ readonly mapper: typeof mapDataFrameHeadTail;
94
+ readonly library: "utils";
95
+ readonly returnType: DataFrameType.DataFrame;
96
+ };
97
+ readonly tail: {
98
+ readonly mapper: typeof mapDataFrameHeadTail;
99
+ readonly library: "utils";
100
+ readonly returnType: DataFrameType.DataFrame;
101
+ };
102
+ readonly subset: {
103
+ readonly mapper: typeof mapDataFrameSubset;
104
+ readonly library: "base";
105
+ readonly returnType: DataFrameType.DataFrame;
106
+ };
107
+ readonly filter: {
108
+ readonly mapper: typeof mapDataFrameFilter;
109
+ readonly library: "dplyr";
110
+ readonly returnType: DataFrameType.DataFrame;
111
+ };
112
+ readonly select: {
113
+ readonly mapper: typeof mapDataFrameSelect;
114
+ readonly library: "dplyr";
115
+ readonly returnType: DataFrameType.DataFrame;
116
+ };
117
+ readonly mutate: {
118
+ readonly mapper: typeof mapDataFrameMutate;
119
+ readonly library: "dplyr";
120
+ readonly returnType: DataFrameType.DataFrame;
121
+ };
122
+ readonly transform: {
123
+ readonly mapper: typeof mapDataFrameMutate;
124
+ readonly library: "base";
125
+ readonly returnType: DataFrameType.DataFrame;
126
+ };
127
+ readonly group_by: {
128
+ readonly mapper: typeof mapDataFrameGroupBy;
129
+ readonly library: "dplyr";
130
+ readonly returnType: DataFrameType.Tibble;
131
+ };
132
+ readonly summarise: {
133
+ readonly mapper: typeof mapDataFrameSummarize;
134
+ readonly library: "dplyr";
135
+ readonly returnType: DataFrameType.DataFrame;
136
+ };
137
+ readonly summarize: {
138
+ readonly mapper: typeof mapDataFrameSummarize;
139
+ readonly library: "dplyr";
140
+ readonly returnType: DataFrameType.DataFrame;
141
+ };
142
+ readonly inner_join: {
143
+ readonly mapper: typeof mapDataFrameJoin;
144
+ readonly library: "dplyr";
145
+ readonly returnType: DataFrameType.DataFrame;
146
+ };
147
+ readonly left_join: {
148
+ readonly mapper: typeof mapDataFrameJoin;
149
+ readonly library: "dplyr";
150
+ readonly returnType: DataFrameType.DataFrame;
151
+ };
152
+ readonly right_join: {
153
+ readonly mapper: typeof mapDataFrameJoin;
154
+ readonly library: "dplyr";
155
+ readonly returnType: DataFrameType.DataFrame;
156
+ };
157
+ readonly full_join: {
158
+ readonly mapper: typeof mapDataFrameJoin;
159
+ readonly library: "dplyr";
160
+ readonly returnType: DataFrameType.DataFrame;
161
+ };
162
+ readonly merge: {
163
+ readonly mapper: typeof mapDataFrameJoin;
164
+ readonly library: "base";
165
+ readonly returnType: DataFrameType.DataFrame;
166
+ };
167
+ readonly relocate: {
168
+ readonly mapper: typeof mapDataFrameIdentity;
169
+ readonly library: "dplyr";
170
+ readonly returnType: DataFrameType.DataFrame;
171
+ };
172
+ readonly arrange: {
173
+ readonly mapper: typeof mapDataFrameIdentity;
174
+ readonly library: "dplyr";
175
+ readonly returnType: DataFrameType.DataFrame;
176
+ };
177
+ };
178
+ /** All currently supported data frame functions */
179
+ type DataFrameFunction = keyof typeof DataFrameFunctionMapper;
180
+ /**
181
+ * Maps a concrete data frame function call to abstract data frame operations.
182
+ *
183
+ * @param node - The R node of the function call
184
+ * @param dfg - The data flow graph for resolving the arguments
185
+ * @param config - The flowR configuration to use
186
+ * @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame function call
187
+ */
188
+ export declare function mapDataFrameFunctionCall<Name extends DataFrameFunction>(node: RNode<ParentInformation>, dfg: DataflowGraph, config: FlowrConfigOptions): DataFrameExpressionInfo | undefined;
189
+ declare function mapDataFrameCreate(args: readonly RFunctionArgument<ParentInformation>[], params: {
190
+ checkNames: FunctionParameterLocation<boolean>;
191
+ noDupNames: FunctionParameterLocation<boolean>;
192
+ special: string[];
193
+ }, info: ResolveInfo): DataFrameOperation[];
194
+ declare function mapDataFrameConvert(args: readonly RFunctionArgument<ParentInformation>[], params: {
195
+ dataFrame: FunctionParameterLocation;
196
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
197
+ declare function mapDataFrameRead(args: readonly RFunctionArgument<ParentInformation>[], params: {
198
+ fileName: FunctionParameterLocation;
199
+ text?: FunctionParameterLocation;
200
+ header: FunctionParameterLocation<boolean>;
201
+ separator: FunctionParameterLocation<string>;
202
+ quote: FunctionParameterLocation<string>;
203
+ comment: FunctionParameterLocation<string>;
204
+ skipLines: FunctionParameterLocation<number>;
205
+ checkNames: FunctionParameterLocation<boolean>;
206
+ noDupNames: FunctionParameterLocation<boolean>;
207
+ noEmptyNames?: boolean;
208
+ }, info: ResolveInfo, config: FlowrConfigOptions): DataFrameOperation[];
209
+ declare function mapDataFrameColBind(args: readonly RFunctionArgument<ParentInformation>[], params: {
210
+ special: string[];
211
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
212
+ declare function mapDataFrameRowBind(args: readonly RFunctionArgument<ParentInformation>[], params: {
213
+ special: string[];
214
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
215
+ declare function mapDataFrameHeadTail(args: readonly RFunctionArgument<ParentInformation>[], params: {
216
+ dataFrame: FunctionParameterLocation;
217
+ amount: FunctionParameterLocation<number>;
218
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
219
+ declare function mapDataFrameSubset(args: readonly RFunctionArgument<ParentInformation>[], params: {
220
+ dataFrame: FunctionParameterLocation;
221
+ subset: FunctionParameterLocation;
222
+ select: FunctionParameterLocation;
223
+ drop: FunctionParameterLocation<boolean>;
224
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
225
+ declare function mapDataFrameFilter(args: readonly RFunctionArgument<ParentInformation>[], params: {
226
+ dataFrame: FunctionParameterLocation;
227
+ special: string[];
228
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
229
+ declare function mapDataFrameSelect(args: readonly RFunctionArgument<ParentInformation>[], params: {
230
+ dataFrame: FunctionParameterLocation;
231
+ special: string[];
232
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
233
+ declare function mapDataFrameMutate(args: readonly RFunctionArgument<ParentInformation>[], params: {
234
+ dataFrame: FunctionParameterLocation;
235
+ special: string[];
236
+ checkNames?: boolean;
237
+ noDupNames?: boolean;
238
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
239
+ declare function mapDataFrameGroupBy(args: readonly RFunctionArgument<ParentInformation>[], params: {
240
+ dataFrame: FunctionParameterLocation;
241
+ by: FunctionParameterLocation;
242
+ special: string[];
243
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
244
+ declare function mapDataFrameSummarize(args: readonly RFunctionArgument<ParentInformation>[], params: {
245
+ dataFrame: FunctionParameterLocation;
246
+ special: string[];
247
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
248
+ declare function mapDataFrameJoin(args: readonly RFunctionArgument<ParentInformation>[], params: {
249
+ dataFrame: FunctionParameterLocation;
250
+ otherDataFrame: FunctionParameterLocation;
251
+ by: FunctionParameterLocation;
252
+ joinAll: FunctionParameterLocation<boolean>;
253
+ joinLeft: FunctionParameterLocation<boolean>;
254
+ joinRight: FunctionParameterLocation<boolean>;
255
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
256
+ declare function mapDataFrameIdentity(args: readonly RFunctionArgument<ParentInformation>[], params: {
257
+ dataFrame: FunctionParameterLocation;
258
+ special: string[];
259
+ disallowNamedArgs?: boolean;
260
+ }, info: ResolveInfo): DataFrameOperation[] | undefined;
261
+ export {};