@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
@@ -20,6 +20,71 @@ const identifier_1 = require("../../../dataflow/environments/identifier");
20
20
  const r_project_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-project");
21
21
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
22
22
  exports.Unknown = 'unknown';
23
+ /** packages a default R session attaches without an explicit `library()` call, so missing them is not "undeclared" */
24
+ const AttachedBasePackages = ['base', 'stats', 'graphics', 'grDevices', 'utils', 'datasets', 'methods'];
25
+ /** {@link LibraryFunctions} indexed by name, to recognise a library-load call by its called function */
26
+ const LibraryLoadFunctionInfo = new Map(library_functions_1.LibraryFunctions.map(f => [f.name, f]));
27
+ /** the literal package name of a `library()`/`require()`-style argument (a bare symbol or a plain string constant) */
28
+ function literalPackageName(node) {
29
+ if (node?.type === type_1.RType.String) {
30
+ return node.content.str;
31
+ }
32
+ else if (node?.type === type_1.RType.Symbol) {
33
+ return identifier_1.Identifier.getName(node.content);
34
+ }
35
+ return undefined;
36
+ }
37
+ /** the argument value(s) of a library-load call that (statically) name the package(s) to load, per the matching {@link FunctionInfo} */
38
+ function libraryCallArgumentValues(args, info) {
39
+ const values = [];
40
+ let position = 0;
41
+ for (const arg of args) {
42
+ if (typeof arg !== 'string' && arg.value !== undefined) {
43
+ if (info.argIdx === 'unnamed') {
44
+ if (arg.name === undefined) {
45
+ values.push(arg.value);
46
+ }
47
+ }
48
+ else if (arg.name !== undefined ? identifier_1.Identifier.getName(arg.name.content) === info.argName : position === info.argIdx) {
49
+ values.push(arg.value);
50
+ }
51
+ }
52
+ position++;
53
+ }
54
+ return values;
55
+ }
56
+ /**
57
+ * The packages used by the code: attached via a `library()`-style call, or referenced via `::`/`:::`.
58
+ * Maps each package name to the node id of one representative use site.
59
+ *
60
+ * This deliberately re-walks the AST instead of depending on the `library` category's result array: categories
61
+ * run concurrently (see the executor's `Promise.all`), so another category's finished results are not available.
62
+ * Only statically known package names are picked up (a bare symbol or string literal argument), matching the
63
+ * `library` category's own `::`/`:::` detection in spirit but staying independent of it.
64
+ */
65
+ async function collectUsedPackages(data) {
66
+ const used = new Map();
67
+ r_project_1.RProject.visitAst((await data.analyzer.normalize()).ast, node => {
68
+ if (node.type === type_1.RType.Symbol) {
69
+ const ns = identifier_1.Identifier.getNamespace(node.content);
70
+ if (ns !== undefined && !used.has(ns)) {
71
+ used.set(ns, node.info.id);
72
+ }
73
+ }
74
+ else if (node.type === type_1.RType.FunctionCall && node.named) {
75
+ const info = LibraryLoadFunctionInfo.get(identifier_1.Identifier.getName(node.functionName.content));
76
+ if (info !== undefined) {
77
+ for (const value of libraryCallArgumentValues(node.arguments, info)) {
78
+ const pkg = literalPackageName(value);
79
+ if (pkg !== undefined && !used.has(pkg)) {
80
+ used.set(pkg, node.info.id);
81
+ }
82
+ }
83
+ }
84
+ }
85
+ });
86
+ return used;
87
+ }
23
88
  exports.DefaultDependencyCategories = {
24
89
  'library': {
25
90
  queryDisplayName: 'Libraries',
@@ -68,27 +133,58 @@ exports.DefaultDependencyCategories = {
68
133
  'test': {
69
134
  queryDisplayName: 'Tests',
70
135
  functions: test_functions_1.TestFunctions
136
+ },
137
+ 'undeclared': {
138
+ queryDisplayName: 'Undeclared Dependencies',
139
+ functions: [],
140
+ /* packages that are used (via `library()`/`require()` or `::`/`:::`) but never declared as a project dependency */
141
+ additionalAnalysis: async (data, ignoreDefault, _functions, _queryResults, result) => {
142
+ if (ignoreDefault) {
143
+ return;
144
+ }
145
+ const deps = data.analyzer.inspectContext().deps;
146
+ const declared = new Set(deps.getDependencies().map(p => p.name));
147
+ for (const [pkg, nodeId] of await collectUsedPackages(data)) {
148
+ if (!declared.has(pkg) && !AttachedBasePackages.includes(pkg)) {
149
+ result.push({ nodeId, functionName: pkg, value: pkg });
150
+ }
151
+ }
152
+ }
153
+ },
154
+ 'unused': {
155
+ queryDisplayName: 'Unused Dependencies',
156
+ functions: [],
157
+ /* packages declared as a project dependency but never used (via `library()`/`require()` or `::`/`:::`) */
158
+ additionalAnalysis: async (data, ignoreDefault, _functions, _queryResults, result) => {
159
+ if (ignoreDefault) {
160
+ return;
161
+ }
162
+ const deps = data.analyzer.inspectContext().deps;
163
+ const used = await collectUsedPackages(data);
164
+ const nodeId = (await data.analyzer.normalize()).ast.files[0]?.root.info.id;
165
+ if (nodeId === undefined) {
166
+ return;
167
+ }
168
+ for (const pkg of deps.getDependencies()) {
169
+ if (!used.has(pkg.name)) {
170
+ result.push({ nodeId, functionName: pkg.name, value: pkg.name });
171
+ }
172
+ }
173
+ }
71
174
  }
72
175
  };
73
- function printResultSection(title, infos, result) {
176
+ function printResultSection(title, infos, result, formatter) {
74
177
  if (infos.length <= 0) {
75
178
  return;
76
179
  }
77
- result.push(` ╰ ${title}`);
78
- const grouped = infos.reduce(function (groups, i) {
79
- const key = identifier_1.Identifier.toString(i.functionName);
80
- const array = groups.get(key);
81
- if (array) {
82
- array.push(i);
83
- }
84
- else {
85
- groups.set(key, [i]);
86
- }
87
- return groups;
88
- }, new Map());
89
- for (const [functionName, infos] of grouped) {
90
- result.push(` ╰ \`${functionName}\``);
91
- result.push(infos.map(i => ` ╰ Node Id: ${i.nodeId}${i.value !== undefined ? `, \`${i.value}\`` : ''}${i.derivedVersion !== undefined ? `, Version: \`${i.derivedVersion.format()}\`` : ''}${i.linkedIds ? `, linked: [${i.linkedIds.join(', ')}]` : ''}`).join('\n'));
180
+ result.push(` ${(0, ansi_1.bold)(title, formatter)} ${(0, ansi_1.faint)(`(${infos.length})`, formatter)}`);
181
+ // one line per dependency: the value (package/file) up front, its function + node as a faint provenance suffix
182
+ for (const i of infos) {
183
+ const fn = identifier_1.Identifier.getName(i.functionName);
184
+ const value = i.value !== undefined ? (0, ansi_1.bold)(i.value, formatter) : (0, ansi_1.faint)('<unresolved>', formatter);
185
+ const version = i.derivedVersion !== undefined ? ` ${(0, ansi_1.faint)(i.derivedVersion.format(), formatter)}` : '';
186
+ const linked = i.linkedIds ? `, linked ${i.linkedIds.join(', ')}` : '';
187
+ result.push(` ${value}${version} ${(0, ansi_1.faint)(`via ${fn} (node ${i.nodeId}${linked})`, formatter)}`);
92
188
  }
93
189
  }
94
190
  /**
@@ -110,12 +206,16 @@ const functionInfoSchema = joi_1.default.array().items(joi_1.default.object({
110
206
  argName: joi_1.default.string().optional().description('The name of the argument that contains the library name.'),
111
207
  })).optional();
112
208
  exports.DependenciesQueryDefinition = {
209
+ title: 'Dependencies Query',
113
210
  executor: dependencies_query_executor_1.executeDependenciesQuery,
114
211
  asciiSummarizer: (formatter, _analyzer, queryResults, result, queries) => {
115
212
  const out = queryResults;
116
213
  result.push(`Query: ${(0, ansi_1.bold)('dependencies', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`);
117
214
  for (const [category, value] of Object.entries(getAllCategories(queries))) {
118
- printResultSection(value.queryDisplayName ?? category, out[category] ?? [], result);
215
+ if (category === 'unused') {
216
+ continue; // the unused-dependency detection is unreliable; omit it from the summary for now
217
+ }
218
+ printResultSection(value.queryDisplayName ?? category, out[category] ?? [], result, formatter);
119
219
  }
120
220
  return true;
121
221
  },
@@ -2,10 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeDiceQuery = executeDiceQuery;
4
4
  const static_slicer_1 = require("../../../slicing/static/static-slicer");
5
- const reconstruct_1 = require("../../../reconstruct/reconstruct");
6
- const auto_select_defaults_1 = require("../../../reconstruct/auto-select/auto-select-defaults");
7
- const magic_comments_1 = require("../../../reconstruct/auto-select/magic-comments");
8
- const parse_1 = require("../../../slicing/criterion/parse");
5
+ const slice_query_options_1 = require("../slice-query-options");
9
6
  const log_1 = require("../../../util/log");
10
7
  /**
11
8
  * Execute dice queries. Each dice computes the intersection of a forward slice from `from`
@@ -23,18 +20,18 @@ async function executeDiceQuery({ analyzer }, queries) {
23
20
  log_1.log.warn(`Duplicate key for dice-query: ${key}, skipping...`);
24
21
  continue;
25
22
  }
26
- const { from, to, noReconstruction, noMagicComments } = query;
27
- const startIds = parse_1.SlicingCriteria.convertAll(from, ast.idMap);
28
- const endIds = parse_1.SlicingCriteria.convertAll(to, ast.idMap);
23
+ const { from, to, noReconstruction, includeCallees } = query;
24
+ const startIds = (0, slice_query_options_1.resolveSliceCriteria)(from, ast);
25
+ const endIds = (0, slice_query_options_1.resolveSliceCriteria)(to, ast);
29
26
  const sliceStart = Date.now();
30
- const slice = (0, static_slicer_1.staticDice)(analyzer.inspectContext(), df, ast, startIds, endIds, analyzer.flowrConfig.solver.slicer?.threshold);
27
+ const slice = (0, static_slicer_1.staticDice)(analyzer.inspectContext(), df, ast, startIds, endIds, analyzer.flowrConfig.solver.slicer?.threshold, includeCallees);
31
28
  const sliceEnd = Date.now();
32
29
  if (noReconstruction) {
33
30
  results[key] = { slice: { ...slice, '.meta': { timing: sliceEnd - sliceStart } } };
34
31
  }
35
32
  else {
36
33
  const reconstructStart = Date.now();
37
- const reconstruct = (0, reconstruct_1.reconstructToCode)(ast, { nodes: slice.result }, noMagicComments ? auto_select_defaults_1.doNotAutoSelect : (0, magic_comments_1.makeMagicCommentHandler)(auto_select_defaults_1.doNotAutoSelect));
34
+ const reconstruct = (0, slice_query_options_1.reconstructSlice)(ast, df.graph, slice.result, query);
38
35
  const reconstructEnd = Date.now();
39
36
  results[key] = {
40
37
  slice: { ...slice, '.meta': { timing: sliceEnd - sliceStart } },
@@ -7,20 +7,17 @@ import { executeDiceQuery } from './dice-query-executor';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
8
  import type { CommandCompletions } from '../../../cli/repl/core';
9
9
  import type { FlowrConfig } from '../../../config';
10
+ import { type SliceQueryOptions } from '../slice-query-options';
10
11
  /**
11
12
  * Computes a program dice: only those parts that lie on a path from the given start nodes to the given end nodes.
12
13
  * Equivalent to the intersection of a forward slice from `from` and a backward slice from `to`.
13
14
  */
14
- export interface DiceQuery extends BaseQueryFormat {
15
+ export interface DiceQuery extends BaseQueryFormat, SliceQueryOptions {
15
16
  readonly type: 'dice';
16
17
  /** Slicing criteria for the start of the dice (forward slice seeds) */
17
18
  readonly from: SlicingCriteria;
18
19
  /** Slicing criteria for the end of the dice (backward slice seeds) */
19
20
  readonly to: SlicingCriteria;
20
- /** Do not reconstruct the dice into readable code */
21
- readonly noReconstruction?: boolean;
22
- /** Should magic comments be ignored? */
23
- readonly noMagicComments?: boolean;
24
21
  }
25
22
  export interface DiceQueryResult extends BaseQueryResult {
26
23
  results: Record<string, {
@@ -43,10 +40,12 @@ export interface DiceQueryResult extends BaseQueryResult {
43
40
  declare function diceQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'dice'>;
44
41
  declare function diceQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfig): CommandCompletions;
45
42
  export declare const DiceQueryDefinition: {
43
+ readonly title: "Dice Query";
46
44
  readonly executor: typeof executeDiceQuery;
47
45
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
48
46
  readonly fromLine: typeof diceQueryLineParser;
49
47
  readonly completer: typeof diceQueryCompleter;
48
+ readonly syntax: "@dice (<crit>;...->crit;...)[iIcB] <code | file://path>";
50
49
  readonly schema: Joi.ObjectSchema<any>;
51
50
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
52
51
  };
@@ -10,6 +10,7 @@ const joi_1 = __importDefault(require("joi"));
10
10
  const dice_query_executor_1 = require("./dice-query-executor");
11
11
  const query_print_1 = require("../../query-print");
12
12
  const slice_query_parser_1 = require("../../../cli/repl/parser/slice-query-parser");
13
+ const slice_query_options_1 = require("../slice-query-options");
13
14
  const diceFormat = '(from1;from2->to1;to2)';
14
15
  function diceQueryLineParser(output, line, _config) {
15
16
  const parsed = (0, slice_query_parser_1.diceCriteriaParser)(line[0]);
@@ -17,9 +18,10 @@ function diceQueryLineParser(output, line, _config) {
17
18
  output.stderr(output.formatter.format(`Invalid dice query format. Expected ${diceFormat}, e.g. (2@x->12@x) or (1@a;2@b->5@c).`, { color: 1 /* Colors.Red */, effect: ansi_1.ColorEffect.Foreground, style: 1 /* FontStyles.Bold */ }));
18
19
  return { query: [] };
19
20
  }
21
+ (0, slice_query_parser_1.warnAboutSliceFlags)(output, line[0], slice_query_parser_1.SharedSliceFlags);
20
22
  return {
21
- query: [{ type: 'dice', from: parsed.from, to: parsed.to }],
22
- rCode: line[1]
23
+ query: [{ type: 'dice', from: parsed.from, to: parsed.to, ...(0, slice_query_parser_1.sliceQueryOptionsParser)(line[0]) }],
24
+ rCode: (0, slice_query_parser_1.queryLineCode)(line)
23
25
  };
24
26
  }
25
27
  function diceQueryCompleter(line, startingNewArg, _config) {
@@ -30,8 +32,9 @@ function diceQueryCompleter(line, startingNewArg, _config) {
30
32
  return { completions: [] };
31
33
  }
32
34
  const arg = line[0];
33
- if (arg.endsWith(')')) {
34
- return { completions: [] };
35
+ const flags = (0, slice_query_parser_1.sliceFlagCompletions)(arg, slice_query_parser_1.SharedSliceFlags);
36
+ if (flags) {
37
+ return flags;
35
38
  }
36
39
  const hasArrow = arg.includes('->');
37
40
  const side = hasArrow ? arg.slice(arg.indexOf('->') + 2) : arg.slice(1);
@@ -45,6 +48,7 @@ function diceQueryCompleter(line, startingNewArg, _config) {
45
48
  return { completions: [] };
46
49
  }
47
50
  exports.DiceQueryDefinition = {
51
+ title: 'Dice Query',
48
52
  executor: dice_query_executor_1.executeDiceQuery,
49
53
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
50
54
  const out = queryResults;
@@ -83,12 +87,12 @@ exports.DiceQueryDefinition = {
83
87
  },
84
88
  fromLine: diceQueryLineParser,
85
89
  completer: diceQueryCompleter,
90
+ syntax: '@dice (<crit>;...->crit;...)[iIcB] <code | file://path>',
86
91
  schema: joi_1.default.object({
87
92
  type: joi_1.default.string().valid('dice').required().description('The type of the query.'),
88
93
  from: joi_1.default.array().items(joi_1.default.string()).min(1).required().description('Slicing criteria for the start of the dice (forward slice seeds).'),
89
94
  to: joi_1.default.array().items(joi_1.default.string()).min(1).required().description('Slicing criteria for the end of the dice (backward slice seeds).'),
90
- noReconstruction: joi_1.default.boolean().optional().description('Do not reconstruct the dice into readable code.'),
91
- noMagicComments: joi_1.default.boolean().optional().description('Should the magic comments be ignored?'),
95
+ ...slice_query_options_1.SliceQueryOptionsSchema
92
96
  }).description('Dice query: selects only paths from the given start nodes that reach the given end nodes.'),
93
97
  flattenInvolvedNodes: (queryResults) => {
94
98
  const flattened = [];
@@ -5,6 +5,7 @@ const log_1 = require("../../../util/log");
5
5
  const node_id_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/node-id");
6
6
  const identifier_1 = require("../../../dataflow/environments/identifier");
7
7
  const parse_1 = require("../../../slicing/criterion/parse");
8
+ const expand_library_internals_1 = require("../call-graph-query/expand-library-internals");
8
9
  /**
9
10
  * Execute does call queries on the given analyzer.
10
11
  */
@@ -12,6 +13,7 @@ async function executeDoesCallQuery({ analyzer }, queries) {
12
13
  const start = Date.now();
13
14
  const cg = await analyzer.callGraph();
14
15
  const idMap = (await analyzer.normalize()).idMap;
16
+ const deps = analyzer.inspectContext().deps;
15
17
  const results = {};
16
18
  for (const query of queries) {
17
19
  const id = query.queryId ?? JSON.stringify(query);
@@ -25,7 +27,7 @@ async function executeDoesCallQuery({ analyzer }, queries) {
25
27
  continue;
26
28
  }
27
29
  const c = makeCallMatcher(query.calls);
28
- results[id] = findCallersMatchingConstraints(cg, nodeId, c);
30
+ results[id] = findCallersMatchingConstraints(cg, nodeId, c, query.expandLibraryInternals ? deps : undefined);
29
31
  }
30
32
  return {
31
33
  '.meta': {
@@ -68,7 +70,7 @@ function makeCallMatcher(constraint) {
68
70
  }
69
71
  }
70
72
  }
71
- function findCallersMatchingConstraints(cg, start, constraints) {
73
+ function findCallersMatchingConstraints(cg, start, constraints, expandDeps) {
72
74
  const visited = new Set();
73
75
  const toVisit = [start];
74
76
  while (toVisit.length > 0) {
@@ -82,6 +84,9 @@ function findCallersMatchingConstraints(cg, start, constraints) {
82
84
  if (constraints({ id: cur, name }, cg)) {
83
85
  return { call: start };
84
86
  }
87
+ if (expandDeps && matchesExpandedLibraryInternals(cur, constraints, cg, expandDeps)) {
88
+ return { call: start };
89
+ }
85
90
  continue;
86
91
  }
87
92
  const vtx = cg.getVertex(cur);
@@ -98,4 +103,12 @@ function findCallersMatchingConstraints(cg, start, constraints) {
98
103
  }
99
104
  return false;
100
105
  }
106
+ /** whether `constraints` matches any internal callee of the library/built-in leaf call `cur`, expanded via the signature database */
107
+ function matchesExpandedLibraryInternals(cur, constraints, cg, deps) {
108
+ const expansion = (0, expand_library_internals_1.transitiveLibraryCallees)(cur, deps);
109
+ if (expansion === undefined) {
110
+ return false;
111
+ }
112
+ return expansion.callees.some(name => constraints({ id: cur, name }, cg));
113
+ }
101
114
  //# sourceMappingURL=does-call-query-executor.js.map
@@ -32,6 +32,12 @@ export interface DoesCallQuery extends BaseQueryFormat {
32
32
  readonly queryId?: string;
33
33
  readonly call: SlicingCriterion;
34
34
  readonly calls: CallsConstraint;
35
+ /**
36
+ * If set, when the walk reaches a library/built-in leaf call, expand it into its internal callees using the
37
+ * signature database's `transitiveCallees` and match the constraints against those as well (a no-op if no
38
+ * signature database is loaded). Default false.
39
+ */
40
+ readonly expandLibraryInternals?: boolean;
35
41
  }
36
42
  export interface FindAllCallsResult {
37
43
  readonly call: NodeId;
@@ -42,9 +48,11 @@ export interface DoesCallQueryResult extends BaseQueryResult {
42
48
  }
43
49
  declare function doesCallQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'does-call'>;
44
50
  export declare const DoesCallQueryDefinition: {
51
+ readonly title: "Does-Call Query";
45
52
  readonly executor: typeof executeDoesCallQuery;
46
53
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
47
54
  readonly fromLine: typeof doesCallQueryLineParser;
55
+ readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
48
56
  readonly schema: Joi.ObjectSchema<any>;
49
57
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
50
58
  };
@@ -68,6 +68,7 @@ function doesCallQueryLineParser(output, line, _config) {
68
68
  };
69
69
  }
70
70
  exports.DoesCallQueryDefinition = {
71
+ title: 'Does-Call Query',
71
72
  executor: does_call_query_executor_1.executeDoesCallQuery,
72
73
  asciiSummarizer: async (formatter, processed, queryResults, result) => {
73
74
  const out = queryResults;
@@ -86,11 +87,13 @@ exports.DoesCallQueryDefinition = {
86
87
  return true;
87
88
  },
88
89
  fromLine: doesCallQueryLineParser,
90
+ syntax: '@does-call (<criterion>:$<id>|"<name>") <code | file://path>',
89
91
  schema: joi_1.default.object({
90
92
  type: joi_1.default.string().valid('does-call').required().description('The type of the query.'),
91
93
  queryId: joi_1.default.string().optional().description('An optional unique identifier for this query, to identify it in the output.'),
92
94
  call: joi_1.default.string().description('The function from which calls are being made. This is a slicing criterion that resolves to a function definition node.'),
93
- calls: joi_1.default.object().required().description('The constraints on which functions are being called. This can be a combination of name-based or id-based constraints, combined with logical operators (and, or, one-of).')
95
+ calls: joi_1.default.object().required().description('The constraints on which functions are being called. This can be a combination of name-based or id-based constraints, combined with logical operators (and, or, one-of).'),
96
+ expandLibraryInternals: joi_1.default.boolean().optional().description('Expand a reached library/built-in leaf call into its internal callees via the signature database and match constraints against those too (default false).')
94
97
  }).description('Either returns all function definitions alongside whether they are recursive, or just those matching the filters.'),
95
98
  flattenInvolvedNodes: (queryResults) => {
96
99
  const out = queryResults;
@@ -27,10 +27,12 @@ export interface FilesQueryResult extends BaseQueryResult {
27
27
  declare function filesQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'files'>;
28
28
  declare function filesQueryCompleter(line: readonly string[], startingNewArg: boolean, _config: FlowrConfig): CommandCompletions;
29
29
  export declare const FilesQueryDefinition: {
30
+ readonly title: "Files Query";
30
31
  readonly executor: typeof executeFileQuery;
31
32
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
32
33
  readonly completer: typeof filesQueryCompleter;
33
34
  readonly fromLine: typeof filesQueryLineParser;
35
+ readonly syntax: "@files [role:<r1>,<r2>,...] <code | file://path>";
34
36
  readonly schema: Joi.ObjectSchema<any>;
35
37
  readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
36
38
  };
@@ -101,6 +101,7 @@ function guessProto(obj) {
101
101
  return undefined;
102
102
  }
103
103
  exports.FilesQueryDefinition = {
104
+ title: 'Files Query',
104
105
  executor: files_query_executor_1.executeFileQuery,
105
106
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
106
107
  const out = queryResults;
@@ -118,6 +119,7 @@ exports.FilesQueryDefinition = {
118
119
  },
119
120
  completer: filesQueryCompleter,
120
121
  fromLine: filesQueryLineParser,
122
+ syntax: '@files [role:<r1>,<r2>,...] <code | file://path>',
121
123
  schema: joi_1.default.object({
122
124
  type: joi_1.default.string().valid('files').required().description('The type of the query.'),
123
125
  roles: joi_1.default.array().optional().items(joi_1.default.string().valid(...Object.values(flowr_file_1.FileRole))).description('Optional roles of the files to query. If not provided, all roles are considered.'),
@@ -0,0 +1,6 @@
1
+ import type { BasicQueryData } from '../../base-query-format';
2
+ import { type GuessDepVersionsQuery, type GuessDepVersionsQueryResult } from './guess-dep-versions-query-format';
3
+ /**
4
+ * Executes a guess-dep-versions query.
5
+ */
6
+ export declare function executeGuessDepVersionsQuery({ analyzer }: BasicQueryData, queries: readonly GuessDepVersionsQuery[]): Promise<GuessDepVersionsQueryResult>;