@eagleoutice/flowr 2.13.16 → 2.14.1

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 (253) hide show
  1. package/README.md +36 -25
  2. package/abstract-interpretation/absint-visitor.js +1 -1
  3. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  4. package/abstract-interpretation/data-frame/mappers/arguments.js +7 -4
  5. package/abstract-interpretation/data-frame/mappers/function-mapper.js +18 -17
  6. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +6 -6
  7. package/abstract-interpretation/data-frame/resolve-args.d.ts +9 -4
  8. package/abstract-interpretation/data-frame/resolve-args.js +10 -5
  9. package/benchmark/calibration.d.ts +16 -7
  10. package/benchmark/calibration.js +44 -17
  11. package/benchmark/slicer.d.ts +3 -2
  12. package/benchmark/slicer.js +9 -5
  13. package/benchmark/stats/size-of.js +1 -1
  14. package/benchmark/summarizer/first-phase/process.d.ts +2 -0
  15. package/benchmark/summarizer/first-phase/process.js +2 -0
  16. package/cli/benchmark-app.js +4 -1
  17. package/cli/benchmark-helper-app.d.ts +1 -0
  18. package/cli/benchmark-helper-app.js +2 -2
  19. package/cli/common/options.d.ts +5 -31
  20. package/cli/common/options.js +2 -8
  21. package/cli/common/scripts-info.d.ts +5 -38
  22. package/cli/common/scripts-info.js +0 -8
  23. package/cli/repl/core.js +1 -1
  24. package/cli/repl/execute.d.ts +2 -2
  25. package/cli/repl/execute.js +2 -2
  26. package/cli/repl/parser/slice-query-parser.js +1 -1
  27. package/cli/repl/print-version.js +2 -2
  28. package/config.d.ts +16 -0
  29. package/config.js +83 -5
  30. package/control-flow/extract-cfg.js +1 -1
  31. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  32. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  33. package/control-flow/useless-loop.js +1 -1
  34. package/core/print/slice-diff-ansi.js +1 -1
  35. package/core/steps/pipeline/create-pipeline.js +1 -1
  36. package/dataflow/cluster.js +2 -2
  37. package/dataflow/environments/apply-kill.js +1 -1
  38. package/dataflow/environments/built-in-props.d.ts +13 -2
  39. package/dataflow/environments/built-in-props.js +23 -1
  40. package/dataflow/environments/built-in.d.ts +7 -1
  41. package/dataflow/environments/built-in.js +42 -3
  42. package/dataflow/environments/default-builtin-config.d.ts +518 -11
  43. package/dataflow/environments/default-builtin-config.js +218 -23
  44. package/dataflow/environments/environment.d.ts +10 -2
  45. package/dataflow/environments/environment.js +25 -7
  46. package/dataflow/environments/identifier.d.ts +8 -2
  47. package/dataflow/environments/identifier.js +6 -1
  48. package/dataflow/environments/query-fn-props.d.ts +6 -0
  49. package/dataflow/environments/query-fn-props.js +22 -2
  50. package/dataflow/environments/reference-to-maybe.js +5 -5
  51. package/dataflow/environments/resolve-by-name.d.ts +3 -0
  52. package/dataflow/environments/resolve-by-name.js +44 -7
  53. package/dataflow/environments/resolve-helper.d.ts +6 -0
  54. package/dataflow/environments/resolve-helper.js +6 -0
  55. package/dataflow/eval/resolve/alias-tracking.d.ts +5 -0
  56. package/dataflow/eval/resolve/alias-tracking.js +21 -14
  57. package/dataflow/eval/resolve/node-value.d.ts +6 -0
  58. package/dataflow/eval/resolve/node-value.js +15 -9
  59. package/dataflow/eval/resolve/resolve-argument.js +2 -2
  60. package/dataflow/eval/resolve/resolve-numbers.js +2 -2
  61. package/dataflow/eval/resolve/resolve-operators.js +5 -4
  62. package/dataflow/eval/resolve/resolve-strings.js +3 -3
  63. package/dataflow/eval/resolve/resolve-working-directory.d.ts +1 -1
  64. package/dataflow/eval/resolve/resolve-working-directory.js +3 -3
  65. package/dataflow/eval/resolve/resolve.d.ts +5 -5
  66. package/dataflow/eval/resolve/resolve.js +10 -11
  67. package/dataflow/eval/values/general.d.ts +4 -1
  68. package/dataflow/eval/values/general.js +1 -1
  69. package/dataflow/extractor.js +2 -1
  70. package/dataflow/fn/exceptions-of-function.d.ts +3 -1
  71. package/dataflow/fn/exceptions-of-function.js +87 -39
  72. package/dataflow/fn/higher-order-function.js +5 -4
  73. package/dataflow/fn/strict-function.d.ts +40 -0
  74. package/dataflow/fn/strict-function.js +337 -0
  75. package/dataflow/graph/call-graph.js +14 -14
  76. package/dataflow/graph/df-helper.d.ts +24 -1
  77. package/dataflow/graph/df-helper.js +29 -7
  78. package/dataflow/graph/diff-dataflow-graph.js +6 -6
  79. package/dataflow/graph/edge.d.ts +27 -0
  80. package/dataflow/graph/edge.js +33 -0
  81. package/dataflow/graph/graph-helper.d.ts +3 -4
  82. package/dataflow/graph/graph-helper.js +4 -5
  83. package/dataflow/graph/graph.d.ts +39 -3
  84. package/dataflow/graph/graph.js +75 -7
  85. package/dataflow/graph/vertex.d.ts +42 -6
  86. package/dataflow/graph/vertex.js +42 -6
  87. package/dataflow/info.d.ts +26 -0
  88. package/dataflow/info.js +28 -1
  89. package/dataflow/internal/linker.d.ts +1 -0
  90. package/dataflow/internal/linker.js +11 -9
  91. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -2
  92. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  93. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -5
  94. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +2 -2
  95. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -7
  96. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -6
  97. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -0
  98. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +19 -18
  99. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +6 -1
  100. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  101. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -2
  102. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -2
  103. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +5 -5
  104. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +1 -1
  105. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -3
  106. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -3
  107. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -0
  108. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +29 -3
  109. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  110. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +1 -1
  111. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +3 -3
  112. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +3 -1
  113. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +44 -20
  114. package/dataflow/internal/process/functions/call/common.d.ts +9 -1
  115. package/dataflow/internal/process/functions/call/common.js +17 -6
  116. package/dataflow/internal/process/functions/call/deferred.js +2 -1
  117. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +3 -1
  118. package/dataflow/internal/process/functions/call/known-call-handling.js +6 -3
  119. package/dataflow/internal/process/functions/call/named-call-handling.js +44 -12
  120. package/dataflow/internal/process/functions/call/nse.d.ts +33 -5
  121. package/dataflow/internal/process/functions/call/nse.js +113 -6
  122. package/dataflow/internal/process/functions/call/quoted.d.ts +5 -0
  123. package/dataflow/internal/process/functions/call/quoted.js +21 -9
  124. package/dataflow/origin/dfg-get-origin.d.ts +1 -0
  125. package/dataflow/origin/dfg-get-origin.js +9 -6
  126. package/documentation/data/faq/faqs.js +88 -88
  127. package/documentation/data/faq/recommended-configs.js +1 -1
  128. package/documentation/data/faq/wiki-faq-store.js +1 -1
  129. package/documentation/doc-capabilities.js +1 -1
  130. package/documentation/doc-readme.js +1 -1
  131. package/documentation/doc-util/doc-auto-gen.js +6 -2
  132. package/documentation/doc-util/doc-functions.js +1 -1
  133. package/documentation/wiki-cfg.js +2 -2
  134. package/documentation/wiki-core.js +1 -1
  135. package/documentation/wiki-create-linting-rules.js +45 -45
  136. package/documentation/wiki-dataflow-graph.js +18 -18
  137. package/documentation/wiki-linter.js +1 -0
  138. package/documentation/wiki-linting-and-testing.js +93 -5
  139. package/documentation/wiki-mk/doc-maker.js +1 -1
  140. package/documentation/wiki-overview.js +12 -1
  141. package/documentation/wiki-query.js +53 -0
  142. package/documentation/wiki-signature-database.js +3 -0
  143. package/linter/linter-output.js +1 -1
  144. package/linter/linter-rules.d.ts +24 -0
  145. package/linter/linter-rules.js +3 -1
  146. package/linter/rules/file-path-validity.js +1 -1
  147. package/linter/rules/function-finder-util.js +1 -1
  148. package/linter/rules/naming-convention.js +1 -1
  149. package/linter/rules/network-functions.d.ts +1 -1
  150. package/linter/rules/no-leaked-credentials.js +2 -1
  151. package/linter/rules/stop-with-call-arg.js +4 -4
  152. package/linter/rules/unclosed-connection.d.ts +44 -0
  153. package/linter/rules/unclosed-connection.js +200 -0
  154. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  155. package/linter/rules/undefined-symbol-util.js +5 -4
  156. package/linter/rules/undefined-symbol.js +3 -3
  157. package/linter/rules/unused-definition.js +2 -1
  158. package/package.json +38 -51
  159. package/project/context/flowr-analyzer-environment-context.d.ts +23 -0
  160. package/project/context/flowr-analyzer-environment-context.js +25 -0
  161. package/project/dependency-version-space.d.ts +3 -3
  162. package/project/dependency-version-space.js +3 -4
  163. package/project/flowr-analyzer.js +1 -1
  164. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
  165. package/project/plugins/file-plugins/files/flowr-description-file.js +1 -1
  166. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
  167. package/project/plugins/file-plugins/files/flowr-namespace-file.js +1 -1
  168. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +1 -1
  169. package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
  170. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +1 -1
  171. package/project/plugins/file-plugins/files/flowr-rda-file.js +4 -4
  172. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +5 -5
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +36 -7
  175. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  176. package/project/sigdb/build.js +16 -16
  177. package/project/sigdb/codec.d.ts +1 -1
  178. package/project/sigdb/codec.js +13 -13
  179. package/project/sigdb/decompress.d.ts +1 -1
  180. package/project/sigdb/decompress.js +33 -33
  181. package/project/sigdb/index-format.js +2 -2
  182. package/project/sigdb/manifest.d.ts +3 -1
  183. package/project/sigdb/manifest.js +68 -27
  184. package/project/sigdb/memory-source.d.ts +64 -0
  185. package/project/sigdb/memory-source.js +133 -0
  186. package/project/sigdb/reader.js +14 -14
  187. package/project/sigdb/schema.d.ts +2 -2
  188. package/project/sigdb/schema.js +2 -2
  189. package/queries/catalog/call-context-query/call-context-query-executor.js +1 -1
  190. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -2
  191. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  192. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  193. package/queries/catalog/dependencies-query/link-devices.js +3 -9
  194. package/queries/catalog/does-call-query/does-call-query-executor.js +2 -1
  195. package/queries/catalog/input-sources-query/simple-input-classifier.js +4 -4
  196. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -1
  197. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -0
  198. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +6 -0
  199. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +25 -0
  200. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +31 -0
  201. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +56 -0
  202. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  203. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  204. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -0
  205. package/queries/catalog/signature-query/signature-query-executor.js +3 -2
  206. package/queries/catalog/slice-query-options.d.ts +1 -1
  207. package/queries/catalog/slice-query-options.js +1 -1
  208. package/queries/query-function-filter.d.ts +8 -2
  209. package/queries/query-function-filter.js +11 -1
  210. package/queries/query.d.ts +11 -1
  211. package/queries/query.js +2 -0
  212. package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
  213. package/r-bridge/lang-4.x/ast/model/model.js +4 -4
  214. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +3 -3
  215. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +1 -1
  216. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -1
  217. package/r-bridge/retriever.d.ts +2 -1
  218. package/r-bridge/retriever.js +3 -2
  219. package/r-bridge/roxygen2/documentation-provider.d.ts +1 -0
  220. package/r-bridge/roxygen2/documentation-provider.js +1 -0
  221. package/r-bridge/roxygen2/roxygen-parse.d.ts +1 -1
  222. package/r-bridge/roxygen2/roxygen-parse.js +1 -1
  223. package/search/flowr-search-filters.d.ts +1 -1
  224. package/search/flowr-search-filters.js +2 -14
  225. package/search/search-executor/search-enrichers.js +4 -4
  226. package/search/search-executor/search-generators.js +1 -1
  227. package/slicing/criterion/parse.d.ts +2 -2
  228. package/slicing/criterion/parse.js +5 -5
  229. package/slicing/static/fingerprint.js +1 -1
  230. package/slicing/static/slice-call.d.ts +1 -1
  231. package/slicing/static/slice-call.js +2 -2
  232. package/slicing/static/static-slicer.js +4 -3
  233. package/util/assert.js +1 -1
  234. package/util/log.d.ts +4 -1
  235. package/util/log.js +15 -2
  236. package/util/logic.js +2 -2
  237. package/util/mermaid/cfg.js +1 -1
  238. package/util/mermaid/dfg.js +6 -6
  239. package/util/mermaid/mermaid.js +3 -1
  240. package/util/objects.d.ts +12 -0
  241. package/util/objects.js +48 -0
  242. package/util/quads.js +19 -6
  243. package/util/schema.js +2 -2
  244. package/util/simple-df/dfg-ascii.js +14 -3
  245. package/util/text/ansi.d.ts +2 -0
  246. package/util/text/ansi.js +8 -0
  247. package/util/text/name-rank.d.ts +29 -0
  248. package/util/text/name-rank.js +39 -0
  249. package/util/text/url-encoding.d.ts +15 -0
  250. package/util/text/url-encoding.js +59 -0
  251. package/util/version.js +1 -1
  252. package/cli/export-quads-app.d.ts +0 -7
  253. package/cli/export-quads-app.js +0 -44
@@ -107,6 +107,39 @@ exports.DfEdge = {
107
107
  doesNotIncludeType({ types }, any) {
108
108
  return (any & types) === 0;
109
109
  },
110
+ /**
111
+ * Whether the edge carries any type at all.
112
+ * Counterpart of {@link DfEdge#hasNoType}.
113
+ * @example
114
+ *
115
+ * ```ts
116
+ * DfEdge.hasAnyType({ types: EdgeType.Reads }) // true
117
+ * DfEdge.hasAnyType({ types: 0 }) // false
118
+ * ```
119
+ */
120
+ hasAnyType({ types }) {
121
+ return types !== 0;
122
+ },
123
+ /**
124
+ * Whether the edge carries no type at all. Such an edge states nothing and has to be removed, not kept.
125
+ * Counterpart of {@link DfEdge#hasAnyType}.
126
+ */
127
+ hasNoType({ types }) {
128
+ return types === 0;
129
+ },
130
+ /**
131
+ * Check whether the edge carries the given types and nothing else.
132
+ * Strict counterpart of {@link DfEdge#includesType}, which already holds if one of the bits is set.
133
+ * @example
134
+ *
135
+ * ```ts
136
+ * DfEdge.isOnlyType({ types: EdgeType.Reads | EdgeType.Calls }, EdgeType.Reads) // false
137
+ * DfEdge.isOnlyType({ types: EdgeType.Reads | EdgeType.Calls }, EdgeType.Reads | EdgeType.Calls) // true
138
+ * ```
139
+ */
140
+ isOnlyType({ types }, only) {
141
+ return types === only;
142
+ },
110
143
  };
111
144
  const alwaysTraverseEdgeTypes = EdgeType.Reads | EdgeType.DefinedBy | EdgeType.Argument | EdgeType.Calls;
112
145
  const definedByOnCallTypes = EdgeType.DefinesOnCall | EdgeType.DefinedByOnCall;
@@ -9,10 +9,9 @@ import type { AstIdMap } from '../../r-bridge/lang-4.x/ast/model/processing/deco
9
9
  import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
10
10
  import { DefaultMap } from '../../util/collections/defaultmap';
11
11
  /**
12
- * The underlying functions which work for any graph* like view
13
- * **Please do not use this object directly but use the helpers**
14
- * - {@link Dataflow}
15
- * - {@link CallGraph}
12
+ * The underlying functions which work for any graph* like view.
13
+ * Use {@link Dataflow} for the dataflow graph and {@link CallGraph} for the call graph, both spread this object in.
14
+ * @useInstead {@link Dataflow}
16
15
  */
17
16
  export declare const GraphHelper: {
18
17
  readonly name: "GraphHelper";
@@ -11,10 +11,9 @@ const parse_1 = require("../../slicing/criterion/parse");
11
11
  const edge_1 = require("./edge");
12
12
  const defaultmap_1 = require("../../util/collections/defaultmap");
13
13
  /**
14
- * The underlying functions which work for any graph* like view
15
- * **Please do not use this object directly but use the helpers**
16
- * - {@link Dataflow}
17
- * - {@link CallGraph}
14
+ * The underlying functions which work for any graph* like view.
15
+ * Use {@link Dataflow} for the dataflow graph and {@link CallGraph} for the call graph, both spread this object in.
16
+ * @useInstead {@link Dataflow}
18
17
  */
19
18
  exports.GraphHelper = {
20
19
  name: 'GraphHelper',
@@ -115,7 +114,7 @@ exports.GraphHelper = {
115
114
  return true;
116
115
  }
117
116
  visited.add(currentId);
118
- for (const [tar] of graph.outgoingEdges(currentId) ?? []) {
117
+ for (const [tar] of graph.outgoingEdges(currentId) ?? graph_1.NoEdges) {
119
118
  toVisit.push(tar);
120
119
  }
121
120
  }
@@ -1,8 +1,9 @@
1
- import type { DfEdge, EdgeType } from './edge';
1
+ import type { EdgeType } from './edge';
2
+ import { DfEdge } from './edge';
2
3
  import type { DataflowInformation } from '../info';
3
4
  import { type DataflowGraphVertexArgument, type DataflowGraphVertexFunctionCall, type DataflowGraphVertexInfo } from './vertex';
4
5
  import { EmptyArgument } from '../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
5
- import type { BrandedIdentifier, IdentifierDefinition, IdentifierReference } from '../environments/identifier';
6
+ import type { BrandedIdentifier, Identifier, IdentifierDefinition, IdentifierReference } from '../environments/identifier';
6
7
  import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
7
8
  import { type EnvType, type REnvironmentInformation } from '../environments/environment';
8
9
  import type { AstIdMap } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
@@ -141,6 +142,25 @@ export type OutgoingEdges<Edge extends DfEdge = DfEdge> = Map<NodeId, Edge>;
141
142
  * In other words, it maps the source to the edge information.
142
143
  */
143
144
  export type IngoingEdges<Edge extends DfEdge = DfEdge> = Map<NodeId, Edge>;
145
+ /**
146
+ * {@link IngoingEdges} as handed out by {@link DataflowGraph#ingoingEdges|ingoingEdges()}: a vertex without any
147
+ * shares the single {@link NoEdges}, so what a caller gets back is not theirs to write into.
148
+ */
149
+ export type ReadonlyIngoingEdges<Edge extends DfEdge = DfEdge> = ReadonlyMap<NodeId, Edge>;
150
+ /**
151
+ * The shared answer for a vertex without edges. Use it instead of a fresh `[]` fallback, the lookups sit in
152
+ * traversal loops where a miss is the common case.
153
+ * @example
154
+ * ```ts
155
+ * for(const [target, edge] of graph.outgoingEdges(id) ?? NoEdges) { /* ... *\/ }
156
+ * ```
157
+ */
158
+ export declare const NoEdges: ReadonlyMap<NodeId, never>;
159
+ /**
160
+ * Resolves the `pkg::fn` name of the call `id`, without and with the base-R qualification.
161
+ * Passed to {@link DataflowGraph#qualify}, which caches what it returns.
162
+ */
163
+ export type CallQualifier = (graph: DataflowGraph, id: NodeId, vertex: DataflowGraphVertexInfo | undefined) => readonly [bare: Identifier | undefined, baseR: Identifier | undefined];
144
164
  /**
145
165
  * The structure of the serialized {@link DataflowGraph}.
146
166
  */
@@ -209,6 +229,7 @@ export declare class DataflowGraph<Vertex extends DataflowGraphVertexInfo = Data
209
229
  private edgeInformation;
210
230
  private incomingIndex?;
211
231
  private readonly types;
232
+ private qualifiedNames?;
212
233
  toJSON(): DataflowGraphJson;
213
234
  /**
214
235
  * Get the {@link DataflowGraphVertexInfo} attached to a node as well as all outgoing edges.
@@ -235,7 +256,22 @@ export declare class DataflowGraph<Vertex extends DataflowGraphVertexInfo = Data
235
256
  */
236
257
  getRootVertex(id: NodeId): Vertex | undefined;
237
258
  outgoingEdges(id: NodeId): OutgoingEdges | undefined;
238
- ingoingEdges(id: NodeId): IngoingEdges | undefined;
259
+ ingoingEdges(id: NodeId): ReadonlyIngoingEdges | undefined;
260
+ /**
261
+ * The cached `pkg::fn` name of the call `id`, asking `resolve` only for a call the cache does not know yet.
262
+ * @useInstead {@link Dataflow.qualify} - which passes the resolution
263
+ */
264
+ qualify(id: NodeId, qualifyBaseR: boolean, resolve: CallQualifier): Identifier | undefined;
265
+ /**
266
+ * The cached `pkg::fn` name of every call, resolving the calls that are still missing.
267
+ * @useInstead {@link Dataflow.qualifyAll} - which passes the resolution
268
+ */
269
+ qualifyAll(qualifyBaseR: boolean, resolve: CallQualifier): ReadonlyMap<NodeId, Identifier | undefined>;
270
+ private qualifications;
271
+ /** one resolution fills both variants: what costs is resolving the call, not qualifying it */
272
+ private resolveInto;
273
+ /** Drops the cached qualifications, as the graph may no longer imply them */
274
+ private dropQualifications;
239
275
  /**
240
276
  * Given a node in the normalized AST this either:
241
277
  * returns the id if the node directly exists in the DFG
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataflowGraph = exports.UnknownSideEffect = exports.FunctionArgument = void 0;
3
+ exports.DataflowGraph = exports.UnknownSideEffect = exports.NoEdges = exports.FunctionArgument = void 0;
4
4
  const assert_1 = require("../../util/assert");
5
+ const edge_1 = require("./edge");
5
6
  const vertex_1 = require("./vertex");
6
7
  const arrays_1 = require("../../util/collections/arrays");
7
8
  const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
8
9
  const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
9
10
  const environment_1 = require("../environments/environment");
10
11
  const clone_1 = require("../environments/clone");
12
+ const vertex_2 = require("./vertex");
11
13
  /**
12
14
  * Helper functions to work with {@link FunctionArgument}s.
13
15
  * @see {@link EmptyArgument} - the marker for empty arguments
@@ -121,6 +123,15 @@ exports.FunctionArgument = {
121
123
  return exports.FunctionArgument.isNamed(arg) && arg.name === name;
122
124
  }
123
125
  };
126
+ /**
127
+ * The shared answer for a vertex without edges. Use it instead of a fresh `[]` fallback, the lookups sit in
128
+ * traversal loops where a miss is the common case.
129
+ * @example
130
+ * ```ts
131
+ * for(const [target, edge] of graph.outgoingEdges(id) ?? NoEdges) { /* ... *\/ }
132
+ * ```
133
+ */
134
+ exports.NoEdges = new Map();
124
135
  /**
125
136
  * Helpers for the {@link UnknownSideEffect} union, which is either a plain {@link NodeId} or a
126
137
  * `{ id, linkTo }` object. Use these instead of hand-rolling `typeof x === 'object' ? x.id : x`
@@ -183,6 +194,8 @@ class DataflowGraph {
183
194
  * edges of many nodes scan the whole graph once per node */
184
195
  incomingIndex;
185
196
  types = new Map();
197
+ /* the qualified call names, built on demand and dropped on every change, as vertices and edges both decide them */
198
+ qualifiedNames;
186
199
  toJSON() {
187
200
  return {
188
201
  rootVertices: Array.from(this.rootVertices),
@@ -245,8 +258,56 @@ class DataflowGraph {
245
258
  }
246
259
  this.incomingIndex = index;
247
260
  }
248
- /* the historic contract is an (possibly empty) map for every id, never `undefined` */
249
- return this.incomingIndex.get(id) ?? new Map();
261
+ /* the historic contract is an (possibly empty) map for every id, never `undefined`; the miss is the common
262
+ * case in traversal loops, so it answers with the shared empty map rather than a fresh one */
263
+ return this.incomingIndex.get(id) ?? exports.NoEdges;
264
+ }
265
+ /**
266
+ * The cached `pkg::fn` name of the call `id`, asking `resolve` only for a call the cache does not know yet.
267
+ * @useInstead {@link Dataflow.qualify} - which passes the resolution
268
+ */
269
+ qualify(id, qualifyBaseR, resolve) {
270
+ const cache = this.qualifications();
271
+ const wanted = qualifyBaseR ? cache.baseR : cache.bare;
272
+ const hit = wanted.get(id);
273
+ if (hit !== undefined || wanted.has(id)) {
274
+ return hit;
275
+ }
276
+ this.resolveInto(cache, id, this.vertexInformation.get(id), resolve);
277
+ return wanted.get(id);
278
+ }
279
+ /**
280
+ * The cached `pkg::fn` name of every call, resolving the calls that are still missing.
281
+ * @useInstead {@link Dataflow.qualifyAll} - which passes the resolution
282
+ */
283
+ qualifyAll(qualifyBaseR, resolve) {
284
+ const cache = this.qualifications();
285
+ const wanted = qualifyBaseR ? cache.baseR : cache.bare;
286
+ if (cache.complete) {
287
+ return wanted;
288
+ }
289
+ for (const id of this.types.get(vertex_1.VertexType.FunctionCall) ?? []) {
290
+ if (!wanted.has(id)) {
291
+ this.resolveInto(cache, id, this.vertexInformation.get(id), resolve);
292
+ }
293
+ }
294
+ cache.complete = true;
295
+ return wanted;
296
+ }
297
+ qualifications() {
298
+ return this.qualifiedNames ??= { bare: new Map(), baseR: new Map(), complete: false };
299
+ }
300
+ /** one resolution fills both variants: what costs is resolving the call, not qualifying it */
301
+ resolveInto(cache, id, vertex, resolve) {
302
+ const [bare, baseR] = resolve(this, id, vertex);
303
+ cache.bare.set(id, bare);
304
+ cache.baseR.set(id, baseR);
305
+ }
306
+ /** Drops the cached qualifications, as the graph may no longer imply them */
307
+ dropQualifications() {
308
+ if (this.qualifiedNames !== undefined) {
309
+ this.qualifiedNames = undefined;
310
+ }
250
311
  }
251
312
  /**
252
313
  * Given a node in the normalized AST this either:
@@ -339,8 +400,9 @@ class DataflowGraph {
339
400
  if (edge === undefined || targets === undefined) {
340
401
  return this;
341
402
  }
403
+ this.dropQualifications();
342
404
  edge.types &= ~type;
343
- if (edge.types !== 0) {
405
+ if (edge_1.DfEdge.hasAnyType(edge)) {
344
406
  /* the reverse index holds this very object, so a narrowed type is already visible through it */
345
407
  return this;
346
408
  }
@@ -370,6 +432,7 @@ class DataflowGraph {
370
432
  if (this.vertexInformation.has(vid) && !overwrite) {
371
433
  return this;
372
434
  }
435
+ this.dropQualifications();
373
436
  const vtag = vertex.tag;
374
437
  // keep a clone of the original environment, isolating the snapshot from later updates
375
438
  vertex.environment = vertex.environment ? (0, clone_1.cloneEnvironmentInformation)(vertex.environment) : (vtag === vertex_1.VertexType.FunctionDefinition || (vtag === vertex_1.VertexType.FunctionCall && !vertex.onlyBuiltin) ? fallbackEnv : undefined);
@@ -390,6 +453,7 @@ class DataflowGraph {
390
453
  if (fromId === toId) {
391
454
  return this;
392
455
  }
456
+ this.dropQualifications();
393
457
  const fromEdges = this.edgeInformation.get(fromId);
394
458
  const existing = fromEdges?.get(toId);
395
459
  if (existing !== undefined) {
@@ -445,6 +509,7 @@ class DataflowGraph {
445
509
  return this;
446
510
  }
447
511
  mergeVertices(otherGraph, mergeRootVertices = true) {
512
+ this.dropQualifications();
448
513
  // merge root ids
449
514
  if (mergeRootVertices) {
450
515
  for (const root of otherGraph.rootVertices) {
@@ -460,6 +525,7 @@ class DataflowGraph {
460
525
  }
461
526
  }
462
527
  mergeEdges(otherGraph) {
528
+ this.dropQualifications();
463
529
  this.incomingIndex = undefined;
464
530
  for (const [id, edges] of otherGraph.edgeInformation.entries()) {
465
531
  let existing = this.edgeInformation.get(id);
@@ -486,9 +552,10 @@ class DataflowGraph {
486
552
  * @param sourceIds - The id of the source vertex of the def, if available
487
553
  */
488
554
  setDefinitionOfVertex(reference, sourceIds) {
555
+ this.dropQualifications();
489
556
  const vertex = this.getVertex(reference.nodeId);
490
557
  (0, assert_1.guard)(vertex !== undefined, () => `node must be defined for ${JSON.stringify(reference)} to set reference`);
491
- if (vertex.tag === vertex_1.VertexType.FunctionDefinition || vertex.tag === vertex_1.VertexType.VariableDefinition) {
558
+ if (vertex_2.FunctionDefinitionVertex.is(vertex) || vertex_2.VariableDefinitionVertex.is(vertex)) {
492
559
  vertex.cds = reference.cds;
493
560
  }
494
561
  else {
@@ -518,9 +585,10 @@ class DataflowGraph {
518
585
  * @param info - The information about the new function call node
519
586
  */
520
587
  updateToFunctionCall(info) {
588
+ this.dropQualifications();
521
589
  const infoId = info.id;
522
590
  const vertex = this.getVertex(infoId);
523
- (0, assert_1.guard)(vertex !== undefined && (vertex.tag === vertex_1.VertexType.Use || vertex.tag === vertex_1.VertexType.Value), () => `node must be a use or value node for ${JSON.stringify(info.id)} to update it to a function call but is ${vertex?.tag}`);
591
+ (0, assert_1.guard)(vertex !== undefined && (vertex_2.UseVertex.is(vertex) || vertex_2.ValueVertex.is(vertex)), () => `node must be a use or value node for ${JSON.stringify(info.id)} to update it to a function call but is ${vertex?.tag}`);
524
592
  const previousTag = vertex.tag;
525
593
  this.vertexInformation.set(infoId, { ...vertex, ...info, tag: vertex_1.VertexType.FunctionCall });
526
594
  const prevIds = this.types.get(previousTag);
@@ -594,7 +662,7 @@ function mergeNodeInfos(current, next) {
594
662
  if (current.tag !== next.tag) {
595
663
  return current;
596
664
  }
597
- else if (current.tag === vertex_1.VertexType.FunctionDefinition) {
665
+ else if (vertex_2.FunctionDefinitionVertex.is(current)) {
598
666
  const n = next;
599
667
  current.exitPoints = (0, arrays_1.uniqueArrayMerge)(current.exitPoints, n.exitPoints);
600
668
  if (n.mode && n.mode.length > 0) {
@@ -176,33 +176,69 @@ export type DataflowGraphVertexInfo = Required<DataflowGraphVertexArgument>;
176
176
  * A mapping of {@link NodeId}s to {@link DataflowGraphVertexInfo|vertices}.
177
177
  */
178
178
  export type DataflowGraphVertices<Vertex extends DataflowGraphVertexInfo = DataflowGraphVertexInfo> = Map<NodeId, Vertex>;
179
- /** Helpers for {@link DataflowGraphVertexValue} vertices. */
179
+ /**
180
+ * Helpers for {@link DataflowGraphVertexValue} vertices.
181
+ * @example
182
+ * ```ts
183
+ * ValueVertex.is(graph.getVertex(id)) // true for a constant like `42`
184
+ * ```
185
+ */
180
186
  export declare const ValueVertex: {
181
187
  name: string;
182
188
  /** Whether the given vertex is a value vertex. */
183
189
  is(this: void, vertex?: DataflowGraphVertexBase): vertex is DataflowGraphVertexValue;
184
190
  };
185
- /** Helpers for {@link DataflowGraphVertexUse} vertices. */
191
+ /**
192
+ * Helpers for {@link DataflowGraphVertexUse} vertices.
193
+ * @example
194
+ * ```ts
195
+ * UseVertex.is(graph.getVertex(id)) // true for a read of `x`
196
+ * ```
197
+ */
186
198
  export declare const UseVertex: {
187
199
  name: string;
188
200
  /** Whether the given vertex is a use vertex. */
189
201
  is(this: void, vertex?: DataflowGraphVertexBase): vertex is DataflowGraphVertexUse;
190
202
  };
191
- /** Helpers for {@link DataflowGraphVertexFunctionCall} vertices. */
203
+ /**
204
+ * Helpers for {@link DataflowGraphVertexFunctionCall} vertices.
205
+ * @example
206
+ * ```ts
207
+ * const vertex = graph.getVertex(id);
208
+ * FunctionCallVertex.is(vertex) && vertex.name // the call's effective name
209
+ * FunctionCallVertex.hasOrigin(vertex, 'builtin:eval') // the call is an eval
210
+ * ```
211
+ */
192
212
  export declare const FunctionCallVertex: {
193
213
  name: string;
194
214
  /** Whether the given vertex is a function call vertex. */
195
215
  is(this: void, vertex?: DataflowGraphVertexBase): vertex is DataflowGraphVertexFunctionCall;
196
- /** Whether the given vertex is a function call carrying the given origin. */
216
+ /**
217
+ * Whether the given vertex is a function call carrying the given origin.
218
+ * Deliberately not a type predicate: a `false` says nothing about the tag, the call may simply carry another origin.
219
+ */
197
220
  hasOrigin(this: void, vertex: DataflowGraphVertexBase | undefined, origin: BuiltInProcName): boolean;
198
221
  };
199
- /** Helpers for {@link DataflowGraphVertexVariableDefinition} vertices. */
222
+ /**
223
+ * Helpers for {@link DataflowGraphVertexVariableDefinition} vertices.
224
+ * @example
225
+ * ```ts
226
+ * VariableDefinitionVertex.is(graph.getVertex(id)) // true for the `x` of `x <- 1`
227
+ * ```
228
+ */
200
229
  export declare const VariableDefinitionVertex: {
201
230
  name: string;
202
231
  /** Whether the given vertex is a variable definition vertex. */
203
232
  is(this: void, vertex?: DataflowGraphVertexBase): vertex is DataflowGraphVertexVariableDefinition;
204
233
  };
205
- /** Helpers for {@link DataflowGraphVertexFunctionDefinition} vertices. */
234
+ /**
235
+ * Helpers for {@link DataflowGraphVertexFunctionDefinition} vertices.
236
+ * @example
237
+ * ```ts
238
+ * const vertex = graph.getVertex(id);
239
+ * FunctionDefinitionVertex.is(vertex) && vertex.exitPoints // where the body returns
240
+ * ```
241
+ */
206
242
  export declare const FunctionDefinitionVertex: {
207
243
  name: string;
208
244
  /** Whether the given vertex is a function definition vertex. */
@@ -11,7 +11,13 @@ var VertexType;
11
11
  })(VertexType || (exports.VertexType = VertexType = {}));
12
12
  exports.ValidVertexTypes = new Set(Object.values(VertexType));
13
13
  exports.ValidVertexTypeReverse = Object.fromEntries(Object.entries(VertexType).map(([k, v]) => [v, k]));
14
- /** Helpers for {@link DataflowGraphVertexValue} vertices. */
14
+ /**
15
+ * Helpers for {@link DataflowGraphVertexValue} vertices.
16
+ * @example
17
+ * ```ts
18
+ * ValueVertex.is(graph.getVertex(id)) // true for a constant like `42`
19
+ * ```
20
+ */
15
21
  exports.ValueVertex = {
16
22
  name: 'ValueVertex',
17
23
  /** Whether the given vertex is a value vertex. */
@@ -19,7 +25,13 @@ exports.ValueVertex = {
19
25
  return vertex?.tag === VertexType.Value;
20
26
  }
21
27
  };
22
- /** Helpers for {@link DataflowGraphVertexUse} vertices. */
28
+ /**
29
+ * Helpers for {@link DataflowGraphVertexUse} vertices.
30
+ * @example
31
+ * ```ts
32
+ * UseVertex.is(graph.getVertex(id)) // true for a read of `x`
33
+ * ```
34
+ */
23
35
  exports.UseVertex = {
24
36
  name: 'UseVertex',
25
37
  /** Whether the given vertex is a use vertex. */
@@ -27,19 +39,36 @@ exports.UseVertex = {
27
39
  return vertex?.tag === VertexType.Use;
28
40
  }
29
41
  };
30
- /** Helpers for {@link DataflowGraphVertexFunctionCall} vertices. */
42
+ /**
43
+ * Helpers for {@link DataflowGraphVertexFunctionCall} vertices.
44
+ * @example
45
+ * ```ts
46
+ * const vertex = graph.getVertex(id);
47
+ * FunctionCallVertex.is(vertex) && vertex.name // the call's effective name
48
+ * FunctionCallVertex.hasOrigin(vertex, 'builtin:eval') // the call is an eval
49
+ * ```
50
+ */
31
51
  exports.FunctionCallVertex = {
32
52
  name: 'FunctionCallVertex',
33
53
  /** Whether the given vertex is a function call vertex. */
34
54
  is(vertex) {
35
55
  return vertex?.tag === VertexType.FunctionCall;
36
56
  },
37
- /** Whether the given vertex is a function call carrying the given origin. */
57
+ /**
58
+ * Whether the given vertex is a function call carrying the given origin.
59
+ * Deliberately not a type predicate: a `false` says nothing about the tag, the call may simply carry another origin.
60
+ */
38
61
  hasOrigin(vertex, origin) {
39
62
  return exports.FunctionCallVertex.is(vertex) && vertex.origin.includes(origin);
40
63
  }
41
64
  };
42
- /** Helpers for {@link DataflowGraphVertexVariableDefinition} vertices. */
65
+ /**
66
+ * Helpers for {@link DataflowGraphVertexVariableDefinition} vertices.
67
+ * @example
68
+ * ```ts
69
+ * VariableDefinitionVertex.is(graph.getVertex(id)) // true for the `x` of `x <- 1`
70
+ * ```
71
+ */
43
72
  exports.VariableDefinitionVertex = {
44
73
  name: 'VariableDefinitionVertex',
45
74
  /** Whether the given vertex is a variable definition vertex. */
@@ -47,7 +76,14 @@ exports.VariableDefinitionVertex = {
47
76
  return vertex?.tag === VertexType.VariableDefinition;
48
77
  }
49
78
  };
50
- /** Helpers for {@link DataflowGraphVertexFunctionDefinition} vertices. */
79
+ /**
80
+ * Helpers for {@link DataflowGraphVertexFunctionDefinition} vertices.
81
+ * @example
82
+ * ```ts
83
+ * const vertex = graph.getVertex(id);
84
+ * FunctionDefinitionVertex.is(vertex) && vertex.exitPoints // where the body returns
85
+ * ```
86
+ */
51
87
  exports.FunctionDefinitionVertex = {
52
88
  name: 'FunctionDefinitionVertex',
53
89
  /** Whether the given vertex is a function definition vertex. */
@@ -5,6 +5,7 @@ import type { REnvironmentInformation } from './environments/environment';
5
5
  import { DataflowGraph } from './graph/graph';
6
6
  import type { GenericDifferenceInformation, WriteableDifferenceReport } from '../util/diff';
7
7
  import type { HookInformation } from './hooks';
8
+ import type { AstIdMap } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
8
9
  /**
9
10
  * A control dependency links a vertex to the control flow element which
10
11
  * may have an influence on its execution.
@@ -24,6 +25,30 @@ export interface ControlDependency {
24
25
  */
25
26
  readonly file?: string;
26
27
  }
28
+ /** Whether the two control dependencies trigger on the same condition and branch. */
29
+ declare function sameControlDependency(a: ControlDependency, b: ControlDependency): boolean;
30
+ /**
31
+ * Utility functions to work with {@link ControlDependency|control dependencies}.
32
+ */
33
+ export declare const ControlDependency: {
34
+ readonly name: "ControlDependency";
35
+ /** Whether the two trigger on the same condition and branch. */
36
+ readonly same: typeof sameControlDependency;
37
+ /** @see {@link appendCds} */
38
+ readonly append: typeof appendCds;
39
+ /** @see {@link withCds} */
40
+ readonly with: typeof withCds;
41
+ /** @see {@link negateControlDependency} */
42
+ readonly negate: typeof negateControlDependency;
43
+ /** @see {@link happensInEveryBranch} */
44
+ readonly happensInEveryBranch: typeof happensInEveryBranch;
45
+ /** @see {@link happensInEveryBranchSet} */
46
+ readonly happensInEveryBranchSet: typeof happensInEveryBranchSet;
47
+ /** Whether the dependency stems from a loop, so what it guards may happen more than once. */
48
+ readonly isIterated: (this: void, cd: ControlDependency, idMap: AstIdMap | undefined) => boolean;
49
+ /** The dependencies of `a` that `b` is not subject to as well. */
50
+ readonly minus: (this: void, a: readonly ControlDependency[], b: readonly ControlDependency[]) => ControlDependency[];
51
+ };
27
52
  /** Appends the given control dependencies to `target`, skipping the ones that are already in there. */
28
53
  export declare function appendCds(target: ControlDependency[], toAdd: readonly ControlDependency[] | undefined): void;
29
54
  /** A copy of `base` with `toAdd` appended, skipping the control dependencies that are already in there. */
@@ -201,3 +226,4 @@ export declare function diffControlDependency<Report extends WriteableDifference
201
226
  * Calculates the difference between two lists of control dependencies.
202
227
  */
203
228
  export declare function diffControlDependencies<Report extends WriteableDifferenceReport>(a: ControlDependency[] | undefined, b: ControlDependency[] | undefined, info: GenericDifferenceInformation<Report>): void;
229
+ export {};
package/dataflow/info.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataflowInformation = void 0;
3
+ exports.DataflowInformation = exports.ControlDependency = void 0;
4
4
  exports.appendCds = appendCds;
5
5
  exports.withCds = withCds;
6
6
  exports.negateControlDependency = negateControlDependency;
@@ -15,10 +15,37 @@ exports.diffControlDependency = diffControlDependency;
15
15
  exports.diffControlDependencies = diffControlDependencies;
16
16
  const graph_1 = require("./graph/graph");
17
17
  const assert_1 = require("../util/assert");
18
+ const model_1 = require("../r-bridge/lang-4.x/ast/model/model");
18
19
  /** Whether the two control dependencies trigger on the same condition and branch. */
19
20
  function sameControlDependency(a, b) {
20
21
  return a.id === b.id && a.when === b.when;
21
22
  }
23
+ /**
24
+ * Utility functions to work with {@link ControlDependency|control dependencies}.
25
+ */
26
+ exports.ControlDependency = {
27
+ name: 'ControlDependency',
28
+ /** Whether the two trigger on the same condition and branch. */
29
+ same: sameControlDependency,
30
+ /** @see {@link appendCds} */
31
+ append: appendCds,
32
+ /** @see {@link withCds} */
33
+ with: withCds,
34
+ /** @see {@link negateControlDependency} */
35
+ negate: negateControlDependency,
36
+ /** @see {@link happensInEveryBranch} */
37
+ happensInEveryBranch,
38
+ /** @see {@link happensInEveryBranchSet} */
39
+ happensInEveryBranchSet,
40
+ /** Whether the dependency stems from a loop, so what it guards may happen more than once. */
41
+ isIterated(cd, idMap) {
42
+ return cd.byIteration === true || model_1.RLoopConstructs.loopConstructTypes.has(idMap?.get(cd.id)?.type);
43
+ },
44
+ /** The dependencies of `a` that `b` is not subject to as well. */
45
+ minus(a, b) {
46
+ return a.filter(cd => !b.some(other => sameControlDependency(other, cd)));
47
+ }
48
+ };
22
49
  /** Appends the given control dependencies to `target`, skipping the ones that are already in there. */
23
50
  function appendCds(target, toAdd) {
24
51
  if (!toAdd) {
@@ -93,6 +93,7 @@ export declare function getAllLinkedFunctionDefinitions(functionDefinitionReadId
93
93
  /**
94
94
  * Links every name in the expression rooted at `expr` against `environment`, as if it were written there, and
95
95
  * hands back what stays unresolved. This is how an expression that was captured elsewhere is read here.
96
+ * @useInstead {@link Quoted.evaluateIn}
96
97
  */
97
98
  export declare function linkExpressionIn<Info>(this: void, graph: DataflowGraph, expr: NodeId, environment: REnvironmentInformation, idMap: AstIdMap<Info & ParentInformation>): readonly IdentifierReference[];
98
99
  /**