@eagleoutice/flowr 2.12.3 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/README.md +42 -95
  2. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
  3. package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
  4. package/abstract-interpretation/data-frame/semantics.js +12 -16
  5. package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
  6. package/abstract-interpretation/domains/abstract-domain.js +146 -6
  7. package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
  8. package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
  9. package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
  10. package/abstract-interpretation/domains/interval-domain.js +111 -146
  11. package/abstract-interpretation/domains/lattice.d.ts +3 -3
  12. package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
  13. package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
  14. package/abstract-interpretation/domains/partial-product-domain.js +21 -54
  15. package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
  16. package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
  17. package/abstract-interpretation/domains/product-domain.d.ts +1 -1
  18. package/abstract-interpretation/domains/product-domain.js +4 -4
  19. package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
  20. package/abstract-interpretation/domains/set-range-domain.js +141 -200
  21. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
  22. package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
  23. package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
  24. package/abstract-interpretation/domains/singleton-domain.js +33 -72
  25. package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
  26. package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
  27. package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
  28. package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
  29. package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
  30. package/benchmark/slicer.d.ts +2 -2
  31. package/benchmark/slicer.js +6 -5
  32. package/cli/common/options.d.ts +20 -0
  33. package/cli/common/options.js +4 -0
  34. package/cli/common/scripts-info.d.ts +20 -0
  35. package/cli/flowr-main-options.d.ts +4 -0
  36. package/cli/flowr-main-options.js +5 -0
  37. package/cli/flowr.d.ts +5 -0
  38. package/cli/flowr.js +15 -7
  39. package/cli/repl/commands/repl-commands.d.ts +8 -0
  40. package/cli/repl/commands/repl-commands.js +16 -3
  41. package/cli/repl/commands/repl-query.js +50 -20
  42. package/cli/repl/commands/repl-signature.js +2 -2
  43. package/cli/repl/core.d.ts +14 -5
  44. package/cli/repl/core.js +32 -17
  45. package/cli/repl/parser/slice-query-parser.d.ts +69 -8
  46. package/cli/repl/parser/slice-query-parser.js +82 -13
  47. package/cli/repl/path-input.d.ts +6 -0
  48. package/cli/repl/path-input.js +41 -0
  49. package/cli/repl/print-version.js +3 -5
  50. package/cli/slicer-app.d.ts +4 -0
  51. package/cli/slicer-app.js +4 -2
  52. package/config.d.ts +56 -6
  53. package/config.js +134 -12
  54. package/control-flow/control-flow-graph.d.ts +3 -2
  55. package/control-flow/control-flow-graph.js +34 -14
  56. package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
  57. package/control-flow/semantic-cfg-guided-visitor.js +3 -0
  58. package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
  59. package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
  60. package/data/r-base-packages.generated.d.ts +1 -1
  61. package/data/r-base-packages.generated.js +3 -3
  62. package/data/sigdb/sigdb.remote.json +53 -53
  63. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  64. package/dataflow/environments/built-in-proc-name.js +2 -0
  65. package/dataflow/environments/built-in.d.ts +2 -0
  66. package/dataflow/environments/built-in.js +2 -0
  67. package/dataflow/environments/default-builtin-config.d.ts +3 -5
  68. package/dataflow/environments/default-builtin-config.js +2 -2
  69. package/dataflow/environments/environment.d.ts +9 -0
  70. package/dataflow/environments/environment.js +28 -7
  71. package/dataflow/environments/identifier.d.ts +1 -2
  72. package/dataflow/environments/identifier.js +1 -5
  73. package/dataflow/extractor.js +1 -2
  74. package/dataflow/graph/dataflowgraph-builder.js +42 -3
  75. package/dataflow/graph/df-helper.d.ts +15 -0
  76. package/dataflow/graph/df-helper.js +20 -0
  77. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
  78. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
  79. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
  80. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
  81. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
  82. package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
  83. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
  84. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
  86. package/documentation/data/faq/faqs.js +12 -1
  87. package/documentation/doc-readme.js +1 -1
  88. package/documentation/doc-util/doc-files.d.ts +2 -2
  89. package/documentation/doc-util/doc-files.js +4 -7
  90. package/documentation/doc-util/doc-query.d.ts +12 -9
  91. package/documentation/doc-util/doc-query.js +63 -28
  92. package/documentation/wiki-absint.js +1 -4
  93. package/documentation/wiki-analyzer.js +8 -3
  94. package/documentation/wiki-cfg.js +3 -2
  95. package/documentation/wiki-dataflow-graph.js +14 -4
  96. package/documentation/wiki-interface.js +30 -16
  97. package/documentation/wiki-mk/doc-maker.js +1 -1
  98. package/documentation/wiki-query.js +190 -30
  99. package/documentation/wiki-signature-database.d.ts +1 -1
  100. package/documentation/wiki-signature-database.js +53 -27
  101. package/linter/linter-output.d.ts +24 -0
  102. package/linter/linter-output.js +117 -0
  103. package/linter/linter-rules.d.ts +2 -4
  104. package/linter/rules/dataframe-access-validation.js +4 -4
  105. package/linter/rules/deprecated-functions.d.ts +2 -4
  106. package/linter/rules/deprecated-functions.js +58 -3
  107. package/linter/rules/undefined-symbol.js +18 -10
  108. package/linter/rules/unused-definition.js +24 -0
  109. package/package.json +5 -2
  110. package/project/context/flowr-analyzer-context.d.ts +61 -1
  111. package/project/context/flowr-analyzer-context.js +124 -3
  112. package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
  113. package/project/context/flowr-analyzer-dependencies-context.js +33 -3
  114. package/project/context/flowr-analyzer-files-context.d.ts +40 -0
  115. package/project/context/flowr-analyzer-files-context.js +171 -14
  116. package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
  117. package/project/context/flowr-analyzer-loading-order-context.js +20 -0
  118. package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
  119. package/project/context/flowr-analyzer-meta-context.js +64 -23
  120. package/project/context/flowr-file.d.ts +7 -0
  121. package/project/context/flowr-file.js +7 -0
  122. package/project/context/project-kind.d.ts +22 -0
  123. package/project/context/project-kind.js +27 -0
  124. package/project/dependency-version-space.d.ts +168 -0
  125. package/project/dependency-version-space.js +570 -0
  126. package/project/flowr-analyzer-builder.js +1 -1
  127. package/project/flowr-analyzer.d.ts +7 -0
  128. package/project/flowr-analyzer.js +9 -0
  129. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
  130. package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
  131. package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
  132. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
  133. package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
  134. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
  135. package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
  136. package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
  137. package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
  138. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  139. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  140. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
  141. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
  142. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
  143. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
  144. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
  145. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
  146. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
  147. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
  148. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
  149. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
  150. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
  151. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
  152. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
  153. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
  154. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
  155. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
  156. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
  157. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
  158. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
  159. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
  160. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
  161. package/project/plugins/flowr-analyzer-plugin.js +5 -0
  162. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
  163. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  164. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
  165. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
  166. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
  167. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
  168. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
  169. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
  170. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
  171. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
  172. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  175. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
  176. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
  177. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
  178. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
  179. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
  180. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
  181. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
  182. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
  183. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
  184. package/project/plugins/package-version-plugins/package.d.ts +4 -1
  185. package/project/plugins/package-version-plugins/package.js +8 -5
  186. package/project/plugins/plugin-registry.d.ts +11 -3
  187. package/project/plugins/plugin-registry.js +24 -5
  188. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
  189. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
  190. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
  191. package/project/sigdb/build.js +12 -2
  192. package/project/sigdb/decode.d.ts +7 -0
  193. package/project/sigdb/decode.js +35 -4
  194. package/project/sigdb/decompress.d.ts +2 -0
  195. package/project/sigdb/decompress.js +5 -0
  196. package/project/sigdb/manifest.d.ts +5 -0
  197. package/project/sigdb/manifest.js +37 -6
  198. package/project/sigdb/reader.d.ts +82 -2
  199. package/project/sigdb/reader.js +226 -14
  200. package/project/sigdb/schema.d.ts +31 -5
  201. package/project/sigdb/schema.js +7 -3
  202. package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
  203. package/project/sigdb/sigdb-version.js +119 -0
  204. package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
  205. package/queries/catalog/absint-query/absint-query-format.js +2 -0
  206. package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
  207. package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
  208. package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
  209. package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
  210. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
  211. package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
  212. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
  213. package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
  214. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
  215. package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
  216. package/queries/catalog/config-query/config-query-executor.js +17 -5
  217. package/queries/catalog/config-query/config-query-format.d.ts +19 -3
  218. package/queries/catalog/config-query/config-query-format.js +258 -98
  219. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
  220. package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
  221. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
  222. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
  223. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
  224. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
  225. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
  226. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
  227. package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
  228. package/queries/catalog/dice-query/dice-query-executor.js +6 -9
  229. package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
  230. package/queries/catalog/dice-query/dice-query-format.js +10 -6
  231. package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
  232. package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
  233. package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
  234. package/queries/catalog/files-query/files-query-format.d.ts +2 -0
  235. package/queries/catalog/files-query/files-query-format.js +2 -0
  236. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
  237. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +293 -0
  238. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +121 -0
  239. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +345 -0
  240. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  241. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  242. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
  243. package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
  244. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  245. package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
  246. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  247. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
  248. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  249. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
  250. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
  251. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
  252. package/queries/catalog/linter-query/linter-query-executor.js +11 -2
  253. package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
  254. package/queries/catalog/linter-query/linter-query-format.js +44 -21
  255. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  256. package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
  257. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
  258. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
  259. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  260. package/queries/catalog/origin-query/origin-query-format.js +2 -0
  261. package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
  262. package/queries/catalog/project-query/project-query-executor.js +19 -62
  263. package/queries/catalog/project-query/project-query-format.d.ts +7 -18
  264. package/queries/catalog/project-query/project-query-format.js +3 -18
  265. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  266. package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
  267. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
  269. package/queries/catalog/search-query/search-query-format.d.ts +1 -0
  270. package/queries/catalog/search-query/search-query-format.js +1 -0
  271. package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
  272. package/queries/catalog/signature-query/signature-query-executor.js +267 -57
  273. package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
  274. package/queries/catalog/signature-query/signature-query-format.js +41 -5
  275. package/queries/catalog/signature-query/signature-query-render.js +48 -6
  276. package/queries/catalog/slice-query-options.d.ts +49 -0
  277. package/queries/catalog/slice-query-options.js +50 -0
  278. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
  279. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
  280. package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
  281. package/queries/query-print.js +3 -1
  282. package/queries/query.d.ts +62 -2
  283. package/queries/query.js +9 -2
  284. package/r-bridge/data/data.d.ts +16 -0
  285. package/r-bridge/data/data.js +20 -0
  286. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
  287. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  288. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  289. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
  290. package/reconstruct/reconstruct.d.ts +18 -1
  291. package/reconstruct/reconstruct.js +42 -19
  292. package/slicing/criterion/parse.d.ts +4 -0
  293. package/slicing/criterion/parse.js +4 -0
  294. package/slicing/static/slice-call.js +17 -9
  295. package/slicing/static/static-slicer.d.ts +1 -1
  296. package/slicing/static/static-slicer.js +5 -4
  297. package/util/files.d.ts +19 -1
  298. package/util/files.js +45 -3
  299. package/util/glob.d.ts +19 -0
  300. package/util/glob.js +67 -0
  301. package/util/log.d.ts +12 -0
  302. package/util/log.js +17 -1
  303. package/util/logic.d.ts +6 -0
  304. package/util/logic.js +31 -1
  305. package/util/mermaid/dfg.js +17 -12
  306. package/util/mermaid/mermaid.js +2 -2
  307. package/util/objects.d.ts +5 -0
  308. package/util/objects.js +8 -0
  309. package/util/r-version.d.ts +9 -1
  310. package/util/r-version.js +27 -2
  311. package/util/schema.d.ts +18 -0
  312. package/util/schema.js +102 -4
  313. package/util/text/ansi.d.ts +4 -0
  314. package/util/text/ansi.js +27 -3
  315. package/util/text/strings.d.ts +9 -0
  316. package/util/text/strings.js +29 -0
  317. package/util/version.js +79 -6
  318. package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
  319. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
  320. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
  321. package/project/sigdb/version.js +0 -55
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.WikiDataflowGraph = void 0;
7
7
  const graph_1 = require("../dataflow/graph/graph");
8
+ const doc_query_1 = require("./doc-util/doc-query");
8
9
  const vertex_1 = require("../dataflow/graph/vertex");
9
10
  const edge_1 = require("../dataflow/graph/edge");
10
11
  const dataflowgraph_builder_1 = require("../dataflow/graph/dataflowgraph-builder");
@@ -40,6 +41,7 @@ const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-cont
40
41
  const doc_maker_1 = require("./wiki-mk/doc-maker");
41
42
  const flowr_analyzer_1 = require("../project/flowr-analyzer");
42
43
  const dfg_1 = require("../util/mermaid/dfg");
44
+ const mermaid_1 = require("../util/mermaid/mermaid");
43
45
  const r_number_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-number");
44
46
  const model_1 = require("../r-bridge/lang-4.x/ast/model/model");
45
47
  const range_1 = require("../util/range");
@@ -188,7 +190,7 @@ Describes any kind of function call, including unnamed calls and those that happ
188
190
  In general the vertex provides you with information about
189
191
  the _name_ of the called function, the passed _arguments_, and the _environment_ in which the call happens (if it is of importance).
190
192
 
191
- Whenever flowR can determine which package a call resolves to — via a loaded \`library()\`/\`::\`, or via the always-available base-R packages taken from the ${ctx.linkPage('wiki/Signature Database', 'signature database')} — the mermaid visualization prints the **package-qualified name** in place of the bare one (e.g. \`acf\` is shown as \`stats::acf\`). To obtain this qualified identifier programmatically from a call's origins, use \`Identifier.toQualified\` (see the \`origin\` property below and the ${ctx.linkPage('wiki/Signature Database', 'signature database')} for where the base-R knowledge comes from).
193
+ Whenever flowR can determine which package a call resolves to — via a loaded \`library()\`/\`::\`, or via the always-available base-R packages taken from the ${ctx.linkPage('wiki/Signature Database', 'signature database')} — the mermaid visualization prints the **package-qualified name** in place of the bare one (e.g. \`acf\` is shown as \`stats::acf\`). To obtain this qualified identifier programmatically, prefer ${ctx.linkO(df_helper_1.Dataflow, 'qualify')} which, given only a call's id and its graph, reconstructs the \`pkg::fn\` identifier from the origins (and, for base R, from the exporting package) — the compact form of \`Identifier.toQualified\` (see the \`origin\` property below and the ${ctx.linkPage('wiki/Signature Database', 'signature database')} for where the base-R knowledge comes from).
192
194
 
193
195
  However, the implementation reveals that it may hold an additional \`onlyBuiltin\` flag to indicate that the call is only calling builtin functions — however, this is only a flag to improve performance,
194
196
  and it should not be relied on as it may under-approximate the actual calling targets (e.g., being \`false\` even though all calls resolve to builtins).
@@ -873,8 +875,12 @@ alongside its [control dependencies](#control-dependencies) if it has any. This
873
875
  To give you an example, have a look at the following graph:
874
876
 
875
877
  ${await (0, doc_dfg_1.printDfGraphForCode)(treeSitter, 'if(u) a', { showCode: false, mark: new Set(['1']), ctx })}
876
- With the _may_ prefix you can see that \`a\` has a [control dependency](#control-dependencies)
877
- on the \`if\`, which only triggers when the condition is \`true\` (as indicated by the \`+\` suffix).
878
+ The \`3+\` tells you that \`a\` has a [control dependency](#control-dependencies) on the vertex with id \`3\`, the \`if\`,
879
+ which only triggers when the condition is \`true\`; a \`-\` suffix marks the \`false\` case.
880
+
881
+ Other vertices are named by their id too: \`v: <id>\` is the value of a definition, \`links: <id>\` the AST vertices that
882
+ contributed to the vertex. Mermaid rejects some characters in an id, so a space or a bracket shows as \`_\`
883
+ (see ${ctx.linkO(mermaid_1.Mermaid, 'escapeId')}); a path keeps its \`/\` and \`.\`.
878
884
 
879
885
  ${(0, doc_structure_1.section)('Location', 3, 'vtx-location')}
880
886
 
@@ -1036,6 +1042,10 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(treeSitter, 'load("file")\nprint(x +
1036
1042
  In general, as we cannot handle these correctly, we leave it up to other analyses (and ${ctx.linkPage('wiki/Query API', 'queries')}) to handle these cases
1037
1043
  as they see fit.
1038
1044
 
1045
+ The \`load\` call above degrades to an unknown side effect only because the file could not be found.
1046
+ When the referenced \`.rda\`/\`.rdata\` file _is_ resolvable, flowR instead parses it natively (see ${ctx.link('RDAParser')}, supporting \`gzip\`- and \`bzip2\`-compressed files) and ${ctx.link('processLoadCall')} injects the loaded variable names into the dataflow graph as definitions, so subsequent uses resolve against them.
1047
+ You can disable this and always treat \`load\` as an unknown side effect with the ${ctx.linkConfig('ignoreLoadCalls')} configuration option.
1048
+
1039
1049
  #### Linked Unknown Side Effects
1040
1050
 
1041
1051
  Not all side effects are created equal in the sense that they stem from a specific function call.
@@ -1114,7 +1124,7 @@ If you are interested in which features we support and which features are still
1114
1124
  ${(0, doc_structure_1.section)('Resolving Values', 3, 'dfg-resolving-values')}
1115
1125
 
1116
1126
  FlowR supports a ${ctx.linkPage('wiki/Interface', 'configurable', 'configuring-flowr')} level of value tracking&mdash;all with the goal of knowing the static value domain of a variable.
1117
- These capabilities are exposed by the ${ctx.linkPage('wiki/Query API', 'resolve value Query', 'resolve-value-query')} and backed by two important functions:
1127
+ These capabilities are exposed by the ${(0, doc_query_1.linkToQueryOfName)('resolve-value', 'resolve value Query')} and backed by two important functions:
1118
1128
 
1119
1129
  ${ctx.link(alias_tracking_1.resolveIdToValue)} provides an environment-sensitive (see ${ctx.link('REnvironmentInformation')})
1120
1130
  value resolution depending on if the environment is provided.
@@ -2,17 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WikiInterface = void 0;
4
4
  const shell_1 = require("../r-bridge/shell");
5
+ const doc_query_1 = require("./doc-util/doc-query");
5
6
  const doc_files_1 = require("./doc-util/doc-files");
6
7
  const doc_cli_option_1 = require("./doc-util/doc-cli-option");
7
8
  const doc_server_message_1 = require("./doc-util/doc-server-message");
8
9
  const doc_data_server_messages_1 = require("./data/server/doc-data-server-messages");
9
10
  const doc_code_1 = require("./doc-util/doc-code");
10
11
  const retriever_1 = require("../r-bridge/retriever");
11
- const core_1 = require("../cli/repl/core");
12
+ const path_input_1 = require("../cli/repl/path-input");
12
13
  const doc_docker_1 = require("./doc-util/doc-docker");
13
14
  const doc_repl_1 = require("./doc-util/doc-repl");
14
15
  const doc_dfg_1 = require("./doc-util/doc-dfg");
15
16
  const config_1 = require("../config");
17
+ const project_kind_1 = require("../project/context/project-kind");
16
18
  const schema_1 = require("../util/schema");
17
19
  const ansi_1 = require("../util/text/ansi");
18
20
  const flowr_main_options_1 = require("../cli/flowr-main-options");
@@ -140,8 +142,8 @@ the REPL will re-use previously obtained information and not re-parse the code a
140
142
  })}
141
143
 
142
144
  Generally, many commands offer shortcut versions in the REPL. Many queries, for example, offer a shortened format (see the example below).
143
- Of special note, the ${ctx.linkPage('wiki/Query API', 'Config Query', 'Config-Query')}
144
- can be used to also modify the currently active configuration of _flowR_ within the REPL (see the ${ctx.linkPage('wiki/Query API', 'wiki page', 'Config-Query')} for more information).
145
+ Of special note, the ${(0, doc_query_1.linkToQueryOfName)('config', 'Config Query')}
146
+ can be used to also modify the currently active configuration of _flowR_ within the REPL (see the ${(0, doc_query_1.linkToQueryOfName)('config', 'wiki page')} for more information).
145
147
 
146
148
  ### Example: Retrieving the Dataflow Graph
147
149
 
@@ -162,6 +164,7 @@ ${await (0, doc_repl_1.documentReplSession)(parser, [{
162
164
 
163
165
  For the slicing with ${ctx.replCmd('slicer')}, you have access to the same [magic comments](#slice-magic-comments) as with the [slice request](#message-request-slice).
164
166
  Pass \`--inline\` to splice resolvable \`source()\` calls into the reconstruction so the slice is a single self-contained R text (the same as the static slice query's \`inlineSources\` flag).
167
+ See \`--help\` for more flags!
165
168
 
166
169
  ### Example: Interfacing with the File System
167
170
 
@@ -169,10 +172,10 @@ Many commands that allow for an R-expression (like ${ctx.replCmd('dataflow*')})
169
172
  if the argument starts with \`${retriever_1.fileProtocol}\`.
170
173
  If you are working from the root directory of the _flowR_ repository, the following gives you the parsed AST of the example file using the ${ctx.replCmd('parse')} command:
171
174
 
172
- > **Watch mode**: Replace \`${retriever_1.fileProtocol}\` with \`${core_1.watchProtocol}\` to enter watch mode.
175
+ > **Watch mode**: Replace \`${retriever_1.fileProtocol}\` with \`${path_input_1.watchProtocol}\` to enter watch mode.
173
176
  > flowR runs the command immediately and then re-runs it every time the file (or any file inside the folder) changes.
174
177
  > Enter any other command to leave watch mode.
175
- > For example: \`:df ${core_1.watchProtocol}analysis.R\`
178
+ > For example: \`:df ${path_input_1.watchProtocol}analysis.R\`
176
179
 
177
180
  ${await (0, doc_repl_1.documentReplSession)(parser, [{
178
181
  command: `:parse ${retriever_1.fileProtocol}test/testfiles/example.R`,
@@ -220,18 +223,21 @@ ${(0, doc_code_1.codeBlock)('shell', ':query @config')}
220
223
 
221
224
  To work with the ${ctx.link(config_1.FlowrConfig)} you can use the provided helper objects alongside its methods like
222
225
  ${ctx.linkO(config_1.FlowrConfig, 'amend')}.
223
- The following summarizes the configuration options:
226
+ The schema below documents every option; the ones you most likely want are:
224
227
 
225
- - \`ignoreSourceCalls\`: If set to \`true\`, _flowR_ will ignore source calls when analyzing the code, i.e., ignoring the inclusion of other files.
226
- - \`semantics\`: allows to configure the way _flowR_ handles R, although we currently only support \`semantics/environment/overwriteBuiltIns\`.
227
- You may use this to overwrite _flowR_'s handling of built-in function and even completely clear the preset definitions shipped with flowR.
228
+ - ${ctx.linkConfig('ignoreSourceCalls')}: ignore source calls when analyzing the code, i.e., ignore the inclusion of other files.
229
+ - ${ctx.linkConfig('ignoreLoadCalls')}: ignore load calls when analyzing the code, i.e., ignore the loading of r-data files.
230
+ - ${ctx.linkConfig('semantics.environment.overwriteBuiltIns')}: overwrite _flowR_'s handling of built-in functions, or clear the preset definitions entirely.
228
231
  See [Configure BuiltIn Semantics](#configure-builtin-semantics) for more information.
229
- - \`solver\`: allows to configure how _flowR_ resolves variables and their values (currently we support: ${Object.values(config_1.VariableResolve).map(v => `\`${v}\``).join(', ')}), as well as if pointer analysis should be active.
230
- - \`engines\`: allows to configure the engines used by _flowR_ to interact with R code. See the ${ctx.linkPage('wiki/Engines', 'Engines wiki page')} for more information.
231
- - \`defaultEngine\`: allows to specify the default engine to use for interacting with R code. If not set, an arbitrary engine from the specified list will be used.
232
- - \`abstractInterpretation\`: allows to configure how _flowR_ performs abstract interpretation, although we currently only support data frame shape inference through abstract interpretation.
233
- - \`defaultPlugins\`: allows to configure which plugins to load by default when creating a new ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} instance.
234
- - \`repl.plugins\`: allows to configure which plugins to load in the _flowR_ REPL. Use \`flowr:default\` to reference the plugins specified by \`defaultPlugins\`.
232
+ - ${ctx.linkConfig('solver.variables')}: how to resolve variables and their values (${Object.values(config_1.VariableResolve).map(v => `\`${v}\``).join(', ')}).
233
+ - ${ctx.linkConfig('engines')} and ${ctx.linkConfig('defaultEngine')}: the engines used to interact with R code, see the ${ctx.linkPage('wiki/Engines', 'Engines wiki page')}.
234
+ - ${ctx.linkConfig('project.implicitSources')}: the files a framework loads without any \`source()\` call, in the order in which they are
235
+ loaded. Entries are globs (e.g. \`R/*.R\`) matched against the file path ignoring capitalization; one matching no file is reported.
236
+ - ${ctx.linkConfig('specializeConfig')}: overwrite (parts of) the configuration depending on the kind of project _flowR_ detects
237
+ (e.g. \`shiny-app\`), which is how a shiny app gets its implicit sources by default. What you configure directly wins.
238
+ - ${ctx.linkConfig('project.useProjectType')}: skip that detection and force a project kind yourself, when auto-detection guesses wrong.
239
+ - ${ctx.linkConfig('defaultPlugins')} and ${ctx.linkConfig('repl.plugins')}: the plugins to load for a new ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} and in the REPL
240
+ (use \`flowr:default\` to reference the former).
235
241
 
236
242
  So you can configure _flowR_ by adding a file like the following:
237
243
 
@@ -241,6 +247,7 @@ So you can configure _flowR_ by adding a file like the following:
241
247
 
242
248
  ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
243
249
  ignoreSourceCalls: true,
250
+ ignoreLoadCalls: true,
244
251
  semantics: {
245
252
  environment: {
246
253
  overwriteBuiltIns: {
@@ -258,7 +265,14 @@ ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
258
265
  plugins: ['flowr:default']
259
266
  },
260
267
  project: {
261
- resolveUnknownPathsOnDisk: true
268
+ resolveUnknownPathsOnDisk: true,
269
+ implicitSources: ['global.R', 'app.R']
270
+ },
271
+ linter: {
272
+ disabledRules: []
273
+ },
274
+ specializeConfig: {
275
+ [project_kind_1.ProjectKind.ShinyApp]: { project: { implicitSources: ['global.R', 'ui.R', 'server.R', 'app.R'] } }
262
276
  },
263
277
  engines: [{ type: 'r-shell' }],
264
278
  solver: {
@@ -17,7 +17,7 @@ const DefaultReplacementPatterns = [
17
17
  [/\d+(\.\d+)?( |\s*)?ms/g, ''],
18
18
  [/tmp[%A-Za-z0-9-]+/g, ''],
19
19
  [/"?(timing|searchTimeMs|processTimeMs|id|tsId)"?:\s*\d+(\.\d)?,?/g, ''],
20
- [/"format":"compact".+/gmius, ''],
20
+ [/"format":"compact"[^\n\r]*/giu, ''],
21
21
  [/%%\s*\d*-+/g, ''],
22
22
  [/"[rR]": "\d+\.\d+\.\d+.*?"/g, ''],
23
23
  [/R\s*\d+\.\d+\.\d+/g, ''],
@@ -41,8 +41,11 @@ const slice_direction_1 = require("../util/slice-direction");
41
41
  const provenance_query_executor_1 = require("../queries/catalog/provenance-query/provenance-query-executor");
42
42
  const input_sources_query_executor_1 = require("../queries/catalog/input-sources-query/input-sources-query-executor");
43
43
  const absint_query_executor_1 = require("../queries/catalog/absint-query/absint-query-executor");
44
+ const dice_query_executor_1 = require("../queries/catalog/dice-query/dice-query-executor");
45
+ const dataflow_lens_query_executor_1 = require("../queries/catalog/dataflow-lens-query/dataflow-lens-query-executor");
46
+ const signature_query_executor_1 = require("../queries/catalog/signature-query/signature-query-executor");
47
+ const guess_dep_versions_query_executor_1 = require("../queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor");
44
48
  (0, doc_query_1.registerQueryDocumentation)('call-context', {
45
- name: 'Call-Context Query',
46
49
  type: 'active',
47
50
  shortDescription: 'Finds all calls in a set of files that matches specified criteria.',
48
51
  functionName: call_context_query_executor_1.executeCallContextQueries.name,
@@ -111,7 +114,6 @@ my_test_function()
111
114
  }
112
115
  });
113
116
  (0, doc_query_1.registerQueryDocumentation)('dataflow', {
114
- name: 'Dataflow Query',
115
117
  type: 'active',
116
118
  shortDescription: 'Returns the dataflow graph of the given code.',
117
119
  functionName: dataflow_query_executor_1.executeDataflowQuery.name,
@@ -130,7 +132,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
130
132
  }
131
133
  });
132
134
  (0, doc_query_1.registerQueryDocumentation)('call-graph', {
133
- name: 'Call-Graph Query',
134
135
  type: 'active',
135
136
  shortDescription: 'Returns the call graph of the given code.',
136
137
  functionName: call_graph_query_executor_1.executeCallGraphQuery.name,
@@ -148,7 +149,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
148
149
  }
149
150
  });
150
151
  (0, doc_query_1.registerQueryDocumentation)('does-call', {
151
- name: 'Does-Call Query',
152
152
  type: 'active',
153
153
  shortDescription: 'Checks whether a function calls another function matching given constraints.',
154
154
  functionName: does_call_query_executor_1.executeDoesCallQuery.name,
@@ -171,7 +171,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
171
171
  }
172
172
  });
173
173
  (0, doc_query_1.registerQueryDocumentation)('files', {
174
- name: 'Files Query',
175
174
  type: 'active',
176
175
  shortDescription: 'Returns the files matching the given criteria.',
177
176
  functionName: files_query_executor_1.executeFileQuery.name,
@@ -186,7 +185,6 @@ ${await (0, doc_query_1.showQuery)(shell, '', [{
186
185
  }
187
186
  });
188
187
  (0, doc_query_1.registerQueryDocumentation)('project', {
189
- name: 'Project Query',
190
188
  type: 'active',
191
189
  shortDescription: 'Returns information about the analyzed project',
192
190
  functionName: dataflow_query_executor_1.executeDataflowQuery.name,
@@ -204,7 +202,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
204
202
  }
205
203
  });
206
204
  (0, doc_query_1.registerQueryDocumentation)('normalized-ast', {
207
- name: 'Normalized AST Query',
208
205
  type: 'active',
209
206
  shortDescription: 'Returns the normalized AST of the given code.',
210
207
  functionName: normalized_ast_query_executor_1.executeNormalizedAstQuery.name,
@@ -223,7 +220,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
223
220
  }
224
221
  });
225
222
  (0, doc_query_1.registerQueryDocumentation)('dataflow-cluster', {
226
- name: 'Dataflow Cluster Query',
227
223
  type: 'active',
228
224
  shortDescription: 'Calculates and returns all the clusters present in the dataflow graph.',
229
225
  functionName: cluster_query_executor_1.executeDataflowClusterQuery.name,
@@ -250,7 +246,6 @@ ${await (0, doc_query_1.showQuery)(shell, example_query_code_1.exampleQueryCode,
250
246
  }
251
247
  });
252
248
  (0, doc_query_1.registerQueryDocumentation)('resolve-value', {
253
- name: 'Resolve Value Query',
254
249
  type: 'active',
255
250
  shortDescription: 'Provides access to flowR\'s value tracking (which is configurable)',
256
251
  functionName: search_query_executor_1.executeSearch.name,
@@ -271,7 +266,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
271
266
  }
272
267
  });
273
268
  (0, doc_query_1.registerQueryDocumentation)('inspect-higher-order', {
274
- name: 'Inspect Higher-Order Functions Query',
275
269
  type: 'active',
276
270
  shortDescription: 'Determine whether functions are higher-order functions',
277
271
  functionName: inspect_higher_order_query_executor_1.executeHigherOrderQuery.name,
@@ -296,7 +290,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
296
290
  }
297
291
  });
298
292
  (0, doc_query_1.registerQueryDocumentation)('inspect-recursion', {
299
- name: 'Inspect Recursive Functions Query',
300
293
  type: 'active',
301
294
  shortDescription: 'Determine whether functions are recursive',
302
295
  functionName: inspect_recursion_query_executor_1.executeRecursionQuery.name,
@@ -321,7 +314,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
321
314
  }
322
315
  });
323
316
  (0, doc_query_1.registerQueryDocumentation)('inspect-exception', {
324
- name: 'Inspect Exceptions of Functions Query',
325
317
  type: 'active',
326
318
  shortDescription: 'Determine whether functions throw exceptions (known to flowR)',
327
319
  functionName: inspect_exception_query_executor_1.executeExceptionQuery.name,
@@ -350,7 +342,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
350
342
  }
351
343
  });
352
344
  (0, doc_query_1.registerQueryDocumentation)('origin', {
353
- name: 'Origin Query',
354
345
  type: 'active',
355
346
  shortDescription: 'Retrieve the origin of a variable, function call, ...',
356
347
  functionName: search_query_executor_1.executeSearch.name,
@@ -371,7 +362,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
371
362
  }
372
363
  });
373
364
  (0, doc_query_1.registerQueryDocumentation)('search', {
374
- name: 'Search Query',
375
365
  type: 'active',
376
366
  shortDescription: 'Provides access to flowR\'s search API',
377
367
  functionName: search_query_executor_1.executeSearch.name,
@@ -390,7 +380,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
390
380
  }
391
381
  });
392
382
  (0, doc_query_1.registerQueryDocumentation)('happens-before', {
393
- name: 'Happens-Before Query',
394
383
  type: 'active',
395
384
  shortDescription: 'Check whether one normalized AST node happens before another in the CFG.',
396
385
  functionName: search_query_executor_1.executeSearch.name,
@@ -414,7 +403,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
414
403
  }
415
404
  });
416
405
  (0, doc_query_1.registerQueryDocumentation)('id-map', {
417
- name: 'Id-Map Query',
418
406
  type: 'active',
419
407
  shortDescription: 'Returns the id-map of the normalized AST of the given code.',
420
408
  functionName: id_map_query_executor_1.executeIdMapQuery.name,
@@ -432,7 +420,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
432
420
  }
433
421
  });
434
422
  (0, doc_query_1.registerQueryDocumentation)('config', {
435
- name: 'Config Query',
436
423
  type: 'active',
437
424
  shortDescription: 'Returns the current configuration of flowR.',
438
425
  functionName: config_query_executor_1.executeConfigQuery.name,
@@ -457,13 +444,26 @@ ${await (0, doc_repl_1.documentReplSession)(shell, [
457
444
  }
458
445
  ])}
459
446
 
460
- One of the most useful options to change on-the-fly are probably those under \`repl\`. For example, setting \`repl.quickStats=true\`
461
- enables quick statistics after each REPL command. Likewise, setting \`repl.dfProcessorHeat=true\` enables the dataflow processor heatmap after each REPL command.
447
+ In the REPL you can also read a single option by its \`.\`-separated path, or several at once with a glob&mdash;\`*\` covers
448
+ one path segment, \`**\` any number. This only reads: setting a value still names exactly one key.
449
+
450
+ ${await (0, doc_repl_1.documentReplSession)(shell, [
451
+ {
452
+ command: ':query @config **.enabled',
453
+ description: 'Read every `enabled` option, wherever it sits in the configuration.'
454
+ },
455
+ {
456
+ command: ':query @config solver.*',
457
+ description: 'Read the direct children of `solver` (use `solver.**` for the whole subtree).'
458
+ }
459
+ ])}
460
+
461
+ One of the most useful options to change on-the-fly are probably those under \`repl\`. For example, setting ${ctx.linkConfig('repl.quickStats', true)}
462
+ enables quick statistics after each REPL command. Likewise, ${ctx.linkConfig('repl.dfProcessorHeat', true)} enables the dataflow processor heatmap after each REPL command.
462
463
  `;
463
464
  }
464
465
  });
465
466
  (0, doc_query_1.registerQueryDocumentation)('absint', {
466
- name: 'Abstract Interpretation Query',
467
467
  type: 'active',
468
468
  shortDescription: 'Returns the abstract values inferred for every expression or at specific locations.',
469
469
  functionName: absint_query_executor_1.executeAbsintQuery.name,
@@ -543,7 +543,6 @@ Now, the results no longer contain calls to \`plot\` that are not defined locall
543
543
  }
544
544
  });
545
545
  (0, doc_query_1.registerQueryDocumentation)('static-slice', {
546
- name: 'Static Slice Query',
547
546
  type: 'active',
548
547
  shortDescription: 'Slice the dataflow graph reducing the code to just the parts relevant for the given criteria (backward and forward).',
549
548
  functionName: static_slice_query_executor_1.executeStaticSliceQuery.name,
@@ -607,7 +606,6 @@ This query replaces the old ${ctx.linkPage('wiki/Interface', '`request-slice`',
607
606
  }
608
607
  });
609
608
  (0, doc_query_1.registerQueryDocumentation)('provenance', {
610
- name: 'Provenance Query',
611
609
  type: 'active',
612
610
  shortDescription: 'Calculate the provenance of a given variable, optionally restricted to its enveloping fdef',
613
611
  functionName: provenance_query_executor_1.executeProvenanceQuery.name,
@@ -631,7 +629,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
631
629
  }
632
630
  });
633
631
  (0, doc_query_1.registerQueryDocumentation)('input-sources', {
634
- name: 'Input Sources Query',
635
632
  type: 'active',
636
633
  shortDescription: 'Classify the input sources of function calls',
637
634
  functionName: input_sources_query_executor_1.executeInputSourcesQuery.name,
@@ -659,7 +656,6 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
659
656
  }
660
657
  });
661
658
  (0, doc_query_1.registerQueryDocumentation)('dependencies', {
662
- name: 'Dependencies Query',
663
659
  type: 'active',
664
660
  shortDescription: 'Returns all direct dependencies (in- and outputs) of a given R script',
665
661
  functionName: dependencies_query_executor_1.executeDependenciesQuery.name,
@@ -713,7 +709,6 @@ Here, \`resolveValue\` tells the dependency query to resolve the value of this a
713
709
  }
714
710
  });
715
711
  (0, doc_query_1.registerQueryDocumentation)('linter', {
716
- name: 'Linter Query',
717
712
  type: 'active',
718
713
  shortDescription: 'Lints a given R script for common issues.',
719
714
  functionName: dependencies_query_executor_1.executeDependenciesQuery.name,
@@ -744,7 +739,6 @@ We welcome any feedback and suggestions for new rules on this (consider opening
744
739
  }
745
740
  });
746
741
  (0, doc_query_1.registerQueryDocumentation)('control-flow', {
747
- name: 'Control-Flow Query',
748
742
  type: 'active',
749
743
  shortDescription: 'Provides the control-flow of the program.',
750
744
  functionName: control_flow_query_executor_1.executeControlFlowQuery.name,
@@ -801,7 +795,6 @@ ${await (0, doc_cfg_1.printCfgCode)(shell, exampleCode, { showCode: false, prefi
801
795
  }
802
796
  });
803
797
  (0, doc_query_1.registerQueryDocumentation)('location-map', {
804
- name: 'Location Map Query',
805
798
  type: 'active',
806
799
  shortDescription: 'Returns a simple mapping of ids to their location in the source file',
807
800
  functionName: location_map_query_executor_1.executeLocationMapQuery.name,
@@ -835,6 +828,168 @@ All locations are given as a ${ctx.link('SourceRange')} paired with the file id
835
828
  `;
836
829
  }
837
830
  });
831
+ (0, doc_query_1.registerQueryDocumentation)('dice', {
832
+ type: 'active',
833
+ shortDescription: 'Reduces the code to the parts that carry information from a given start point to a given end point.',
834
+ functionName: dice_query_executor_1.executeDiceQuery.name,
835
+ functionFile: '../queries/catalog/dice-query/dice-query-executor.ts',
836
+ buildExplanation: async (shell, ctx) => {
837
+ const exampleCode = 'x <- 1\ny <- 2\nz <- x + y\nw <- z * 2\nprint(z)';
838
+ return `
839
+ While the ${(0, doc_query_1.linkToQueryOfName)('static-slice')} answers "what affects this point?" (or "what does this point affect?"),
840
+ a _dice_ answers the two-sided question: **which parts of the program carry information from A to B?**
841
+ It is the intersection of a forward slice seeded at \`from\` and a backward slice seeded at \`to\`,
842
+ so only the code that lies on some dependency path between the two criteria survives.
843
+
844
+ Both \`from\` and \`to\` are arrays of [slicing criteria](${doc_files_1.FlowrWikiBaseRef}/Terminology#slicing-criterion), just like for the ${(0, doc_query_1.linkToQueryOfName)('static-slice')}.
845
+ Unlike that query, there is no \`direction\` property: the direction is already fixed by the \`from\`&rarr;\`to\` pairing.
846
+
847
+ Consider the following code:
848
+ ${(0, doc_code_1.codeBlock)('r', exampleCode)}
849
+
850
+ Asking what connects the definition of \`x\` to the definition of \`z\` drops \`y <- 2\` (it never depends on \`x\`)
851
+ as well as \`w <- z * 2\` and \`print(z)\` (they are not on a path _into_ the \`to\` criterion):
852
+
853
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
854
+ type: 'dice',
855
+ from: ['1@x'],
856
+ to: ['3@z']
857
+ }], { showCode: false, shorthand: `(1@x->3@z) "${(0, doc_escape_1.escapeNewline)(exampleCode)}"`, ctx })}
858
+
859
+ Beyond \`from\` and \`to\`, the dice query understands the same options as the ${(0, doc_query_1.linkToQueryOfName)('static-slice')}
860
+ (\`noReconstruction\`, \`noMagicComments\`, \`inlineSources\`, \`inlineFull\`, and \`includeCallees\`), as both share the
861
+ \`SliceQueryOptions\` of ${(0, doc_files_1.getFilePathMd)('../queries/catalog/slice-query-options.ts')}.
862
+
863
+ ${(0, doc_structure_1.details)('Multiple Criteria per Side', 'Each side accepts several criteria, which are seeded together:' + await (0, doc_query_1.showQuery)(shell, exampleCode, [{
864
+ type: 'dice',
865
+ from: ['1@x', '2@y'],
866
+ to: ['5@print']
867
+ }], { showCode: false, ctx }))}
868
+ `;
869
+ }
870
+ });
871
+ (0, doc_query_1.registerQueryDocumentation)('dataflow-lens', {
872
+ type: 'active',
873
+ shortDescription: 'Returns a simplified view on the dataflow graph, reduced to definitions, uses, and calls.',
874
+ functionName: dataflow_lens_query_executor_1.executeDataflowLensQuery.name,
875
+ functionFile: '../queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.ts',
876
+ buildExplanation: async (shell, ctx) => {
877
+ const exampleCode = 'f <- function(a) a + 1\nx <- 1\ny <- f(x)\nprint(y)';
878
+ return `
879
+ The ${(0, doc_query_1.linkToQueryOfName)('dataflow')} hands you the complete dataflow graph, which is precise but quickly grows too large to read.
880
+ The dataflow lens returns a _reduced_ view of that same graph, keeping only what is usually interesting when looking at it by hand:
881
+
882
+ * only vertices tagged as a use, a variable definition, a function definition, or a function call (value vertices are dropped),
883
+ * without the environment captured at each vertex (control dependencies are kept),
884
+ * and without the vertices for plain operators and keywords (\`<-\`, \`=\`, \`+\`, \`|>\`, \`if\`, \`function\`, ...).
885
+
886
+ Edges survive only if both of their endpoints do. The query takes no further arguments.
887
+
888
+ ${(0, doc_code_1.codeBlock)('r', exampleCode)}
889
+
890
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{ type: 'dataflow-lens' }], { showCode: false, ctx })}
891
+
892
+ ${(0, doc_structure_1.block)({
893
+ type: 'NOTE',
894
+ content: `This is a presentation aid, not a semantic one: the reduced graph is not a sound basis for slicing.
895
+ Use the ${(0, doc_query_1.linkToQueryOfName)('dataflow')} if you need the complete graph, or the ${(0, doc_query_1.linkToQueryOfName)('dataflow-cluster')} if you want the graph partitioned instead of shrunk.`
896
+ })}
897
+ `;
898
+ }
899
+ });
900
+ (0, doc_query_1.registerQueryDocumentation)('signature', {
901
+ type: 'active',
902
+ shortDescription: 'Inspects the signature database: packages, function signatures, source and documentation links.',
903
+ functionName: signature_query_executor_1.executeSignatureQuery.name,
904
+ functionFile: '../queries/catalog/signature-query/signature-query-executor.ts',
905
+ buildExplanation: async (shell, ctx) => {
906
+ const exampleCode = 'library(dplyr)\nlead(1:10, n = 1)';
907
+ return `
908
+ This query is the read-side interface to flowR's ${ctx.linkPage('wiki/Signature Database', 'signature database')}&mdash;the very same database
909
+ that resolves \`library()\` and \`::\` calls during the dataflow analysis. It lets you ask what flowR actually _knows_ about a package
910
+ or a function, without needing R or a network connection.
911
+
912
+ What you get back depends on how specific you are:
913
+
914
+ | Given | Result |
915
+ | ----- | :----- |
916
+ | nothing | a summary of the loaded databases |
917
+ | \`package\` | the full package view: version, CRAN links, dependencies, exports |
918
+ | \`package\` + \`function\` | the full function view: parameters, definition site, source and documentation links, S3 relations |
919
+ | a glob in either (\`gg*\`, \`geom_*\`) | the set of matching packages or functions |
920
+
921
+ The \`version\` property accepts an exact version, a glob (\`3.*\`), a semver range (\`>=3.0.0\`), or a release-date bound (\`<=2026\`, \`>=2021.05\`).
922
+ Without it, the release that flowR resolved for the analyzed script is used, so the signature you see is the one the analysis actually assumed.
923
+
924
+ Given a script such as:
925
+ ${(0, doc_code_1.codeBlock)('r', exampleCode)}
926
+
927
+ we can inspect the signature of the function it calls:
928
+
929
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{ type: 'signature', package: 'dplyr', function: 'lead' }], { showCode: false, collapseResult: true, ctx })}
930
+
931
+ The \`parameters\` and \`requiredParameters\` properties additionally filter by the _shape_ of a function, which is useful to find
932
+ functions you only half-remember: \`{ package: '*', parameters: ['data', 'mapping'] }\` finds every known function taking both of these.
933
+
934
+ ${(0, doc_structure_1.block)({
935
+ type: 'NOTE',
936
+ content: `The results depend on which database shards are mounted; with none available the query reports that no database is loaded rather than failing.
937
+ See the ${ctx.linkPage('wiki/Signature Database')} page for the storage format, the configuration under ${ctx.linkConfig('solver.sigdb', true)}, and how to obtain further shards.
938
+ To find out what a script _uses_, reach for the ${(0, doc_query_1.linkToQueryOfName)('dependencies')}; to find out which versions it is compatible with, see the ${(0, doc_query_1.linkToQueryOfName)('guess-dep-versions')}.`
939
+ })}
940
+ `;
941
+ }
942
+ });
943
+ (0, doc_query_1.registerQueryDocumentation)('guess-dep-versions', {
944
+ type: 'active',
945
+ shortDescription: 'Guesses the version range each dependency must have, from declared constraints and actual code usage.',
946
+ functionName: guess_dep_versions_query_executor_1.executeGuessDepVersionsQuery.name,
947
+ functionFile: '../queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.ts',
948
+ buildExplanation: async (shell, ctx) => {
949
+ const exampleCode = 'library(dplyr)\nmutate(mtcars, across(everything(), round))';
950
+ return `
951
+ A script rarely says which version of a package it needs, but it shows you. If it passes an argument that a function only
952
+ gained in some release, it cannot run on anything older. This query turns that observation into a concrete version range per dependency.
953
+
954
+ It combines two sources of evidence:
955
+
956
+ 1. what the project **declares**: a \`DESCRIPTION\` range, an \`rproject.toml\` entry, a lockfile pin, and everything these imply transitively, and
957
+ 2. what the code **does**: which package functions it calls and with which arguments, matched against the ${ctx.linkPage('wiki/Signature Database', 'signature database')}.
958
+
959
+ Every resulting bound carries its provenance, so the answer explains itself: each entry lists the \`evidence\` that produced it,
960
+ naming the function, the parameter, and the bound it implies.
961
+
962
+ Two things can raise a lower bound: calling a function that did not exist yet, or passing an argument that the
963
+ function only gained later. Consider a script calling \`dplyr::across\`:
964
+ ${(0, doc_code_1.codeBlock)('r', exampleCode)}
965
+
966
+ \`across\` was only introduced in dplyr 1.0.0, so the script cannot run on anything older. The result names the function
967
+ that produced the bound:
968
+
969
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{ type: 'guess-dep-versions' }], { showCode: false, collapseResult: true, ctx })}
970
+
971
+ The guess can be narrowed further:
972
+
973
+ * \`packages\` restricts it to the dependencies you care about,
974
+ * \`date\` caps every guess to releases available at that point in time (\`YYYY.MM.DD\`, also \`YYYY\` or \`YYYY.MM\`),
975
+ * \`clean\` ignores the declared constraints entirely and guesses purely from usage,
976
+ * \`disabled\` excludes individual evidence sources by name (repl: \`--disabled\` followed by their one-letter codes shown in the legend below, e.g. \`--disabled ds\` drops \`declared\` and \`signature\`),
977
+ * \`maxCandidates\` caps how many candidate versions are listed per dependency,
978
+ * \`maxIterations\` bounds the two fixpoint loops (packages constrain each other, so the guess is iterated until it settles), and
979
+ * \`explode\` additionally enumerates concrete version _combinations_ (\`order\`, \`prefer\`, and \`limit\` control which and how many).
980
+
981
+ Packages can also be tied to one shared version (the base/R packages always are), and ${ctx.linkConfig('solver.versionManagement.linkedVersionGroups', true)}
982
+ declares further groups. Such a package reports its partners in \`linkedWith\`, because its range is then no longer independent of theirs.
983
+
984
+ ${(0, doc_structure_1.block)({
985
+ type: 'NOTE',
986
+ content: `This query needs the ${ctx.linkPage('wiki/Signature Database', 'signature database')}, and specifically a database carrying the _history_ of a package,
987
+ since bounding a version means comparing releases. Without one it returns no guesses and says so in its \`message\`.
988
+ See the ${(0, doc_query_1.linkToQueryOfName)('signature')} to inspect the signatures the guess is drawn from.`
989
+ })}
990
+ `;
991
+ }
992
+ });
838
993
  /**
839
994
  * https://github.com/flowr-analysis/flowr/wiki/Query-API
840
995
  */
@@ -843,6 +998,13 @@ class WikiQuery extends doc_maker_1.DocMaker {
843
998
  super('wiki/Query API.md', module.filename, 'query API');
844
999
  }
845
1000
  async text({ ctx, shell }) {
1001
+ (0, doc_query_1.assertAllQueriesDocumented)();
1002
+ for (const [file, content] of Object.entries({
1003
+ ...await (0, doc_query_1.queryPages)(shell, ctx, 'active'),
1004
+ ...await (0, doc_query_1.queryPages)(shell, ctx, 'virtual')
1005
+ })) {
1006
+ this.writeSubFile(file, content);
1007
+ }
846
1008
  return `
847
1009
  This page briefly summarizes flowR's query API, represented by the ${query_1.executeQueries.name} function in ${(0, doc_files_1.getFilePathMd)('../queries/query.ts')}.
848
1010
  Please see the ${ctx.linkPage('wiki/Interface')} wiki page for more information on how to access this API.
@@ -917,9 +1079,7 @@ Just as an example, the following ${(0, doc_query_1.linkToQueryOfName)('call-con
917
1079
 
918
1080
  ${await (0, doc_query_1.showQuery)(shell, example_query_code_1.exampleQueryCode, [{ type: 'call-context', callName: '^read_csv$', callTargets: identify_link_to_last_call_relation_1.CallTargets.OnlyGlobal, kind: 'input', subkind: 'csv-file' }], { showCode: false, ctx })}
919
1081
 
920
- ${await (0, doc_query_1.explainQueries)(shell, ctx, 'active')}
921
-
922
- ${await (0, doc_query_1.explainQueries)(shell, ctx, 'virtual')}
1082
+ Every query is explained in detail on its own wiki page, linked from the overviews above.
923
1083
  `;
924
1084
  }
925
1085
  }
@@ -1,7 +1,7 @@
1
1
  import type { DocMakerArgs } from './wiki-mk/doc-maker';
2
2
  import { DocMaker } from './wiki-mk/doc-maker';
3
3
  /**
4
- * https://github.com/flowr-analysis/flowr/wiki/Package-Database
4
+ * https://github.com/flowr-analysis/flowr/wiki/Signature-Database
5
5
  */
6
6
  export declare class WikiSignatureDatabase extends DocMaker<'wiki/Signature Database.md'> {
7
7
  constructor();