@eagleoutice/flowr 2.14.1 → 2.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/README.md +142 -87
  2. package/abstract-interpretation/absint-visitor.d.ts +132 -25
  3. package/abstract-interpretation/absint-visitor.js +459 -99
  4. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
  5. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  6. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
  7. package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
  8. package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
  9. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
  10. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
  11. package/abstract-interpretation/data-frame/resolve-args.js +6 -4
  12. package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
  13. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
  14. package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
  15. package/abstract-interpretation/domains/partial-product-domain.js +1 -1
  16. package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
  17. package/abstract-interpretation/domains/set-range-domain.js +3 -2
  18. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
  19. package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
  20. package/benchmark/calibration.d.ts +11 -6
  21. package/benchmark/calibration.js +19 -8
  22. package/benchmark/slicer.d.ts +7 -1
  23. package/benchmark/slicer.js +38 -34
  24. package/benchmark/stats/count-comments.d.ts +16 -0
  25. package/benchmark/stats/count-comments.js +30 -0
  26. package/benchmark/stats/print.js +2 -0
  27. package/benchmark/stats/size-of.d.ts +7 -3
  28. package/benchmark/stats/size-of.js +7 -3
  29. package/benchmark/stats/stats.d.ts +7 -0
  30. package/benchmark/summarizer/first-phase/process.js +2 -19
  31. package/benchmark/summarizer/second-phase/graph.js +13 -3
  32. package/benchmark/summarizer/second-phase/process.js +2 -0
  33. package/cli/repl/commands/repl-dataflow.js +70 -27
  34. package/cli/repl/core.d.ts +1 -1
  35. package/cli/repl/core.js +1 -1
  36. package/cli/repl/parser/slice-query-parser.js +2 -1
  37. package/cli/repl/server/connection.d.ts +4 -0
  38. package/cli/repl/server/connection.js +19 -16
  39. package/cli/repl/server/messages/message-analysis.d.ts +1 -1
  40. package/config.d.ts +21 -8
  41. package/config.js +12 -5
  42. package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
  43. package/control-flow/basic-cfg-guided-visitor.js +37 -24
  44. package/control-flow/cfg-dead-code.js +44 -33
  45. package/control-flow/cfg-properties.js +2 -2
  46. package/control-flow/cfg-simplification.js +6 -5
  47. package/control-flow/cfg-to-basic-blocks.js +11 -13
  48. package/control-flow/control-flow-graph.d.ts +179 -189
  49. package/control-flow/control-flow-graph.js +400 -263
  50. package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
  51. package/control-flow/dfg-cfg-guided-visitor.js +17 -13
  52. package/control-flow/diff-cfg.js +6 -14
  53. package/control-flow/happens-before.js +5 -4
  54. package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
  55. package/control-flow/semantic-cfg-guided-visitor.js +6 -3
  56. package/control-flow/simple-visitor.js +14 -15
  57. package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
  58. package/control-flow/useless-loop.js +18 -14
  59. package/core/steps/all/core/20-dataflow.d.ts +1 -3
  60. package/core/steps/pipeline/default-pipelines.d.ts +141 -157
  61. package/dataflow/cluster.js +7 -0
  62. package/dataflow/environments/apply-kill.d.ts +6 -0
  63. package/dataflow/environments/apply-kill.js +63 -31
  64. package/dataflow/environments/built-in-props.d.ts +5 -1
  65. package/dataflow/environments/built-in-props.js +4 -0
  66. package/dataflow/environments/built-in.d.ts +6 -3
  67. package/dataflow/environments/built-in.js +8 -5
  68. package/dataflow/environments/clone.d.ts +3 -3
  69. package/dataflow/environments/clone.js +5 -5
  70. package/dataflow/environments/default-builtin-config.d.ts +114 -3
  71. package/dataflow/environments/default-builtin-config.js +137 -35
  72. package/dataflow/environments/environment.d.ts +5 -5
  73. package/dataflow/environments/environment.js +5 -5
  74. package/dataflow/environments/identifier.d.ts +11 -1
  75. package/dataflow/environments/identifier.js +4 -1
  76. package/dataflow/environments/resolve-by-name.d.ts +7 -0
  77. package/dataflow/environments/resolve-by-name.js +12 -0
  78. package/dataflow/environments/resolve-helper.d.ts +3 -1
  79. package/dataflow/environments/resolve-helper.js +2 -0
  80. package/dataflow/eval/resolve/alias-tracking.d.ts +3 -3
  81. package/dataflow/eval/resolve/alias-tracking.js +3 -3
  82. package/dataflow/eval/resolve/match-arguments.js +7 -5
  83. package/dataflow/eval/resolve/node-value.d.ts +3 -1
  84. package/dataflow/eval/resolve/node-value.js +12 -0
  85. package/dataflow/eval/resolve/resolve-argument.js +5 -4
  86. package/dataflow/eval/resolve/resolve-operators.js +9 -6
  87. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  88. package/dataflow/eval/resolve/resolve-working-directory.js +4 -3
  89. package/dataflow/eval/resolve/resolve.js +3 -2
  90. package/dataflow/eval/values/general.js +8 -5
  91. package/dataflow/extractor.d.ts +1 -4
  92. package/dataflow/extractor.js +11 -10
  93. package/dataflow/fn/exceptions-of-function.d.ts +3 -1
  94. package/dataflow/fn/strict-function.js +7 -5
  95. package/dataflow/graph/call-graph.js +2 -2
  96. package/dataflow/graph/df-helper.d.ts +8 -1
  97. package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
  98. package/dataflow/graph/diff-dataflow-graph.js +19 -2
  99. package/dataflow/graph/edge.d.ts +38 -2
  100. package/dataflow/graph/edge.js +32 -2
  101. package/dataflow/graph/graph.d.ts +4 -3
  102. package/dataflow/graph/graph.js +6 -2
  103. package/dataflow/graph/match-args.d.ts +69 -0
  104. package/dataflow/graph/match-args.js +167 -0
  105. package/dataflow/info.d.ts +15 -6
  106. package/dataflow/info.js +0 -17
  107. package/dataflow/internal/control-flow.d.ts +114 -0
  108. package/dataflow/internal/control-flow.js +224 -0
  109. package/dataflow/internal/linker.d.ts +6 -31
  110. package/dataflow/internal/linker.js +24 -81
  111. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
  112. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
  113. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
  114. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
  115. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  116. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
  117. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
  118. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
  119. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  120. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
  121. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
  122. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
  123. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
  124. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  125. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
  126. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +18 -2
  127. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +12 -1
  128. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
  129. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +38 -30
  130. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
  131. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  132. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +36 -8
  133. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
  134. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
  135. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +6 -4
  137. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
  138. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +9 -4
  139. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
  140. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
  141. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
  142. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
  143. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
  144. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
  145. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
  146. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
  147. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +11 -2
  148. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
  149. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
  150. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
  151. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
  152. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
  153. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
  154. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -2
  155. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +71 -33
  156. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
  157. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +13 -14
  158. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +14 -11
  160. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
  161. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
  162. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
  163. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
  164. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
  165. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
  166. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
  167. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +50 -10
  168. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
  169. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +20 -4
  170. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
  171. package/dataflow/internal/process/functions/call/common.js +5 -6
  172. package/dataflow/internal/process/functions/call/deferred.js +2 -2
  173. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
  174. package/dataflow/internal/process/functions/call/known-call-handling.js +41 -15
  175. package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
  176. package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
  177. package/dataflow/internal/process/functions/call/nse.js +6 -1
  178. package/dataflow/internal/process/functions/call/quoted.js +2 -2
  179. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
  180. package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
  181. package/dataflow/internal/process/functions/process-argument.js +12 -4
  182. package/dataflow/internal/process/functions/process-parameter.js +13 -0
  183. package/dataflow/internal/process/process-named-call.d.ts +2 -2
  184. package/dataflow/internal/process/process-named-call.js +9 -7
  185. package/documentation/data/server/doc-data-server-messages.js +4 -4
  186. package/documentation/doc-readme.js +33 -0
  187. package/documentation/doc-util/doc-cfg.d.ts +8 -7
  188. package/documentation/doc-util/doc-cfg.js +10 -10
  189. package/documentation/doc-util/doc-playground.d.ts +12 -0
  190. package/documentation/doc-util/doc-playground.js +21 -0
  191. package/documentation/doc-util/doc-query.d.ts +4 -1
  192. package/documentation/doc-util/doc-query.js +4 -2
  193. package/documentation/wiki-absint.d.ts +3 -4
  194. package/documentation/wiki-absint.js +17 -5
  195. package/documentation/wiki-analyzer.js +2 -2
  196. package/documentation/wiki-cfg.js +101 -106
  197. package/documentation/wiki-dataflow-graph.js +84 -53
  198. package/documentation/wiki-interface.js +1 -0
  199. package/documentation/wiki-linter.js +15 -1
  200. package/documentation/wiki-linting-and-testing.js +1 -16
  201. package/documentation/wiki-mk/doc-maker.js +6 -4
  202. package/documentation/wiki-query.js +14 -4
  203. package/documentation/wiki-signature-database.js +28 -2
  204. package/linter/linter-fix.d.ts +16 -0
  205. package/linter/linter-fix.js +104 -0
  206. package/linter/linter-format.d.ts +18 -1
  207. package/linter/linter-format.js +31 -1
  208. package/linter/linter-output.js +46 -10
  209. package/linter/linter-rules.d.ts +40 -9
  210. package/linter/linter-rules.js +2 -0
  211. package/linter/rules/absolute-path.js +4 -2
  212. package/linter/rules/dataframe-access-validation.js +6 -7
  213. package/linter/rules/deprecated-functions.d.ts +107 -10
  214. package/linter/rules/deprecated-functions.js +311 -23
  215. package/linter/rules/file-path-validity.js +5 -4
  216. package/linter/rules/function-finder-util.d.ts +6 -0
  217. package/linter/rules/function-finder-util.js +21 -13
  218. package/linter/rules/naming-convention.js +1 -1
  219. package/linter/rules/network-functions.d.ts +2 -2
  220. package/linter/rules/stop-with-call-arg.js +2 -2
  221. package/linter/rules/unclosed-connection.js +2 -2
  222. package/linter/rules/undefined-symbol-util.js +6 -4
  223. package/linter/rules/undefined-symbol.js +2 -2
  224. package/linter/rules/unused-definition.js +8 -4
  225. package/linter/rules/unused-import.d.ts +60 -0
  226. package/linter/rules/unused-import.js +179 -0
  227. package/package.json +2 -2
  228. package/project/attached-packages.js +2 -1
  229. package/project/cache/flowr-analyzer-cache.d.ts +2 -5
  230. package/project/cache/flowr-analyzer-cache.js +4 -7
  231. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
  232. package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
  233. package/project/cache/flowr-cache.d.ts +9 -0
  234. package/project/cache/flowr-cache.js +19 -0
  235. package/project/context/flowr-analyzer-context.d.ts +7 -3
  236. package/project/context/flowr-analyzer-context.js +15 -9
  237. package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
  238. package/project/context/flowr-analyzer-dependencies-context.js +9 -14
  239. package/project/context/flowr-analyzer-files-context.js +15 -17
  240. package/project/context/flowr-analyzer-meta-context.js +2 -12
  241. package/project/dependency-version-space.d.ts +1 -7
  242. package/project/dependency-version-space.js +9 -8
  243. package/project/flowr-analyzer-builder.d.ts +4 -4
  244. package/project/flowr-analyzer.d.ts +4 -6
  245. package/project/flowr-analyzer.js +4 -5
  246. package/project/plugins/file-plugins/files/flowr-namespace-file.js +22 -34
  247. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
  248. package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
  249. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
  250. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
  251. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
  252. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
  253. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
  254. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
  255. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
  256. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
  257. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
  258. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
  259. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
  260. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
  261. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
  262. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
  263. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
  264. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
  265. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
  266. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
  267. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
  268. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
  269. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
  270. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
  271. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
  272. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
  273. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
  274. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
  275. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
  276. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
  277. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
  278. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
  279. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
  280. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
  281. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
  282. package/project/sigdb/build.d.ts +2 -2
  283. package/project/sigdb/decode.d.ts +0 -5
  284. package/project/sigdb/decode.js +0 -8
  285. package/project/sigdb/index-format.d.ts +4 -4
  286. package/project/sigdb/manifest.d.ts +2 -2
  287. package/project/sigdb/reader.d.ts +54 -13
  288. package/project/sigdb/reader.js +4 -3
  289. package/project/sigdb/schema.d.ts +3 -1
  290. package/project/sigdb/signature-db.d.ts +69 -0
  291. package/project/sigdb/signature-db.js +54 -0
  292. package/project/sigdb/signature-match.d.ts +10 -5
  293. package/project/sigdb/signature-match.js +13 -8
  294. package/queries/catalog/absint-query/absint-query-executor.js +1 -2
  295. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
  296. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
  297. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
  298. package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
  299. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  300. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
  301. package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
  302. package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
  303. package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
  304. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
  305. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
  306. package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
  307. package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
  308. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
  309. package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
  310. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  311. package/queries/catalog/signature-query/signature-query-executor.js +4 -3
  312. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  313. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
  314. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
  315. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  316. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
  317. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
  318. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
  319. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  320. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
  321. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  322. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
  323. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  324. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
  325. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  326. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
  327. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  328. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
  329. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
  330. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
  331. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  332. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
  333. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  334. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
  335. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  336. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
  337. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  338. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
  339. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  340. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
  341. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
  342. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -0
  343. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +8 -0
  344. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +8 -0
  345. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  346. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
  347. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
  348. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +1 -0
  349. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  350. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
  351. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  352. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -0
  353. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  354. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
  355. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  356. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
  357. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  358. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
  359. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  360. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +5 -1
  361. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +0 -5
  362. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
  363. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
  364. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
  365. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
  366. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
  367. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
  368. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
  369. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
  370. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
  371. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
  372. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
  373. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
  374. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
  375. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  376. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
  377. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
  378. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
  379. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
  380. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
  381. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
  382. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
  383. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
  384. package/reconstruct/inline/source-inline-map.js +3 -3
  385. package/reconstruct/reconstruct.js +6 -4
  386. package/search/flowr-search-builder.d.ts +8 -8
  387. package/search/flowr-search-builder.js +4 -4
  388. package/search/flowr-search-filters.d.ts +2 -2
  389. package/search/flowr-search-filters.js +3 -2
  390. package/search/search-executor/search-enrichers.d.ts +6 -0
  391. package/search/search-executor/search-enrichers.js +44 -5
  392. package/slicing/criterion/filters/all-variables.js +2 -1
  393. package/slicing/criterion/parse.js +8 -6
  394. package/slicing/static/slice-call.js +2 -2
  395. package/util/arg-matching.d.ts +3 -0
  396. package/util/arg-matching.js +12 -1
  397. package/util/collections/arrays.d.ts +0 -4
  398. package/util/collections/arrays.js +4 -26
  399. package/util/diff-graph.d.ts +1 -1
  400. package/util/diff-graph.js +17 -3
  401. package/util/diff.d.ts +6 -0
  402. package/util/mermaid/ast.d.ts +1 -1
  403. package/util/mermaid/ast.js +5 -4
  404. package/util/mermaid/cfg.js +130 -24
  405. package/util/mermaid/dfg.js +31 -10
  406. package/util/mermaid/mermaid.js +2 -0
  407. package/util/objects.d.ts +24 -4
  408. package/util/objects.js +12 -0
  409. package/util/prefix.d.ts +1 -1
  410. package/util/text/playground-link.d.ts +131 -0
  411. package/util/text/playground-link.js +214 -0
  412. package/util/text/strings.js +7 -3
  413. package/util/version.js +1 -1
  414. package/control-flow/cfg-builder.d.ts +0 -30
  415. package/control-flow/cfg-builder.js +0 -79
  416. package/control-flow/extract-cfg.d.ts +0 -36
  417. package/control-flow/extract-cfg.js +0 -693
  418. package/project/cfg-kind.d.ts +0 -21
  419. package/project/cfg-kind.js +0 -26
@@ -1,16 +1,15 @@
1
1
  import { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
2
+ import type { DataflowGraph } from '../dataflow/graph/graph';
3
+ import type { ControlDependency, DataflowInformation } from '../dataflow/info';
4
+ import { type QuadSerializationConfiguration } from '../util/quads';
2
5
  import type { MergeableRecord } from '../util/objects';
3
6
  import { RFalse, RTrue } from '../r-bridge/lang-4.x/convert-values';
7
+ import type { AstIdMap } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
4
8
  /**
5
9
  * The type of a vertex in the {@link ControlFlowGraph}.
6
10
  * Please use the helper object (e.g. {@link CfgVertex#getType|getType()}) to work with vertices instead of directly accessing the properties.
7
11
  */
8
12
  export declare enum CfgVertexType {
9
- /**
10
- * The explicit exit-nodes to ensure the hammock property.
11
- * @see {@link CfgVertex.makeMarker|CfgVertex.makeMarker()} - for a helper function to create end marker vertices
12
- */
13
- Marker = 0,
14
13
  /**
15
14
  * something like an if, assignment, ... even though in the classical sense of R they are still expressions
16
15
  * @see {@link CfgVertex.makeStatement|CfgVertex.makeStatement()} - for a helper function to create statement vertices
@@ -28,32 +27,30 @@ export declare enum CfgVertexType {
28
27
  Block = 3
29
28
  }
30
29
  export declare const enum CfgEdgeType {
31
- /** a flow dependency */
32
- Fd = 0,
33
- /** a control dependency */
34
- Cd = 1
30
+ /** the target simply runs after the source */
31
+ Flow = 0,
32
+ /** the target runs after the source, but only under a {@link ControlDependency} */
33
+ Control = 1
35
34
  }
36
35
  /**
37
- * A vertex in the {@link ControlFlowGraph} that may have markers attached to it (e.g., for function calls).
36
+ * A vertex in the {@link ControlFlowGraph}.
38
37
  * - `type`: the type of the vertex, either a statement or an expression
39
- * - `id`: the id of the vertex, which should directly relate to the AST node
38
+ * - `id`: the id of the vertex, which directly relates to the AST node and to the vertex of the same id in the {@link DataflowGraph}
40
39
  * - `children`: child nodes attached to this one
41
40
  * - `callTargets`: if the vertex calls a function, this links all targets of this call
41
+ *
42
+ * The control flow is modeled in post-order: a construct's own vertex is where its operands join again,
43
+ * which is why there are no separate marker vertices to close an `if` or a loop.
42
44
  */
43
- type CfgBaseVertexWithMarker = [type: CfgVertexType, id: NodeId, mid?: NodeId[], end?: NodeId[], children?: NodeId[], callTargets?: Set<NodeId>];
44
- /**
45
- * @see {@link CfgBaseVertexWithMarker}
46
- */
47
- export type CfgStatementVertex = [CfgVertexType.Statement, ...a: unknown[]] & CfgBaseVertexWithMarker;
45
+ type CfgBaseVertex = [type: CfgVertexType, id: NodeId, children?: NodeId[], callTargets?: Set<NodeId>];
48
46
  /**
49
- * @see {@link CfgBaseVertexWithMarker}
47
+ * @see {@link CfgBaseVertex}
50
48
  */
51
- export type CfgExpressionVertex = [CfgVertexType.Expression, ...a: unknown[]] & CfgBaseVertexWithMarker;
49
+ export type CfgStatementVertex = [CfgVertexType.Statement, ...a: unknown[]] & CfgBaseVertex;
52
50
  /**
53
- * The root id is only stored if it is not derivable from the canonical id
54
- * @see {@link CfgBaseVertexWithMarker}
51
+ * @see {@link CfgBaseVertex}
55
52
  */
56
- export type CfgMarkerVertex = NodeId | [CfgVertexType.Marker, ...a: unknown[]] & [type: CfgVertexType, id: NodeId, rootId?: NodeId];
53
+ export type CfgExpressionVertex = [CfgVertexType.Expression, ...a: unknown[]] & CfgBaseVertex;
57
54
  /**
58
55
  * A basic block vertex in the {@link ControlFlowGraph}.
59
56
  * Contains the vertices that are part of this block, only connected by FDs, vertices should never occur in multiple bbs.
@@ -63,99 +60,45 @@ export type CfgBasicBlockVertex = [CfgVertexType.Block, ...a: unknown[]] & [type
63
60
  * A vertex in the {@link ControlFlowGraph}.
64
61
  * Please use the helper object (e.g. {@link CfgVertex#getType|getType()}) to work with vertices instead of directly accessing the properties.
65
62
  */
66
- export type CfgVertex = CfgStatementVertex | CfgExpressionVertex | CfgBasicBlockVertex | CfgMarkerVertex;
63
+ export type CfgVertex = CfgStatementVertex | CfgExpressionVertex | CfgBasicBlockVertex;
67
64
  /**
68
- * Helper object for {@link CfgVertex} - a vertex in the {@link ControlFlowGraph} that may have markers attached to it (e.g., for function calls).
65
+ * Helper object for {@link CfgVertex} - a vertex in the {@link ControlFlowGraph}.
69
66
  */
70
67
  export declare const CfgVertex: {
71
68
  readonly name: "CfgVertex";
72
69
  /**
73
- * Create a new expression vertex with the given id, children, call targets, and markers.
70
+ * Create a new expression vertex with the given id, children, and call targets.
74
71
  * @param id - the id of the vertex, which should directly relate to the AST node
75
72
  * @param children - child nodes attached to this one
76
73
  * @param callTargets - if the vertex calls a function, this links all targets of this call
77
- * @param mid - the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers
78
- * @param end - the ids of the end-markers attached to this vertex, which should directly relate to the AST nodes of the end markers
79
74
  * @see {@link CfgVertex#isExpression|isExpression()} - for a way to check whether a vertex is an expression vertex
80
75
  */
81
- readonly makeExpression: (this: void, id: NodeId, { children, mid, end, callTargets }?: {
76
+ readonly makeExpression: (this: void, id: NodeId, { children, callTargets }?: {
82
77
  children?: NodeId[];
83
78
  callTargets?: Set<NodeId>;
84
- mid?: NodeId[];
85
- end?: NodeId[];
86
79
  }) => CfgExpressionVertex;
87
80
  /**
88
- * A convenience function to create a new expression vertex with a canonical end marker ({@link CfgVertex#toExitId|toExitId()}) based on the given id and the given id as root id for the end marker.
81
+ * Create a new statement vertex with the given id, children, and call targets.
89
82
  * @param id - the id of the vertex, which should directly relate to the AST node
90
83
  * @param children - child nodes attached to this one
91
84
  * @param callTargets - if the vertex calls a function, this links all targets of this call
92
- * @param mid - the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers
93
- * @see {@link CfgVertex#makeExpression|makeExpression()} - for a way to create expression vertices with a custom end marker
94
- * @see {@link CfgVertex#makeExitMarker|makeExitMarker()} - for a helper function to create end marker vertices with a canonical id#
95
- * @see {@link CfgVertex#toExitId|toExitId()} - for a way to convert the given id to a canonical end marker id
96
- */
97
- readonly makeExpressionWithEnd: (this: void, id: NodeId, { children, mid, callTargets }?: {
98
- children?: NodeId[];
99
- callTargets?: Set<NodeId>;
100
- mid?: NodeId[];
101
- }) => CfgExpressionVertex;
102
- /**
103
- * A convenience function to create a new statement vertex with a canonical end marker ({@link CfgVertex#toExitId|toExitId()}) based on the given id and the given id as root id for the end marker.
104
- * @param id - the id of the vertex, which should directly relate to the AST node
105
- * @param children - child nodes attached to this one
106
- * @param callTargets - if the vertex calls a function, this links all targets of this call
107
- * @param mid - the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers
108
- * @see {@link CfgVertex#makeExpression|makeExpression()} - for a way to create expression vertices with a custom end marker
109
- * @see {@link CfgVertex#makeExitMarker|makeExitMarker()} - for a helper function to create end marker vertices with a canonical id#
110
- * @see {@link CfgVertex#toExitId|toExitId()} - for a way to convert the given id to a canonical end marker id
111
- */
112
- readonly makeStatementWithEnd: (this: void, id: NodeId, { children, mid, callTargets }?: {
113
- children?: NodeId[];
114
- callTargets?: Set<NodeId>;
115
- mid?: NodeId[];
116
- }) => CfgStatementVertex;
117
- /**
118
- * Create a new statement vertex with the given id, children, call targets, and markers.
119
- * @param id - the id of the vertex, which should directly relate to the AST node
120
- * @param children - child nodes attached to this one
121
- * @param callTargets - if the vertex calls a function, this links all targets of this call
122
- * @param mid - the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers
123
- * @param end - the ids of the end-markers attached to this vertex, which should directly relate to the AST nodes of the end markers
124
85
  * @see {@link CfgVertex#isStatement|isStatement()} - for a way to check whether a vertex is a statement vertex
125
86
  */
126
- readonly makeStatement: (this: void, id: NodeId, { children, mid, end, callTargets }?: {
87
+ readonly makeStatement: (this: void, id: NodeId, { children, callTargets }?: {
127
88
  children?: NodeId[];
128
89
  callTargets?: Set<NodeId>;
129
- mid?: NodeId[];
130
- end?: NodeId[];
131
90
  }) => CfgStatementVertex;
132
91
  /**
133
92
  * A convenience function to create a new vertex which is either a statement or an expression.
134
93
  */
135
- readonly makeExprOrStm: (this: void, id: NodeId, type: CfgVertexType.Expression | CfgVertexType.Statement, { children, mid, end, callTargets }?: {
94
+ readonly makeExprOrStm: (this: void, id: NodeId, type: CfgVertexType.Expression | CfgVertexType.Statement, { children, callTargets }?: {
136
95
  children?: NodeId[];
137
96
  callTargets?: Set<NodeId>;
138
- mid?: NodeId[];
139
- end?: NodeId[];
140
97
  }) => CfgExpressionVertex | CfgStatementVertex;
141
98
  /**
142
- * Create a new marker vertex with the given id, root id, children, and call targets.
143
- * @param id - the id of the vertex, which should directly relate to the AST node
144
- * @param rootId - the id of the AST node this end marker corresponds to
145
- * @see {@link CfgVertex#isMarker|isMarker()} - for a way to check whether a vertex is an end marker vertex
146
- * @see {@link CfgVertex#getRootId|getRootId()} - for a way to get the root id of an end marker vertex
147
- * @see {@link CfgVertex#makeExitMarker|makeExitMarker()} - for a helper function to create end marker vertices with a canonical id
148
- */
149
- readonly makeMarker: (this: void, id: NodeId, rootId: NodeId) => CfgMarkerVertex;
150
- /**
151
- * A convenience function to create a new marker vertex with a canonical id ({@link CfgVertex#toExitId|toExitId()}) based on the given id and the given id as root id.
152
- * @see {@link CfgVertex#makeMarker|makeMarker()} - for a way to create end marker vertices with a custom id
153
- */
154
- readonly makeExitMarker: (this: void, id: NodeId) => CfgMarkerVertex;
155
- /**
156
- * Create a new basic block vertex with the given id, elements, children, and call targets.
99
+ * Create a new basic block vertex with the given id and elements.
157
100
  * @param id - the id of the vertex, which should directly relate to the AST node
158
- * @param elems - the vertices that are part of this block, only connected by FDs, vertices should never occur in multiple bbs
101
+ * @param elems - the vertices that are part of this block in the order they run, only connected by FDs; a vertex should never occur in multiple blocks
159
102
  * @see {@link CfgVertex#isBlock|isBlock()} - for a way to check whether a vertex is a basic block vertex
160
103
  */
161
104
  readonly makeBlock: (this: void, id: NodeId, elems: readonly Exclude<CfgVertex, CfgBasicBlockVertex>[]) => CfgBasicBlockVertex;
@@ -171,12 +114,6 @@ export declare const CfgVertex: {
171
114
  * @see {@link CfgVertex#getType|getType()} - for a way to get the type of a vertex instead of checking against a given type
172
115
  */
173
116
  readonly isStatement: (this: void, vertex: CfgVertex | undefined) => vertex is CfgStatementVertex;
174
- /**
175
- * Check whether the given vertex is an end marker vertex.
176
- * @see {@link CfgVertex#makeMarker|makeMarker()} - for a way to create end marker vertices
177
- * @see {@link CfgVertex#getType|getType()} - for a way to get the type of a vertex instead of checking against a given type
178
- */
179
- readonly isMarker: (this: void, vertex: CfgVertex | undefined) => vertex is CfgMarkerVertex;
180
117
  /**
181
118
  * Check whether the given vertex is a basic block vertex.
182
119
  * @see {@link CfgVertex#makeBlock|makeBlock()} - for a way to create basic block vertices
@@ -187,10 +124,10 @@ export declare const CfgVertex: {
187
124
  * Get the type of the given vertex.
188
125
  * @example
189
126
  * ```ts
190
- * const vertex: CfgVertex = CfgVertex.makeExpr('node-1')
127
+ * const vertex: CfgVertex = CfgVertex.makeExpression('node-1')
191
128
  * console.log(CfgVertex.getType(vertex)); // Output: CfgVertexType.Expression
192
129
  * ```
193
- * @see {@link CfgVertex#isExpression|isExpression()}, {@link CfgVertex#isStatement|isStatement()}, {@link CfgVertex#isMarker|isMarker()}, {@link CfgVertex#isBlock|isBlock()} - for ways to check the type of a vertex against a specific type instead of getting the type and checking it against a specific type
130
+ * @see {@link CfgVertex#isExpression|isExpression()}, {@link CfgVertex#isStatement|isStatement()}, {@link CfgVertex#isBlock|isBlock()} - for ways to check the type of a vertex against a specific type
194
131
  * @see {@link CfgVertex#getId|getId()} - for a way to get the id of a vertex
195
132
  * @see {@link CfgVertex#typeToString|typeToString()} - for a way to convert the type of a vertex to a string for easier debugging and visualization
196
133
  */
@@ -202,31 +139,19 @@ export declare const CfgVertex: {
202
139
  */
203
140
  readonly typeToString: (this: void, type: CfgVertexType) => string;
204
141
  /**
205
- * Get the id of the given vertex, which should directly relate to the AST node.
142
+ * Get the id of the given vertex, which directly relates to the AST node.
206
143
  * @example
207
144
  * ```ts
208
- * const vertex: CfgVertex = CfgVertex.makeExpr('node-1')
145
+ * const vertex: CfgVertex = CfgVertex.makeExpression('node-1')
209
146
  * console.log(CfgVertex.getId(vertex)); // Output: 'node-1'
210
147
  * ```
211
148
  * @see {@link CfgVertex#getType|getType()} - for a way to get the type of a vertex
212
- * @see {@link CfgVertex#getRootId|getRootId()} - for a way to get the root id of a vertex
213
149
  */
214
150
  readonly getId: <T extends CfgVertex | undefined>(this: void, vertex: T) => T extends undefined ? NodeId | undefined : NodeId;
215
151
  /**
216
152
  * Check whether two vertices are equal, i.e., they have the same type, id, and if they are basic block vertices, they also have the same elements in the same order.
217
153
  */
218
154
  readonly equal: (this: void, a: CfgVertex, b: CfgVertex) => boolean;
219
- /**
220
- * Get the root id of a vertex, i.e., the id of the AST node it corresponds to.
221
- * For normal vertices, this is the same as the id of the vertex itself, for end marker vertices, this is the root id stored in the vertex.
222
- * @see {@link CfgVertex#unpackRoot|unpackRoot()} - for a way to unpack the root id of a marker vertex
223
- */
224
- readonly getRootId: (this: void, vertex: CfgVertex) => NodeId;
225
- /**
226
- * Unpack the root id of a marker vertex, i.e., get the root id stored in the vertex or derive it from the canonical id if it is not explicitly stored.
227
- * @see {@link CfgVertex#getRootId|getRootId()} - for a way to get the root id of a vertex, which uses this function for marker vertices
228
- */
229
- readonly unpackRootId: (this: void, vertex: CfgMarkerVertex) => NodeId;
230
155
  /**
231
156
  * Get the elements of a basic block vertex, i.e., the vertices that are part of this block, only connected by FDs, vertices should never occur in multiple bbs.
232
157
  * @see {@link CfgVertex#isBlock|isBlock()} - for a way to check whether a vertex is a basic block vertex before trying to get the elements
@@ -240,72 +165,27 @@ export declare const CfgVertex: {
240
165
  * @see {@link CfgVertex#getBasicBlockElements|getBasicBlockElements()} - for a way to get the elements of a basic block vertex
241
166
  */
242
167
  readonly setBasicBlockElements: (this: void, vertex: CfgBasicBlockVertex, elems: readonly Exclude<CfgVertex, CfgBasicBlockVertex>[]) => void;
243
- /**
244
- * Get the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers.
245
- * @see {@link CfgVertex#getMid|getMid()} - for a way to get the ids of the mid-markers attached to this vertex
246
- * @see {@link CfgVertex#setEnd|setEnd()} - for a way to set the ids of the end-markers attached to this vertex
247
- */
248
- readonly getEnd: (this: void, vertex: CfgVertex | undefined) => NodeId[] | undefined;
249
- /**
250
- * **Sets in-place**
251
- * Set the ids of the end-markers attached to this vertex, which should directly relate to the AST nodes of the end markers.
252
- * @see {@link CfgVertex#getEnd|getEnd()} - for a way to get the ids of the end-markers attached to this vertex
253
- */
254
- readonly setEnd: (this: void, vertex: CfgStatementVertex | CfgExpressionVertex, endMarkers: NodeId[] | undefined) => void;
255
- /**
256
- * Get the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers.
257
- */
258
- readonly getMid: (this: void, vertex: CfgVertex) => NodeId[] | undefined;
259
- /**
260
- * **Sets in-place**
261
- * Set the ids of the mid-markers attached to this vertex, which should directly relate to the AST nodes of the mid markers.
262
- * @see {@link CfgVertex#getMid|getMid()} - for a way to get the ids of the mid-markers attached to this vertex
263
- * @see {@link CfgVertex#setEnd|setEnd()} - for a way to set the ids of the end-markers attached to this vertex
264
- */
265
- readonly setMid: (this: void, vertex: CfgStatementVertex | CfgExpressionVertex, midMarkers: NodeId[] | undefined) => void;
266
168
  /**
267
169
  * Converts the given id to a, canonical, basic block lift (i.e., it adds 'bb-' as a prefix).
268
170
  */
269
171
  readonly toBasicBlockId: <Id extends NodeId>(this: void, id: Id) => `bb-${Id}`;
270
172
  /**
271
- * Converts the given id to a canonical, end marker lift (i.e., it adds '-end' as a suffix).
272
- * @see {@link CfgVertex#fromExitId|fromExitId()} - for a way to convert the given id from a canonical end marker lift to the original id (i.e., it removes '-end' as a suffix if it is present)
273
- */
274
- readonly toExitId: <Id extends NodeId>(this: void, id: Id) => `${Id}-e`;
275
- /**
276
- * Converts the given id from a canonical end marker lift to the original id (i.e., it removes '-end' as a suffix if it is present).
277
- * @see {@link CfgVertex#toExitId|toExitId()} - for a way to convert the given id to a canonical end marker lift (i.e., it adds '-end' as a suffix)
278
- */
279
- readonly fromExitId: (this: void, exitId: NodeId) => NodeId;
280
- /**
281
- * Get the call targets of a statement or expression vertex, which links all targets of this call.
173
+ * The functions a call may dispatch to, taken from the `calls` edges the dataflow analysis resolved.
282
174
  */
283
175
  readonly getCallTargets: (this: void, vertex: CfgVertex | undefined) => Set<NodeId> | undefined;
284
- /**
285
- * **Sets in-place**
286
- * Set the call targets of a statement or expression vertex, which links all targets of this call.
287
- * @see {@link CfgVertex#getCallTargets|getCallTargets()} - for a way to get the call targets of a statement or expression vertex
288
- * @see {@link CfgVertex#mapCallTargets|mapCallTargets()} - for a way to map the call targets of a statement or expression vertex to new call targets
289
- */
290
- readonly setCallTargets: (this: void, vertex: CfgStatementVertex | CfgExpressionVertex, callTargets: Set<NodeId>) => void;
291
- /**
292
- * Map the call targets of a statement or expression vertex, which links all targets of this call, to new call targets using the given mapping function.
293
- * @see {@link CfgVertex#getCallTargets|getCallTargets()} - for a way to get the call targets of a statement or expression vertex
294
- * @see {@link CfgVertex#setCallTargets|setCallTargets()} - for a way to set the call targets of a statement or expression vertex to new call targets
295
- */
296
- readonly mapCallTargets: (this: void, vertex: CfgStatementVertex | CfgExpressionVertex, mapFn: (targets: Set<NodeId> | undefined) => Set<NodeId>) => void;
297
176
  /**
298
177
  * Get the children of a statement or expression vertex, i.e., the child nodes attached to this one.
299
178
  */
300
179
  readonly getChildren: (this: void, vertex: CfgVertex | undefined) => NodeId[] | undefined;
301
180
  };
302
- type CfgFlowDependencyEdge = CfgEdgeType.Fd;
303
- type CfgControlDependencyEdge = [c: NodeId, w: typeof RTrue | typeof RFalse];
181
+ type CfgFlowEdge = CfgEdgeType.Flow;
182
+ /** a control edge *is* the {@link ControlDependency} it stands for, so nothing about the branch is lost */
183
+ type CfgControlEdge = ControlDependency;
304
184
  /**
305
185
  * An edge in the {@link ControlFlowGraph}.
306
186
  * @see {@link CfgEdge} - for helper functions to work with edges.
307
187
  */
308
- export type CfgEdge = CfgFlowDependencyEdge | CfgControlDependencyEdge;
188
+ export type CfgEdge = CfgFlowEdge | CfgControlEdge;
309
189
  /**
310
190
  * Helper object for {@link CfgEdge} - an edge in the {@link ControlFlowGraph}.
311
191
  */
@@ -314,35 +194,34 @@ export declare const CfgEdge: {
314
194
  /**
315
195
  * Check whether the given edge is a flow dependency edge.
316
196
  */
317
- readonly isFlowDependency: (this: void, edge: CfgEdge | undefined) => edge is CfgFlowDependencyEdge;
197
+ readonly isFlowDependency: (this: void, edge: CfgEdge | undefined) => edge is CfgFlowEdge;
318
198
  /**
319
199
  * Check whether the given edge is a control dependency edge.
320
200
  */
321
- readonly isControlDependency: (this: void, edge: CfgEdge | undefined) => edge is CfgControlDependencyEdge;
201
+ readonly isControlDependency: (this: void, edge: CfgEdge | undefined) => edge is CfgControlEdge;
322
202
  /**
323
203
  * Create a flow dependency edge.
324
204
  */
325
- readonly makeFd: (this: void) => CfgFlowDependencyEdge;
205
+ readonly makeFd: (this: void) => CfgFlowEdge;
326
206
  /**
327
- * Create a control dependency edge with the given cause and condition.
328
- * @param controlId - the id of the vertex that causes the control dependency
329
- * @param whenTrue - whether the control dependency is satisfied with a true condition or is it negated (e.g., else-branch)
330
- * @see {@link CfgEdge#makeCdTrue|makeCdTrue()} - for a version of this function that assumes the control dependency is satisfied with a true condition
331
- * @see {@link CfgEdge#makeCdFalse|makeCdFalse()} - for a version of this function that assumes the control dependency is negated (e.g., else-branch)
207
+ * Create a control dependency edge from the given control dependency, which is what the edge is.
208
+ * @param cd - the decision the edge follows, i.e. the vertex that causes it and the outcome it takes
209
+ * @see {@link CfgEdge#makeCdTrue|makeCdTrue()} - to build one for a true condition from the causing id alone
210
+ * @see {@link CfgEdge#makeCdFalse|makeCdFalse()} - to build one for a negated condition (e.g., else-branch)
332
211
  */
333
- readonly makeCd: (this: void, controlId: NodeId, whenTrue: typeof RTrue | typeof RFalse) => CfgControlDependencyEdge;
212
+ readonly makeCd: (this: void, cd: CfgControlEdge) => CfgControlEdge;
334
213
  /**
335
214
  * Create a control dependency edge with the given cause and a true condition.
336
215
  * @param controlId - the id of the vertex that causes the control dependency
337
216
  * @see {@link CfgEdge#makeCd|makeCd()} - for a version of this function that allows to specify the condition as well
338
217
  */
339
- readonly makeCdTrue: (this: void, controlId: NodeId) => CfgControlDependencyEdge;
218
+ readonly makeCdTrue: (this: void, controlId: NodeId) => CfgControlEdge;
340
219
  /**
341
220
  * Create a control dependency edge with the given cause and a negated condition (e.g., else-branch).
342
221
  * @param controlId - the id of the vertex that causes the control dependency
343
222
  * @see {@link CfgEdge#makeCd|makeCd()} - for a version of this function that allows to specify the condition as well
344
223
  */
345
- readonly makeCdFalse: (this: void, controlId: NodeId) => CfgControlDependencyEdge;
224
+ readonly makeCdFalse: (this: void, controlId: NodeId) => CfgControlEdge;
346
225
  /**
347
226
  * Get the cause of a control dependency edge, i.e., the id of the vertex that causes the control dependency.
348
227
  * If the edge is not a control dependency edge, this returns undefined.
@@ -354,7 +233,7 @@ export declare const CfgEdge: {
354
233
  /**
355
234
  * Get the cause of a control dependency edge, i.e., the id of the vertex that causes the control dependency.
356
235
  */
357
- readonly unpackCause: (this: void, edge: CfgControlDependencyEdge) => NodeId;
236
+ readonly unpackCause: (this: void, edge: CfgControlEdge) => NodeId;
358
237
  /**
359
238
  * Get whether the control dependency edge is satisfied with a true condition or is it negated (e.g., else-branch).
360
239
  * If the edge is not a control dependency edge, this returns undefined.
@@ -366,7 +245,7 @@ export declare const CfgEdge: {
366
245
  /**
367
246
  * Get whether the control dependency edge is satisfied with a true condition or is it negated (e.g., else-branch).
368
247
  */
369
- readonly unpackWhen: (this: void, edge: CfgControlDependencyEdge) => typeof RTrue | typeof RFalse;
248
+ readonly unpackWhen: (this: void, edge: CfgControlEdge) => typeof RTrue | typeof RFalse;
370
249
  /**
371
250
  * Check whether two edges are equal.
372
251
  */
@@ -409,30 +288,29 @@ export interface ReadOnlyControlFlowGraph {
409
288
  /**
410
289
  * Provide a view of all vertices in the graph.
411
290
  * @param includeBasicBlockElements - if true, the elements of basic block elements are included in the result, otherwise only the basic blocks themselves are included
412
- * @see {@link ReadOnlyControlFlowGraph#rootVertexIds|rootVertexIds()} - for a way to get the root vertices of the graph.
291
+ * @see {@link ReadOnlyControlFlowGraph#rootIds|rootIds()} - for a way to get the root vertices of the graph.
413
292
  * @see {@link ReadOnlyControlFlowGraph#getVertex|getVertex()} - for a way to get a specific vertex by its id.
414
293
  * @see {@link ReadOnlyControlFlowGraph#edges|edges()} - for a way to get all edges in the graph.
415
294
  */
416
295
  readonly vertices: (includeBasicBlockElements: boolean) => ReadonlyMap<NodeId, CfgVertex>;
417
296
  /**
418
297
  * Get all edges in the graph, independent of their sources and targets.
298
+ * Edges are in flow order: an edge from `a` to `b` means that `b` is evaluated after `a`.
419
299
  * If you are only interested in the edges of a specific node, please use {@link ReadOnlyControlFlowGraph#outgoingEdges|outgoingEdges()} or {@link ReadOnlyControlFlowGraph#ingoingEdges|ingoingEdges()}.
420
300
  *
421
301
  * This is the pendant of {@link DataflowGraph#edges|edges()} on a {@link DataflowGraph}.
422
302
  */
423
303
  readonly edges: () => ReadonlyMap<NodeId, ReadonlyMap<NodeId, CfgEdge>>;
424
304
  /**
425
- * Receive all outgoing edges of a given vertex.
426
- *
427
- * This is the pendant of {@link DataflowGraph#ingoingEdges|ingoingEdges()} on a {@link DataflowGraph}.
428
- * @see {@link ReadOnlyControlFlowGraph#ingoingEdges|ingoingEdges()} - for a way to get all ingoing edges of a vertex.
305
+ * The edges leaving the given vertex, i.e. what may be evaluated after it.
306
+ * @see {@link ReadOnlyControlFlowGraph#ingoingEdges|ingoingEdges()} - for what may be evaluated before it
307
+ * @see {@link ReadOnlyControlFlowGraph#successors|successors()} - if you only need the ids
429
308
  */
430
309
  readonly outgoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined;
431
310
  /**
432
- * Receive all ingoing edges of a given vertex.
433
- *
434
- * This is the pendant of {@link DataflowGraph#outgoingEdges|outgoingEdges()} on a {@link DataflowGraph}.
435
- * @see {@link ReadOnlyControlFlowGraph#outgoingEdges|outgoingEdges()} - for a way to get all outgoing edges of a vertex.
311
+ * The edges leading into the given vertex, i.e. what may be evaluated before it.
312
+ * @see {@link ReadOnlyControlFlowGraph#outgoingEdges|outgoingEdges()} - for what may be evaluated after it
313
+ * @see {@link ReadOnlyControlFlowGraph#predecessors|predecessors()} - if you only need the ids
436
314
  */
437
315
  readonly ingoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined;
438
316
  /**
@@ -460,36 +338,126 @@ export interface ReadOnlyControlFlowGraph {
460
338
  * This can be used for optimizations.
461
339
  */
462
340
  readonly mayHaveBasicBlocks: () => boolean;
341
+ /**
342
+ * The vertices control flow may reach directly from `id`, i.e. what may be evaluated next.
343
+ *
344
+ * Prefer this over walking the edges by hand: a graph that is a view on another structure
345
+ * (see {@link ControlFlowGraph}) may answer it without projecting itself at all.
346
+ * @see {@link ReadOnlyControlFlowGraph#predecessors|predecessors()} - for the other direction
347
+ */
348
+ readonly successors: (id: NodeId) => Iterable<NodeId>;
349
+ /**
350
+ * The vertices control flow may come from to reach `id`, i.e. what may have been evaluated before.
351
+ * @see {@link ReadOnlyControlFlowGraph#successors|successors()} - for the other direction
352
+ */
353
+ readonly predecessors: (id: NodeId) => Iterable<NodeId>;
354
+ /**
355
+ * The dataflow graph this control flow graph is a view of, `undefined` once it holds a copy of its own.
356
+ * It knows the ast as well, so a traversal needs nothing but the control flow to reach either.
357
+ */
358
+ readonly dataflow: () => DataflowGraph | undefined;
359
+ /**
360
+ * The vertices nested within the given one, which for a function definition is the body it holds.
361
+ * Nothing flows into such a region, so this is the only way a traversal can step into it.
362
+ */
363
+ readonly childrenOf: (id: NodeId) => readonly NodeId[] | undefined;
364
+ /**
365
+ * The constructs whose outcome this vertex decides, e.g. the `if` a condition belongs to.
366
+ *
367
+ * Since a construct is reached only once its parts have run, standing on the condition is the moment
368
+ * to ask what that condition is for.
369
+ * @example
370
+ * ```r
371
+ * if(u) a else b # decides(u) names the if, so `u` is known to be its condition
372
+ * ```
373
+ * @see {@link ReadOnlyControlFlowGraph#entryOf|entryOf()} - for the way back, from the construct to its condition
374
+ */
375
+ readonly decides: (id: NodeId) => readonly NodeId[];
376
+ /**
377
+ * The vertex a construct is over at, i.e. where its branches join and control flow continues past it.
378
+ *
379
+ * The control flow is modeled in post-order: everything a construct is made of is evaluated before the
380
+ * construct itself, so an `if` is over on the `if` vertex, a loop on its loop vertex, and `2 * 3` on the
381
+ * `*` vertex. There is no separate marker to look for &mdash; reaching the vertex *is* the construct ending.
382
+ * @see {@link ReadOnlyControlFlowGraph#entryOf|entryOf()} - for where it begins instead
383
+ */
384
+ readonly exitOf: (id: NodeId) => NodeId;
385
+ /**
386
+ * The vertex control flow enters the construct rooted at `id` at, i.e. the first thing it evaluates.
387
+ * For `if(u) a else b` that is the condition, for `2 * 3` the left operand, and for a leaf the leaf itself.
388
+ *
389
+ * `undefined` if the construct is not part of the control flow at all.
390
+ * @param id - the construct to look at
391
+ * @param idMap - the AST the graph belongs to; a graph that knows its own (a view on a dataflow graph) may omit it
392
+ * @see {@link ReadOnlyControlFlowGraph#exitOf|exitOf()} - for where it is over
393
+ */
394
+ readonly entryOf: (id: NodeId, idMap?: AstIdMap) => NodeId | undefined;
463
395
  }
396
+ /** Shared empty result so navigating a vertex without neighbors allocates nothing. */
397
+ export declare const NoNeighbors: readonly NodeId[];
464
398
  /**
465
399
  * This class represents the control flow graph of an R program.
466
- * The control flow may be hierarchical when confronted with function definitions (see {@link CfgVertex} and {@link CFG#rootVertexIds|rootVertexIds()}).
400
+ * The control flow may be hierarchical when confronted with function definitions (see {@link CfgVertex} and {@link ControlFlowGraph#rootIds|rootIds()}).
401
+ *
402
+ * Edges are in flow order: an edge from `a` to `b` means that `b` is evaluated after `a`.
403
+ * Reading them backwards (what leads into a vertex) goes through a reverse index built on the first such read.
467
404
  *
468
405
  * There are two very simple visitors to traverse a CFG:
469
- * - {@link visitCfgInOrder} visits the graph in the order of the vertices
470
- * - {@link visitCfgInReverseOrder} visits the graph in reverse order
406
+ * - {@link visitCfgInOrder} visits it in the order the program runs
407
+ * - {@link visitCfgInReverseOrder} visits it in the opposite order
471
408
  *
472
409
  * If you want to prohibit modification, please refer to the {@link ReadOnlyControlFlowGraph} interface.
473
410
  */
474
411
  export declare class ControlFlowGraph<Vertex extends CfgVertex = CfgVertex> implements ReadOnlyControlFlowGraph {
475
- private readonly roots;
412
+ /**
413
+ * The dataflow graph this control flow graph is a view on, if it is one.
414
+ * Reads are answered from it directly; the state below is only filled in when the graph is modified
415
+ * (see {@link ControlFlowGraph#materialize|materialize()}).
416
+ */
417
+ private readonly dfg?;
418
+ /** whether the state below has been filled in from {@link ControlFlowGraph#dfg|dfg} already */
419
+ private projected;
420
+ /** the root ids of a view, which stay the same as long as it is one */
421
+ private rootCache?;
422
+ protected readonly roots: Set<NodeId>;
476
423
  /** Nesting-Independent vertex information, mapping the id to the vertex */
477
- private readonly vtxInfos;
424
+ protected readonly vtxInfos: Map<NodeId, Vertex>;
478
425
  /** the basic block children map contains a mapping of ids to all vertices that are nested in basic blocks, mapping them to the Id of the block they appear in */
479
- private readonly bbChildren;
480
- /** basic block agnostic edges */
481
- private readonly edgeInfos;
426
+ protected readonly bbChildren: Map<NodeId, NodeId>;
427
+ /** basic block agnostic edges, in flow order: `edgeInfos[a][b]` means that `b` is evaluated after `a` */
428
+ protected readonly edgeInfos: Map<NodeId, Map<NodeId, CfgEdge>>;
482
429
  /** reverse edges for bidirectional mapping, derived from `edgeInfos` on the first ingoing lookup */
483
- private revEdgeInfos;
430
+ protected revEdgeInfos: Map<NodeId, Map<NodeId, CfgEdge>> | undefined;
484
431
  /** used as an optimization to avoid unnecessary lookups */
485
- private _mayBB;
432
+ protected _mayBB: boolean;
433
+ /**
434
+ * A control flow graph either owns its vertices and edges, or is a view on the {@link DataflowGraph} that
435
+ * carries them: the dataflow extraction records the control flow while it walks the program, so every
436
+ * vertex of that graph is a vertex here and its {@link EdgeType.FlowEdge|flow} and
437
+ * {@link EdgeType.ControlEdge|control} dependency edges are the edges here.
438
+ * @param dfg - the dataflow graph to view, or nothing to build a graph of your own
439
+ */
440
+ constructor(dfg?: DataflowGraph);
441
+ /**
442
+ * Fill the state of this graph from the dataflow graph it views.
443
+ * Reading a view does not need this &mdash; the reads below are answered from the dataflow graph &mdash; but
444
+ * modifying one does, and so does asking for every vertex or edge at once.
445
+ */
446
+ protected materialize(): void;
447
+ /**
448
+ * Serializing a graph hands out its vertices and edges, never the dataflow graph a view reads them from,
449
+ * so a view and a graph of its own serialize alike.
450
+ */
451
+ toJSON(): unknown;
452
+ /** Whether this graph still answers from the dataflow graph it views instead of a copy of it. */
453
+ private get isView();
486
454
  /**
487
455
  * Add a new vertex to the control flow graph.
488
456
  * @see {@link ControlFlowGraph#addEdge|addEdge()} - to add an edge
489
457
  */
490
458
  addVertex(vertex: Vertex, rootVertex?: boolean): this;
491
459
  /**
492
- * Add a new edge to the control flow graph.
460
+ * Add a new edge to the control flow graph, in flow order: `to` is evaluated after `from`.
493
461
  * @see {@link ControlFlowGraph#addVertex|addVertex()} - to add vertices
494
462
  * @see {@link ControlFlowGraph#addEdges|addEdges()} - to add multiple edges at once
495
463
  */
@@ -511,6 +479,13 @@ export declare class ControlFlowGraph<Vertex extends CfgVertex = CfgVertex> impl
511
479
  getVertex(id: NodeId, includeBlocks?: boolean): CfgVertex | undefined;
512
480
  hasVertex(id: NodeId, includeBlocks?: boolean): boolean;
513
481
  mayHaveBasicBlocks(): boolean;
482
+ dataflow(): DataflowGraph | undefined;
483
+ childrenOf(id: NodeId): readonly NodeId[] | undefined;
484
+ decides(id: NodeId): readonly NodeId[];
485
+ exitOf(id: NodeId): NodeId;
486
+ entryOf(id: NodeId, idMap?: AstIdMap | undefined): NodeId | undefined;
487
+ successors(id: NodeId): Iterable<NodeId>;
488
+ predecessors(id: NodeId): Iterable<NodeId>;
514
489
  /**
515
490
  * This removes the vertex and all edges to and from it.
516
491
  * @param id - the id of the vertex to remove
@@ -558,4 +533,19 @@ export interface ControlFlowInformation<Vertex extends CfgVertex = CfgVertex> ex
558
533
  * Create an empty control flow information object.
559
534
  */
560
535
  export declare function emptyControlFlowInformation(): ControlFlowInformation;
536
+ /**
537
+ * The control flow of the program the given dataflow analysis describes.
538
+ * @see {@link ControlFlowGraph} - for the projection this is built on
539
+ */
540
+ /**
541
+ *
542
+ */
543
+ export declare function extractCfg(dataflow: DataflowInformation): ControlFlowInformation;
544
+ /**
545
+ * Convert a cfg to RDF quads.
546
+ * @see {@link df2quads}
547
+ * @see {@link serialize2quads}
548
+ * @see {@link graph2quads}
549
+ */
550
+ export declare function cfg2quads(cfg: ControlFlowInformation, config: QuadSerializationConfiguration): string;
561
551
  export {};