@eagleoutice/flowr 2.7.0 → 2.7.3

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 (168) hide show
  1. package/README.md +14 -14
  2. package/abstract-interpretation/absint-visitor.d.ts +160 -0
  3. package/abstract-interpretation/absint-visitor.js +279 -0
  4. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +2 -2
  5. package/abstract-interpretation/data-frame/dataframe-domain.js +23 -7
  6. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +6 -6
  7. package/abstract-interpretation/data-frame/mappers/access-mapper.js +10 -14
  8. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +15 -9
  9. package/abstract-interpretation/data-frame/mappers/arguments.js +27 -4
  10. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +17 -17
  11. package/abstract-interpretation/data-frame/mappers/function-mapper.js +55 -67
  12. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +7 -7
  13. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +25 -29
  14. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
  15. package/abstract-interpretation/data-frame/resolve-args.js +1 -1
  16. package/abstract-interpretation/data-frame/semantics.js +5 -6
  17. package/abstract-interpretation/data-frame/shape-inference.d.ts +52 -28
  18. package/abstract-interpretation/data-frame/shape-inference.js +67 -90
  19. package/abstract-interpretation/domains/bounded-set-domain.d.ts +2 -2
  20. package/abstract-interpretation/domains/interval-domain.d.ts +2 -2
  21. package/abstract-interpretation/domains/set-range-domain.d.ts +10 -4
  22. package/abstract-interpretation/domains/set-range-domain.js +7 -1
  23. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +2 -2
  24. package/abstract-interpretation/domains/singleton-domain.d.ts +2 -2
  25. package/benchmark/slicer.js +13 -14
  26. package/cli/common/options.d.ts +431 -8
  27. package/cli/common/options.js +1 -1
  28. package/cli/common/scripts-info.d.ts +431 -7
  29. package/cli/flowr-main-options.d.ts +102 -2
  30. package/cli/flowr.d.ts +102 -2
  31. package/cli/repl/commands/repl-commands.d.ts +25 -0
  32. package/cli/repl/commands/repl-query.js +17 -5
  33. package/cli/wiki.d.ts +13 -0
  34. package/cli/wiki.js +7 -2
  35. package/config.d.ts +4 -4
  36. package/config.js +1 -1
  37. package/control-flow/basic-cfg-guided-visitor.js +7 -8
  38. package/control-flow/control-flow-graph.d.ts +1 -1
  39. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  40. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  41. package/dataflow/eval/resolve/alias-tracking.js +1 -1
  42. package/dataflow/internal/linker.d.ts +2 -0
  43. package/dataflow/internal/linker.js +10 -12
  44. package/documentation/doc-capabilities.d.ts +1 -1
  45. package/documentation/doc-readme.d.ts +1 -1
  46. package/documentation/doc-util/doc-cfg.js +1 -1
  47. package/documentation/doc-util/doc-cli-option.d.ts +6 -6
  48. package/documentation/doc-util/doc-cli-option.js +3 -3
  49. package/documentation/doc-util/doc-dfg.d.ts +1 -1
  50. package/documentation/doc-util/doc-files.d.ts +3 -0
  51. package/documentation/doc-util/doc-files.js +4 -1
  52. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  53. package/documentation/issue-linting-rule.d.ts +1 -1
  54. package/documentation/wiki-analyzer.d.ts +1 -1
  55. package/documentation/wiki-cfg.d.ts +1 -1
  56. package/documentation/wiki-core.d.ts +1 -1
  57. package/documentation/wiki-dataflow-graph.d.ts +1 -1
  58. package/documentation/wiki-dataflow-graph.js +6 -6
  59. package/documentation/wiki-engine.d.ts +1 -1
  60. package/documentation/wiki-engine.js +9 -10
  61. package/documentation/wiki-faq.d.ts +1 -1
  62. package/documentation/wiki-interface.d.ts +1 -1
  63. package/documentation/wiki-interface.js +12 -13
  64. package/documentation/wiki-linter.d.ts +1 -1
  65. package/documentation/wiki-linting-and-testing.d.ts +1 -1
  66. package/documentation/wiki-mk/doc-context.d.ts +54 -1
  67. package/documentation/wiki-mk/doc-context.js +17 -0
  68. package/documentation/wiki-mk/doc-maker.d.ts +5 -5
  69. package/documentation/wiki-mk/doc-maker.js +3 -1
  70. package/documentation/wiki-normalized-ast.d.ts +1 -1
  71. package/documentation/wiki-onboarding.d.ts +1 -1
  72. package/documentation/wiki-overview.d.ts +9 -0
  73. package/documentation/wiki-overview.js +248 -0
  74. package/documentation/wiki-query.d.ts +1 -1
  75. package/documentation/wiki-query.js +17 -1
  76. package/documentation/wiki-search.d.ts +1 -1
  77. package/documentation/wiki-setup.d.ts +9 -0
  78. package/documentation/wiki-setup.js +122 -0
  79. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  80. package/linter/rules/dataframe-access-validation.js +8 -10
  81. package/linter/rules/unused-definition.js +1 -1
  82. package/package.json +1 -1
  83. package/project/context/flowr-analyzer-context.d.ts +4 -0
  84. package/project/context/flowr-analyzer-context.js +3 -1
  85. package/project/context/flowr-analyzer-dependencies-context.d.ts +3 -2
  86. package/project/context/flowr-analyzer-dependencies-context.js +4 -2
  87. package/project/context/flowr-analyzer-files-context.d.ts +9 -1
  88. package/project/context/flowr-analyzer-files-context.js +4 -0
  89. package/project/context/flowr-analyzer-functions-context.d.ts +29 -0
  90. package/project/context/flowr-analyzer-functions-context.js +68 -0
  91. package/project/context/flowr-file.d.ts +2 -0
  92. package/project/context/flowr-file.js +2 -0
  93. package/project/plugins/file-plugins/{flowr-description-file.d.ts → files/flowr-description-file.d.ts} +1 -1
  94. package/project/plugins/file-plugins/files/flowr-description-file.js +75 -0
  95. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +32 -0
  96. package/project/plugins/file-plugins/files/flowr-namespace-file.js +102 -0
  97. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +27 -0
  98. package/project/plugins/file-plugins/files/flowr-news-file.js +152 -0
  99. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  100. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  101. package/project/plugins/file-plugins/flowr-analyzer-namespace-file-plugin.d.ts +22 -0
  102. package/project/plugins/file-plugins/flowr-analyzer-namespace-file-plugin.js +34 -0
  103. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +23 -0
  104. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +35 -0
  105. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +1 -1
  106. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +1 -1
  107. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -1
  108. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +1 -1
  109. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +1 -1
  110. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +1 -1
  111. package/project/plugins/flowr-analyzer-plugin-defaults.js +4 -0
  112. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +5 -1
  113. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +10 -0
  114. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +56 -0
  115. package/project/plugins/package-version-plugins/package.d.ts +15 -2
  116. package/project/plugins/package-version-plugins/package.js +33 -5
  117. package/project/plugins/plugin-registry.d.ts +3 -1
  118. package/project/plugins/plugin-registry.js +4 -0
  119. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
  120. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -1
  121. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +2 -0
  122. package/queries/catalog/dependencies-query/dependencies-query-format.js +2 -1
  123. package/queries/catalog/df-shape-query/df-shape-query-executor.js +4 -2
  124. package/queries/catalog/files-query/files-query-executor.d.ts +6 -0
  125. package/queries/catalog/files-query/files-query-executor.js +49 -0
  126. package/queries/catalog/files-query/files-query-format.d.ts +36 -0
  127. package/queries/catalog/files-query/files-query-format.js +114 -0
  128. package/queries/catalog/linter-query/linter-query-format.js +1 -1
  129. package/queries/query.d.ts +10 -1
  130. package/queries/query.js +3 -1
  131. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -1
  132. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +8 -8
  133. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +8 -8
  134. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +0 -1
  135. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +0 -1
  136. package/statistics/features/supported/data-access/data-access.js +1 -1
  137. package/util/containers.js +1 -1
  138. package/util/files.d.ts +0 -7
  139. package/util/files.js +0 -41
  140. package/util/mermaid/ast.d.ts +3 -2
  141. package/util/mermaid/ast.js +13 -7
  142. package/util/mermaid/cfg.d.ts +3 -2
  143. package/util/mermaid/cfg.js +26 -6
  144. package/util/mermaid/dfg.d.ts +1 -7
  145. package/util/mermaid/dfg.js +7 -3
  146. package/util/mermaid/info.d.ts +17 -0
  147. package/util/mermaid/info.js +5 -0
  148. package/util/prefix.d.ts +9 -5
  149. package/util/prefix.js +14 -6
  150. package/util/r-regex.d.ts +21 -0
  151. package/util/r-regex.js +25 -0
  152. package/util/text/args.js +12 -3
  153. package/util/version.js +1 -1
  154. package/abstract-interpretation/data-frame/absint-info.d.ts +0 -109
  155. package/abstract-interpretation/data-frame/absint-info.js +0 -31
  156. package/abstract-interpretation/data-frame/absint-visitor.d.ts +0 -57
  157. package/abstract-interpretation/data-frame/absint-visitor.js +0 -176
  158. package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +0 -21
  159. package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +0 -34
  160. package/documentation/doc-util/doc-print.d.ts +0 -5
  161. package/documentation/doc-util/doc-print.js +0 -36
  162. package/project/plugins/file-plugins/flowr-description-file.js +0 -37
  163. package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
  164. package/project/plugins/file-plugins/notebooks/notebook.js +0 -2
  165. /package/project/plugins/file-plugins/{notebooks → files}/flowr-jupyter-file.d.ts +0 -0
  166. /package/project/plugins/file-plugins/{notebooks → files}/flowr-jupyter-file.js +0 -0
  167. /package/project/plugins/file-plugins/{notebooks → files}/flowr-rmarkdown-file.d.ts +0 -0
  168. /package/project/plugins/file-plugins/{notebooks → files}/flowr-rmarkdown-file.js +0 -0
@@ -15,31 +15,27 @@ const SpecialAccessArgumentsMapper = {
15
15
  '[[': ['exact']
16
16
  };
17
17
  /**
18
- * Maps a concrete data frame access to abstract data frame operations.
18
+ * Maps a concrete data frame access operation to abstract data frame operations.
19
19
  * @param node - The R node of the access
20
20
  * @param dfg - The data flow graph for resolving the arguments
21
- * @param ctx - The read-only Flowr analyzer context
22
- * @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame access
21
+ * @param ctx - The current flowR analyzer context
22
+ * @returns The mapped abstract data frame operations for the access operation, or `undefined` if the node does not represent a data frame access operation
23
23
  */
24
- function mapDataFrameAccess(node, dfg, ctx) {
24
+ function mapDataFrameAccess(node, inference, dfg, ctx) {
25
25
  if (node.type !== type_1.RType.Access) {
26
26
  return;
27
27
  }
28
28
  const resolveInfo = { graph: dfg, idMap: dfg.idMap, full: true, resolve: config_1.VariableResolve.Alias, ctx };
29
- let operations;
30
29
  if (isStringBasedAccess(node)) {
31
- operations = mapDataFrameNamedColumnAccess(node, resolveInfo);
30
+ return mapDataFrameNamedColumnAccess(node, inference, resolveInfo);
32
31
  }
33
32
  else {
34
- operations = mapDataFrameIndexColRowAccess(node, resolveInfo);
35
- }
36
- if (operations !== undefined) {
37
- return { type: 'expression', operations: operations };
33
+ return mapDataFrameIndexColRowAccess(node, inference, resolveInfo);
38
34
  }
39
35
  }
40
- function mapDataFrameNamedColumnAccess(access, info) {
36
+ function mapDataFrameNamedColumnAccess(access, inference, info) {
41
37
  const dataFrame = access.accessed;
42
- if (!(0, arguments_1.isDataFrameArgument)(dataFrame, info)) {
38
+ if (!(0, arguments_1.isDataFrameArgument)(dataFrame, inference)) {
43
39
  return;
44
40
  }
45
41
  const colname = (0, resolve_args_1.resolveIdToArgValueSymbolName)(access.access[0], info);
@@ -49,12 +45,12 @@ function mapDataFrameNamedColumnAccess(access, info) {
49
45
  columns: colname ? [colname] : undefined
50
46
  }];
51
47
  }
52
- function mapDataFrameIndexColRowAccess(access, info) {
48
+ function mapDataFrameIndexColRowAccess(access, inference, info) {
53
49
  const dataFrame = access.accessed;
54
50
  const drop = (0, arguments_1.getArgumentValue)(access.access, 'drop', info);
55
51
  const exact = (0, arguments_1.getArgumentValue)(access.access, 'exact', info);
56
52
  const args = getAccessArgs(access.operator, access.access);
57
- if (!(0, arguments_1.isDataFrameArgument)(dataFrame, info)) {
53
+ if (!(0, arguments_1.isDataFrameArgument)(dataFrame, inference)) {
58
54
  return;
59
55
  }
60
56
  else if (args.every(arg => arg === r_function_call_1.EmptyArgument)) {
@@ -6,7 +6,8 @@ import { type RFunctionArgument, type RFunctionCall, EmptyArgument } from '../..
6
6
  import type { RSymbol } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
7
7
  import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
8
8
  import { RNull } from '../../../r-bridge/lang-4.x/convert-values';
9
- import type { AbstractInterpretationInfo } from '../absint-info';
9
+ import type { RParseRequest } from '../../../r-bridge/retriever';
10
+ import type { DataFrameShapeInferenceVisitor } from '../shape-inference';
10
11
  /**
11
12
  * The location of a function parameter for mapping function call arguments to function parameters.
12
13
  * - `pos` contains the position of the function parameter (use `-1` for non-existent or non-positional arguments)
@@ -31,9 +32,10 @@ export declare function escapeRegExp(text: string, allowTokens?: boolean): strin
31
32
  * @param checkNames - Whether to map all invalid column names to top (`undefined`)
32
33
  * @param noDupNames - Whether to map all duplicate column names to top (`undefined`)
33
34
  * @param noEmptyNames - Whether to map all empty column names to top (`undefined`)
35
+ * @param collapseDups - Whether duplicate columns should be collapsed to single occurrences afterward (excluding `undefined` values)
34
36
  * @returns The filtered column names
35
37
  */
36
- export declare function filterValidNames(colnames: (string | undefined)[] | undefined, checkNames?: boolean, noDupNames?: boolean, noEmptyNames?: boolean): (string | undefined)[] | undefined;
38
+ export declare function filterValidNames(colnames: (string | undefined)[] | undefined, checkNames?: boolean, noDupNames?: boolean, noEmptyNames?: boolean, collapseDups?: boolean): (string | undefined)[] | undefined;
37
39
  /**
38
40
  * Gets the value of an argument that specified as {@link FunctionParameterLocation}.
39
41
  * @param args - The arguments to get the requested argument from
@@ -80,14 +82,14 @@ export declare function getUnresolvedSymbolsInExpression(expression: RNode<Paren
80
82
  */
81
83
  export declare function hasCriticalArgument(args: readonly RFunctionArgument<ParentInformation>[], critical: (FunctionParameterLocation<unknown> | string)[] | undefined, info: ResolveInfo): boolean;
82
84
  /**
83
- * Checks if a given argument has any data frame shape information and therefore may represent a data frame.
84
- * @param arg - The argument to check
85
- * @param info - Argument resolve information
86
- * @returns Whether the argument has any data frame shape information and may represent a data frame
85
+ * Checks if a given argument has an inferred data frame shape and therefore represents a data frame
86
+ * @param arg - The argument to check
87
+ * @param inference - The data frame shape inference visitor to use
88
+ * @returns Whether the argument represents a data frame
87
89
  */
88
- export declare function isDataFrameArgument(arg: RNode<ParentInformation> | undefined, info: ResolveInfo): arg is RNode<ParentInformation & Required<AbstractInterpretationInfo>>;
89
- export declare function isDataFrameArgument(arg: RFunctionArgument<ParentInformation> | undefined, info: ResolveInfo): arg is RArgument<ParentInformation & Required<AbstractInterpretationInfo>> & {
90
- value: RNode<ParentInformation & Required<AbstractInterpretationInfo>>;
90
+ export declare function isDataFrameArgument(arg: RNode<ParentInformation> | undefined, inference: DataFrameShapeInferenceVisitor): arg is RNode<ParentInformation>;
91
+ export declare function isDataFrameArgument(arg: RFunctionArgument<ParentInformation> | undefined, inference: DataFrameShapeInferenceVisitor): arg is RArgument<ParentInformation> & {
92
+ value: RNode<ParentInformation>;
91
93
  };
92
94
  /**
93
95
  * Checks whether a function argument is a names argument.
@@ -106,3 +108,7 @@ export declare function isRNull(node: RFunctionArgument<ParentInformation> | und
106
108
  * Checks whether a string is a valid columns name according to the flag `check.names` in R.
107
109
  */
108
110
  export declare function isValidColName(colname: string | undefined): boolean;
111
+ /**
112
+ * Parses a text of file parse request using the provided parser function.
113
+ */
114
+ export declare function parseRequestContent(request: RParseRequest, parser: (line: Buffer | string, lineNumber: number) => void, maxLines?: number): boolean;
@@ -12,16 +12,20 @@ exports.isDataFrameArgument = isDataFrameArgument;
12
12
  exports.isNamedArgument = isNamedArgument;
13
13
  exports.isRNull = isRNull;
14
14
  exports.isValidColName = isValidColName;
15
+ exports.parseRequestContent = parseRequestContent;
15
16
  const vertex_1 = require("../../../dataflow/graph/vertex");
16
17
  const make_argument_1 = require("../../../dataflow/internal/process/functions/call/argument/make-argument");
17
18
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
18
19
  const visitor_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/visitor");
19
20
  const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
20
21
  const convert_values_1 = require("../../../r-bridge/lang-4.x/convert-values");
22
+ const assert_1 = require("../../../util/assert");
23
+ const files_1 = require("../../../util/files");
21
24
  const resolve_args_1 = require("../resolve-args");
22
- const shape_inference_1 = require("../shape-inference");
23
25
  /** Regular expression representing valid columns names, e.g. for `data.frame` */
24
26
  const ColNamesRegex = /^[A-Za-z.][A-Za-z0-9_.]*$/;
27
+ /** Regular expression representing line terminations (LF, CRLF, CR) */
28
+ const LineTerminationRegex = /\r\n|\r|\n/;
25
29
  /**
26
30
  * Escapes a regular expression given as string by escaping all special regular expression characters.
27
31
  * @param text - The text to escape
@@ -42,9 +46,10 @@ function escapeRegExp(text, allowTokens = false) {
42
46
  * @param checkNames - Whether to map all invalid column names to top (`undefined`)
43
47
  * @param noDupNames - Whether to map all duplicate column names to top (`undefined`)
44
48
  * @param noEmptyNames - Whether to map all empty column names to top (`undefined`)
49
+ * @param collapseDups - Whether duplicate columns should be collapsed to single occurrences afterward (excluding `undefined` values)
45
50
  * @returns The filtered column names
46
51
  */
47
- function filterValidNames(colnames, checkNames, noDupNames, noEmptyNames) {
52
+ function filterValidNames(colnames, checkNames, noDupNames, noEmptyNames, collapseDups = false) {
48
53
  if (checkNames) { // map all invalid column names to top
49
54
  colnames = colnames?.map(entry => isValidColName(entry) ? entry : undefined);
50
55
  }
@@ -54,6 +59,9 @@ function filterValidNames(colnames, checkNames, noDupNames, noEmptyNames) {
54
59
  if (noEmptyNames) { // map all empty column names to top
55
60
  colnames = colnames?.map(entry => entry?.length === 0 ? undefined : entry);
56
61
  }
62
+ if (collapseDups) {
63
+ colnames = colnames?.filter((value, index, array) => value === undefined || array.indexOf(value) === index);
64
+ }
57
65
  return colnames;
58
66
  }
59
67
  /**
@@ -157,8 +165,8 @@ function hasCriticalArgument(args, critical, info) {
157
165
  }
158
166
  return false;
159
167
  }
160
- function isDataFrameArgument(arg, info) {
161
- return arg !== r_function_call_1.EmptyArgument && (0, shape_inference_1.resolveIdToDataFrameShape)(arg, info.graph) !== undefined;
168
+ function isDataFrameArgument(arg, inference) {
169
+ return arg !== r_function_call_1.EmptyArgument && inference.getAbstractValue(arg) !== undefined;
162
170
  }
163
171
  /**
164
172
  * Checks whether a function argument is a names argument.
@@ -178,4 +186,19 @@ function isRNull(node) {
178
186
  function isValidColName(colname) {
179
187
  return colname !== undefined && ColNamesRegex.test(colname);
180
188
  }
189
+ /**
190
+ * Parses a text of file parse request using the provided parser function.
191
+ */
192
+ function parseRequestContent(request, parser, maxLines) {
193
+ const requestType = request.request;
194
+ switch (requestType) {
195
+ case 'text':
196
+ (0, resolve_args_1.unescapeSpecialChars)(request.content).split(LineTerminationRegex).forEach(parser);
197
+ return true;
198
+ case 'file':
199
+ return (0, files_1.readLineByLineSync)(request.content, parser, maxLines);
200
+ default:
201
+ (0, assert_1.assertUnreachable)(requestType);
202
+ }
203
+ }
181
204
  //# sourceMappingURL=arguments.js.map
@@ -4,7 +4,7 @@ import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flow
4
4
  import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model';
5
5
  import { type RFunctionArgument } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
6
6
  import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
- import type { DataFrameExpressionInfo, DataFrameOperation } from '../absint-info';
7
+ import type { DataFrameOperations, DataFrameShapeInferenceVisitor } from '../shape-inference';
8
8
  import { type FunctionParameterLocation } from './arguments';
9
9
  /**
10
10
  * Represents the different types of data frames in R
@@ -182,17 +182,17 @@ type DataFrameFunction = keyof typeof DataFrameFunctionMapper;
182
182
  * @param node - The R node of the function call
183
183
  * @param dfg - The data flow graph for resolving the arguments
184
184
  * @param ctx - The current flowR analyzer context
185
- * @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
185
+ * @returns The mapped abstract data frame operations for the function call, or `undefined` if the node does not represent a data frame function call
186
186
  */
187
- export declare function mapDataFrameFunctionCall<Name extends DataFrameFunction>(node: RNode<ParentInformation>, dfg: DataflowGraph, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameExpressionInfo | undefined;
187
+ export declare function mapDataFrameFunctionCall<Name extends DataFrameFunction>(node: RNode<ParentInformation>, inference: DataFrameShapeInferenceVisitor, dfg: DataflowGraph, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperations;
188
188
  declare function mapDataFrameCreate(args: readonly RFunctionArgument<ParentInformation>[], params: {
189
189
  checkNames: FunctionParameterLocation<boolean>;
190
190
  noDupNames: FunctionParameterLocation<boolean>;
191
191
  special: string[];
192
- }, info: ResolveInfo): DataFrameOperation[];
192
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
193
193
  declare function mapDataFrameConvert(args: readonly RFunctionArgument<ParentInformation>[], params: {
194
194
  dataFrame: FunctionParameterLocation;
195
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
195
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
196
196
  declare function mapDataFrameRead(args: readonly RFunctionArgument<ParentInformation>[], params: {
197
197
  fileName: FunctionParameterLocation;
198
198
  text?: FunctionParameterLocation;
@@ -204,46 +204,46 @@ declare function mapDataFrameRead(args: readonly RFunctionArgument<ParentInforma
204
204
  checkNames: FunctionParameterLocation<boolean>;
205
205
  noDupNames: FunctionParameterLocation<boolean>;
206
206
  noEmptyNames?: boolean;
207
- }, info: ResolveInfo, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperation[];
207
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
208
208
  declare function mapDataFrameColBind(args: readonly RFunctionArgument<ParentInformation>[], params: {
209
209
  special: string[];
210
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
210
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
211
211
  declare function mapDataFrameRowBind(args: readonly RFunctionArgument<ParentInformation>[], params: {
212
212
  special: string[];
213
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
213
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
214
214
  declare function mapDataFrameHeadTail(args: readonly RFunctionArgument<ParentInformation>[], params: {
215
215
  dataFrame: FunctionParameterLocation;
216
216
  amount: FunctionParameterLocation<number>;
217
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
217
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
218
218
  declare function mapDataFrameSubset(args: readonly RFunctionArgument<ParentInformation>[], params: {
219
219
  dataFrame: FunctionParameterLocation;
220
220
  subset: FunctionParameterLocation;
221
221
  select: FunctionParameterLocation;
222
222
  drop: FunctionParameterLocation<boolean>;
223
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
223
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
224
224
  declare function mapDataFrameFilter(args: readonly RFunctionArgument<ParentInformation>[], params: {
225
225
  dataFrame: FunctionParameterLocation;
226
226
  special: string[];
227
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
227
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
228
228
  declare function mapDataFrameSelect(args: readonly RFunctionArgument<ParentInformation>[], params: {
229
229
  dataFrame: FunctionParameterLocation;
230
230
  special: string[];
231
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
231
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
232
232
  declare function mapDataFrameMutate(args: readonly RFunctionArgument<ParentInformation>[], params: {
233
233
  dataFrame: FunctionParameterLocation;
234
234
  special: string[];
235
235
  checkNames?: boolean;
236
236
  noDupNames?: boolean;
237
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
237
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
238
238
  declare function mapDataFrameGroupBy(args: readonly RFunctionArgument<ParentInformation>[], params: {
239
239
  dataFrame: FunctionParameterLocation;
240
240
  by: FunctionParameterLocation;
241
241
  special: string[];
242
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
242
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
243
243
  declare function mapDataFrameSummarize(args: readonly RFunctionArgument<ParentInformation>[], params: {
244
244
  dataFrame: FunctionParameterLocation;
245
245
  special: string[];
246
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
246
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
247
247
  declare function mapDataFrameJoin(args: readonly RFunctionArgument<ParentInformation>[], params: {
248
248
  dataFrame: FunctionParameterLocation;
249
249
  otherDataFrame: FunctionParameterLocation;
@@ -251,10 +251,10 @@ declare function mapDataFrameJoin(args: readonly RFunctionArgument<ParentInforma
251
251
  joinAll: FunctionParameterLocation<boolean>;
252
252
  joinLeft: FunctionParameterLocation<boolean>;
253
253
  joinRight: FunctionParameterLocation<boolean>;
254
- }, info: ResolveInfo, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperation[] | undefined;
254
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
255
255
  declare function mapDataFrameIdentity(args: readonly RFunctionArgument<ParentInformation>[], params: {
256
256
  dataFrame: FunctionParameterLocation;
257
257
  special: string[];
258
258
  disallowNamedArgs?: boolean;
259
- }, info: ResolveInfo): DataFrameOperation[] | undefined;
259
+ }, inference: DataFrameShapeInferenceVisitor, info: ResolveInfo): DataFrameOperations;
260
260
  export {};