@eagleoutice/flowr 2.9.9 → 2.9.11

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 (198) hide show
  1. package/README.md +57 -54
  2. package/abstract-interpretation/absint-visitor.d.ts +16 -14
  3. package/abstract-interpretation/absint-visitor.js +93 -47
  4. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
  5. package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
  6. package/abstract-interpretation/data-frame/shape-inference.d.ts +2 -5
  7. package/abstract-interpretation/data-frame/shape-inference.js +4 -5
  8. package/abstract-interpretation/domains/abstract-domain.d.ts +4 -4
  9. package/abstract-interpretation/domains/abstract-domain.js +8 -8
  10. package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +12 -5
  11. package/abstract-interpretation/domains/mapped-abstract-domain.js +47 -23
  12. package/abstract-interpretation/domains/set-range-domain.js +1 -1
  13. package/abstract-interpretation/domains/state-abstract-domain.d.ts +30 -1
  14. package/abstract-interpretation/domains/state-abstract-domain.js +130 -4
  15. package/abstract-interpretation/normalized-ast-fold.d.ts +2 -2
  16. package/abstract-interpretation/normalized-ast-fold.js +4 -3
  17. package/benchmark/slicer.js +5 -5
  18. package/benchmark/summarizer/first-phase/process.js +4 -4
  19. package/cli/repl/commands/repl-normalize.js +2 -2
  20. package/cli/repl/core.js +2 -2
  21. package/config.js +1 -1
  22. package/control-flow/cfg-simplification.d.ts +1 -0
  23. package/control-flow/cfg-simplification.js +1 -0
  24. package/control-flow/control-flow-graph.d.ts +1 -1
  25. package/control-flow/control-flow-graph.js +1 -2
  26. package/control-flow/extract-cfg.js +34 -15
  27. package/control-flow/semantic-cfg-guided-visitor.js +1 -0
  28. package/dataflow/cluster.js +1 -1
  29. package/dataflow/environments/built-in.d.ts +6 -15
  30. package/dataflow/environments/built-in.js +25 -33
  31. package/dataflow/environments/default-builtin-config.d.ts +4 -8
  32. package/dataflow/environments/default-builtin-config.js +8 -5
  33. package/dataflow/environments/reference-to-maybe.d.ts +8 -0
  34. package/dataflow/environments/reference-to-maybe.js +46 -3
  35. package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
  36. package/dataflow/eval/resolve/alias-tracking.js +6 -6
  37. package/dataflow/eval/resolve/resolve.js +12 -10
  38. package/dataflow/fn/exceptions-of-function.d.ts +1 -1
  39. package/dataflow/fn/exceptions-of-function.js +2 -1
  40. package/dataflow/graph/call-graph.d.ts +1 -1
  41. package/dataflow/graph/call-graph.js +4 -3
  42. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  43. package/dataflow/graph/dataflowgraph-builder.js +21 -21
  44. package/dataflow/graph/graph.d.ts +5 -5
  45. package/dataflow/graph/graph.js +36 -32
  46. package/dataflow/graph/unknown-side-effect.js +3 -1
  47. package/dataflow/info.d.ts +4 -0
  48. package/dataflow/info.js +2 -2
  49. package/dataflow/internal/linker.d.ts +4 -4
  50. package/dataflow/internal/linker.js +59 -33
  51. package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -1
  52. package/dataflow/internal/process/functions/call/argument/make-argument.js +3 -1
  53. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
  54. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
  55. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -5
  56. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
  57. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +6 -5
  58. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +15 -6
  59. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -1
  60. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +3 -2
  61. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -4
  62. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +3 -3
  63. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -2
  64. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -1
  65. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -1
  66. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +7 -7
  67. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +3 -3
  68. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +22 -11
  69. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +22 -19
  70. package/dataflow/internal/process/functions/call/common.d.ts +1 -1
  71. package/dataflow/internal/process/functions/call/common.js +43 -35
  72. package/dataflow/internal/process/functions/call/known-call-handling.js +0 -2
  73. package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
  74. package/dataflow/internal/process/functions/process-argument.js +3 -3
  75. package/dataflow/internal/process/functions/process-parameter.js +2 -2
  76. package/dataflow/origin/dfg-get-origin.d.ts +1 -1
  77. package/dataflow/origin/dfg-get-origin.js +2 -2
  78. package/documentation/doc-util/doc-types.js +1 -1
  79. package/documentation/wiki-absint.js +7 -8
  80. package/documentation/wiki-cfg.js +3 -3
  81. package/documentation/wiki-mk/doc-context.d.ts +8 -0
  82. package/documentation/wiki-mk/doc-context.js +4 -0
  83. package/documentation/wiki-normalized-ast.d.ts +1 -1
  84. package/documentation/wiki-normalized-ast.js +9 -6
  85. package/linter/linter-format.d.ts +10 -0
  86. package/linter/linter-format.js +15 -0
  87. package/linter/rules/absolute-path.js +3 -3
  88. package/linter/rules/dead-code.js +1 -1
  89. package/linter/rules/file-path-validity.js +1 -1
  90. package/linter/rules/seeded-randomness.js +1 -1
  91. package/linter/rules/unused-definition.js +1 -1
  92. package/package.json +7 -7
  93. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +9 -0
  94. package/project/plugins/file-plugins/files/flowr-description-file.js +12 -0
  95. package/queries/catalog/call-context-query/call-context-query-executor.js +1 -1
  96. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
  97. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +4 -5
  98. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -1
  99. package/queries/catalog/dependencies-query/dependencies-query-format.js +6 -5
  100. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +1 -1
  101. package/queries/catalog/df-shape-query/df-shape-query-format.js +3 -3
  102. package/queries/catalog/does-call-query/does-call-query-executor.js +3 -3
  103. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +1 -1
  104. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -2
  105. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
  106. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -1
  107. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +1 -1
  108. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +1 -1
  109. package/queries/query-print.d.ts +1 -1
  110. package/queries/query-print.js +4 -3
  111. package/r-bridge/lang-4.x/ast/model/model.d.ts +151 -4
  112. package/r-bridge/lang-4.x/ast/model/model.js +249 -0
  113. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +11 -1
  114. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +13 -0
  115. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +19 -1
  116. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +26 -0
  117. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +36 -3
  118. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +48 -13
  119. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
  120. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +21 -0
  121. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +11 -1
  122. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +14 -0
  123. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +8 -2
  124. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +11 -5
  125. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +23 -1
  126. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +32 -0
  127. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +11 -1
  128. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +14 -0
  129. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +19 -1
  130. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +26 -1
  131. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +11 -1
  132. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +14 -0
  133. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +11 -1
  134. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +14 -0
  135. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +12 -2
  136. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +14 -0
  137. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +20 -2
  138. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +26 -0
  139. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +12 -2
  140. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +14 -0
  141. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +8 -2
  142. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +11 -5
  143. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +17 -1
  144. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +22 -0
  145. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +16 -1
  146. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +22 -0
  147. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +45 -8
  148. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +57 -16
  149. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +12 -2
  150. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +14 -0
  151. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +15 -3
  152. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +21 -6
  153. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +21 -6
  154. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +22 -5
  155. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
  156. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +21 -0
  157. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +11 -1
  158. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +14 -0
  159. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +23 -17
  160. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +39 -2
  161. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +52 -9
  162. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +18 -17
  163. package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +8 -7
  164. package/r-bridge/lang-4.x/ast/model/processing/visitor.js +6 -13
  165. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +1 -1
  166. package/r-bridge/lang-4.x/ast/parser/json/parser.js +1 -1
  167. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +4 -2
  168. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -1
  169. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +2 -2
  170. package/r-bridge/lang-4.x/convert-values.d.ts +14 -5
  171. package/r-bridge/lang-4.x/convert-values.js +76 -72
  172. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -15
  173. package/r-bridge/roxygen2/roxygen-parse.js +1 -1
  174. package/r-bridge/shell-executor.js +1 -1
  175. package/reconstruct/auto-select/magic-comments.js +4 -4
  176. package/reconstruct/reconstruct.js +2 -1
  177. package/search/search-executor/search-generators.js +2 -2
  178. package/slicing/criterion/filters/all-variables.js +1 -1
  179. package/slicing/criterion/parse.d.ts +1 -1
  180. package/slicing/criterion/parse.js +5 -3
  181. package/slicing/static/slice-call.d.ts +1 -1
  182. package/slicing/static/slice-call.js +2 -2
  183. package/statistics/features/supported/assignments/assignments.js +2 -2
  184. package/statistics/features/supported/control-flow/control-flow.js +2 -2
  185. package/statistics/features/supported/data-access/data-access.js +6 -5
  186. package/statistics/features/supported/defined-functions/defined-functions.js +9 -8
  187. package/statistics/features/supported/expression-list/statistics-expression-list.js +2 -2
  188. package/statistics/features/supported/loops/loops.js +6 -5
  189. package/statistics/features/supported/used-functions/used-functions.js +2 -2
  190. package/statistics/features/supported/variables/variables.js +8 -8
  191. package/util/mermaid/ast.js +3 -3
  192. package/util/mermaid/cfg.js +3 -4
  193. package/util/mermaid/dfg.d.ts +1 -1
  194. package/util/mermaid/dfg.js +13 -12
  195. package/util/simple-df/dfg-ascii.js +1 -1
  196. package/util/version.js +1 -1
  197. package/r-bridge/lang-4.x/ast/model/collect.d.ts +0 -10
  198. package/r-bridge/lang-4.x/ast/model/collect.js +0 -25
@@ -8,11 +8,11 @@ const control_flow_graph_1 = require("../../control-flow/control-flow-graph");
8
8
  const reconstruct_1 = require("../../reconstruct/reconstruct");
9
9
  const auto_select_defaults_1 = require("../../reconstruct/auto-select/auto-select-defaults");
10
10
  const info_1 = require("./info");
11
- const collect_1 = require("../../r-bridge/lang-4.x/ast/model/collect");
11
+ const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
12
12
  exports.MermaidEntryPointDefaultMarkStyle = 'stroke:cyan,stroke-width:6.5px;';
13
13
  exports.MermaidExitPointDefaultMarkStyle = 'stroke:green,stroke-width:6.5px;';
14
14
  function getLexeme(n) {
15
- return n ? n.info.fullLexeme ?? n.lexeme ?? '' : undefined;
15
+ return n ? model_1.RNode.lexeme(n) ?? '' : undefined;
16
16
  }
17
17
  function cfgOfNode(vert, normalizedVertex, id, content, output) {
18
18
  if (normalizedVertex && content !== undefined) {
@@ -58,8 +58,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart BT\n', simplify
58
58
  if (!nastNode) {
59
59
  continue;
60
60
  }
61
- const ids = (0, collect_1.collectAllIds)(nastNode);
62
- for (const childId of ids) {
61
+ for (const childId of model_1.RNode.collectAllIds(nastNode)) {
63
62
  completed.add(childId);
64
63
  }
65
64
  }
@@ -1,5 +1,5 @@
1
1
  import { type DataflowGraph } from '../../dataflow/graph/graph';
2
- import { type NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
2
+ import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
3
3
  import { type IdentifierDefinition } from '../../dataflow/environments/identifier';
4
4
  import { type MermaidMarkdownMark, type MermaidMarkStyle } from './info';
5
5
  interface MermaidGraph {
@@ -13,9 +13,9 @@ const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-fun
13
13
  const edge_1 = require("../../dataflow/graph/edge");
14
14
  const vertex_1 = require("../../dataflow/graph/vertex");
15
15
  const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
16
- const built_in_1 = require("../../dataflow/environments/built-in");
17
16
  const info_1 = require("./info");
18
17
  const range_1 = require("../range");
18
+ const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
19
19
  function subflowToMermaid(nodeId, subflow, mermaid, idPrefix = '') {
20
20
  if (subflow === undefined) {
21
21
  return;
@@ -25,7 +25,7 @@ function subflowToMermaid(nodeId, subflow, mermaid, idPrefix = '') {
25
25
  // get parent
26
26
  const idMap = mermaid.rootGraph.idMap;
27
27
  const node = idMap?.get(nodeId);
28
- const nodeLexeme = node?.info.fullLexeme ?? node?.lexeme ?? 'function';
28
+ const nodeLexeme = model_1.RNode.lexeme(node) ?? 'function';
29
29
  const location = node?.location?.[0] ? ` (L. ${node?.location?.[0]})` : '';
30
30
  mermaid.nodeLines.push(`\nsubgraph "${subflowId}" ["${(0, mermaid_1.escapeMarkdown)(nodeLexeme)}${location}"]`);
31
31
  }
@@ -134,6 +134,7 @@ function printEnvironmentToLines(env) {
134
134
  function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
135
135
  const fCall = info.tag === vertex_1.VertexType.FunctionCall;
136
136
  const { open, close } = mermaidNodeBrackets(info.tag);
137
+ const origId = id;
137
138
  id = (0, mermaid_1.escapeId)(id);
138
139
  if (info.environment && mermaid.includeEnvironments) {
139
140
  if (info.environment.level > 0 || info.environment.current.memory.size !== 0) {
@@ -157,17 +158,20 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
157
158
  if (mark?.has(id)) {
158
159
  mermaid.nodeLines.push(` style ${idPrefix}${id} ${mermaid.markStyle.vertex} `);
159
160
  }
160
- if ([...mermaid.rootGraph.unknownSideEffects].some(l => (0, node_id_1.normalizeIdToNumberIfPossible)(l) === (0, node_id_1.normalizeIdToNumberIfPossible)(id))) {
161
+ if (mermaid.rootGraph.unknownSideEffects.values().some(l => node_id_1.NodeId.normalize(l) === node_id_1.NodeId.normalize(origId))) {
161
162
  mermaid.nodeLines.push(` style ${idPrefix}${id} stroke:red,stroke-width:5px; `);
162
163
  }
163
- const edges = mermaid.rootGraph.get((0, node_id_1.normalizeIdToNumberIfPossible)(id), true);
164
+ if (info.tag === vertex_1.VertexType.FunctionDefinition) {
165
+ subflowToMermaid(id, info.subflow, mermaid, idPrefix);
166
+ }
167
+ const edges = mermaid.rootGraph.outgoingEdges(node_id_1.NodeId.normalize(origId));
164
168
  if (edges === undefined) {
165
169
  mermaid.nodeLines.push(' %% No edges found for ' + id);
166
170
  return;
167
171
  }
168
- const artificialCdEdges = (info.cds ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']) }]);
172
+ const artificialCdEdges = (info.cds ?? []).map(x => [x.id, { types: new Set([x.when ? 'CD-True' : 'CD-False']), file: x.file }]);
169
173
  // eslint-disable-next-line prefer-const
170
- for (let [target, edge] of [...edges[1], ...artificialCdEdges]) {
174
+ for (let [target, edge] of [...edges, ...artificialCdEdges]) {
171
175
  if (includeOnlyIds && !includeOnlyIds.has(target)) {
172
176
  continue;
173
177
  }
@@ -177,8 +181,8 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
177
181
  const edgeId = encodeEdge(idPrefix + id, idPrefix + target, edgeTypes);
178
182
  if (!mermaid.presentEdges.has(edgeId)) {
179
183
  mermaid.presentEdges.add(edgeId);
180
- const style = (0, built_in_1.isBuiltIn)(target) ? '-.->' : '-->';
181
- mermaid.edgeLines.push(` ${idPrefix}${id} ${style}|"${[...edgeTypes].map(e => typeof e === 'number' ? edge_1.DfEdge.typeToName(e) : e).join(', ')}"| ${idPrefix}${target}`);
184
+ const style = node_id_1.NodeId.isBuiltIn(target) ? '-.->' : '-->';
185
+ mermaid.edgeLines.push(` ${idPrefix}${id} ${style}|"${[...edgeTypes].map(e => typeof e === 'number' ? edge_1.DfEdge.typeToName(e) : e).join(', ')}${'file' in edge && edge.file ? `, from: ${edge.file}` : ''}"| ${idPrefix}${target}`);
182
186
  if (mermaid.mark?.has(id + '->' + target)) {
183
187
  // who invented this syntax?!
184
188
  mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} ${mermaid.markStyle.edge}`);
@@ -186,7 +190,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
186
190
  if (edgeTypes.has('CD-True') || edgeTypes.has('CD-False')) {
187
191
  mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} stroke:gray,color:gray;`);
188
192
  }
189
- if ((0, built_in_1.isBuiltIn)(target)) {
193
+ if (node_id_1.NodeId.isBuiltIn(target)) {
190
194
  mermaid.edgeLines.push(` linkStyle ${mermaid.presentEdges.size - 1} stroke:gray;`);
191
195
  if (!mermaid.presentVertices.has(target)) {
192
196
  mermaid.nodeLines.push(` ${idPrefix}${target}["\`Built-In:\n${(0, mermaid_1.escapeMarkdown)(String(originalTarget).replace('built-in:', ''))}\`"]`);
@@ -196,9 +200,6 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
196
200
  }
197
201
  }
198
202
  }
199
- if (info.tag === vertex_1.VertexType.FunctionDefinition) {
200
- subflowToMermaid(id, info.subflow, mermaid, idPrefix);
201
- }
202
203
  }
203
204
  // make the passing of root ids more performant again
204
205
  function graphToMermaidGraph(rootIds, { simplified, graph, prefix = 'flowchart BT', idPrefix = '', includeEnvironments = !simplified, mark, rootGraph, presentEdges = new Set(), markStyle = info_1.MermaidDefaultMarkStyle, includeOnlyIds }) {
@@ -156,7 +156,7 @@ function renderVertices(dfg, g, canvas) {
156
156
  const label = node.label;
157
157
  const x = Math.round(node.x);
158
158
  const y = Math.round(node.y);
159
- const tag = dfg.getVertex((0, node_id_1.normalizeIdToNumberIfPossible)(nodeId))?.tag;
159
+ const tag = dfg.getVertex(node_id_1.NodeId.normalize(nodeId))?.tag;
160
160
  let e = '+';
161
161
  if (tag && tag in type2Edge) {
162
162
  e = type2Edge[tag];
package/util/version.js CHANGED
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
6
6
  const semver_1 = require("semver");
7
7
  const assert_1 = require("./assert");
8
8
  // this is automatically replaced with the current version by release-it
9
- const version = '2.9.9';
9
+ const version = '2.9.11';
10
10
  /**
11
11
  * Retrieves the current flowR version as a new {@link SemVer} object.
12
12
  */
@@ -1,10 +0,0 @@
1
- import type { RNode } from './model';
2
- import type { NodeId } from './processing/node-id';
3
- import type { ParentInformation } from './processing/decorate';
4
- import type { RProject } from './nodes/r-project';
5
- /**
6
- * Collects all node ids within a tree given by a respective root node
7
- * @param nodes - The root id nodes to start collecting from
8
- * @param stop - A function that determines whether to stop collecting at a given node, does not stop by default
9
- */
10
- export declare function collectAllIds<OtherInfo>(nodes: RProject<OtherInfo & ParentInformation> | RNode<OtherInfo & ParentInformation> | (RNode<OtherInfo & ParentInformation> | null | undefined)[] | undefined, stop?: (node: RNode<OtherInfo & ParentInformation>) => boolean): Set<NodeId>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.collectAllIds = collectAllIds;
4
- const visitor_1 = require("./processing/visitor");
5
- const type_1 = require("./type");
6
- /**
7
- * Collects all node ids within a tree given by a respective root node
8
- * @param nodes - The root id nodes to start collecting from
9
- * @param stop - A function that determines whether to stop collecting at a given node, does not stop by default
10
- */
11
- function collectAllIds(nodes, stop = () => false) {
12
- if (nodes && 'type' in nodes && nodes.type === type_1.RType.Project) {
13
- nodes = nodes.files.map(f => f.root);
14
- }
15
- const ids = new Set();
16
- (0, visitor_1.visitAst)(nodes, (node) => {
17
- if (stop(node)) {
18
- return true;
19
- }
20
- ids.add(node.info.id);
21
- return false;
22
- });
23
- return ids;
24
- }
25
- //# sourceMappingURL=collect.js.map