@eagleoutice/flowr 2.12.2 → 2.13.0

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 (319) hide show
  1. package/README.md +38 -91
  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 +10 -0
  33. package/cli/common/options.js +2 -0
  34. package/cli/common/scripts-info.d.ts +10 -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-query.js +42 -20
  40. package/cli/repl/commands/repl-signature.js +2 -2
  41. package/cli/repl/core.d.ts +14 -5
  42. package/cli/repl/core.js +32 -17
  43. package/cli/repl/parser/slice-query-parser.d.ts +69 -8
  44. package/cli/repl/parser/slice-query-parser.js +82 -13
  45. package/cli/repl/path-input.d.ts +6 -0
  46. package/cli/repl/path-input.js +41 -0
  47. package/cli/repl/print-version.js +3 -5
  48. package/cli/slicer-app.d.ts +2 -0
  49. package/cli/slicer-app.js +2 -1
  50. package/config.d.ts +54 -6
  51. package/config.js +133 -12
  52. package/control-flow/control-flow-graph.d.ts +3 -2
  53. package/control-flow/control-flow-graph.js +34 -14
  54. package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
  55. package/control-flow/semantic-cfg-guided-visitor.js +3 -0
  56. package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
  57. package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
  58. package/data/r-base-packages.generated.d.ts +1 -1
  59. package/data/r-base-packages.generated.js +3 -3
  60. package/data/sigdb/sigdb.remote.json +53 -53
  61. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  62. package/dataflow/environments/built-in-proc-name.js +2 -0
  63. package/dataflow/environments/built-in.d.ts +2 -0
  64. package/dataflow/environments/built-in.js +2 -0
  65. package/dataflow/environments/default-builtin-config.d.ts +3 -5
  66. package/dataflow/environments/default-builtin-config.js +2 -2
  67. package/dataflow/environments/environment.d.ts +9 -0
  68. package/dataflow/environments/environment.js +28 -7
  69. package/dataflow/environments/identifier.d.ts +1 -2
  70. package/dataflow/environments/identifier.js +1 -5
  71. package/dataflow/extractor.js +1 -2
  72. package/dataflow/graph/dataflowgraph-builder.js +42 -3
  73. package/dataflow/graph/df-helper.d.ts +15 -0
  74. package/dataflow/graph/df-helper.js +20 -0
  75. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
  76. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
  77. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
  78. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
  79. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
  80. package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
  81. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
  82. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
  84. package/documentation/data/faq/faqs.js +12 -1
  85. package/documentation/doc-readme.js +1 -1
  86. package/documentation/doc-util/doc-files.d.ts +2 -2
  87. package/documentation/doc-util/doc-files.js +4 -7
  88. package/documentation/doc-util/doc-query.d.ts +12 -9
  89. package/documentation/doc-util/doc-query.js +63 -28
  90. package/documentation/wiki-absint.js +1 -4
  91. package/documentation/wiki-analyzer.js +8 -3
  92. package/documentation/wiki-cfg.js +3 -2
  93. package/documentation/wiki-dataflow-graph.js +14 -4
  94. package/documentation/wiki-interface.js +29 -16
  95. package/documentation/wiki-mk/doc-maker.js +1 -1
  96. package/documentation/wiki-query.js +189 -30
  97. package/documentation/wiki-signature-database.d.ts +1 -1
  98. package/documentation/wiki-signature-database.js +53 -27
  99. package/linter/linter-output.d.ts +24 -0
  100. package/linter/linter-output.js +117 -0
  101. package/linter/linter-rules.d.ts +2 -4
  102. package/linter/rules/dataframe-access-validation.js +4 -4
  103. package/linter/rules/deprecated-functions.d.ts +2 -4
  104. package/linter/rules/deprecated-functions.js +58 -3
  105. package/linter/rules/undefined-symbol.js +18 -10
  106. package/linter/rules/unused-definition.js +24 -0
  107. package/package.json +5 -2
  108. package/project/context/flowr-analyzer-context.d.ts +59 -1
  109. package/project/context/flowr-analyzer-context.js +118 -3
  110. package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
  111. package/project/context/flowr-analyzer-dependencies-context.js +33 -3
  112. package/project/context/flowr-analyzer-files-context.d.ts +32 -0
  113. package/project/context/flowr-analyzer-files-context.js +132 -14
  114. package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
  115. package/project/context/flowr-analyzer-loading-order-context.js +20 -0
  116. package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
  117. package/project/context/flowr-analyzer-meta-context.js +64 -23
  118. package/project/context/flowr-file.d.ts +7 -0
  119. package/project/context/flowr-file.js +7 -0
  120. package/project/context/project-kind.d.ts +22 -0
  121. package/project/context/project-kind.js +27 -0
  122. package/project/dependency-version-space.d.ts +166 -0
  123. package/project/dependency-version-space.js +564 -0
  124. package/project/flowr-analyzer-builder.js +1 -1
  125. package/project/flowr-analyzer.d.ts +4 -0
  126. package/project/flowr-analyzer.js +5 -0
  127. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
  128. package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
  129. package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
  130. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
  131. package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
  132. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
  133. package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
  134. package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
  135. package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
  136. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  137. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  138. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
  139. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
  140. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
  141. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
  142. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
  143. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
  144. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
  145. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
  146. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
  147. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
  148. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
  149. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
  150. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
  151. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
  152. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
  153. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
  154. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
  155. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
  156. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
  157. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
  158. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
  159. package/project/plugins/flowr-analyzer-plugin.js +5 -0
  160. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
  161. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  162. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
  163. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
  164. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
  165. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
  166. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
  167. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
  168. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
  169. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
  170. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
  171. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
  172. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
  175. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
  176. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
  177. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
  178. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
  179. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
  180. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
  181. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
  182. package/project/plugins/package-version-plugins/package.d.ts +4 -1
  183. package/project/plugins/package-version-plugins/package.js +8 -5
  184. package/project/plugins/plugin-registry.d.ts +11 -3
  185. package/project/plugins/plugin-registry.js +24 -5
  186. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
  187. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
  188. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
  189. package/project/sigdb/build.js +12 -2
  190. package/project/sigdb/decode.d.ts +7 -0
  191. package/project/sigdb/decode.js +35 -4
  192. package/project/sigdb/decompress.d.ts +2 -0
  193. package/project/sigdb/decompress.js +5 -0
  194. package/project/sigdb/manifest.d.ts +5 -0
  195. package/project/sigdb/manifest.js +37 -6
  196. package/project/sigdb/reader.d.ts +82 -2
  197. package/project/sigdb/reader.js +226 -14
  198. package/project/sigdb/schema.d.ts +31 -5
  199. package/project/sigdb/schema.js +7 -3
  200. package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
  201. package/project/sigdb/sigdb-version.js +119 -0
  202. package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
  203. package/queries/catalog/absint-query/absint-query-format.js +2 -0
  204. package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
  205. package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
  206. package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
  207. package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
  208. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
  209. package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
  210. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
  211. package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
  212. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
  213. package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
  214. package/queries/catalog/config-query/config-query-executor.js +15 -6
  215. package/queries/catalog/config-query/config-query-format.d.ts +18 -4
  216. package/queries/catalog/config-query/config-query-format.js +246 -96
  217. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
  218. package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
  219. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
  220. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
  221. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
  222. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
  223. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
  224. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
  225. package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
  226. package/queries/catalog/dice-query/dice-query-executor.js +6 -9
  227. package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
  228. package/queries/catalog/dice-query/dice-query-format.js +10 -6
  229. package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
  230. package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
  231. package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
  232. package/queries/catalog/files-query/files-query-format.d.ts +2 -0
  233. package/queries/catalog/files-query/files-query-format.js +2 -0
  234. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
  235. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +277 -0
  236. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +119 -0
  237. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +331 -0
  238. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  239. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  240. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
  241. package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
  242. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  243. package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
  244. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  245. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
  246. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  247. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
  248. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
  249. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
  250. package/queries/catalog/linter-query/linter-query-executor.js +11 -2
  251. package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
  252. package/queries/catalog/linter-query/linter-query-format.js +44 -21
  253. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  254. package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
  255. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
  256. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
  257. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  258. package/queries/catalog/origin-query/origin-query-format.js +2 -0
  259. package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
  260. package/queries/catalog/project-query/project-query-executor.js +19 -62
  261. package/queries/catalog/project-query/project-query-format.d.ts +7 -18
  262. package/queries/catalog/project-query/project-query-format.js +3 -18
  263. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  264. package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
  265. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  266. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
  267. package/queries/catalog/search-query/search-query-format.d.ts +1 -0
  268. package/queries/catalog/search-query/search-query-format.js +1 -0
  269. package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
  270. package/queries/catalog/signature-query/signature-query-executor.js +267 -57
  271. package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
  272. package/queries/catalog/signature-query/signature-query-format.js +41 -5
  273. package/queries/catalog/signature-query/signature-query-render.js +48 -6
  274. package/queries/catalog/slice-query-options.d.ts +49 -0
  275. package/queries/catalog/slice-query-options.js +50 -0
  276. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
  277. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
  278. package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
  279. package/queries/query-print.js +3 -1
  280. package/queries/query.d.ts +63 -3
  281. package/queries/query.js +9 -2
  282. package/r-bridge/data/data.d.ts +16 -0
  283. package/r-bridge/data/data.js +20 -0
  284. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
  285. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  286. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  287. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
  288. package/reconstruct/reconstruct.d.ts +18 -1
  289. package/reconstruct/reconstruct.js +42 -19
  290. package/slicing/criterion/parse.d.ts +4 -0
  291. package/slicing/criterion/parse.js +4 -0
  292. package/slicing/static/slice-call.js +17 -9
  293. package/slicing/static/static-slicer.d.ts +1 -1
  294. package/slicing/static/static-slicer.js +5 -4
  295. package/util/files.d.ts +19 -1
  296. package/util/files.js +45 -3
  297. package/util/glob.d.ts +19 -0
  298. package/util/glob.js +67 -0
  299. package/util/log.d.ts +12 -0
  300. package/util/log.js +17 -1
  301. package/util/logic.d.ts +6 -0
  302. package/util/logic.js +31 -1
  303. package/util/mermaid/dfg.js +17 -12
  304. package/util/mermaid/mermaid.js +2 -2
  305. package/util/objects.d.ts +5 -0
  306. package/util/objects.js +8 -0
  307. package/util/r-version.d.ts +9 -1
  308. package/util/r-version.js +27 -2
  309. package/util/schema.d.ts +16 -0
  310. package/util/schema.js +89 -4
  311. package/util/text/ansi.d.ts +4 -0
  312. package/util/text/ansi.js +27 -3
  313. package/util/text/strings.d.ts +9 -0
  314. package/util/text/strings.js +29 -0
  315. package/util/version.js +79 -6
  316. package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
  317. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
  318. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
  319. package/project/sigdb/version.js +0 -55
@@ -37,11 +37,12 @@ import type { InputSourcesQuery } from './catalog/input-sources-query/input-sour
37
37
  import type { ProvenanceQuery } from './catalog/provenance-query/provenance-query-format';
38
38
  import type { LintingResultCertainty } from '../linter/linter-format';
39
39
  import { type DiceQuery } from './catalog/dice-query/dice-query-format';
40
+ import { type GuessDepVersionsQuery } from './catalog/guess-dep-versions-query/guess-dep-versions-query-format';
40
41
  import { type AbsintQuery } from './catalog/absint-query/absint-query-format';
41
42
  /**
42
43
  * These are all queries that can be executed from within flowR
43
44
  */
44
- export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery;
45
+ export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery | GuessDepVersionsQuery;
45
46
  export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
46
47
  type: QueryType;
47
48
  };
@@ -61,6 +62,10 @@ export interface SupportedQuery<QueryType extends BaseQueryFormat['type'] = Base
61
62
  completer?: (splitLine: readonly string[], startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
62
63
  /** optional query construction from an, e.g., repl line */
63
64
  fromLine?: (output: ReplOutput, splitLine: readonly string[], config: FlowrConfig) => ParsedQueryLine<QueryType>;
65
+ /** optional one-line usage of the repl `@`-shorthand `fromLine` accepts, shown by `:query ?<type>` */
66
+ syntax?: string;
67
+ /** the human-readable name, e.g. `Call-Context Query`; also names its wiki page, see {@link queryWikiPage} */
68
+ title: string;
64
69
  /**
65
70
  * Generates an ASCII summary of the query result to be printed in, e.g., the REPL.
66
71
  * @returns whether a summary was produced (`true` if so, `false` if not, in this case a default/generic summary will be created)
@@ -76,193 +81,235 @@ export interface SupportedQuery<QueryType extends BaseQueryFormat['type'] = Base
76
81
  }
77
82
  export declare const SupportedQueries: {
78
83
  readonly 'call-context': {
84
+ readonly title: "Call-Context Query";
79
85
  readonly executor: typeof import("./catalog/call-context-query/call-context-query-executor").executeCallContextQueries;
80
86
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
81
87
  readonly schema: Joi.ObjectSchema<any>;
82
88
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
83
89
  };
84
90
  readonly config: {
91
+ readonly title: "Config Query";
92
+ readonly syntax: "@config [<path> | <glob>] | @config +<path>=<value>";
85
93
  readonly executor: typeof import("./catalog/config-query/config-query-executor").executeConfigQuery;
86
94
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
87
- readonly completer: (partialLine: readonly string[], _startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
88
- readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"config">;
95
+ readonly completer: (partialLine: readonly string[], startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
96
+ readonly fromLine: (output: ReplOutput, line: readonly string[], config: FlowrConfig) => ParsedQueryLine<"config">;
89
97
  readonly schema: Joi.ObjectSchema<any>;
90
98
  readonly flattenInvolvedNodes: () => never[];
91
99
  };
92
100
  readonly 'control-flow': {
101
+ readonly title: "Control-Flow Query";
93
102
  readonly executor: typeof import("./catalog/control-flow-query/control-flow-query-executor").executeControlFlowQuery;
94
103
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
95
104
  readonly schema: Joi.ObjectSchema<any>;
96
105
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
97
106
  };
98
107
  readonly 'call-graph': {
108
+ readonly title: "Call-Graph Query";
99
109
  readonly executor: typeof import("./catalog/call-graph-query/call-graph-query-executor").executeCallGraphQuery;
100
110
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
101
111
  readonly schema: Joi.ObjectSchema<any>;
102
112
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
103
113
  };
104
114
  readonly dataflow: {
115
+ readonly title: "Dataflow Query";
105
116
  readonly executor: typeof import("./catalog/dataflow-query/dataflow-query-executor").executeDataflowQuery;
106
117
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
107
118
  readonly schema: Joi.ObjectSchema<any>;
108
119
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
109
120
  };
110
121
  readonly 'does-call': {
122
+ readonly title: "Does-Call Query";
111
123
  readonly executor: typeof import("./catalog/does-call-query/does-call-query-executor").executeDoesCallQuery;
112
124
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
113
125
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"does-call">;
126
+ readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
114
127
  readonly schema: Joi.ObjectSchema<any>;
115
128
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
116
129
  };
117
130
  readonly 'dataflow-lens': {
131
+ readonly title: "Dataflow Lens Query";
118
132
  readonly executor: typeof import("./catalog/dataflow-lens-query/dataflow-lens-query-executor").executeDataflowLensQuery;
119
133
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
120
134
  readonly schema: Joi.ObjectSchema<any>;
121
135
  readonly flattenInvolvedNodes: () => never[];
122
136
  };
123
137
  readonly absint: {
138
+ readonly title: "Abstract Interpretation Query";
124
139
  readonly executor: typeof import("./catalog/absint-query/absint-query-executor").executeAbsintQuery;
125
140
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
126
141
  readonly jsonFormatter: (queryResults: BaseQueryResult) => object;
127
142
  readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
128
143
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"absint">;
144
+ readonly syntax: "@absint <inference-type> [(<criteria>)] <code | file://path>";
129
145
  readonly schema: Joi.ObjectSchema<any>;
130
146
  readonly flattenInvolvedNodes: () => never[];
131
147
  };
132
148
  readonly files: {
149
+ readonly title: "Files Query";
133
150
  readonly executor: typeof import("./catalog/files-query/files-query-executor").executeFileQuery;
134
151
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
135
152
  readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
136
153
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"files">;
154
+ readonly syntax: "@files [role:<r1>,<r2>,...] <code | file://path>";
137
155
  readonly schema: Joi.ObjectSchema<any>;
138
156
  readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
139
157
  };
140
158
  readonly 'id-map': {
159
+ readonly title: "Id-Map Query";
141
160
  readonly executor: typeof import("./catalog/id-map-query/id-map-query-executor").executeIdMapQuery;
142
161
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
143
162
  readonly schema: Joi.ObjectSchema<any>;
144
163
  readonly flattenInvolvedNodes: () => never[];
145
164
  };
146
165
  readonly 'normalized-ast': {
166
+ readonly title: "Normalized AST Query";
147
167
  readonly executor: typeof import("./catalog/normalized-ast-query/normalized-ast-query-executor").executeNormalizedAstQuery;
148
168
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
149
169
  readonly schema: Joi.ObjectSchema<any>;
150
170
  readonly flattenInvolvedNodes: () => never[];
151
171
  };
152
172
  readonly 'dataflow-cluster': {
173
+ readonly title: "Dataflow Cluster Query";
153
174
  readonly executor: typeof import("./catalog/cluster-query/cluster-query-executor").executeDataflowClusterQuery;
154
175
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
155
176
  readonly schema: Joi.ObjectSchema<any>;
156
177
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
157
178
  };
158
179
  readonly 'static-slice': {
180
+ readonly title: "Static Slice Query";
159
181
  readonly executor: typeof import("./catalog/static-slice-query/static-slice-query-executor").executeStaticSliceQuery;
160
182
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
161
183
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"static-slice">;
162
184
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
185
+ readonly syntax: "@static-slice (<crit>;...)[fiIcB] <code | file://path>";
163
186
  readonly schema: Joi.ObjectSchema<any>;
164
187
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
165
188
  };
166
189
  readonly provenance: {
190
+ readonly title: "Provenance Query";
167
191
  readonly executor: typeof import("./catalog/provenance-query/provenance-query-executor").executeProvenanceQuery;
168
192
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
169
193
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"provenance">;
170
194
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
195
+ readonly syntax: "@provenance (<criterion>)[f] <code | file://path>";
171
196
  readonly schema: Joi.ObjectSchema<any>;
172
197
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
173
198
  };
174
199
  readonly 'input-sources': {
200
+ readonly title: "Input Sources Query";
175
201
  readonly executor: typeof import("./catalog/input-sources-query/input-sources-query-executor").executeInputSourcesQuery;
176
202
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
177
203
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"input-sources">;
178
204
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
205
+ readonly syntax: "@input-sources (<criterion>) <code | file://path>";
179
206
  readonly schema: Joi.ObjectSchema<any>;
180
207
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
181
208
  };
182
209
  readonly dependencies: {
210
+ readonly title: "Dependencies Query";
183
211
  readonly executor: typeof import("./catalog/dependencies-query/dependencies-query-executor").executeDependenciesQuery;
184
212
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
185
213
  readonly schema: Joi.ObjectSchema<any>;
186
214
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, query: readonly Query[]) => NodeId[];
187
215
  };
188
216
  readonly 'location-map': {
217
+ readonly title: "Location Map Query";
189
218
  readonly executor: typeof import("./catalog/location-map-query/location-map-query-executor").executeLocationMapQuery;
190
219
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
191
220
  readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"location-map">;
192
221
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
222
+ readonly syntax: "@location-map [(<crit>;...)] <code | file://path>";
193
223
  readonly schema: Joi.ObjectSchema<any>;
194
224
  readonly flattenInvolvedNodes: () => never[];
195
225
  };
196
226
  readonly search: {
227
+ readonly title: "Search Query";
197
228
  readonly executor: typeof import("./catalog/search-query/search-query-executor").executeSearch;
198
229
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
199
230
  readonly schema: Joi.ObjectSchema<any>;
200
231
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
201
232
  };
202
233
  readonly 'happens-before': {
234
+ readonly title: "Happens-Before Query";
203
235
  readonly executor: typeof import("./catalog/happens-before-query/happens-before-query-executor").executeHappensBefore;
204
236
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
205
237
  readonly schema: Joi.ObjectSchema<any>;
206
238
  readonly flattenInvolvedNodes: () => never[];
207
239
  };
208
240
  readonly 'inspect-exception': {
241
+ readonly title: "Inspect Exceptions of Functions Query";
209
242
  readonly executor: typeof import("./catalog/inspect-exceptions-query/inspect-exception-query-executor").executeExceptionQuery;
210
243
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
211
244
  readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-exception">;
212
245
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
246
+ readonly syntax: "@inspect-exception [(<crit>;...)] <code | file://path>";
213
247
  readonly schema: Joi.ObjectSchema<any>;
214
248
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
215
249
  };
216
250
  readonly 'inspect-higher-order': {
251
+ readonly title: "Inspect Higher-Order Functions Query";
217
252
  readonly executor: typeof import("./catalog/inspect-higher-order-query/inspect-higher-order-query-executor").executeHigherOrderQuery;
218
253
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
219
254
  readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-higher-order">;
220
255
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
256
+ readonly syntax: "@inspect-higher-order [(<crit>;...)] <code | file://path>";
221
257
  readonly schema: Joi.ObjectSchema<any>;
222
258
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
223
259
  };
224
260
  readonly 'inspect-recursion': {
261
+ readonly title: "Inspect Recursive Functions Query";
225
262
  readonly executor: typeof import("./catalog/inspect-recursion-query/inspect-recursion-query-executor").executeRecursionQuery;
226
263
  readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
227
264
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-recursion">;
265
+ readonly syntax: "@inspect-recursion [(<crit>;...)] <code | file://path>";
228
266
  readonly schema: Joi.ObjectSchema<any>;
229
267
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
230
268
  };
231
269
  readonly 'resolve-value': {
270
+ readonly title: "Resolve Value Query";
232
271
  readonly executor: typeof import("./catalog/resolve-value-query/resolve-value-query-executor").executeResolveValueQuery;
233
272
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
234
273
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"resolve-value">;
235
274
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
275
+ readonly syntax: "@resolve-value (<crit>;...) <code | file://path>";
236
276
  readonly schema: Joi.ObjectSchema<any>;
237
277
  readonly flattenInvolvedNodes: () => never[];
238
278
  };
239
279
  readonly project: {
280
+ readonly title: "Project Query";
240
281
  readonly executor: typeof import("./catalog/project-query/project-query-executor").executeProjectQuery;
241
282
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
242
283
  readonly schema: Joi.ObjectSchema<any>;
243
284
  readonly flattenInvolvedNodes: () => never[];
244
285
  };
245
286
  readonly signature: {
287
+ readonly title: "Signature Query";
246
288
  readonly executor: typeof import("./catalog/signature-query/signature-query-executor").executeSignatureQuery;
247
289
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly Query[]) => true;
248
290
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"signature">;
249
291
  readonly completer: typeof import("./catalog/signature-query/signature-query-executor").signatureQueryCompleter;
292
+ readonly syntax: "@signature [<pkg>[@<version>]] [<pkg>::<fn> | <fn>] [--param <name>[,...]] [--required <n>] [--cg] [--help]";
250
293
  readonly schema: Joi.ObjectSchema<any>;
251
294
  readonly flattenInvolvedNodes: () => NodeId[];
252
295
  };
253
296
  readonly origin: {
297
+ readonly title: "Origin Query";
254
298
  readonly executor: typeof import("./catalog/origin-query/origin-query-executor").executeResolveValueQuery;
255
299
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
256
300
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"origin">;
257
301
  readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
302
+ readonly syntax: "@origin (<criterion>) <code | file://path>";
258
303
  readonly schema: Joi.ObjectSchema<any>;
259
304
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
260
305
  };
261
306
  readonly linter: {
307
+ readonly title: "Linter Query";
262
308
  readonly executor: typeof import("./catalog/linter-query/linter-query-executor").executeLinterQuery;
263
309
  readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
264
310
  readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
265
311
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"linter">;
312
+ readonly syntax: "@linter [rules:<r1>,<r2>,...] [format:<fmt>] <code | file://path>";
266
313
  readonly schema: Joi.ObjectSchema<any>;
267
314
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly Query[], certainty: LintingResultCertainty | undefined) => ((string & {
268
315
  __brand?: "node-id";
@@ -271,15 +318,28 @@ export declare const SupportedQueries: {
271
318
  }))[];
272
319
  };
273
320
  readonly dice: {
321
+ readonly title: "Dice Query";
274
322
  readonly executor: typeof import("./catalog/dice-query/dice-query-executor").executeDiceQuery;
275
323
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
276
324
  readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"dice">;
277
325
  readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
326
+ readonly syntax: "@dice (<crit>;...->crit;...)[iIcB] <code | file://path>";
278
327
  readonly schema: Joi.ObjectSchema<any>;
279
328
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
280
329
  };
330
+ readonly 'guess-dep-versions': {
331
+ readonly title: "Guess Dependency Versions Query";
332
+ readonly executor: typeof import("./catalog/guess-dep-versions-query/guess-dep-versions-query-executor").executeGuessDepVersionsQuery;
333
+ readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly Query[]) => true;
334
+ readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"guess-dep-versions">;
335
+ readonly syntax: "@guess-dep-versions [<pkg> ...] [(clean | <=YYYY.MM.DD)] [--date YYYY.MM.DD] [--max <n>] [--iterations <n>] [--explode [--oldest] [--limit <n>] [--prefer <pkg>=<ver>]] <code | file://path>";
336
+ readonly schema: Joi.ObjectSchema<any>;
337
+ readonly flattenInvolvedNodes: () => NodeId[];
338
+ };
281
339
  };
282
340
  export type SupportedQueryTypes = keyof typeof SupportedQueries;
341
+ /** The wiki page documenting a query, derived from its {@link SupportedQuery.title}. */
342
+ export declare function queryWikiPage(title: string): string;
283
343
  export type QueryResult<Type extends Query['type']> = Promise<ReturnType<typeof SupportedQueries[Type]['executor']>>;
284
344
  /**
285
345
  * Executes a set of queries that are all of the same type.
package/queries/query.js CHANGED
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CompoundQuerySchema = exports.SupportedQueries = void 0;
7
+ exports.queryWikiPage = queryWikiPage;
7
8
  exports.executeQueriesOfSameType = executeQueriesOfSameType;
8
9
  exports.executeQueries = executeQueries;
9
10
  exports.SupportedQueriesSchema = SupportedQueriesSchema;
@@ -43,6 +44,7 @@ const inspect_exception_query_format_1 = require("./catalog/inspect-exceptions-q
43
44
  const input_sources_query_format_1 = require("./catalog/input-sources-query/input-sources-query-format");
44
45
  const provenance_query_format_1 = require("./catalog/provenance-query/provenance-query-format");
45
46
  const dice_query_format_1 = require("./catalog/dice-query/dice-query-format");
47
+ const guess_dep_versions_query_format_1 = require("./catalog/guess-dep-versions-query/guess-dep-versions-query-format");
46
48
  const absint_query_format_1 = require("./catalog/absint-query/absint-query-format");
47
49
  exports.SupportedQueries = {
48
50
  'call-context': call_context_query_format_1.CallContextQueryDefinition,
@@ -72,8 +74,13 @@ exports.SupportedQueries = {
72
74
  'signature': signature_query_format_1.SignatureQueryDefinition,
73
75
  'origin': origin_query_format_1.OriginQueryDefinition,
74
76
  'linter': linter_query_format_1.LinterQueryDefinition,
75
- 'dice': dice_query_format_1.DiceQueryDefinition
77
+ 'dice': dice_query_format_1.DiceQueryDefinition,
78
+ 'guess-dep-versions': guess_dep_versions_query_format_1.GuessDepVersionsQueryDefinition
76
79
  };
80
+ /** The wiki page documenting a query, derived from its {@link SupportedQuery.title}. */
81
+ function queryWikiPage(title) {
82
+ return '[Query] ' + title.replace(/\s*Query$/, '');
83
+ }
77
84
  /**
78
85
  * Executes a set of queries that are all of the same type.
79
86
  * Only use this function if you are sure all queries are of the same type.
@@ -127,7 +134,7 @@ async function executeQueries(data, queries) {
127
134
  }
128
135
  catch (e) {
129
136
  const message = e instanceof Error ? e.message : String(e);
130
- log_1.log.error(`query of type '${type}' failed: ${message}`, e);
137
+ log_1.log.error(`query of type '${type}' failed: ${message}`);
131
138
  results.push([type, { '.meta': { timing: 0 }, error: message }]);
132
139
  }
133
140
  }
@@ -646,6 +646,22 @@ export declare const flowrCapabilities: {
646
646
  }];
647
647
  readonly supported: "partially";
648
648
  readonly description: "_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
649
+ }, {
650
+ readonly name: "Class-Based Dependency Attribution";
651
+ readonly id: "oop-class-dependency-attribution";
652
+ readonly supported: "partially";
653
+ readonly description: "_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database's class-ownership map)._";
654
+ readonly capabilities: readonly [{
655
+ readonly name: "S3 class ownership";
656
+ readonly id: "class-owner-s3";
657
+ readonly supported: "partially";
658
+ readonly description: "_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project's NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method(\"as.irts\",\"zoo\")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, \"zoo\")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor's export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._";
659
+ }, {
660
+ readonly name: "S4 class ownership";
661
+ readonly id: "class-owner-s4";
662
+ readonly supported: "partially";
663
+ readonly description: "_A project's `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._";
664
+ }];
649
665
  }];
650
666
  }];
651
667
  }, {
@@ -805,6 +805,26 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true })}
805
805
  ],
806
806
  supported: 'partially',
807
807
  description: '_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes "as units."'
808
+ },
809
+ {
810
+ name: 'Class-Based Dependency Attribution',
811
+ id: 'oop-class-dependency-attribution',
812
+ supported: 'partially',
813
+ description: '_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database\'s class-ownership map)._',
814
+ capabilities: [
815
+ {
816
+ name: 'S3 class ownership',
817
+ id: 'class-owner-s3',
818
+ supported: 'partially',
819
+ description: '_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project\'s NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method("as.irts","zoo")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, "zoo")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor\'s export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._'
820
+ },
821
+ {
822
+ name: 'S4 class ownership',
823
+ id: 'class-owner-s4',
824
+ supported: 'partially',
825
+ description: '_A project\'s `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._'
826
+ }
827
+ ]
808
828
  }
809
829
  ]
810
830
  }
@@ -46,6 +46,7 @@ export interface Source {
46
46
  fullRange?: SourceRange;
47
47
  /**
48
48
  * Similar to {@link Source.fullRange} this contains the complete R lexeme of the given element.
49
+ * This is the lexeme of the element itself, never that of an enclosing one: the field of `a$b` reports `b`.
49
50
  */
50
51
  fullLexeme?: string;
51
52
  /**
@@ -38,7 +38,8 @@ function deterministicPrefixIdGenerator(prefix, id = 0) {
38
38
  */
39
39
  function sourcedDeterministicCountingIdGenerator(path, location, start = 0) {
40
40
  let id = start;
41
- return () => `${path}-${loc2Id(location)}-${id++}`;
41
+ const [sl, sc] = location;
42
+ return () => `${path}:${sl}:${sc}-${id++}`;
42
43
  }
43
44
  function loc2Id([sl, sc, el, ec]) {
44
45
  return `${sl}:${sc}-${el}:${ec}`;
@@ -20,7 +20,8 @@ function normalizeAbstractArgument(x, data, operator) {
20
20
  return gotAccess;
21
21
  }
22
22
  else {
23
- const node = (0, normalize_single_node_1.normalizeSingleNode)(data, x[0]);
23
+ const { content, location } = (0, normalize_meta_1.retrieveMetaStructure)(x[0].content);
24
+ const node = (0, normalize_single_node_1.normalizeSingleNode)({ ...data, currentRange: location, currentLexeme: content }, x[0]);
24
25
  (0, assert_1.guard)(node.type !== type_1.RType.ExpressionList, () => `expected expression list to be parsed as argument, yet received ${JSON.stringify(node)} for ${JSON.stringify(x)}`);
25
26
  return {
26
27
  type: type_1.RType.Argument,
@@ -160,6 +160,8 @@ function convertTreeNode(node) {
160
160
  const [commentsBoth, [op]] = splitComments(children.slice(1, -1));
161
161
  const comments = commentsBoth.map(c => c[1]);
162
162
  const opSource = makeSourceRange(op);
163
+ /* every `.text` re-slices the source, so read it once */
164
+ const opText = op.text;
163
165
  const lhsAsArg = {
164
166
  type: type_1.RType.Argument,
165
167
  location: lhs.location,
@@ -178,8 +180,8 @@ function convertTreeNode(node) {
178
180
  functionName: {
179
181
  type: type_1.RType.Symbol,
180
182
  location: opSource,
181
- lexeme: op.text,
182
- content: op.text,
183
+ lexeme: opText,
184
+ content: opText,
183
185
  info: {
184
186
  tsId: op.id
185
187
  }
@@ -202,13 +204,13 @@ function convertTreeNode(node) {
202
204
  }
203
205
  };
204
206
  }
205
- else if (op.text === '|>') {
207
+ else if (opText === '|>') {
206
208
  return {
207
209
  type: type_1.RType.Pipe,
208
210
  location: opSource,
209
211
  lhs: lhsAsArg,
210
212
  rhs,
211
- lexeme: op.text,
213
+ lexeme: opText,
212
214
  ...defaultInfo(),
213
215
  info: {
214
216
  fullRange: range,
@@ -223,8 +225,8 @@ function convertTreeNode(node) {
223
225
  type: type_1.RType.BinaryOp,
224
226
  location: opSource,
225
227
  lhs, rhs,
226
- operator: op.text,
227
- lexeme: op.text,
228
+ operator: opText,
229
+ lexeme: opText,
228
230
  info: {
229
231
  fullRange: range,
230
232
  adToks: comments,
@@ -508,10 +510,7 @@ function convertTreeNode(node) {
508
510
  access: [{
509
511
  type: type_1.RType.Argument,
510
512
  name: undefined,
511
- value: {
512
- ...convertTreeNode(rhs),
513
- ...defaultInfo()
514
- },
513
+ value: convertTreeNode(rhs),
515
514
  location: rhsRange,
516
515
  lexeme: rhs?.text,
517
516
  info: {
@@ -534,28 +533,29 @@ function convertTreeNode(node) {
534
533
  if (children.length === 3) {
535
534
  defaultValue = convertTreeNode(children[2]);
536
535
  }
536
+ const nameText = name.text;
537
537
  return {
538
538
  type: type_1.RType.Parameter,
539
539
  name: {
540
540
  type: type_1.RType.Symbol,
541
541
  location: nameRange,
542
- content: name.text,
543
- lexeme: name.text,
542
+ content: nameText,
543
+ lexeme: nameText,
544
544
  info: {
545
545
  fullRange: range,
546
546
  adToks: [],
547
- fullLexeme: name.text,
547
+ fullLexeme: nameText,
548
548
  tsId: name.id
549
549
  }
550
550
  },
551
- special: name.text === '...',
551
+ special: nameText === '...',
552
552
  defaultValue,
553
553
  location: nameRange,
554
- lexeme: name.text,
554
+ lexeme: nameText,
555
555
  info: {
556
556
  fullRange: range,
557
557
  adToks: [],
558
- fullLexeme: name.text,
558
+ fullLexeme: nameText,
559
559
  tsId: name.id
560
560
  }
561
561
  };
@@ -707,6 +707,9 @@ function findFirstNonCommentSibling(snode, knownNexts) {
707
707
  return cur;
708
708
  }
709
709
  function linkCommentsToNextNodes(nodes, comments) {
710
+ if (comments.length === 0) {
711
+ return comments;
712
+ }
710
713
  const remain = [];
711
714
  const cacheMap = new Map();
712
715
  const nodeById = new Map(nodes.map(n => [n[0].id, n]));
@@ -7,6 +7,12 @@ import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/de
7
7
  import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
8
8
  import { type AutoSelectPredicate } from './auto-select/auto-select-defaults';
9
9
  import type { InlineWarning } from './inline/source-inline-map';
10
+ /**
11
+ * Whether to inline every file into a single self-contained text: `true` inlines them, `'banner'` additionally
12
+ * precedes each with a banner comment naming it.
13
+ * @see {@link Selection#inlineFull}
14
+ */
15
+ export type InlineFull = boolean | 'banner';
10
16
  interface Selection {
11
17
  /**
12
18
  * The set of node ids to be reconstructed.
@@ -23,9 +29,18 @@ interface Selection {
23
29
  * @see {@link SourceInlineMap.build}
24
30
  */
25
31
  inlineSources?: boolean;
32
+ /**
33
+ * If set, every file is reconstructed into a single self-contained text, in the loading order flowR
34
+ * determined (which respects implicit sources), independent of whether it is sourced explicitly. Files that
35
+ * _are_ sourced explicitly are spliced into their `source()` call instead of being repeated at the top level.
36
+ * Pass `'banner'` to precede every inlined file with a banner comment naming it.
37
+ * Requires {@link Selection#sourceMap} to be provided. Overrides {@link Selection#inlineSources} and
38
+ * {@link Selection#reconstructFiles}.
39
+ */
40
+ inlineFull?: InlineFull;
26
41
  /**
27
42
  * Maps a `source()` call node id to the index of the sourced file in `ast.ast.files`.
28
- * Only used together with {@link Selection#inlineSources}. Build it via {@link SourceInlineMap.build}.
43
+ * Only used together with {@link Selection#inlineSources} or {@link Selection#inlineFull}. Build it via {@link SourceInlineMap.build}.
29
44
  */
30
45
  sourceMap?: ReadonlyMap<NodeId, number>;
31
46
  }
@@ -40,6 +55,8 @@ export interface ReconstructionResult {
40
55
  }
41
56
  export declare function reconstructToCode(ast: NormalizedAst, selection: Selection & ({
42
57
  inlineSources: true;
58
+ } | {
59
+ inlineFull: true;
43
60
  } | {
44
61
  reconstructFiles?: [number] | undefined;
45
62
  }), autoSelectIf?: AutoSelectPredicate): ReconstructionResult & {