@eagleoutice/flowr 2.13.14 → 2.13.15

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 (131) hide show
  1. package/README.md +23 -23
  2. package/abstract-interpretation/data-frame/resolve-args.js +11 -12
  3. package/benchmark/summarizer/second-phase/graph.d.ts +23 -0
  4. package/benchmark/summarizer/second-phase/graph.js +47 -14
  5. package/cli/repl/commands/repl-cfg.js +2 -42
  6. package/cli/repl/commands/repl-clipboard.d.ts +7 -0
  7. package/cli/repl/commands/repl-clipboard.js +53 -0
  8. package/cli/repl/commands/repl-dataflow.js +5 -70
  9. package/cli/repl/commands/repl-normalize.js +3 -51
  10. package/control-flow/cfg-dead-code.js +5 -29
  11. package/control-flow/diff-cfg.js +2 -56
  12. package/control-flow/semantic-cfg-guided-visitor.d.ts +7 -0
  13. package/control-flow/semantic-cfg-guided-visitor.js +14 -0
  14. package/control-flow/useless-loop.js +4 -26
  15. package/core/steps/all/core/10-normalize.d.ts +8 -0
  16. package/core/steps/all/core/10-normalize.js +10 -8
  17. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +5 -7
  18. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -9
  19. package/data/r-base-packages.generated.d.ts +1 -0
  20. package/data/r-base-packages.generated.js +5 -3
  21. package/dataflow/environments/built-in-config.d.ts +9 -1
  22. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  23. package/dataflow/environments/built-in-proc-name.js +2 -0
  24. package/dataflow/environments/built-in-props.d.ts +4 -0
  25. package/dataflow/environments/built-in-props.js +3 -3
  26. package/dataflow/environments/built-in.d.ts +4 -2
  27. package/dataflow/environments/built-in.js +53 -3
  28. package/dataflow/environments/data-masking-functions.d.ts +3 -4
  29. package/dataflow/environments/data-masking-functions.js +7 -8
  30. package/dataflow/environments/default-builtin-config.d.ts +92 -12
  31. package/dataflow/environments/default-builtin-config.js +86 -43
  32. package/dataflow/environments/environment.d.ts +5 -0
  33. package/dataflow/environments/environment.js +17 -12
  34. package/dataflow/environments/identifier.d.ts +3 -0
  35. package/dataflow/eval/resolve/alias-tracking.js +4 -7
  36. package/dataflow/eval/resolve/node-value.d.ts +51 -0
  37. package/dataflow/eval/resolve/node-value.js +71 -0
  38. package/dataflow/eval/resolve/resolve-argument.js +10 -7
  39. package/dataflow/eval/resolve/resolve-operators.js +1 -2
  40. package/dataflow/eval/values/general.d.ts +4 -0
  41. package/dataflow/eval/values/general.js +11 -0
  42. package/dataflow/eval/values/r-value.d.ts +15 -0
  43. package/dataflow/eval/values/r-value.js +27 -1
  44. package/dataflow/extractor.js +2 -0
  45. package/dataflow/fn/higher-order-function.js +2 -3
  46. package/dataflow/graph/diff-dataflow-graph.js +3 -55
  47. package/dataflow/graph/graph.d.ts +5 -0
  48. package/dataflow/graph/graph.js +27 -0
  49. package/dataflow/internal/linker.d.ts +23 -0
  50. package/dataflow/internal/linker.js +70 -1
  51. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +4 -1
  52. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +2 -0
  53. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +8 -29
  54. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +39 -6
  55. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +10 -22
  56. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +29 -53
  57. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -5
  58. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +7 -7
  59. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -3
  60. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +19 -12
  61. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +2 -1
  62. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +3 -0
  63. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +69 -52
  64. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
  65. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +2 -8
  66. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -8
  67. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +2 -2
  68. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -2
  69. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +5 -0
  70. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +23 -3
  71. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +5 -4
  72. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +7 -10
  73. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +6 -1
  74. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +20 -3
  75. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -8
  76. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +25 -0
  77. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +105 -0
  78. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +1 -27
  79. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +4 -5
  80. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +1 -1
  81. package/dataflow/internal/process/functions/call/deferred.d.ts +41 -0
  82. package/dataflow/internal/process/functions/call/deferred.js +127 -0
  83. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +13 -12
  84. package/dataflow/internal/process/functions/call/known-call-handling.js +35 -35
  85. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -1
  86. package/dataflow/internal/process/functions/call/named-call-handling.js +8 -4
  87. package/dataflow/internal/process/functions/call/nse.d.ts +28 -0
  88. package/dataflow/internal/process/functions/call/nse.js +87 -0
  89. package/dataflow/internal/process/functions/call/quoted.d.ts +29 -0
  90. package/dataflow/internal/process/functions/call/quoted.js +188 -0
  91. package/documentation/doc-util/doc-types.js +15 -9
  92. package/linter/rules/deprecated-functions.js +9 -3
  93. package/linter/rules/seeded-randomness.js +2 -3
  94. package/linter/rules/undefined-symbol.js +10 -1
  95. package/package.json +1 -1
  96. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +6 -0
  97. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +17 -1
  98. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +2 -11
  99. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +3 -15
  100. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +16 -0
  101. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +26 -0
  102. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +2 -11
  103. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +3 -15
  104. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +4 -10
  105. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +2 -9
  106. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +2 -9
  107. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +1 -1
  108. package/project/sigdb/reader.d.ts +9 -0
  109. package/project/sigdb/reader.js +30 -0
  110. package/queries/catalog/input-sources-query/input-sources-query-format.js +1 -1
  111. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -12
  112. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -37
  113. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -23
  114. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +2 -2
  115. package/queries/query-function-filter.d.ts +21 -0
  116. package/queries/query-function-filter.js +48 -0
  117. package/r-bridge/data/data.d.ts +13 -3
  118. package/r-bridge/data/data.js +15 -3
  119. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +2 -0
  120. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +4 -0
  121. package/search/flowr-search-filters.d.ts +5 -1
  122. package/search/flowr-search-filters.js +31 -21
  123. package/search/search-executor/search-enrichers.d.ts +24 -4
  124. package/search/search-executor/search-enrichers.js +22 -9
  125. package/search/search-executor/search-transformer.js +1 -1
  126. package/util/diff-graph.d.ts +13 -0
  127. package/util/diff-graph.js +64 -1
  128. package/util/files.js +9 -8
  129. package/util/r-base-packages.d.ts +2 -0
  130. package/util/r-base-packages.js +3 -1
  131. package/util/version.js +1 -1
@@ -21,7 +21,7 @@ export interface ProcessKnownFunctionCallInput<OtherInfo> extends ForceArguments
21
21
  readonly data: DataflowProcessorInformation<OtherInfo & ParentInformation>;
22
22
  /** should arguments be processed from right to left? This does not affect the order recorded in the call but of the environments */
23
23
  readonly reverseOrder?: boolean;
24
- /** which arguments are to be marked as {@link EdgeType#NonStandardEvaluation|non-standard-evaluation}? */
24
+ /** which arguments are {@link NseKind.Reevaluated|reevaluated}, like a loop body */
25
25
  readonly markAsNSE?: readonly number[];
26
26
  /** allows passing a data processor in-between each argument */
27
27
  readonly patchData?: (data: DataflowProcessorInformation<OtherInfo & ParentInformation>, arg: number) => DataflowProcessorInformation<OtherInfo & ParentInformation>;
@@ -65,20 +65,21 @@ export declare enum NseKind {
65
65
  /** the argument is not evaluated at all (`quote(x + y)`), so nothing within it is */
66
66
  Quoted = "quoted",
67
67
  /** the argument is evaluated in a data mask (`subset(d, a > k)`), where only its symbols may name columns */
68
- DataMasked = "data-masked"
68
+ DataMasked = "data-masked",
69
+ /** evaluated, just not exactly once (a loop body), so only the argument itself is marked */
70
+ Reevaluated = "reevaluated"
71
+ }
72
+ export interface NseMarkOptions {
73
+ readonly kind?: NseKind;
74
+ /** ids an unquote escape splices back in, see {@link Nse.unquoted} */
75
+ readonly evaluated?: ReadonlySet<NodeId>;
69
76
  }
70
77
  /**
71
- * Marks the selected arguments as {@link EdgeType.NonStandardEvaluation}, so they are recognised as not being
72
- * evaluated the standard way. A {@link NseKind.Quoted|quoted} argument is marked entirely, as none of it is
73
- * evaluated. A {@link NseKind.DataMasked|data-masked} one is evaluated in the caller's frame, with only the
74
- * names the mask supplies (those that resolve to nothing else) taken from the data, so only those are marked.
75
- * Besides the {@link NseArguments} shorthands, the positions may be listed explicitly, `undefined` marks nothing.
76
- */
77
- export declare function markArgumentsAsNonStandardEvaluation(graph: DataflowGraph, rootId: NodeId, processedArguments: readonly (DataflowInformation | undefined)[], which: NseArguments | readonly number[] | undefined, kind?: NseKind): void;
78
- /**
79
- * Marks the given arguments as being involved in R's non-standard evaluation.
78
+ * Marks the selected arguments as {@link EdgeType.NonStandardEvaluation}: a {@link NseKind.Quoted|quoted} one
79
+ * entirely, a {@link NseKind.DataMasked|data-masked} one only where {@link Nse.suppliedByMask} holds, and a
80
+ * {@link NseKind.Reevaluated|reevaluated} one as a whole but not within.
80
81
  */
81
- export declare function markNonStandardEvaluationEdges(markAsNSE: readonly number[], callArgs: readonly (DataflowInformation | undefined)[], finalGraph: DataflowGraph, rootId: NodeId): void;
82
+ export declare function markArgumentsAsNonStandardEvaluation(graph: DataflowGraph, rootId: NodeId, processedArguments: readonly (DataflowInformation | undefined)[], which: NseArguments | readonly number[] | undefined, { kind, evaluated }?: NseMarkOptions): void;
82
83
  /**
83
84
  * The main processor for function calls for which we know the target but need not
84
85
  * add any specific handling.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NseKind = exports.NseArguments = void 0;
4
4
  exports.markArgumentsAsNonStandardEvaluation = markArgumentsAsNonStandardEvaluation;
5
- exports.markNonStandardEvaluationEdges = markNonStandardEvaluationEdges;
6
5
  exports.processKnownFunctionCall = processKnownFunctionCall;
7
6
  const processor_1 = require("../../../../processor");
8
7
  const common_1 = require("./common");
@@ -13,6 +12,7 @@ const logger_1 = require("../../../../logger");
13
12
  const vertex_1 = require("../../../../graph/vertex");
14
13
  const unknown_side_effect_1 = require("../../../../graph/unknown-side-effect");
15
14
  const built_in_proc_name_1 = require("../../../../environments/built-in-proc-name");
15
+ const nse_1 = require("./nse");
16
16
  /**
17
17
  * Which arguments of a call {@link markArgumentsAsNonStandardEvaluation|are non-standardly evaluated}:
18
18
  * every argument, all but the (data) first one, or only the first one.
@@ -36,48 +36,50 @@ var NseKind;
36
36
  NseKind["Quoted"] = "quoted";
37
37
  /** the argument is evaluated in a data mask (`subset(d, a > k)`), where only its symbols may name columns */
38
38
  NseKind["DataMasked"] = "data-masked";
39
+ /** evaluated, just not exactly once (a loop body), so only the argument itself is marked */
40
+ NseKind["Reevaluated"] = "reevaluated";
39
41
  })(NseKind || (exports.NseKind = NseKind = {}));
40
42
  /**
41
- * Marks the selected arguments as {@link EdgeType.NonStandardEvaluation}, so they are recognised as not being
42
- * evaluated the standard way. A {@link NseKind.Quoted|quoted} argument is marked entirely, as none of it is
43
- * evaluated. A {@link NseKind.DataMasked|data-masked} one is evaluated in the caller's frame, with only the
44
- * names the mask supplies (those that resolve to nothing else) taken from the data, so only those are marked.
45
- * Besides the {@link NseArguments} shorthands, the positions may be listed explicitly, `undefined` marks nothing.
43
+ * Marks the selected arguments as {@link EdgeType.NonStandardEvaluation}: a {@link NseKind.Quoted|quoted} one
44
+ * entirely, a {@link NseKind.DataMasked|data-masked} one only where {@link Nse.suppliedByMask} holds, and a
45
+ * {@link NseKind.Reevaluated|reevaluated} one as a whole but not within.
46
46
  */
47
- function markArgumentsAsNonStandardEvaluation(graph, rootId, processedArguments, which, kind = NseKind.Quoted) {
47
+ function markArgumentsAsNonStandardEvaluation(graph, rootId, processedArguments, which, { kind = NseKind.Quoted, evaluated } = {}) {
48
48
  if (which === undefined) {
49
49
  return;
50
50
  }
51
- const end = which === NseArguments.First ? 1 : processedArguments.length;
52
- for (let i = which === NseArguments.AllButFirst ? 1 : 0; i < end; i++) {
53
- const arg = processedArguments[i];
54
- if (arg === undefined || (typeof which !== 'string' && !which.includes(i))) {
55
- continue;
56
- }
57
- if (kind === NseKind.Quoted) {
58
- graph.addEdge(rootId, arg.entryPoint, edge_1.EdgeType.NonStandardEvaluation);
59
- }
60
- for (const [vtx, info] of arg.graph.vertices(true)) {
61
- /* a masked name the caller does not bind is the one the data supplies */
62
- if (kind === NseKind.Quoted || (vertex_1.UseVertex.is(info) && !arg.graph.outgoingEdges(vtx)?.values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.Reads)))) {
63
- graph.addEdge(rootId, vtx, edge_1.EdgeType.NonStandardEvaluation);
51
+ if (typeof which !== 'string') {
52
+ for (const i of which) {
53
+ if (i < processedArguments.length) {
54
+ markArgument(graph, rootId, processedArguments[i], kind, evaluated);
55
+ }
56
+ else {
57
+ logger_1.dataflowLogger.warn(`Trying to mark argument ${i} as non-standard-evaluation, but only ${processedArguments.length} arguments are available`);
64
58
  }
65
59
  }
60
+ return;
61
+ }
62
+ const end = which === NseArguments.First ? 1 : processedArguments.length;
63
+ for (let i = which === NseArguments.AllButFirst ? 1 : 0; i < end; i++) {
64
+ markArgument(graph, rootId, processedArguments[i], kind, evaluated);
66
65
  }
67
66
  }
68
- /**
69
- * Marks the given arguments as being involved in R's non-standard evaluation.
70
- */
71
- function markNonStandardEvaluationEdges(markAsNSE, callArgs, finalGraph, rootId) {
72
- for (const nse of markAsNSE) {
73
- if (nse < callArgs.length) {
74
- const arg = callArgs[nse];
75
- if (arg !== undefined) {
76
- finalGraph.addEdge(rootId, arg.entryPoint, edge_1.EdgeType.NonStandardEvaluation);
77
- }
67
+ function markArgument(graph, rootId, arg, kind, evaluated) {
68
+ if (arg === undefined) {
69
+ return;
70
+ }
71
+ if (kind !== NseKind.DataMasked) {
72
+ graph.addEdge(rootId, arg.entryPoint, edge_1.EdgeType.NonStandardEvaluation);
73
+ }
74
+ if (kind === NseKind.Reevaluated) {
75
+ return;
76
+ }
77
+ for (const [vtx, info] of arg.graph.vertices(true)) {
78
+ if (evaluated?.has(vtx)) {
79
+ continue;
78
80
  }
79
- else {
80
- logger_1.dataflowLogger.warn(`Trying to mark argument ${nse} as non-standard-evaluation, but only ${callArgs.length} arguments are available`);
81
+ if (kind === NseKind.Quoted || nse_1.Nse.suppliedByMask(arg.graph, vtx, info)) {
82
+ graph.addEdge(rootId, vtx, edge_1.EdgeType.NonStandardEvaluation);
81
83
  }
82
84
  }
83
85
  }
@@ -91,9 +93,7 @@ function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = fal
91
93
  const functionCallName = name.content;
92
94
  const processArgs = reverseOrder ? args.toReversed() : args;
93
95
  const { finalEnv, callArgs, remainingReadInArgs, processedArguments } = (0, common_1.processAllArguments)({ functionName, args: processArgs, data, finalGraph, functionRootId: rootId, patchData, forceArgs });
94
- if (markAsNSE) {
95
- markNonStandardEvaluationEdges(markAsNSE, processedArguments, finalGraph, rootId);
96
- }
96
+ markArgumentsAsNonStandardEvaluation(finalGraph, rootId, processedArguments, markAsNSE, { kind: NseKind.Reevaluated });
97
97
  const onlyBuiltin = data.builtInNoEnv === rootId;
98
98
  finalGraph.addVertex({
99
99
  tag: vertex_1.VertexType.FunctionCall,
@@ -8,7 +8,7 @@ import type { DataflowGraph } from '../../../../graph/graph';
8
8
  /**
9
9
  * Marks the given function call node as only calling built-in functions.
10
10
  */
11
- export declare function markAsOnlyBuiltIn(graph: DataflowGraph, rootId: NodeId): void;
11
+ export declare function markAsOnlyBuiltIn(graph: DataflowGraph, rootId: NodeId, keepEnvironment?: boolean): void;
12
12
  /**
13
13
  * Processes a named function call within the dataflow analysis.
14
14
  * For example, `myFunction(arg1, arg2)`, resolves against the environment.
@@ -30,11 +30,13 @@ function mergeInformation(info, newInfo) {
30
30
  /**
31
31
  * Marks the given function call node as only calling built-in functions.
32
32
  */
33
- function markAsOnlyBuiltIn(graph, rootId) {
33
+ function markAsOnlyBuiltIn(graph, rootId, keepEnvironment = false) {
34
34
  const v = graph.getVertex(rootId);
35
35
  if (v?.tag === vertex_1.VertexType.FunctionCall) {
36
36
  v.onlyBuiltin = true;
37
- v.environment = undefined;
37
+ if (!keepEnvironment) {
38
+ v.environment = undefined;
39
+ }
38
40
  }
39
41
  }
40
42
  /**
@@ -44,8 +46,10 @@ function markAsOnlyBuiltIn(graph, rootId) {
44
46
  function processNamedCall(name, args, rootId, data) {
45
47
  const resolved = (0, resolve_by_name_1.resolveByName)(name.content, data.environment, identifier_1.ReferenceType.Function) ?? [];
46
48
  let defaultProcessor = resolved.length === 0;
49
+ /* a call whose meaning a later pass looks up in its environment has to keep it */
50
+ const keepEnvironment = resolved.some(r => r.type === identifier_1.ReferenceType.BuiltInFunction && r.config?.keepEnvironment === true);
47
51
  /* if this call will be marked as built-in only (see below), its vertex needs no environment snapshot */
48
- if (resolved.length > 0
52
+ if (resolved.length > 0 && !keepEnvironment
49
53
  && resolved.every(r => r.type === identifier_1.ReferenceType.BuiltInFunction && typeof r.processor === 'function')
50
54
  && resolved.some(r => r.type === identifier_1.ReferenceType.BuiltInFunction && r.config?.libFn !== true)) {
51
55
  data = { ...data, builtInNoEnv: rootId };
@@ -68,7 +72,7 @@ function processNamedCall(name, args, rootId, data) {
68
72
  }
69
73
  else if (information && builtIn) {
70
74
  // mark the function call as built in only
71
- markAsOnlyBuiltIn(information.graph, rootId);
75
+ markAsOnlyBuiltIn(information.graph, rootId, keepEnvironment);
72
76
  }
73
77
  // on demand: materialize the built-in vertex for any package export this call resolves to and, when we
74
78
  // already know the loading call here, link to it (a function-local export is invisible to the later
@@ -0,0 +1,28 @@
1
+ import { RNode } from '../../../../../r-bridge/lang-4.x/ast/model/model';
2
+ import type { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
3
+ import type { ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
4
+ import { Identifier } from '../../../../environments/identifier';
5
+ import type { DataflowGraph } from '../../../../graph/graph';
6
+ import { type DataflowGraphVertexInfo } from '../../../../graph/vertex';
7
+ /** The escape a quoting function offers, a property of the function: `quote(!!x)` negates, `expr(!!x)` splices. */
8
+ export declare enum Unquote {
9
+ /** no escape at all, everything within the argument stays unevaluated */
10
+ None = "none",
11
+ /** rlang's `!!` and `!!!` splice in the value of their operand */
12
+ Rlang = "rlang",
13
+ /** `bquote`'s `.(x)` evaluates its operand */
14
+ Bquote = "bquote"
15
+ }
16
+ /** The parts of a call R does not evaluate the standard way. */
17
+ export declare const Nse: {
18
+ /** The ids an {@link Unquote} escape hands back to standard evaluation, the markers themselves excluded. */
19
+ readonly unquoted: <Info extends ParentInformation>(this: void, root: RNode<Info> | undefined, style: Unquote) => ReadonlySet<NodeId> | undefined;
20
+ /** Whether everything below `node` is unquoted. */
21
+ readonly isUnquote: <Info>(this: void, node: RNode<Info>, style: Unquote) => boolean;
22
+ /** Drops the mask mark from names the caller binds: while `filter(d, k)` is processed `k` has no read yet. */
23
+ readonly dropResolvedMask: (this: void, graph: DataflowGraph, id: NodeId, name: Identifier) => void;
24
+ /** Drops the non-standard-evaluation mark from the outgoing edges of `id` that `which` accepts. */
25
+ readonly unmark: (this: void, graph: DataflowGraph, id: NodeId, which?: (target: NodeId) => boolean) => void;
26
+ /** Whether `id` is a name the data mask supplies, i.e. a use the caller does not bind itself. */
27
+ readonly suppliedByMask: (this: void, graph: DataflowGraph, id: NodeId, vertex?: DataflowGraphVertexInfo | undefined) => boolean;
28
+ };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Nse = exports.Unquote = void 0;
4
+ const model_1 = require("../../../../../r-bridge/lang-4.x/ast/model/model");
5
+ const r_unary_op_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-unary-op");
6
+ const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
7
+ const identifier_1 = require("../../../../environments/identifier");
8
+ const data_masking_functions_1 = require("../../../../environments/data-masking-functions");
9
+ const vertex_1 = require("../../../../graph/vertex");
10
+ const edge_1 = require("../../../../graph/edge");
11
+ /** The escape a quoting function offers, a property of the function: `quote(!!x)` negates, `expr(!!x)` splices. */
12
+ var Unquote;
13
+ (function (Unquote) {
14
+ /** no escape at all, everything within the argument stays unevaluated */
15
+ Unquote["None"] = "none";
16
+ /** rlang's `!!` and `!!!` splice in the value of their operand */
17
+ Unquote["Rlang"] = "rlang";
18
+ /** `bquote`'s `.(x)` evaluates its operand */
19
+ Unquote["Bquote"] = "bquote";
20
+ })(Unquote || (exports.Unquote = Unquote = {}));
21
+ /** `!!x` parses as `!(!x)`, so peel the run of `!` to reach the operand. */
22
+ function unquotedOperandOf(node, style) {
23
+ if (style === Unquote.Bquote) {
24
+ if (!r_function_call_1.RFunctionCall.isNamed(node) || identifier_1.Identifier.getName(node.functionName.content) !== '.' || node.arguments.length !== 1) {
25
+ return undefined;
26
+ }
27
+ const arg = node.arguments[0];
28
+ return arg === r_function_call_1.EmptyArgument ? undefined : arg.value;
29
+ }
30
+ if (!isNegation(node) || !isNegation(node.operand)) {
31
+ return undefined;
32
+ }
33
+ let operand = node.operand;
34
+ while (isNegation(operand)) {
35
+ operand = operand.operand;
36
+ }
37
+ return operand;
38
+ }
39
+ function isNegation(node) {
40
+ return r_unary_op_1.RUnaryOp.is(node) && node.operator === '!';
41
+ }
42
+ /** The parts of a call R does not evaluate the standard way. */
43
+ exports.Nse = {
44
+ /** The ids an {@link Unquote} escape hands back to standard evaluation, the markers themselves excluded. */
45
+ unquoted(root, style) {
46
+ if (root === undefined || style === Unquote.None) {
47
+ return undefined;
48
+ }
49
+ const evaluated = new Set();
50
+ model_1.RNode.visitAst(root, node => {
51
+ const operand = unquotedOperandOf(node, style);
52
+ if (operand === undefined) {
53
+ return false;
54
+ }
55
+ model_1.RNode.visitAst(operand, inner => {
56
+ evaluated.add(inner.info.id);
57
+ return false;
58
+ });
59
+ return true;
60
+ });
61
+ return evaluated.size > 0 ? evaluated : undefined;
62
+ },
63
+ /** Whether everything below `node` is unquoted. */
64
+ isUnquote(node, style) {
65
+ return style !== Unquote.None && unquotedOperandOf(node, style) !== undefined;
66
+ },
67
+ /** Drops the mask mark from names the caller binds: while `filter(d, k)` is processed `k` has no read yet. */
68
+ dropResolvedMask(graph, id, name) {
69
+ if (data_masking_functions_1.DataMaskingFunctionNames.has(identifier_1.Identifier.getName(name))) {
70
+ exports.Nse.unmark(graph, id, target => !exports.Nse.suppliedByMask(graph, target));
71
+ }
72
+ },
73
+ /** Drops the non-standard-evaluation mark from the outgoing edges of `id` that `which` accepts. */
74
+ unmark(graph, id, which = () => true) {
75
+ const edges = graph.outgoingEdges(id);
76
+ for (const [target, edge] of [...edges ?? []]) {
77
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.NonStandardEvaluation) && which(target)) {
78
+ graph.removeEdgeType(id, target, edge_1.EdgeType.NonStandardEvaluation);
79
+ }
80
+ }
81
+ },
82
+ /** Whether `id` is a name the data mask supplies, i.e. a use the caller does not bind itself. */
83
+ suppliedByMask(graph, id, vertex = graph.getVertex(id)) {
84
+ return vertex_1.UseVertex.is(vertex) && !graph.outgoingEdges(id)?.values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.Reads));
85
+ }
86
+ };
87
+ //# sourceMappingURL=nse.js.map
@@ -0,0 +1,29 @@
1
+ import type { ControlFlowGraph } from '../../../../../control-flow/control-flow-graph';
2
+ import type { AstIdMap, ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
3
+ import { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
4
+ import type { DataflowGraph } from '../../../../graph/graph';
5
+ import { linkExpressionIn } from '../../../linker';
6
+ /**
7
+ * A language object reads nothing where it is written and everything where it reaches `eval`, with the bindings
8
+ * in effect there. Working on the finished graph makes assignments, branches, loops, and calls one traversal.
9
+ */
10
+ export declare const Quoted: {
11
+ /** The expression a capturing call holds on to. */
12
+ readonly capturedBy: (this: void, graph: DataflowGraph, id: NodeId) => NodeId | undefined;
13
+ /** Every expression the value at `id` may hold, with the call that captured it. Several is normal. */
14
+ readonly sourcesOf: (this: void, graph: DataflowGraph, id: NodeId) => readonly CapturedExpression[];
15
+ /** Links every name in `expr` against `environment` and hands back what stays unresolved. */
16
+ readonly evaluateIn: typeof linkExpressionIn;
17
+ /**
18
+ * The finishing pass over a complete graph: it settles what a call really evaluates, which the call itself
19
+ * could not know. A capture reaches the `eval` that forces it, a promise reaches the bindings it may be
20
+ * forced against, and a masked name the caller binds after all loses its mark.
21
+ */
22
+ readonly finalize: <Info>(this: void, graph: DataflowGraph, idMap: AstIdMap<Info & ParentInformation>, controlFlow: () => ControlFlowGraph | undefined) => void;
23
+ };
24
+ interface CapturedExpression {
25
+ readonly expr: NodeId;
26
+ /** the capturing call, whose scope encloses `expr` */
27
+ readonly at: NodeId;
28
+ }
29
+ export {};
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Quoted = void 0;
4
+ const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
5
+ const type_1 = require("../../../../../r-bridge/lang-4.x/ast/model/type");
6
+ const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
7
+ const identifier_1 = require("../../../../environments/identifier");
8
+ const built_in_proc_name_1 = require("../../../../environments/built-in-proc-name");
9
+ const edge_1 = require("../../../../graph/edge");
10
+ const graph_1 = require("../../../../graph/graph");
11
+ const vertex_1 = require("../../../../graph/vertex");
12
+ const linker_1 = require("../../../linker");
13
+ const nse_1 = require("./nse");
14
+ const deferred_1 = require("./deferred");
15
+ /** Calls capturing a language object. */
16
+ const CapturingProcessors = [built_in_proc_name_1.BuiltInProcName.Quote];
17
+ /** Calls capturing an expression as a promise, forced at some later read of the variable they bind. */
18
+ const DelayingCalls = new Set(['delayedAssign']);
19
+ /** Calls evaluating one. */
20
+ const EvaluatingProcessors = [built_in_proc_name_1.BuiltInProcName.Eval];
21
+ /** How a value reaches its use, `DefinedByOnCall` being the hop from a parameter to its argument. */
22
+ const ValueFlow = edge_1.EdgeType.Reads | edge_1.EdgeType.DefinedBy | edge_1.EdgeType.DefinedByOnCall | edge_1.EdgeType.Returns;
23
+ function hasOrigin(vertex, of) {
24
+ return vertex.origin !== 'unnamed' && vertex.origin.some(o => of.includes(o));
25
+ }
26
+ /**
27
+ * A language object reads nothing where it is written and everything where it reaches `eval`, with the bindings
28
+ * in effect there. Working on the finished graph makes assignments, branches, loops, and calls one traversal.
29
+ */
30
+ exports.Quoted = {
31
+ /** The expression a capturing call holds on to. */
32
+ capturedBy(graph, id) {
33
+ const vertex = graph.getVertex(id);
34
+ return vertex_1.FunctionCallVertex.is(vertex) && hasOrigin(vertex, CapturingProcessors) ? capturedArgumentOf(graph, id) : undefined;
35
+ },
36
+ /** Every expression the value at `id` may hold, with the call that captured it. Several is normal. */
37
+ sourcesOf(graph, id) {
38
+ const found = [];
39
+ const seen = new Set([id]);
40
+ const pending = [id];
41
+ while (pending.length > 0) {
42
+ const current = pending.pop();
43
+ const captured = exports.Quoted.capturedBy(graph, current);
44
+ if (captured !== undefined) {
45
+ found.push({ expr: captured, at: current });
46
+ continue;
47
+ }
48
+ for (const [target, edge] of graph.outgoingEdges(current) ?? []) {
49
+ if (edge_1.DfEdge.includesType(edge, ValueFlow) && !seen.has(target)) {
50
+ seen.add(target);
51
+ pending.push(target);
52
+ }
53
+ }
54
+ }
55
+ return found;
56
+ },
57
+ /** Links every name in `expr` against `environment` and hands back what stays unresolved. */
58
+ evaluateIn: linker_1.linkExpressionIn,
59
+ /**
60
+ * The finishing pass over a complete graph: it settles what a call really evaluates, which the call itself
61
+ * could not know. A capture reaches the `eval` that forces it, a promise reaches the bindings it may be
62
+ * forced against, and a masked name the caller binds after all loses its mark.
63
+ */
64
+ finalize(graph, idMap, controlFlow) {
65
+ let names = undefined;
66
+ let cfg = null;
67
+ const cfgOnce = () => (cfg === null ? (cfg = controlFlow()) : cfg);
68
+ for (const [id, vertex] of graph.verticesOfType(vertex_1.VertexType.FunctionCall)) {
69
+ nse_1.Nse.dropResolvedMask(graph, id, vertex.name);
70
+ if (DelayingCalls.has(identifier_1.Identifier.getName(vertex.name))) {
71
+ const promise = capturedArgumentOf(graph, id);
72
+ const binding = promise === undefined ? undefined : boundBy(graph, id);
73
+ if (promise !== undefined) {
74
+ names ??= deferred_1.Deferred.indexOf(graph, idMap);
75
+ const flow = binding === undefined ? undefined : cfgOnce();
76
+ const sites = flow === undefined || binding === undefined ? undefined : deferred_1.Deferred.forcedAt(graph, binding, flow);
77
+ deferred_1.Deferred.link(graph, promise, names, idMap, flow !== undefined && sites?.length && binding !== undefined ? { cfg: flow, sites, binding } : undefined);
78
+ }
79
+ }
80
+ else if (vertex.environment !== undefined && hasOrigin(vertex, EvaluatingProcessors) && !evaluatesElsewhere(idMap.get(id))) {
81
+ resolveEvaluation(graph, vertex, vertex.environment, idMap);
82
+ }
83
+ else {
84
+ for (const escaped of escapingArguments(graph, id)) {
85
+ names ??= deferred_1.Deferred.indexOf(graph, idMap);
86
+ deferred_1.Deferred.link(graph, escaped, names, idMap);
87
+ }
88
+ }
89
+ }
90
+ }
91
+ };
92
+ /** The name a delaying call binds, which is the definition its reads have to go through. */
93
+ function boundBy(graph, id) {
94
+ for (const [target, edge] of graph.ingoingEdges(id) ?? []) {
95
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.DefinedBy) && vertex_1.VariableDefinitionVertex.is(graph.getVertex(target))) {
96
+ return target;
97
+ }
98
+ }
99
+ return undefined;
100
+ }
101
+ /** The argument a call takes but does not evaluate, which is the one it captured. */
102
+ function capturedArgumentOf(graph, id) {
103
+ for (const [target, edge] of graph.outgoingEdges(id) ?? []) {
104
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Argument) && edge_1.DfEdge.includesType(edge, edge_1.EdgeType.NonStandardEvaluation)) {
105
+ return target;
106
+ }
107
+ }
108
+ return undefined;
109
+ }
110
+ /** Links a capture handed to an evaluating call, in that call's scope. */
111
+ function resolveEvaluation(graph, call, environment, idMap) {
112
+ const id = call.id;
113
+ const argument = call.args.find(a => !graph_1.FunctionArgument.isEmpty(a));
114
+ const reference = argument === undefined ? undefined : unwrapArgument(graph_1.FunctionArgument.getReference(argument), idMap);
115
+ const sources = reference === undefined ? [] : exports.Quoted.sourcesOf(graph, reference);
116
+ for (const { expr, at } of sources) {
117
+ const open = (0, linker_1.linkExpressionIn)(graph, expr, environment, idMap);
118
+ /* R falls through to the enclosing scope for names the evaluating frame does not bind */
119
+ const enclosing = open.length > 0 ? graph.getVertex(at)?.environment : undefined;
120
+ if (enclosing !== undefined) {
121
+ (0, linker_1.linkInputs)(open, enclosing, [], graph, false);
122
+ }
123
+ graph.addEdge(id, expr, edge_1.EdgeType.Returns);
124
+ /* the capture said "not evaluated here", and being handed to `eval` settles that it is */
125
+ nse_1.Nse.unmark(graph, at);
126
+ }
127
+ if (sources.length > 0) {
128
+ forgetUnknownSideEffect(graph, id);
129
+ }
130
+ }
131
+ /**
132
+ * The arguments of `id` whose promise outlives the call: the callee hands back a closure and never reads the
133
+ * parameter outside it, so R forces them wherever that closure is called, not here. A parameter read in the
134
+ * body itself (what `force` is for) is settled during the call and stays where it is.
135
+ */
136
+ function* escapingArguments(graph, id) {
137
+ for (const [target, edge] of graph.outgoingEdges(id) ?? []) {
138
+ if (!edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Calls)) {
139
+ continue;
140
+ }
141
+ const callee = graph.getVertex(target);
142
+ if (callee?.tag !== vertex_1.VertexType.FunctionDefinition) {
143
+ continue;
144
+ }
145
+ for (const exit of callee.exitPoints) {
146
+ const closure = graph.getVertex(exit.nodeId);
147
+ if (closure?.tag !== vertex_1.VertexType.FunctionDefinition) {
148
+ continue;
149
+ }
150
+ for (const key of Object.keys(callee.params)) {
151
+ const parameter = node_id_1.NodeId.normalize(key);
152
+ let escapes = true;
153
+ for (const [reader, edge] of graph.ingoingEdges(parameter) ?? []) {
154
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Reads) && !closure.subflow.graph.has(reader)) {
155
+ escapes = false;
156
+ break;
157
+ }
158
+ }
159
+ if (!escapes) {
160
+ continue;
161
+ }
162
+ for (const [argument, edge] of graph.outgoingEdges(parameter) ?? []) {
163
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.DefinedByOnCall)) {
164
+ yield argument;
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ /** The value an argument reference points at. */
172
+ function unwrapArgument(reference, idMap) {
173
+ const node = reference === undefined ? undefined : idMap.get(reference);
174
+ return node?.type === type_1.RType.Argument ? node.value?.info.id : reference;
175
+ }
176
+ /** `eval(expr, envir)` runs elsewhere, so the bindings here say nothing. */
177
+ function evaluatesElsewhere(call) {
178
+ return r_function_call_1.RFunctionCall.isNamed(call) && call.arguments.length > 1;
179
+ }
180
+ /** Drops the marker the call carries while we cannot say what it evaluates. */
181
+ function forgetUnknownSideEffect(graph, id) {
182
+ for (const unknown of graph.unknownSideEffects) {
183
+ if (graph_1.UnknownSideEffect.id(unknown) === id) {
184
+ graph.unknownSideEffects.delete(unknown);
185
+ }
186
+ }
187
+ }
188
+ //# sourceMappingURL=quoted.js.map
@@ -209,6 +209,16 @@ function followTypeReference(type, sourceFile) {
209
209
  }
210
210
  return [nodeLexeme, baseLexeme, ...args];
211
211
  }
212
+ /** The base types a declaration extends or implements, with their generics dropped. */
213
+ function heritageTypeNames(node, sourceFile) {
214
+ return node.heritageClauses?.flatMap(clause => clause.types
215
+ .map(type => type.getText(sourceFile) ?? '')
216
+ .map(dropGenericsFromTypeName)) ?? [];
217
+ }
218
+ /** The names of the type parameters a declaration takes. */
219
+ function genericNames(node, sourceFile) {
220
+ return node.typeParameters?.map(param => param.getText(sourceFile) ?? '') ?? [];
221
+ }
212
222
  function collectHierarchyInformation(sourceFiles, options) {
213
223
  const hierarchyList = [];
214
224
  const typeChecker = options.program.getTypeChecker();
@@ -218,10 +228,8 @@ function collectHierarchyInformation(sourceFiles, options) {
218
228
  }
219
229
  if (typescript_1.default.isInterfaceDeclaration(node)) {
220
230
  const interfaceName = node.name?.getText(sourceFile) ?? '';
221
- const baseTypes = node.heritageClauses?.flatMap(clause => clause.types
222
- .map(type => type.getText(sourceFile) ?? '')
223
- .map(dropGenericsFromTypeName)) ?? [];
224
- const generics = node.typeParameters?.map(param => param.getText(sourceFile) ?? '') ?? [];
231
+ const baseTypes = heritageTypeNames(node, sourceFile);
232
+ const generics = genericNames(node, sourceFile);
225
233
  hierarchyList.push({
226
234
  name: dropGenericsFromTypeName(interfaceName),
227
235
  node,
@@ -246,7 +254,7 @@ function collectHierarchyInformation(sourceFiles, options) {
246
254
  else if (typescript_1.default.isTypeReferenceNode(node.type)) {
247
255
  baseTypes = followTypeReference(node.type, sourceFile).map(dropGenericsFromTypeName);
248
256
  }
249
- const generics = node.typeParameters?.map(param => param.getText(sourceFile) ?? '') ?? [];
257
+ const generics = genericNames(node, sourceFile);
250
258
  hierarchyList.push({
251
259
  name: dropGenericsFromTypeName(typeName),
252
260
  node,
@@ -288,10 +296,8 @@ function collectHierarchyInformation(sourceFiles, options) {
288
296
  }
289
297
  else if (typescript_1.default.isClassDeclaration(node)) {
290
298
  const className = node.name?.getText(sourceFile) ?? '';
291
- const baseTypes = node.heritageClauses?.flatMap(clause => clause.types
292
- .map(type => type.getText(sourceFile) ?? '')
293
- .map(dropGenericsFromTypeName)) ?? [];
294
- const generics = node.typeParameters?.map(param => param.getText(sourceFile) ?? '') ?? [];
299
+ const baseTypes = heritageTypeNames(node, sourceFile);
300
+ const generics = genericNames(node, sourceFile);
295
301
  hierarchyList.push({
296
302
  name: dropGenericsFromTypeName(className),
297
303
  node,
@@ -29,6 +29,7 @@ exports.DEPRECATED_FUNCTIONS = {
29
29
  // even when it is not part of the hardcoded `fns` list above
30
30
  const graph = (await data.dataflow()).graph;
31
31
  const alreadyFlagged = new Set(hardcoded.results.map(r => r.involvedId));
32
+ const deprecatedByName = new Map();
32
33
  const sigdbFlagged = [];
33
34
  for (const element of elements.getElements()) {
34
35
  const id = element.node.info.id;
@@ -39,8 +40,13 @@ exports.DEPRECATED_FUNCTIONS = {
39
40
  if (qualified === undefined) {
40
41
  continue;
41
42
  }
42
- const fn = deps.signatureOf(qualified);
43
- if (fn === undefined || !fn.props.includes('deprecated')) {
43
+ const name = identifier_1.Identifier.toString(qualified);
44
+ let deprecated = deprecatedByName.get(name);
45
+ if (deprecated === undefined) {
46
+ deprecated = deps.signatureOf(qualified)?.props.includes('deprecated') === true;
47
+ deprecatedByName.set(name, deprecated);
48
+ }
49
+ if (!deprecated) {
44
50
  continue;
45
51
  }
46
52
  const loc = range_1.SourceLocation.fromNode(element.node);
@@ -51,7 +57,7 @@ exports.DEPRECATED_FUNCTIONS = {
51
57
  sigdbFlagged.push({
52
58
  certainty: linter_format_1.LintingResultCertainty.Certain,
53
59
  involvedId: id,
54
- function: identifier_1.Identifier.toString(qualified),
60
+ function: name,
55
61
  loc
56
62
  });
57
63
  }
@@ -12,8 +12,7 @@ const graph_1 = require("../../dataflow/graph/graph");
12
12
  const cascade_action_1 = require("../../queries/catalog/call-context-query/cascade-action");
13
13
  const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
14
14
  const linter_tags_1 = require("../linter-tags");
15
- const alias_tracking_1 = require("../../dataflow/eval/resolve/alias-tracking");
16
- const general_1 = require("../../dataflow/eval/values/general");
15
+ const node_value_1 = require("../../dataflow/eval/resolve/node-value");
17
16
  const config_1 = require("../../config");
18
17
  const vertex_1 = require("../../dataflow/graph/vertex");
19
18
  const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
@@ -162,7 +161,7 @@ function getDefaultAssignments() {
162
161
  }
163
162
  function isConstantArgument(graph, call, argIndex, ctx) {
164
163
  const args = call.args.filter(arg => arg !== r_function_call_1.EmptyArgument && !arg.name).map(graph_1.FunctionArgument.getReference);
165
- const values = (0, general_1.valueSetGuard)((0, alias_tracking_1.resolveIdToValue)(args[argIndex], { graph: graph, resolve: config_1.VariableResolve.Alias, ctx }));
164
+ const values = node_value_1.NodeValue.inGraph.setOf(args[argIndex], graph, ctx, { resolve: config_1.VariableResolve.Alias });
166
165
  return values?.elements.every(v => v.type === 'number' ||
167
166
  v.type === 'logical' ||
168
167
  v.type === 'string' ||