@eagleoutice/flowr 2.17.7 → 2.17.8

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 (120) hide show
  1. package/abstract-interpretation/branch-paths.d.ts +10 -0
  2. package/abstract-interpretation/branch-paths.js +104 -10
  3. package/config.js +3 -1
  4. package/control-flow/control-flow-graph.js +18 -2
  5. package/data/r-base-guards.generated.js +2 -2
  6. package/dataflow/environments/ambient-effect.js +4 -1
  7. package/dataflow/environments/built-in-props.d.ts +8 -2
  8. package/dataflow/environments/built-in-props.js +16 -5
  9. package/dataflow/environments/default-builtin-config/base-functions.js +1 -1
  10. package/dataflow/environments/default-builtin-config/guards.d.ts +1 -1
  11. package/dataflow/environments/default-builtin-config/guards.js +28 -0
  12. package/dataflow/environments/default-builtin-config/index.d.ts +8 -4
  13. package/dataflow/environments/default-builtin-config/index.js +9 -5
  14. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
  15. package/dataflow/environments/default-builtin-config/parallel-execution.js +25 -0
  16. package/dataflow/environments/guard-facts.d.ts +28 -1
  17. package/dataflow/environments/pkg-name.d.ts +2 -0
  18. package/dataflow/environments/query-fn-props.d.ts +19 -15
  19. package/dataflow/environments/query-fn-props.js +46 -36
  20. package/dataflow/environments/removal-marker.d.ts +1 -1
  21. package/dataflow/environments/removal-marker.js +18 -3
  22. package/dataflow/environments/reserved-names.d.ts +6 -0
  23. package/dataflow/environments/reserved-names.js +14 -0
  24. package/dataflow/environments/resolve-by-name.js +5 -10
  25. package/dataflow/eval/resolve/alias-tracking.js +23 -6
  26. package/dataflow/extractor.js +103 -28
  27. package/dataflow/fn/argument-roles.d.ts +3 -0
  28. package/dataflow/fn/argument-roles.js +5 -5
  29. package/dataflow/fn/exceptions-of-function.d.ts +7 -0
  30. package/dataflow/fn/exceptions-of-function.js +15 -2
  31. package/dataflow/fn/function-props.d.ts +1 -1
  32. package/dataflow/fn/function-props.js +40 -18
  33. package/dataflow/fn/function-semantics.d.ts +3 -1
  34. package/dataflow/fn/function-semantics.js +2 -0
  35. package/dataflow/fn/guards/built-in-guards.js +2 -1
  36. package/dataflow/fn/guards/condition-grouping.d.ts +11 -0
  37. package/dataflow/fn/guards/condition-grouping.js +50 -3
  38. package/dataflow/fn/guards/function-guards.d.ts +10 -0
  39. package/dataflow/fn/guards/function-guards.js +130 -14
  40. package/dataflow/fn/guards/guard-claims.d.ts +2 -0
  41. package/dataflow/fn/guards/guard-claims.js +42 -2
  42. package/dataflow/fn/guards/guard-knowledge.d.ts +7 -1
  43. package/dataflow/fn/guards/guard-knowledge.js +50 -4
  44. package/dataflow/fn/guards/guard-term.js +10 -1
  45. package/dataflow/fn/higher-order-function.d.ts +15 -1
  46. package/dataflow/fn/higher-order-function.js +54 -10
  47. package/dataflow/graph/call-graph.d.ts +5 -0
  48. package/dataflow/graph/call-graph.js +51 -15
  49. package/dataflow/graph/df-helper.d.ts +2 -0
  50. package/dataflow/graph/df-helper.js +4 -2
  51. package/dataflow/graph/graph.d.ts +21 -0
  52. package/dataflow/graph/graph.js +63 -2
  53. package/dataflow/internal/linker.d.ts +20 -0
  54. package/dataflow/internal/linker.js +190 -24
  55. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +20 -12
  56. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +5 -3
  57. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +2 -1
  58. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +2 -0
  59. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +5 -0
  60. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +7 -3
  61. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +12 -5
  62. package/dataflow/internal/process/functions/call/deferred.d.ts +7 -2
  63. package/dataflow/internal/process/functions/call/deferred.js +63 -28
  64. package/dataflow/internal/process/functions/call/quoted.js +33 -7
  65. package/documentation/data/dfg/doc-ambient.js +3 -1
  66. package/documentation/wiki-normalized-ast.js +1 -1
  67. package/documentation/wiki-query.js +9 -3
  68. package/package.json +5 -3
  69. package/project/context/flowr-analyzer-context.d.ts +7 -4
  70. package/project/context/flowr-analyzer-context.js +8 -3
  71. package/project/context/flowr-analyzer-files-context.js +1 -0
  72. package/project/context/flowr-analyzer-functions-context.d.ts +2 -1
  73. package/project/context/flowr-analyzer-functions-context.js +9 -8
  74. package/project/flowr-analyzer.d.ts +7 -4
  75. package/project/flowr-analyzer.js +37 -8
  76. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +22 -0
  77. package/project/plugins/file-plugins/files/flowr-namespace-file.js +34 -0
  78. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +4 -1
  79. package/project/sigdb/build.js +41 -2
  80. package/project/sigdb/decode.d.ts +3 -1
  81. package/project/sigdb/decode.js +45 -1
  82. package/project/sigdb/decompress.d.ts +5 -0
  83. package/project/sigdb/decompress.js +17 -1
  84. package/project/sigdb/manifest.d.ts +2 -1
  85. package/project/sigdb/manifest.js +12 -5
  86. package/project/sigdb/native-routines.d.ts +82 -0
  87. package/project/sigdb/native-routines.js +178 -0
  88. package/project/sigdb/reader.d.ts +21 -3
  89. package/project/sigdb/reader.js +35 -3
  90. package/project/sigdb/schema.d.ts +107 -3
  91. package/project/sigdb/schema.js +8 -2
  92. package/project/sigdb/sigdb-download.js +1 -1
  93. package/project/sigdb/sigdb-version.d.ts +7 -1
  94. package/project/sigdb/sigdb-version.js +12 -9
  95. package/project/sigdb/spec-query.d.ts +9 -4
  96. package/project/sigdb/spec-query.js +71 -45
  97. package/queries/catalog/call-context-query/call-context-query-executor.js +76 -29
  98. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +1 -12
  99. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +3 -0
  100. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +3 -2
  101. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -0
  102. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +3 -2
  103. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +3 -1
  104. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +4 -2
  105. package/queries/catalog/signature-query/signature-query-executor.js +6 -2
  106. package/queries/catalog/signature-query/signature-query-format.d.ts +4 -0
  107. package/util/collections/bounded-map.d.ts +9 -0
  108. package/util/collections/bounded-map.js +22 -0
  109. package/util/collections/defaultmap.d.ts +5 -0
  110. package/util/collections/defaultmap.js +10 -0
  111. package/util/fixpoint.d.ts +6 -1
  112. package/util/fixpoint.js +45 -3
  113. package/util/flowr-version.d.ts +1 -1
  114. package/util/flowr-version.js +2 -2
  115. package/util/global-caches.d.ts +26 -0
  116. package/util/global-caches.js +43 -0
  117. package/util/monoid.js +2 -2
  118. package/util/quads.js +11 -3
  119. package/util/r-package-urls.d.ts +19 -0
  120. package/util/r-package-urls.js +41 -0
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.s4ClassName = s4ClassName;
4
+ exports.isS4ClassName = isS4ClassName;
4
5
  exports.linkS4Uses = linkS4Uses;
5
6
  exports.linkS4Declaration = linkS4Declaration;
6
7
  exports.linkS4Generic = linkS4Generic;
@@ -30,6 +31,10 @@ const S4ClassMark = '﹕s4class﹕';
30
31
  function s4ClassName(cls) {
31
32
  return S4ClassMark + cls;
32
33
  }
34
+ /** Whether the name is one of {@link s4ClassName}, an entry of the class registry rather than a variable. */
35
+ function isS4ClassName(name) {
36
+ return name.startsWith(S4ClassMark);
37
+ }
33
38
  /** The names an argument states, looking through the `c(...)`/`signature(...)` wrappers a signature may use. */
34
39
  function classNamesOf(node, data) {
35
40
  const known = node === undefined ? [] : node_value_1.NodeValue.knownStringsOf(node.info.id, data);
@@ -271,6 +271,8 @@ function linkLateWarningsAsErrors(graph, environment, idMap) {
271
271
  /** Links what a handler of a condition class other than an error changes outside its frame, which is a side effect on the call running it, to every site of the block that may signal that class, as the handler runs only then. */
272
272
  function linkHandlersToSignalSites(graph, environment, data) {
273
273
  const idMap = data.completeAst.idMap;
274
+ /* added once every handler is looked at: any change to the graph drops the call targets resolved over it */
275
+ const edges = new graph_1.PendingEdges();
274
276
  for (const [, vertex] of graph.verticesOfType(vertex_1.VertexType.FunctionCall)) {
275
277
  const config = vertex_1.DfgVertex.hasOrigin(vertex, built_in_proc_name_1.BuiltInProcName.Try) ? tryConfigOf(vertex, environment) : undefined;
276
278
  if (config === undefined) {
@@ -286,18 +288,20 @@ function linkHandlersToSignalSites(graph, environment, data) {
286
288
  /* no construct encloses what signals to a handler of the session, so each site that may runs it */
287
289
  const runs = config.block === undefined ? df_helper_1.Dataflow.callTargetsOf(handler, graph).filter(t => vertex_1.DfgVertex.isFunctionDefinition(graph.getVertex(t))) : [];
288
290
  const at = graph.getVertex(handler)?.environment;
289
- const sites = (writes.length === 0 && runs.length === 0) || at === undefined ? [] : blocks.flatMap(b => (0, built_in_ambient_state_1.signalSites)(b, identifier_1.Identifier.getName(condition), graph, { ...data, environment: at }, false));
291
+ /* a site reached along several paths is listed once per path, which for a handler of the session is thousands of times */
292
+ const sites = (writes.length === 0 && runs.length === 0) || at === undefined ? [] : new Set(blocks.flatMap(b => (0, built_in_ambient_state_1.signalSites)(b, identifier_1.Identifier.getName(condition), graph, { ...data, environment: at }, false)));
290
293
  for (const site of sites) {
291
294
  for (const write of writes) {
292
- graph.addEdge(write, site, edge_1.EdgeType.Reads);
295
+ edges.add(write, site, edge_1.EdgeType.Reads);
293
296
  }
294
297
  for (const definition of runs) {
295
- graph.addEdge(site, definition, edge_1.EdgeType.Calls);
298
+ edges.add(site, definition, edge_1.EdgeType.Calls);
296
299
  }
297
300
  }
298
301
  }
299
302
  }
300
303
  }
304
+ edges.applyTo(graph);
301
305
  }
302
306
  /** The top-level statements after the one holding `id`, which a call within a function body may run in any of once the function is defined. */
303
307
  function statementsAfter(id, idMap) {
@@ -829,11 +829,18 @@ function linkReadsAfter(graph, call, def, open, definitionsNamed, escaped) {
829
829
  /* a write of the call that escapes under another name (`par` beside `plot` in the body) replaces nothing of this one */
830
830
  const sameName = (id) => escaped.get(id)?.some(d => d.name === def.name) ?? true;
831
831
  const replaced = new Set([...visible, ...df_helper_1.Dataflow.sourcesOf(graph, call, edge_1.EdgeType.SideEffectOnCall).filter(sameName)]);
832
- const readers = new Set(open.filter(r => r.name === def.name).map(r => r.nodeId));
833
- for (const [id] of graph.vertices(true)) {
834
- /* an argument reads the value of a call, not a name the call may define (an ambient state is defined at its call) */
835
- if ((readers.has(id) || graph.edgesFrom(id).entries().some(([target, edge]) => edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Reads) && edge_1.DfEdge.doesNotIncludeType(edge, edge_1.EdgeType.Argument) && replaced.has(target)))
836
- && !program_order_1.ProgramOrder.definedLater(call, program_order_1.ProgramOrder.runsOnceAt(id, graph), graph)) {
832
+ const candidates = new Set(open.filter(r => r.name === def.name).map(r => r.nodeId));
833
+ /* the reads of a replaced definition are its incoming edges, so only those vertices are asked, not every vertex of the graph */
834
+ for (const target of replaced) {
835
+ for (const [id, edge] of graph.edgesTo(target)) {
836
+ /* an argument reads the value of a call, not a name the call may define (an ambient state is defined at its call) */
837
+ if (edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Reads) && edge_1.DfEdge.doesNotIncludeType(edge, edge_1.EdgeType.Argument)) {
838
+ candidates.add(id);
839
+ }
840
+ }
841
+ }
842
+ for (const id of candidates) {
843
+ if (graph.hasVertex(id) && !program_order_1.ProgramOrder.definedLater(call, program_order_1.ProgramOrder.runsOnceAt(id, graph), graph)) {
837
844
  graph.addEdge(id, def.nodeId, edge_1.EdgeType.Reads);
838
845
  }
839
846
  }
@@ -1,8 +1,8 @@
1
1
  import type { AstIdMap, ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
2
2
  import { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
3
- import { type NodesByName } from '../../../../environments/identifier';
3
+ import { type BrandedIdentifier, type NodesByName } from '../../../../environments/identifier';
4
4
  import type { DataflowGraph } from '../../../../graph/graph';
5
- import { VertexType } from '../../../../graph/vertex';
5
+ import { type DataflowGraphVertexFunctionDefinition, VertexType } from '../../../../graph/vertex';
6
6
  import type { ControlFlowGraph } from '../../../../../control-flow/control-flow-graph';
7
7
  /** The reads that may force the expression, and the control flow deciding what they can see. */
8
8
  export interface ForceSites {
@@ -15,12 +15,17 @@ export interface ForceSites {
15
15
  before?: ReadonlySet<NodeId>;
16
16
  after?: ReadonlySet<NodeId>;
17
17
  always?: Map<NodeId, boolean>;
18
+ seen?: WeakMap<NodesByName, Map<BrandedIdentifier, readonly NodeId[]>>;
19
+ /** the captures evaluated elsewhere that were linked with these sites already, the same for every call handing one on */
20
+ linked?: Set<NodeId>;
18
21
  };
19
22
  }
20
23
  /** Where a name is bound and where it is read, so that a deferred expression can reach either. */
21
24
  export interface NameIndex {
22
25
  readonly definitions: NodesByName;
23
26
  readonly uses: NodesByName;
27
+ /** the functions each binding may hold, filled on first use by every deferred call meeting it */
28
+ readonly held?: Map<NodeId, readonly Required<DataflowGraphVertexFunctionDefinition>[]>;
24
29
  }
25
30
  /** The vertices of `type` by their unquoted name. */
26
31
  export declare function verticesByName<Info>(graph: DataflowGraph, type: VertexType, idMap: AstIdMap<Info & ParentInformation>): Map<string, NodeId[]>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Deferred = void 0;
4
4
  exports.verticesByName = verticesByName;
5
+ const defaultmap_1 = require("../../../../../util/collections/defaultmap");
5
6
  const model_1 = require("../../../../../r-bridge/lang-4.x/ast/model/model");
6
7
  const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
7
8
  const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
@@ -19,38 +20,51 @@ function verticesByName(graph, type, idMap) {
19
20
  const named = graph.vertexIdsOfType(type).filter(id => node_id_1.NodeId.recoverName(id, idMap) !== undefined);
20
21
  return Map.groupBy(named, id => node_id_1.NodeId.recoverBareName(id, idMap));
21
22
  }
23
+ /** Per AST, what each deferred expression holds: the syntax does not change, so every link of the same expression shares one walk. */
24
+ const touchedCache = new WeakMap();
25
+ /** The calls and symbols below `expr`, not descending into function definitions, whose bodies run only when called. */
26
+ function touchedWithin(expr, idMap) {
27
+ return (0, defaultmap_1.getOrSet)((0, defaultmap_1.getOrSet)(touchedCache, idMap, () => new Map()), expr, () => {
28
+ const touched = [];
29
+ const callees = new Set();
30
+ model_1.RNode.visitAst(idMap.get(expr), inner => {
31
+ /* a definition only creates its closure, the body runs when it is called and that call carries its effects */
32
+ if (r_function_definition_1.RFunctionDefinition.is(inner)) {
33
+ return true;
34
+ }
35
+ else if (r_function_call_1.RFunctionCall.isNamed(inner)) {
36
+ callees.add(inner.functionName.info.id);
37
+ touched.push({ call: true, id: inner.info.id, name: identifier_1.Identifier.getName(inner.functionName.content) });
38
+ }
39
+ else if (r_symbol_1.RSymbol.is(inner) && !callees.has(inner.info.id)) {
40
+ touched.push({ call: false, id: inner.info.id, name: identifier_1.Identifier.getName(inner.content) });
41
+ }
42
+ return false;
43
+ });
44
+ return touched;
45
+ });
46
+ }
22
47
  /** The names a deferred expression touches, each with the node touching it and whether it is written. */
23
48
  function namesWithin(expr, graph, idMap) {
24
49
  const names = [];
25
- const callees = new Set();
26
- model_1.RNode.visitAst(idMap.get(expr), inner => {
27
- /* a definition only creates its closure, the body runs when it is called and that call carries its effects */
28
- if (r_function_definition_1.RFunctionDefinition.is(inner)) {
29
- return true;
30
- }
31
- else if (r_function_call_1.RFunctionCall.isNamed(inner)) {
32
- callees.add(inner.functionName.info.id);
50
+ for (const { call, id, name } of touchedWithin(expr, idMap)) {
51
+ const vertex = graph.getVertex(id);
52
+ if (call) {
33
53
  /* a call reads the function it names, so `eval(quote(f()))` needs the definition of `f` */
34
- if (vertex_1.DfgVertex.isFunctionCall(graph.getVertex(inner.info.id))) {
35
- names.push([inner.info.id, identifier_1.Identifier.getName(inner.functionName.content), false]);
36
- for (const def of df_helper_1.Dataflow.sourcesOf(graph, inner.info.id, edge_1.EdgeType.SideEffectOnCall)) {
37
- const name = node_id_1.NodeId.recoverBareName(def, idMap);
38
- if (name !== undefined) {
39
- names.push([def, name, true]);
54
+ if (vertex_1.DfgVertex.isFunctionCall(vertex)) {
55
+ names.push([id, name, false]);
56
+ for (const def of df_helper_1.Dataflow.sourcesOf(graph, id, edge_1.EdgeType.SideEffectOnCall)) {
57
+ const written = node_id_1.NodeId.recoverBareName(def, idMap);
58
+ if (written !== undefined) {
59
+ names.push([def, written, true]);
40
60
  }
41
61
  }
42
62
  }
43
- return false;
44
63
  }
45
- else if (!r_symbol_1.RSymbol.is(inner) || callees.has(inner.info.id)) {
46
- return false;
64
+ else if (vertex_1.DfgVertex.isUse(vertex) || vertex_1.DfgVertex.isVariableDefinition(vertex)) {
65
+ names.push([id, name, vertex_1.DfgVertex.isVariableDefinition(vertex)]);
47
66
  }
48
- const vertex = graph.getVertex(inner.info.id);
49
- if (vertex_1.DfgVertex.isUse(vertex) || vertex_1.DfgVertex.isVariableDefinition(vertex)) {
50
- names.push([inner.info.id, identifier_1.Identifier.getName(inner.content), vertex_1.DfgVertex.isVariableDefinition(vertex)]);
51
- }
52
- return false;
53
- });
67
+ }
54
68
  return names;
55
69
  }
56
70
  /** An expression R evaluates at a time we cannot pin down: the body a `delayedAssign` binds, forced at some later read of the name, or a promise a closure carries past the call that created it. */
@@ -59,7 +73,8 @@ exports.Deferred = {
59
73
  indexOf(graph, idMap) {
60
74
  return {
61
75
  definitions: verticesByName(graph, vertex_1.VertexType.VariableDefinition, idMap),
62
- uses: verticesByName(graph, vertex_1.VertexType.Use, idMap)
76
+ uses: verticesByName(graph, vertex_1.VertexType.Use, idMap),
77
+ held: new Map()
63
78
  };
64
79
  },
65
80
  /** The reads that may be the one forcing `binding`: every read of it that no other read always precedes, since an earlier read would already have forced it and cached the value. */
@@ -114,6 +129,11 @@ exports.Deferred = {
114
129
  /* the forcing read yields the promise's value, so only reads after it observe what the promise wrote */
115
130
  const reachedByAForce = (use) => forces === undefined
116
131
  || (!forces.sites.includes(use) && (reach.after ??= (0, happens_before_1.reachableFrom)(forces.cfg, forces.sites)).has(use));
132
+ /* the bindings of a name some force can see, asked again by every expression these forces evaluate (`eval` deep in a function meets thousands of bindings of `x`) */
133
+ function seenByAForceNamed(name) {
134
+ const byName = (0, defaultmap_1.getOrSet)(reach.seen ??= new WeakMap(), index.definitions, () => new Map());
135
+ return (0, defaultmap_1.getOrSet)(byName, name, () => (index.definitions.get(name) ?? []).filter(seenByAForce));
136
+ }
117
137
  /* whether some force always happens before `use`, asked again by every write of the bound name */
118
138
  let sites;
119
139
  function alwaysAfterAForce(use) {
@@ -126,6 +146,8 @@ exports.Deferred = {
126
146
  reach.always.set(use, always);
127
147
  return always;
128
148
  }
149
+ /* the bindings of a name this expression sees, the same for every read of it here */
150
+ const visible = new Map();
129
151
  /* `delayedAssign` names its variable with a string literal */
130
152
  const bindingName = forces === undefined ? undefined : node_id_1.NodeId.recoverBareName(forces.binding, idMap) ?? '';
131
153
  for (const [node, name, writes] of within) {
@@ -147,18 +169,31 @@ exports.Deferred = {
147
169
  }
148
170
  }
149
171
  else {
150
- const seen = (index.definitions.get(name) ?? []).filter(d => seenByAForce(d) && (!inCallerFrame || visibleFrom(expr, d, graph, idMap)));
172
+ const seen = inCallerFrame ? (0, defaultmap_1.getOrSet)(visible, name, () => (index.definitions.get(name) ?? []).filter(d => seenByAForce(d) && visibleFrom(expr, d, graph, idMap))) : seenByAForceNamed(name);
151
173
  for (const definition of seen) {
152
174
  graph.addEdge(node, definition, edge_1.EdgeType.Reads);
153
175
  }
154
- if (forces !== undefined) {
155
- /* a deferred call runs what its name holds at the force, which may be defined after the call was written */
156
- (0, linker_1.linkCallToDefinitions)(graph, node, seen, idMap);
176
+ if (forces !== undefined && seen.length > 0 && vertex_1.DfgVertex.isFunctionCall(graph.getVertex(node))) {
177
+ /* a deferred call runs what its name holds at the force, which may be defined after the call was written; every call of the name holds the same */
178
+ (0, linker_1.linkCallToFunctions)(graph, node, functionsHeldBy(seen, graph, index.held), idMap);
157
179
  }
158
180
  }
159
181
  }
160
182
  }
161
183
  };
184
+ /** The functions any of the bindings may hold, each binding walked once per index: deferred calls of one name in many places meet the same bindings. */
185
+ function functionsHeldBy(bindings, graph, held) {
186
+ if (held === undefined) {
187
+ return [...(0, linker_1.getAllLinkedFunctionDefinitions)(new Set(bindings), graph)[0]];
188
+ }
189
+ const functions = new Set();
190
+ for (const binding of bindings) {
191
+ for (const f of (0, defaultmap_1.getOrSet)(held, binding, () => [...(0, linker_1.getAllLinkedFunctionDefinitions)(new Set([binding]), graph)[0]])) {
192
+ functions.add(f);
193
+ }
194
+ }
195
+ return [...functions];
196
+ }
162
197
  /** Whether the binding `definition` lives in a frame `expr` sees: not a parameter or a local binding of a function `expr` is not within. */
163
198
  function visibleFrom(expr, definition, graph, idMap) {
164
199
  const node = idMap.get(definition);
@@ -100,6 +100,8 @@ exports.Quoted = {
100
100
  let enclosing;
101
101
  /* every call of a function lists the arguments of all its calls, so each is linked once per forces it meets */
102
102
  const linkedWith = new defaultmap_1.DefaultMap(() => new Set());
103
+ /* per parameter, the forces all of its arguments were linked with */
104
+ const settled = new Map();
103
105
  for (const [id, vertex] of graph.verticesOfType(vertex_1.VertexType.FunctionCall)) {
104
106
  const masks = nse_1.Nse.dropResolvedMask(graph, id, vertex.name);
105
107
  if (masks !== undefined) {
@@ -124,7 +126,7 @@ exports.Quoted = {
124
126
  const tracked = trackedEnvOf(vertex, evalEnv);
125
127
  /* a tracked `eval.env` that binds every name the promise reads leaves no other binding in play, its writes still reach later reads */
126
128
  const bound = tracked !== undefined && exports.Quoted.evaluateIn(graph, promise, tracked, idMap).length === 0;
127
- const candidates = bound ? { definitions: new Map(), uses: promised.uses } : promised;
129
+ const candidates = bound ? { definitions: new Map(), uses: promised.uses, held: promised.held } : promised;
128
130
  const forces = flow !== undefined && sites?.length && binding !== undefined ? { cfg: flow, sites, binding } : undefined;
129
131
  deferred_1.Deferred.link(graph, promise, candidates, idMap, forces);
130
132
  if (binding !== undefined) {
@@ -149,14 +151,31 @@ exports.Quoted = {
149
151
  continue;
150
152
  }
151
153
  for (const parameter of df_helper_1.Dataflow.calleesOf(graph, id).flatMap(df_helper_1.Dataflow.parametersOf)) {
152
- for (const argument of df_helper_1.Dataflow.argumentsBoundTo(graph, parameter)) {
154
+ /*
155
+ * every call of the function comes here with the same parameter and the same arguments, which are done once they all met
156
+ * these forces; the parameter's edges, which bind its arguments, only grow, so an unchanged count means the same arguments
157
+ */
158
+ const first = forcesOf(graph, parameter, flow, forcing, reachOf);
159
+ const edges = graph.edgesFrom(parameter).size;
160
+ const done = settled.get(parameter);
161
+ if (first !== undefined && done?.forces === first && done.edges === edges) {
162
+ continue;
163
+ }
164
+ const bound = [...df_helper_1.Dataflow.argumentsBoundTo(graph, parameter)];
165
+ let stable = true;
166
+ for (const argument of bound) {
153
167
  const index = namesOnce();
154
168
  const forces = forcesOf(graph, parameter, flow, forcing, reachOf);
169
+ stable &&= forces === first;
155
170
  if (forces !== undefined && !linkedWith.get(argument).has(forces)) {
156
171
  linkedWith.get(argument).add(forces);
157
172
  deferred_1.Deferred.link(graph, argument, index, idMap, forces, true);
158
173
  }
159
174
  }
175
+ /* only if linking bound no further argument while it ran, which the loop above would not have seen */
176
+ if (stable && first !== undefined && graph.edgesFrom(parameter).size === edges) {
177
+ settled.set(parameter, { forces: first, edges });
178
+ }
160
179
  }
161
180
  }
162
181
  }
@@ -188,7 +207,9 @@ function forcesOf(graph, parameter, cfg, forcing, reachOf) {
188
207
  return known.forces;
189
208
  }
190
209
  const sites = deferred_1.Deferred.forcedAt(graph, parameter, cfg);
191
- const forces = sites.length > 0 ? { cfg, sites, binding: parameter, reach: reachOf(sites) } : undefined;
210
+ /* new reads that leave the forces where they were keep them, and with them what was linked with them */
211
+ const same = known?.forces !== undefined && sites.length === known.forces.sites.length && sites.every((site, i) => site === known.forces?.sites[i]);
212
+ const forces = same ? known.forces : sites.length > 0 ? { cfg, sites, binding: parameter, reach: reachOf(sites) } : undefined;
192
213
  forcing.set(parameter, { version, reads, forces });
193
214
  return forces;
194
215
  }
@@ -312,12 +333,17 @@ function resolveEvaluation(graph, call, idMap, names, bindings, cfg, reachOf, en
312
333
  /* a frame of its own (`eval(expr, envir)` runs in the one it is given) says nothing about the bindings here, so every one of them stays possible */
313
334
  const elsewhere = environment === undefined || (r_function_call_1.RFunctionCall.isNamed(node) && node.arguments.length > 1);
314
335
  const sites = sources.length > 0 ? evaluationSites(graph, id, enclosing) : undefined;
315
- const reach = sites === undefined ? {} : reachOf(sites);
336
+ const reach = reachOf(sites ?? []);
316
337
  for (const { expr, at } of sources) {
317
338
  if (elsewhere) {
318
- const forces = cfg === undefined || sites === undefined ? undefined : { cfg, sites, binding: id, reach };
319
- deferred_1.Deferred.link(graph, expr, { definitions: bindings, uses: names.uses }, idMap, forces);
320
- deferred_1.Deferred.publish(graph, expr, names, idMap, id, sites ?? []);
339
+ /* every call evaluating the same capture at the same sites links it to the same bindings, so the first one does */
340
+ const linked = reach.linked ??= new Set();
341
+ if (!linked.has(expr)) {
342
+ linked.add(expr);
343
+ const forces = cfg === undefined || sites === undefined ? undefined : { cfg, sites, binding: id, reach };
344
+ deferred_1.Deferred.link(graph, expr, { definitions: bindings, uses: names.uses, held: names.held }, idMap, forces);
345
+ deferred_1.Deferred.publish(graph, expr, names, idMap, id, sites ?? []);
346
+ }
321
347
  }
322
348
  else {
323
349
  const open = (0, linker_1.linkExpressionIn)(graph, expr, environment, idMap);
@@ -5,6 +5,7 @@ const doc_dfg_1 = require("../../doc-util/doc-dfg");
5
5
  const doc_code_1 = require("../../doc-util/doc-code");
6
6
  const ambient_effect_1 = require("../../../dataflow/environments/ambient-effect");
7
7
  const default_builtin_config_1 = require("../../../dataflow/environments/default-builtin-config");
8
+ const flowr_analyzer_context_1 = require("../../../project/context/flowr-analyzer-context");
8
9
  /** a function's ambient accesses as a list, generated from its declaration */
9
10
  function summaryOf(stated, name) {
10
11
  const families = (0, default_builtin_config_1.statedSignatureOf)(stated, name)?.ambient ?? [];
@@ -15,7 +16,8 @@ function summaryOf(stated, name) {
15
16
  }
16
17
  /** The wiki section on how ambient state is declared in the built-in configuration and tracked in the dataflow graph. */
17
18
  async function ambientStateSection(parser, ctx) {
18
- const stated = (0, default_builtin_config_1.statedSignatures)();
19
+ const known = (0, flowr_analyzer_context_1.contextFromInput)('');
20
+ const stated = (0, default_builtin_config_1.statedSignatures)(default_builtin_config_1.DefaultBuiltinConfig, id => known.functionInfo(id));
19
21
  const families = Object.entries(ambient_effect_1.AmbientFamilyInfo);
20
22
  const verbs = Object.entries(ambient_effect_1.AmbientVerbInfo);
21
23
  const examples = ['png', 'plot', 'points', 'curve', 'dev.off', 'par', 'palette', 'sink', 'print', 'paste', 'options', 'getOption', 'Sys.setenv', 'set.seed', 'runif', 'setwd'];
@@ -145,7 +145,7 @@ ${(0, doc_structure_1.block)('TIP', 'When working with names and identifiers, co
145
145
  If you want a simple visitor which traverses the AST, the ${ctx.linkO(model_1.RNode, 'visitAst')} function is a good starting point.
146
146
  You may specify functions to be called whenever you enter and exit a node during the traversal, and any
147
147
  computation is to be done by side effects.
148
- For example, if you want to collect all the \`id\`s present within a normalized (sub-)AST,
148
+ For example, if you want to collect all ids present within a normalized (sub-)AST,
149
149
  as it is done by the ${ctx.linkO(model_1.RNode, 'collectAllIds')} (and corresponding ${ctx.linkO(model_1.RNode, 'collectAllIdsWithStop')}, ${ctx.linkO(r_project_1.RProject, 'collectAllIds')}, ...) function, you can use the following visitor:
150
150
 
151
151
  ${(0, doc_code_1.codeBlock)('ts', `
@@ -916,6 +916,14 @@ scale_it <- function(values) {
916
916
  (values - mu) / sd(values)
917
917
  }`;
918
918
  return `
919
+ Two functions that compute the same thing under different names are clones of each other, and the query finds such pairs. Given this R code:
920
+
921
+ ${(0, doc_code_1.codeBlock)('r', example)}
922
+
923
+ The following query reports them:
924
+
925
+ ${await (0, doc_query_1.showQuery)(shell, example, [{ type: 'code-clones', algorithms: [clone_detector_1.CloneAlgorithm.Gst, clone_detector_1.CloneAlgorithm.Winnowing] }], { ctx })}
926
+
919
927
  This query reports pairs of code fragments that are clones of each other, that is, code that was copied and possibly
920
928
  adapted. It runs over all files of the analysis, for example a whole folder or package, with three published algorithms:
921
929
 
@@ -925,7 +933,7 @@ adapted. It runs over all files of the analysis, for example a whole folder or p
925
933
  | \`gst\` | the token strings of functions or files with Greedy String Tiling | as in [JPlag](https://github.com/jplag/JPlag), see Prechelt et al., [Finding Plagiarisms among a Set of Programs with JPlag](https://doi.org/10.3217/jucs-008-11-1016), 2002 |
926
934
  | \`winnowing\` | k-gram fingerprints selected by robust winnowing, reported with the matched passages | Schleimer et al., [Winnowing: Local Algorithms for Document Fingerprinting](https://doi.org/10.1145/872757.872770), SIGMOD 2003, the algorithm behind MOSS |
927
935
 
928
- Before the detection, the query presents the code in one of three \`perspective\`s:
936
+ Before the detection, the query presents the code in one of three perspectives, chosen with \`perspective\`:
929
937
 
930
938
  - \`syntax\` shows the code as written.
931
939
  - \`canonical\` (the default) rewrites syntactic sugar and newer R features into one core form. Pipes become calls, \`\\(x)\` becomes \`function(x)\`, right and equal assignments become \`<-\`, \`(e)\` and \`{e}\` become \`e\`, \`x[["a"]]\` becomes \`x$a\`, \`T\` and \`F\` become \`TRUE\` and \`FALSE\`, and a tail \`return(e)\` becomes \`e\`. Every rewritten node keeps the id of the node it stems from, so all findings point to the original source.
@@ -935,8 +943,6 @@ With \`exportIndex\`, the query also returns the clone index of the analyzed fil
935
943
  A later query can pass such indices as \`against\` to search new code in a corpus of pre-analyzed projects without analyzing them again.
936
944
  Use \`config\` to tune the thresholds of each algorithm, and \`maxPairs\` to limit the number of reported pairs, as \`n\` copies of the same function already form \`n(n-1)/2\` pairs.
937
945
 
938
- ${await (0, doc_query_1.showQuery)(shell, example, [{ type: 'code-clones', algorithms: [clone_detector_1.CloneAlgorithm.Gst, clone_detector_1.CloneAlgorithm.Winnowing] }], { showCode: true, collapseResult: true, ctx })}
939
-
940
946
  In code, passing the query on its own to ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'query')} returns its result directly:
941
947
 
942
948
  ${(0, doc_code_1.codeBlock)('typescript', `const { pairs } = await analyzer.query({ type: 'code-clones', algorithms: ['gst', 'winnowing'] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "2.17.7",
3
+ "version": "2.17.8",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -28,11 +28,13 @@
28
28
  "overrides": {
29
29
  "lodash.isequal": "npm:fast-deep-equal@^3.1.3",
30
30
  "get-uri": {
31
- "basic-ftp": "6.2.3"
31
+ "basic-ftp": "^6.2.4"
32
32
  },
33
33
  "release-it": {
34
34
  "undici": "^7.30.1"
35
- }
35
+ },
36
+ "glob": "^14.0.2",
37
+ "minimatch": "^11.0.1"
36
38
  },
37
39
  "dependencies": {
38
40
  "@davisvaughan/tree-sitter-r": "^1.2.0",
@@ -13,7 +13,7 @@ import type { FlowrAnalyzer } from '../flowr-analyzer';
13
13
  import { type ReadOnlyFlowrAnalyzerIncrementalAnalysisContext, FlowrAnalyzerIncrementalAnalysisContext } from './flowr-analyzer-incremental-analysis-context';
14
14
  import { type InvalidationEvent, type InvalidationEventReceiver } from '../cache/flowr-cache';
15
15
  import { FlowrAnalyzerGasContext, type ReadOnlyFlowrAnalyzerGasContext } from './flowr-analyzer-gas-context';
16
- import { type FnInfo } from '../../dataflow/environments/query-fn-props';
16
+ import { type FnInfo, type FnInfoOptions } from '../../dataflow/environments/query-fn-props';
17
17
  import { Identifier } from '../../dataflow/environments/identifier';
18
18
  /**
19
19
  * This is a read-only interface to the {@link FlowrAnalyzerContext}.
@@ -36,7 +36,7 @@ export interface ReadOnlyFlowrAnalyzerContext {
36
36
  /** class names of plugins that activated (produced a result) since the last reset; only filled when `config.repl.showPlugins` is set */
37
37
  readonly activatedPlugins: ReadonlySet<string>;
38
38
  /** What flowR knows about the function `name` (a bare or `pkg::` name), from its built-ins and the signature database, see {@link fnInfo}. */
39
- functionInfo(name: Identifier | string, version?: string): FnInfo | undefined;
39
+ functionInfo(name: Identifier | string, options?: FnInfoOptions): FnInfo | undefined;
40
40
  /** The project kind the effective {@link config} is specialized for and the overrides it applies, or `undefined` when no specialization is in effect. */
41
41
  configSpecialization(): {
42
42
  readonly kind: ProjectKind;
@@ -165,8 +165,11 @@ export declare class FlowrAnalyzerContext implements ReadOnlyFlowrAnalyzerContex
165
165
  * the available methods.
166
166
  */
167
167
  inspect(): ReadOnlyFlowrAnalyzerContext;
168
- functionInfo(name: Identifier | string, version?: string): FnInfo | undefined;
169
- /** Reset the context to its initial state, e.g., removing all files, dependencies, and loading orders. */
168
+ functionInfo(name: Identifier | string, options?: FnInfoOptions): FnInfo | undefined;
169
+ /**
170
+ * Reset the context to its initial state, e.g., removing all files, dependencies, and loading orders.
171
+ * This also releases the module-level caches holding data of the analyzed program (see {@link GlobalCaches}).
172
+ */
170
173
  reset(): void;
171
174
  receive(event: InvalidationEvent): void;
172
175
  }
@@ -20,6 +20,7 @@ const flowr_analyzer_incremental_analysis_context_1 = require("./flowr-analyzer-
20
20
  const flowr_analyzer_gas_context_1 = require("./flowr-analyzer-gas-context");
21
21
  const query_fn_props_1 = require("../../dataflow/environments/query-fn-props");
22
22
  const identifier_1 = require("../../dataflow/environments/identifier");
23
+ const global_caches_1 = require("../../util/global-caches");
23
24
  /**
24
25
  * This summarizes the other context layers used by the {@link FlowrAnalyzer}.
25
26
  * Have a look at the attributes and layers listed below (e.g., {@link files} and {@link deps})
@@ -222,11 +223,15 @@ class FlowrAnalyzerContext {
222
223
  inspect() {
223
224
  return this;
224
225
  }
225
- functionInfo(name, version) {
226
- return (0, query_fn_props_1.fnInfo)(typeof name === 'string' ? identifier_1.Identifier.parse(name) : name, this, version);
226
+ functionInfo(name, options) {
227
+ return (0, query_fn_props_1.fnInfo)(typeof name === 'string' ? identifier_1.Identifier.parse(name) : name, this, options);
227
228
  }
228
- /** Reset the context to its initial state, e.g., removing all files, dependencies, and loading orders. */
229
+ /**
230
+ * Reset the context to its initial state, e.g., removing all files, dependencies, and loading orders.
231
+ * This also releases the module-level caches holding data of the analyzed program (see {@link GlobalCaches}).
232
+ */
229
233
  reset() {
234
+ global_caches_1.GlobalCaches.clear(global_caches_1.CacheScope.Analysis);
230
235
  this.files.reset();
231
236
  this.deps.reset();
232
237
  this.meta.reset();
@@ -82,6 +82,7 @@ class FlowrAnalyzerFilesContext extends abstract_flowr_analyzer_context_1.Abstra
82
82
  this.rootResolved = false;
83
83
  this.caseIndex = undefined;
84
84
  this.readdirCache.clear();
85
+ this.implicitSourceDirs.clear();
85
86
  }
86
87
  addRoot(root) {
87
88
  this.requestedRoots.push(root);
@@ -41,7 +41,8 @@ export interface ReadOnlyFlowrAnalyzerFunctionsContext {
41
41
  */
42
42
  export declare class FlowrAnalyzerFunctionsContext extends AbstractFlowrAnalyzerContext<undefined, void, FlowrAnalyzerPackageVersionsPlugin> implements ReadOnlyFlowrAnalyzerFunctionsContext {
43
43
  readonly name = "flowr-analyzer-functions-context";
44
- private functionInfo;
44
+ /** the functions the analyzed packages declare, by name; `ctx.functionInfo` is what flowR knows of a function by name */
45
+ private byName;
45
46
  constructor(ctx: FlowrAnalyzerContext, plugins?: readonly FlowrAnalyzerPackageVersionsPlugin[]);
46
47
  addFunctionInfo(info: FunctionInfo): void;
47
48
  private mergeFunctionInfo;
@@ -12,14 +12,15 @@ const flowr_analyzer_package_versions_namespace_file_plugin_1 = require("../plug
12
12
  */
13
13
  class FlowrAnalyzerFunctionsContext extends abstract_flowr_analyzer_context_1.AbstractFlowrAnalyzerContext {
14
14
  name = 'flowr-analyzer-functions-context';
15
- functionInfo = new Map();
15
+ /** the functions the analyzed packages declare, by name; `ctx.functionInfo` is what flowR knows of a function by name */
16
+ byName = new Map();
16
17
  constructor(ctx, plugins) {
17
18
  super(ctx, flowr_analyzer_package_versions_plugin_1.FlowrAnalyzerPackageVersionsPlugin.defaultPlugin(), plugins);
18
19
  }
19
20
  addFunctionInfo(info) {
20
- const list = this.functionInfo.get(info.name);
21
+ const list = this.byName.get(info.name);
21
22
  if (!list) {
22
- this.functionInfo.set(info.name, [info]);
23
+ this.byName.set(info.name, [info]);
23
24
  return;
24
25
  }
25
26
  const other = list.find(e => e.name === info.name &&
@@ -50,20 +51,20 @@ class FlowrAnalyzerFunctionsContext extends abstract_flowr_analyzer_context_1.Ab
50
51
  }
51
52
  getFunctionInfo(pkg, name, s3TypeDispatch) {
52
53
  if (s3TypeDispatch) {
53
- return this.functionInfo.get(name)?.find(e => e.packageOrigin === pkg && e.s3TypeDispatch === s3TypeDispatch);
54
+ return this.byName.get(name)?.find(e => e.packageOrigin === pkg && e.s3TypeDispatch === s3TypeDispatch);
54
55
  }
55
56
  else if (name.includes('.')) {
56
57
  const parts = name.split('.');
57
58
  s3TypeDispatch = parts.pop();
58
59
  const splitName = parts.join('.');
59
- if (this.functionInfo.has(splitName)) {
60
- return this.functionInfo.get(splitName)?.find(e => e.packageOrigin === pkg && e.s3TypeDispatch === s3TypeDispatch);
60
+ if (this.byName.has(splitName)) {
61
+ return this.byName.get(splitName)?.find(e => e.packageOrigin === pkg && e.s3TypeDispatch === s3TypeDispatch);
61
62
  }
62
63
  }
63
- return this.functionInfo.get(name)?.filter(e => e.packageOrigin === pkg);
64
+ return this.byName.get(name)?.filter(e => e.packageOrigin === pkg);
64
65
  }
65
66
  reset() {
66
- this.functionInfo = new Map();
67
+ this.byName = new Map();
67
68
  }
68
69
  }
69
70
  exports.FlowrAnalyzerFunctionsContext = FlowrAnalyzerFunctionsContext;
@@ -20,7 +20,7 @@ import { type TaintAnalysisBuilder } from '../taint-analysis/builder/taint-analy
20
20
  import '../abstract-interpretation/branch-paths-interpreter';
21
21
  import type { InvalidationEvent } from './cache/flowr-cache';
22
22
  import type { GasOverrides } from '../gas';
23
- import type { FnInfo } from '../dataflow/environments/query-fn-props';
23
+ import type { FnInfo, FnInfoOptions } from '../dataflow/environments/query-fn-props';
24
24
  import type { Identifier } from '../dataflow/environments/identifier';
25
25
  /** Options for a single analyzer operation, bounding what it may cost. */
26
26
  export interface FlowrAnalysisOptions {
@@ -83,9 +83,9 @@ export interface ReadonlyFlowrAnalysisProvider<Parser extends KnownParser = Know
83
83
  * A string is read the way R source spells a name, so `'dplyr::lead'` and `'dplyr:::internal'` name the
84
84
  * package function rather than a symbol with a `::` in it (pass an {@link Identifier} for that one).
85
85
  * @param name - The function to ask about, `'dplyr::lead'` or `Identifier.make('lead', 'dplyr')` to pin the package down.
86
- * @param version - The package version to answer for, the one the analysis assumes if omitted.
86
+ * @param options - The package version to answer for (the one the analysis assumes if omitted), and the fields to leave out (all are there by default).
87
87
  */
88
- functionInfo(name: Identifier | string, version?: string): FnInfo | undefined;
88
+ functionInfo(name: Identifier | string, options?: FnInfoOptions): FnInfo | undefined;
89
89
  /**
90
90
  * Get the parse output for the request.
91
91
  *
@@ -211,6 +211,8 @@ export declare class FlowrAnalyzer<Parser extends KnownParser = KnownParser> imp
211
211
  private parserInfo;
212
212
  /** the graph whose calls are already being qualified in the background, see {@link qualifyInBackground} */
213
213
  private qualifying;
214
+ /** stops the background qualification of {@link qualifying}, so a dropped graph is neither worked on nor kept */
215
+ private stopQualifying;
214
216
  /**
215
217
  * Create a new analyzer instance.
216
218
  * **Prefer the use of the {@link FlowrAnalyzerBuilder} instead of calling this constructor directly.**
@@ -223,8 +225,9 @@ export declare class FlowrAnalyzer<Parser extends KnownParser = KnownParser> imp
223
225
  context(): FlowrAnalyzerContext;
224
226
  parserInformation(): KnownParserInformation;
225
227
  inspectContext(): ReadOnlyFlowrAnalyzerContext;
226
- functionInfo(name: Identifier | string, version?: string): FnInfo | undefined;
228
+ functionInfo(name: Identifier | string, options?: FnInfoOptions): FnInfo | undefined;
227
229
  reset(): void;
230
+ private stopBackgroundWork;
228
231
  receive(event: InvalidationEvent): void;
229
232
  updateConfig(update: DeepPartial<FlowrConfig>): void;
230
233
  resetConfig(): void;