@eagleoutice/flowr 2.17.3 → 2.17.5

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 (592) hide show
  1. package/README.md +13 -52
  2. package/abstract-interpretation/absint-inference.js +1 -2
  3. package/abstract-interpretation/data-frame/arguments.d.ts +14 -3
  4. package/abstract-interpretation/data-frame/arguments.js +34 -0
  5. package/abstract-interpretation/data-frame/dataframe-semantics.js +7 -15
  6. package/abstract-interpretation/data-frame/resolve-args.d.ts +2 -2
  7. package/abstract-interpretation/data-frame/semantics.d.ts +8 -1
  8. package/abstract-interpretation/data-frame/semantics.js +14 -6
  9. package/abstract-interpretation/domains/state-abstract-domain.js +28 -18
  10. package/abstract-interpretation/domains/state-map.d.ts +43 -0
  11. package/abstract-interpretation/domains/state-map.js +147 -0
  12. package/benchmark/slicer.d.ts +1 -1
  13. package/benchmark/slicer.js +8 -7
  14. package/cli/repl/commands/repl-dataflow.js +5 -5
  15. package/cli/repl/commands/repl-execute.js +3 -2
  16. package/cli/repl/commands/repl-parse.js +2 -1
  17. package/cli/repl/commands/repl-signature.d.ts +1 -1
  18. package/cli/repl/completion.d.ts +23 -0
  19. package/cli/repl/completion.js +9 -0
  20. package/cli/repl/core.d.ts +0 -23
  21. package/cli/repl/core.js +0 -5
  22. package/cli/repl/parser/slice-query-parser.d.ts +1 -1
  23. package/cli/repl/parser/slice-query-parser.js +3 -3
  24. package/cli/repl/print-version.d.ts +1 -1
  25. package/cli/repl/print-version.js +2 -1
  26. package/cli/repl/server/connection.d.ts +1 -1
  27. package/cli/repl/server/connection.js +7 -9
  28. package/cli/slicer-app.js +2 -1
  29. package/clones/algorithms/baxter-ast.d.ts +33 -0
  30. package/clones/algorithms/baxter-ast.js +70 -0
  31. package/clones/algorithms/greedy-string-tiling.d.ts +17 -0
  32. package/clones/algorithms/greedy-string-tiling.js +56 -0
  33. package/clones/algorithms/winnowing.d.ts +27 -0
  34. package/clones/algorithms/winnowing.js +66 -0
  35. package/clones/clone-ast.d.ts +75 -0
  36. package/clones/clone-ast.js +174 -0
  37. package/clones/clone-dataflow.d.ts +11 -0
  38. package/clones/clone-dataflow.js +83 -0
  39. package/clones/clone-detector.d.ts +116 -0
  40. package/clones/clone-detector.js +200 -0
  41. package/clones/clone-index.d.ts +54 -0
  42. package/clones/clone-index.js +56 -0
  43. package/config.d.ts +21 -2
  44. package/config.js +7 -1
  45. package/control-flow/basic-cfg-guided-visitor.js +1 -2
  46. package/control-flow/happens-before.d.ts +2 -0
  47. package/control-flow/happens-before.js +15 -9
  48. package/control-flow/simple-visitor.js +2 -4
  49. package/core/steps/all/core/00-parse.js +2 -1
  50. package/core/steps/all/core/01-parse-tree-sitter.js +2 -1
  51. package/core/steps/all/core/10-normalize.js +2 -1
  52. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -1
  53. package/core/steps/all/static-slicing/00-slice.js +2 -1
  54. package/core/steps/all/static-slicing/10-reconstruct.js +2 -1
  55. package/core/steps/pipeline/create-pipeline.js +1 -2
  56. package/core/steps/pipeline/default-pipelines.d.ts +1 -1
  57. package/core/steps/pipeline/default-pipelines.js +5 -4
  58. package/core/steps/pipeline-step.d.ts +3 -1
  59. package/core/steps/pipeline-step.js +5 -0
  60. package/data/r-base-primitives.generated.d.ts +2 -1
  61. package/dataflow/cluster.js +1 -2
  62. package/dataflow/environments/ambient-state-name.d.ts +14 -22
  63. package/dataflow/environments/ambient-state-name.js +4 -18
  64. package/dataflow/environments/apply-kill.d.ts +9 -20
  65. package/dataflow/environments/apply-kill.js +51 -25
  66. package/dataflow/environments/built-in-config.d.ts +7 -15
  67. package/dataflow/environments/built-in-config.js +15 -16
  68. package/dataflow/environments/built-in-eval-name.d.ts +5 -6
  69. package/dataflow/environments/built-in-eval-name.js +4 -5
  70. package/dataflow/environments/built-in-kinds.d.ts +111 -0
  71. package/dataflow/environments/built-in-kinds.js +35 -0
  72. package/dataflow/environments/built-in-proc-name.d.ts +4 -0
  73. package/dataflow/environments/built-in-proc-name.js +11 -0
  74. package/dataflow/environments/built-in-props.d.ts +66 -172
  75. package/dataflow/environments/built-in-props.js +47 -151
  76. package/dataflow/environments/built-in.d.ts +42 -76
  77. package/dataflow/environments/built-in.js +46 -66
  78. package/dataflow/environments/data-masking-functions.d.ts +2 -2
  79. package/dataflow/environments/default-builtin-config/base-functions.d.ts +7 -0
  80. package/dataflow/environments/default-builtin-config/base-functions.js +339 -0
  81. package/dataflow/environments/default-builtin-config/base-language.d.ts +3 -0
  82. package/dataflow/environments/default-builtin-config/base-language.js +66 -0
  83. package/dataflow/environments/default-builtin-config/base-operators.d.ts +58 -0
  84. package/dataflow/environments/default-builtin-config/base-operators.js +169 -0
  85. package/dataflow/environments/default-builtin-config/database-access.d.ts +3 -0
  86. package/dataflow/environments/default-builtin-config/database-access.js +16 -0
  87. package/dataflow/environments/default-builtin-config/define-helpers.d.ts +45 -0
  88. package/dataflow/environments/default-builtin-config/define-helpers.js +50 -0
  89. package/dataflow/environments/default-builtin-config/dev-tooling.d.ts +3 -0
  90. package/dataflow/environments/default-builtin-config/dev-tooling.js +63 -0
  91. package/dataflow/environments/default-builtin-config/file-io.d.ts +3 -0
  92. package/dataflow/environments/default-builtin-config/file-io.js +81 -0
  93. package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +3 -0
  94. package/dataflow/environments/default-builtin-config/graphics-devices.js +57 -0
  95. package/dataflow/environments/default-builtin-config/index.d.ts +18 -0
  96. package/dataflow/environments/default-builtin-config/index.js +114 -0
  97. package/dataflow/environments/default-builtin-config/media-formats.d.ts +3 -0
  98. package/dataflow/environments/default-builtin-config/media-formats.js +41 -0
  99. package/dataflow/environments/default-builtin-config/misc-packages.d.ts +3 -0
  100. package/dataflow/environments/default-builtin-config/misc-packages.js +18 -0
  101. package/dataflow/environments/default-builtin-config/network-access.d.ts +3 -0
  102. package/dataflow/environments/default-builtin-config/network-access.js +47 -0
  103. package/dataflow/environments/default-builtin-config/object-systems.d.ts +3 -0
  104. package/dataflow/environments/default-builtin-config/object-systems.js +39 -0
  105. package/dataflow/environments/default-builtin-config/package-data-table.d.ts +3 -0
  106. package/dataflow/environments/default-builtin-config/package-data-table.js +18 -0
  107. package/dataflow/environments/default-builtin-config/package-spatial.d.ts +3 -0
  108. package/dataflow/environments/default-builtin-config/package-spatial.js +32 -0
  109. package/dataflow/environments/default-builtin-config/package-tidyverse.d.ts +3 -0
  110. package/dataflow/environments/default-builtin-config/package-tidyverse.js +96 -0
  111. package/dataflow/environments/default-builtin-config/package-utils.d.ts +3 -0
  112. package/dataflow/environments/default-builtin-config/package-utils.js +35 -0
  113. package/dataflow/environments/default-builtin-config/package-withr.d.ts +3 -0
  114. package/dataflow/environments/default-builtin-config/package-withr.js +41 -0
  115. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +3 -0
  116. package/dataflow/environments/default-builtin-config/parallel-execution.js +31 -0
  117. package/dataflow/environments/default-builtin-config/session-interactive.d.ts +3 -0
  118. package/dataflow/environments/default-builtin-config/session-interactive.js +31 -0
  119. package/dataflow/environments/default-builtin-config/shared-configs.d.ts +267 -0
  120. package/dataflow/environments/default-builtin-config/shared-configs.js +483 -0
  121. package/dataflow/environments/default-builtin-config/shared-signatures.d.ts +21 -0
  122. package/dataflow/environments/default-builtin-config/shared-signatures.js +32 -0
  123. package/dataflow/environments/default-builtin-config/statistics.d.ts +3 -0
  124. package/dataflow/environments/default-builtin-config/statistics.js +32 -0
  125. package/dataflow/environments/default-builtin-config/unit-testing.d.ts +3 -0
  126. package/dataflow/environments/default-builtin-config/unit-testing.js +13 -0
  127. package/dataflow/environments/environment.d.ts +28 -52
  128. package/dataflow/environments/environment.js +24 -71
  129. package/dataflow/environments/group-generics.d.ts +12 -19
  130. package/dataflow/environments/group-generics.js +17 -14
  131. package/dataflow/environments/identifier.d.ts +72 -427
  132. package/dataflow/environments/identifier.js +34 -145
  133. package/dataflow/environments/pkg-name.d.ts +197 -0
  134. package/dataflow/environments/pkg-name.js +3 -0
  135. package/dataflow/environments/query-fn-props.d.ts +27 -76
  136. package/dataflow/environments/query-fn-props.js +34 -95
  137. package/dataflow/environments/resolve-by-name.d.ts +6 -16
  138. package/dataflow/environments/resolve-by-name.js +23 -35
  139. package/dataflow/environments/scoping.d.ts +5 -5
  140. package/dataflow/environments/scoping.js +13 -5
  141. package/dataflow/eval/resolve/alias-tracking.d.ts +31 -68
  142. package/dataflow/eval/resolve/alias-tracking.js +611 -126
  143. package/dataflow/eval/resolve/match-arguments.d.ts +5 -3
  144. package/dataflow/eval/resolve/resolve-argument.d.ts +11 -11
  145. package/dataflow/eval/resolve/resolve-argument.js +35 -35
  146. package/dataflow/eval/resolve/resolve-field.d.ts +10 -0
  147. package/dataflow/eval/resolve/resolve-field.js +127 -0
  148. package/dataflow/eval/resolve/resolve-numbers.d.ts +1 -178
  149. package/dataflow/eval/resolve/resolve-numbers.js +2 -13
  150. package/dataflow/eval/resolve/resolve-replacement.d.ts +10 -0
  151. package/dataflow/eval/resolve/resolve-replacement.js +80 -0
  152. package/dataflow/eval/resolve/resolve-strings.d.ts +3 -95
  153. package/dataflow/eval/resolve/resolve-strings.js +2 -17
  154. package/dataflow/eval/resolve/resolve-working-directory.js +3 -4
  155. package/dataflow/eval/resolve/resolve.d.ts +13 -10
  156. package/dataflow/eval/resolve/resolve.js +81 -32
  157. package/dataflow/eval/values/general.d.ts +6 -24
  158. package/dataflow/eval/values/general.js +12 -29
  159. package/dataflow/eval/values/lists/list-constants.d.ts +11 -0
  160. package/dataflow/eval/values/lists/list-constants.js +65 -0
  161. package/dataflow/eval/values/r-value.d.ts +20 -23
  162. package/dataflow/eval/values/r-value.js +22 -17
  163. package/dataflow/extractor.d.ts +2 -10
  164. package/dataflow/extractor.js +134 -62
  165. package/dataflow/fn/argument-roles.d.ts +2 -4
  166. package/dataflow/fn/argument-roles.js +49 -23
  167. package/dataflow/fn/class-declaration.d.ts +36 -52
  168. package/dataflow/fn/class-declaration.js +22 -56
  169. package/dataflow/fn/condition-handlers.d.ts +2 -1
  170. package/dataflow/fn/dispatch.d.ts +70 -0
  171. package/dataflow/fn/dispatch.js +434 -0
  172. package/dataflow/fn/exceptions-of-function.d.ts +1 -2
  173. package/dataflow/fn/exceptions-of-function.js +36 -106
  174. package/dataflow/fn/frame-reflection.d.ts +1 -3
  175. package/dataflow/fn/frame-reflection.js +8 -16
  176. package/dataflow/fn/function-props.d.ts +2 -5
  177. package/dataflow/fn/function-props.js +27 -36
  178. package/dataflow/fn/function-semantics.d.ts +14 -26
  179. package/dataflow/fn/function-semantics.js +4 -18
  180. package/dataflow/fn/higher-order-function.js +2 -4
  181. package/dataflow/fn/strict-function.d.ts +10 -35
  182. package/dataflow/fn/strict-function.js +126 -138
  183. package/dataflow/graph/ambient-access.d.ts +51 -0
  184. package/dataflow/graph/ambient-access.js +80 -0
  185. package/dataflow/graph/call-graph.d.ts +9 -29
  186. package/dataflow/graph/call-graph.js +17 -41
  187. package/dataflow/graph/closure-frames.d.ts +46 -0
  188. package/dataflow/graph/closure-frames.js +225 -0
  189. package/dataflow/graph/dataflowgraph-builder.d.ts +25 -96
  190. package/dataflow/graph/dataflowgraph-builder.js +29 -97
  191. package/dataflow/graph/df-helper.d.ts +48 -187
  192. package/dataflow/graph/df-helper.js +107 -207
  193. package/dataflow/graph/diff-dataflow-graph.d.ts +5 -15
  194. package/dataflow/graph/diff-dataflow-graph.js +25 -25
  195. package/dataflow/graph/edge.js +1 -1
  196. package/dataflow/graph/graph-helper.d.ts +10 -46
  197. package/dataflow/graph/graph-helper.js +16 -50
  198. package/dataflow/graph/graph.d.ts +44 -97
  199. package/dataflow/graph/graph.js +83 -79
  200. package/dataflow/graph/match-args.d.ts +21 -88
  201. package/dataflow/graph/match-args.js +284 -97
  202. package/dataflow/graph/vertex.d.ts +101 -128
  203. package/dataflow/graph/vertex.js +23 -20
  204. package/dataflow/hooks.d.ts +7 -14
  205. package/dataflow/hooks.js +15 -13
  206. package/dataflow/info.d.ts +2 -17
  207. package/dataflow/internal/dispatch-linking.d.ts +71 -0
  208. package/dataflow/internal/dispatch-linking.js +332 -0
  209. package/dataflow/internal/linker.d.ts +48 -50
  210. package/dataflow/internal/linker.js +458 -155
  211. package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -1
  212. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -14
  213. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -46
  214. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +7 -6
  215. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +10 -9
  216. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +25 -69
  217. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +292 -89
  218. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +10 -7
  219. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +66 -45
  220. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +15 -19
  221. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +85 -64
  222. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +4 -4
  223. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +2 -2
  224. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +2 -2
  225. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +3 -2
  226. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +15 -0
  227. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +416 -0
  228. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +37 -54
  229. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +192 -111
  230. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +4 -3
  231. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +60 -13
  232. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -3
  233. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +80 -76
  234. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +1 -7
  235. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -13
  236. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +4 -8
  237. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +436 -140
  238. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +18 -10
  239. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +90 -12
  240. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -5
  241. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +5 -14
  242. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +9 -8
  243. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -7
  244. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -2
  245. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +3 -5
  246. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -6
  247. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -1
  248. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +9 -24
  249. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +10 -6
  250. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +5 -6
  251. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -4
  252. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -4
  253. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +8 -11
  254. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -5
  255. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +20 -28
  256. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +17 -4
  257. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +117 -4
  258. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +5 -3
  259. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  260. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +8 -4
  261. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +18 -29
  262. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +7 -34
  263. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +42 -56
  264. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +4 -18
  265. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +16 -22
  266. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +18 -16
  267. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +130 -65
  268. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -1
  269. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +2 -1
  270. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +39 -21
  271. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +587 -107
  272. package/dataflow/internal/process/functions/call/common.d.ts +8 -24
  273. package/dataflow/internal/process/functions/call/common.js +24 -24
  274. package/dataflow/internal/process/functions/call/deferred.d.ts +7 -27
  275. package/dataflow/internal/process/functions/call/deferred.js +6 -27
  276. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +7 -50
  277. package/dataflow/internal/process/functions/call/known-call-handling.js +14 -50
  278. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -4
  279. package/dataflow/internal/process/functions/call/named-call-handling.js +14 -35
  280. package/dataflow/internal/process/functions/call/nse-kind.d.ts +24 -0
  281. package/dataflow/internal/process/functions/call/nse-kind.js +30 -0
  282. package/dataflow/internal/process/functions/call/nse.d.ts +2 -9
  283. package/dataflow/internal/process/functions/call/nse.js +6 -13
  284. package/dataflow/internal/process/functions/call/quoted.d.ts +4 -15
  285. package/dataflow/internal/process/functions/call/quoted.js +26 -62
  286. package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +3 -6
  287. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +29 -11
  288. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  289. package/dataflow/internal/program-order.d.ts +3 -10
  290. package/dataflow/internal/program-order.js +19 -10
  291. package/dataflow/origin/dfg-get-origin.js +2 -1
  292. package/documentation/data/faq/faqs.js +16 -1
  293. package/documentation/data/interface/doc-writing-code.js +5 -7
  294. package/documentation/doc-capabilities.js +3 -3
  295. package/documentation/doc-readme.js +1 -1
  296. package/documentation/doc-util/doc-code.d.ts +0 -5
  297. package/documentation/doc-util/doc-code.js +2 -22
  298. package/documentation/doc-util/doc-query.d.ts +1 -2
  299. package/documentation/doc-util/doc-query.js +4 -5
  300. package/documentation/doc-util/doc-search.js +1 -1
  301. package/documentation/wiki-analyzer.js +4 -3
  302. package/documentation/wiki-core.js +5 -5
  303. package/documentation/wiki-dataflow-graph.js +6 -0
  304. package/documentation/wiki-interface.js +2 -1
  305. package/documentation/wiki-linter.js +15 -3
  306. package/documentation/wiki-linting-and-testing.js +15 -2
  307. package/documentation/wiki-query.js +114 -31
  308. package/index.d.ts +3 -1
  309. package/index.js +6 -3
  310. package/linter/linter-executor.js +1 -1
  311. package/linter/linter-rules.d.ts +37 -8
  312. package/linter/linter-rules.js +8 -1
  313. package/linter/linter-util.d.ts +3 -3
  314. package/linter/linter-util.js +1 -1
  315. package/linter/rules/absolute-path.js +5 -5
  316. package/linter/rules/cmd-check/bogus-return.d.ts +2 -1
  317. package/linter/rules/cmd-check/call-arguments.d.ts +3 -2
  318. package/linter/rules/cmd-check/call-arguments.js +5 -5
  319. package/linter/rules/cmd-check/cmd-check-util.d.ts +9 -8
  320. package/linter/rules/cmd-check/dependency-declaration.d.ts +2 -1
  321. package/linter/rules/cmd-check/dependency-declaration.js +3 -3
  322. package/linter/rules/cmd-check/documentation-mismatch.d.ts +3 -2
  323. package/linter/rules/cmd-check/documentation-mismatch.js +2 -1
  324. package/linter/rules/cmd-check/file-checks.d.ts +2 -2
  325. package/linter/rules/cmd-check/foreign-function-calls.d.ts +2 -1
  326. package/linter/rules/cmd-check/global-environment-modification.d.ts +6 -5
  327. package/linter/rules/cmd-check/namespace-tampering.d.ts +2 -1
  328. package/linter/rules/cmd-check/non-ascii-code.js +1 -1
  329. package/linter/rules/cmd-check/package-files.d.ts +2 -2
  330. package/linter/rules/cmd-check/package-hooks.d.ts +5 -4
  331. package/linter/rules/cmd-check/package-runtime.js +4 -4
  332. package/linter/rules/cmd-check/rd-files.js +2 -1
  333. package/linter/rules/cmd-check/s-three-method-consistency.d.ts +3 -2
  334. package/linter/rules/cmd-check/s-three-method-consistency.js +2 -1
  335. package/linter/rules/code-clones.d.ts +57 -0
  336. package/linter/rules/code-clones.js +53 -0
  337. package/linter/rules/deprecated-functions.js +5 -8
  338. package/linter/rules/file-path-validity.js +11 -9
  339. package/linter/rules/function-finder-util.d.ts +4 -2
  340. package/linter/rules/function-finder-util.js +2 -2
  341. package/linter/rules/naming-convention.d.ts +6 -5
  342. package/linter/rules/naming-convention.js +2 -3
  343. package/linter/rules/no-leaked-credentials.d.ts +2 -1
  344. package/linter/rules/no-leaked-credentials.js +1 -1
  345. package/linter/rules/overwritten-file.d.ts +2 -1
  346. package/linter/rules/overwritten-file.js +2 -4
  347. package/linter/rules/problematic-inputs.d.ts +2 -1
  348. package/linter/rules/problematic-inputs.js +3 -3
  349. package/linter/rules/process-state-in-session.d.ts +7 -6
  350. package/linter/rules/process-state-in-session.js +1 -1
  351. package/linter/rules/roxygen-arguments.d.ts +1 -1
  352. package/linter/rules/secret-exfiltration.d.ts +3 -2
  353. package/linter/rules/secret-exfiltration.js +9 -4
  354. package/linter/rules/seeded-randomness.d.ts +3 -3
  355. package/linter/rules/unclosed-connection.js +1 -2
  356. package/linter/rules/undefined-symbol-util.d.ts +3 -2
  357. package/linter/rules/undefined-symbol.d.ts +3 -2
  358. package/linter/rules/unescaped-arguments.d.ts +1 -1
  359. package/linter/rules/unescaped-arguments.js +6 -8
  360. package/linter/rules/unused-definition.d.ts +4 -3
  361. package/linter/rules/unused-definition.js +10 -12
  362. package/linter/rules/unused-import.d.ts +6 -5
  363. package/linter/rules/unused-import.js +20 -6
  364. package/package.json +1 -1
  365. package/project/attached-packages.d.ts +5 -4
  366. package/project/cache/flowr-analyzer-cache.d.ts +14 -1
  367. package/project/cache/flowr-analyzer-cache.js +40 -3
  368. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +0 -6
  369. package/project/cache/flowr-analyzer-controlflow-cache.js +7 -27
  370. package/project/context/flowr-analyzer-context.d.ts +2 -2
  371. package/project/context/flowr-analyzer-context.js +2 -2
  372. package/project/context/flowr-analyzer-dependencies-context.d.ts +12 -12
  373. package/project/context/flowr-analyzer-environment-context.d.ts +3 -3
  374. package/project/context/flowr-analyzer-environment-context.js +3 -3
  375. package/project/context/flowr-analyzer-files-context.d.ts +8 -0
  376. package/project/context/flowr-analyzer-files-context.js +51 -6
  377. package/project/context/flowr-analyzer-functions-context.d.ts +9 -7
  378. package/project/context/flowr-analyzer-gas-context.d.ts +25 -0
  379. package/project/context/flowr-analyzer-gas-context.js +34 -4
  380. package/project/dependency-version-space.d.ts +30 -29
  381. package/project/dependency-version-space.js +1 -2
  382. package/project/flowr-analyzer-builder.d.ts +2 -3
  383. package/project/flowr-analyzer.d.ts +35 -12
  384. package/project/flowr-analyzer.js +18 -33
  385. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +15 -17
  386. package/project/plugins/file-plugins/files/flowr-namespace-file.js +57 -163
  387. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -3
  388. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -3
  389. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -3
  390. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -2
  391. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -2
  392. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +5 -4
  393. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +1 -1
  394. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +2 -1
  395. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -3
  396. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +2 -2
  397. package/project/plugins/package-version-plugins/package.d.ts +6 -5
  398. package/project/plugins/package-version-plugins/package.js +1 -1
  399. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -3
  400. package/project/sigdb/build.js +1 -1
  401. package/project/sigdb/decode.d.ts +8 -7
  402. package/project/sigdb/decode.js +1 -2
  403. package/project/sigdb/dict.d.ts +2 -1
  404. package/project/sigdb/dict.js +2 -2
  405. package/project/sigdb/index-format.d.ts +2 -1
  406. package/project/sigdb/manifest.d.ts +1 -1
  407. package/project/sigdb/memory-source.d.ts +18 -17
  408. package/project/sigdb/on-demand/package-sources.d.ts +4 -3
  409. package/project/sigdb/on-demand/recoverer.d.ts +2 -1
  410. package/project/sigdb/on-demand/remote-sources.d.ts +2 -1
  411. package/project/sigdb/reader.d.ts +85 -80
  412. package/project/sigdb/reader.js +0 -4
  413. package/project/sigdb/schema.d.ts +9 -8
  414. package/project/sigdb/signature-db.d.ts +6 -6
  415. package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
  416. package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +6 -0
  417. package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +50 -0
  418. package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +54 -0
  419. package/queries/catalog/ambient-access-query/ambient-access-query-format.js +45 -0
  420. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +2 -1
  421. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
  422. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +3 -2
  423. package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +6 -0
  424. package/queries/catalog/code-clones-query/code-clones-query-executor.js +38 -0
  425. package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +54 -0
  426. package/queries/catalog/code-clones-query/code-clones-query-format.js +73 -0
  427. package/queries/catalog/config-query/config-query-format.d.ts +1 -1
  428. package/queries/catalog/config-query/config-query-format.js +4 -4
  429. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -3
  430. package/queries/catalog/dependencies-query/data-flow.d.ts +5 -4
  431. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +5 -2
  432. package/queries/catalog/dependencies-query/dependencies-query-executor.js +11 -10
  433. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -6
  434. package/queries/catalog/dependencies-query/dependencies-query-format.js +12 -12
  435. package/queries/catalog/dependencies-query/dependency-values.d.ts +9 -0
  436. package/queries/catalog/dependencies-query/dependency-values.js +13 -0
  437. package/queries/catalog/dependencies-query/function-info/function-info.d.ts +6 -4
  438. package/queries/catalog/dependencies-query/function-info/remote-functions.js +2 -2
  439. package/queries/catalog/dependencies-query/function-info/write-functions.js +8 -7
  440. package/queries/catalog/dependencies-query/implicit-echo.js +4 -2
  441. package/queries/catalog/dependencies-query/plot-description.d.ts +1 -1
  442. package/queries/catalog/dependencies-query/plot-description.js +2 -2
  443. package/queries/catalog/dice-query/dice-query-format.d.ts +2 -1
  444. package/queries/catalog/dice-query/dice-query-format.js +1 -0
  445. package/queries/catalog/does-call-query/does-call-query-executor.js +1 -2
  446. package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -0
  447. package/queries/catalog/does-call-query/does-call-query-format.js +1 -0
  448. package/queries/catalog/files-query/files-query-format.d.ts +1 -1
  449. package/queries/catalog/function-info-query/function-info-query-format.d.ts +2 -1
  450. package/queries/catalog/function-info-query/function-origin.d.ts +3 -2
  451. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +3 -3
  452. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +5 -4
  453. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  454. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  455. package/queries/catalog/input-sources-query/input-sources-query-executor.js +7 -3
  456. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +9 -9
  457. package/queries/catalog/input-sources-query/simple-input-classifier.js +1 -1
  458. package/queries/catalog/linter-query/linter-query-executor.js +4 -1
  459. package/queries/catalog/linter-query/linter-query-format.d.ts +2 -2
  460. package/queries/catalog/linter-query/linter-query-format.js +16 -11
  461. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -0
  462. package/queries/catalog/origin-query/origin-query-format.js +1 -0
  463. package/queries/catalog/project-query/project-query-format.d.ts +2 -1
  464. package/queries/catalog/provenance-query/provenance-query-format.d.ts +1 -0
  465. package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
  466. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -0
  467. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
  468. package/queries/catalog/signature-query/signature-query-executor.d.ts +10 -7
  469. package/queries/catalog/signature-query/signature-query-executor.js +14 -15
  470. package/queries/catalog/signature-query/signature-query-format.d.ts +21 -20
  471. package/queries/catalog/signature-query/signature-query-render.js +1 -1
  472. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  473. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +9 -5
  474. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
  475. package/queries/catalog/taint-query/taint-query-format.d.ts +1 -1
  476. package/queries/query.d.ts +61 -10
  477. package/queries/query.js +59 -37
  478. package/r-bridge/data/data.d.ts +39 -28
  479. package/r-bridge/data/data.js +37 -28
  480. package/r-bridge/init.js +1 -1
  481. package/r-bridge/lang-4.x/ast/model/model.d.ts +10 -1
  482. package/r-bridge/lang-4.x/ast/model/model.js +30 -0
  483. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +21 -0
  484. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +25 -2
  485. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +2 -1
  486. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -2
  487. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -2
  488. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  489. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  490. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  491. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  492. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -3
  493. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  494. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  495. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  496. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  497. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  498. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
  499. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  500. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  501. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  502. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +5 -6
  503. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -7
  504. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  505. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -2
  506. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -2
  507. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  508. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -5
  509. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +7 -2
  510. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +14 -6
  511. package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
  512. package/r-bridge/lang-4.x/ast/model/processing/visitor.js +2 -2
  513. package/r-bridge/lang-4.x/ast/model/type.d.ts +1 -1
  514. package/r-bridge/lang-4.x/ast/model/type.js +1 -1
  515. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -2
  516. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -2
  517. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  518. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -2
  519. package/r-bridge/parser.d.ts +8 -2
  520. package/r-bridge/parser.js +6 -0
  521. package/r-bridge/shell-executor.d.ts +2 -2
  522. package/r-bridge/shell-executor.js +3 -2
  523. package/r-bridge/shell.d.ts +2 -2
  524. package/r-bridge/shell.js +3 -2
  525. package/reconstruct/auto-select/magic-comments.js +1 -1
  526. package/reconstruct/reconstruct.d.ts +0 -5
  527. package/reconstruct/reconstruct.js +6 -5
  528. package/search/flowr-search-builder.d.ts +14 -0
  529. package/search/flowr-search-builder.js +7 -0
  530. package/search/flowr-search-executor.js +2 -2
  531. package/search/flowr-search-filters.js +10 -11
  532. package/search/flowr-search.js +1 -1
  533. package/search/search-executor/search-enrichers.d.ts +2 -0
  534. package/search/search-executor/search-enrichers.js +6 -1
  535. package/search/search-executor/search-generators.d.ts +2 -3
  536. package/search/search-executor/search-generators.js +18 -14
  537. package/search/search-executor/search-mappers.js +1 -1
  538. package/search/search-executor/search-transformer.d.ts +2 -2
  539. package/search/search-executor/search-transformer.js +6 -6
  540. package/search/search-logger.d.ts +1 -0
  541. package/search/search-logger.js +6 -0
  542. package/slicing/criterion/parse.d.ts +2 -1
  543. package/slicing/criterion/parse.js +2 -1
  544. package/slicing/static/removal-slice.js +2 -1
  545. package/slicing/static/slice-call.d.ts +30 -4
  546. package/slicing/static/slice-call.js +74 -9
  547. package/slicing/static/slicer-types.d.ts +2 -1
  548. package/slicing/static/static-slicer.js +66 -11
  549. package/slicing/static/visiting-queue.d.ts +2 -0
  550. package/slicing/static/visiting-queue.js +4 -0
  551. package/taint-analysis/builder/report-template.d.ts +3 -3
  552. package/util/arg-matching.d.ts +1 -1
  553. package/util/collections/relation.d.ts +23 -0
  554. package/util/collections/relation.js +63 -0
  555. package/util/fixpoint.d.ts +65 -0
  556. package/util/fixpoint.js +216 -0
  557. package/util/flowr-version.d.ts +1 -1
  558. package/util/flowr-version.js +2 -2
  559. package/util/json.d.ts +4 -0
  560. package/util/json.js +12 -3
  561. package/util/mermaid/cfg.js +1 -2
  562. package/util/mermaid/dfg.d.ts +1 -1
  563. package/util/mermaid/dfg.js +1 -1
  564. package/util/mermaid/mermaid.d.ts +2 -1
  565. package/util/monoid.d.ts +26 -0
  566. package/util/monoid.js +31 -0
  567. package/util/prefix.d.ts +1 -1
  568. package/util/r-base-packages.d.ts +10 -7
  569. package/util/r-base-packages.js +11 -6
  570. package/util/r-package-urls.d.ts +10 -9
  571. package/util/r-value.js +2 -1
  572. package/util/r-version-order.d.ts +2 -0
  573. package/util/r-version-order.js +19 -0
  574. package/util/r-version.d.ts +2 -1
  575. package/util/r-version.js +2 -14
  576. package/util/range.d.ts +38 -29
  577. package/util/range.js +10 -5
  578. package/util/simple-df/dfg-ascii.js +2 -2
  579. package/util/text/ansi.d.ts +13 -9
  580. package/util/text/ansi.js +4 -6
  581. package/util/text/strings.d.ts +10 -3
  582. package/util/text/strings.js +10 -1
  583. package/util/version.d.ts +1 -1
  584. package/util/version.js +2 -1
  585. package/dataflow/environments/default-builtin-config.d.ts +0 -8856
  586. package/dataflow/environments/default-builtin-config.js +0 -1735
  587. package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -33
  588. package/r-bridge/lang-4.x/ast/model/operators.js +0 -54
  589. package/taint-analysis/eval/eval.d.ts +0 -1
  590. package/taint-analysis/eval/eval.js +0 -124
  591. package/taint-analysis/eval/instrumentation.d.ts +0 -59
  592. package/taint-analysis/eval/instrumentation.js +0 -124
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectImplicitEchoes = collectImplicitEchoes;
4
4
  const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
5
5
  const function_semantics_1 = require("../../../dataflow/fn/function-semantics");
6
+ const dependency_values_1 = require("./dependency-values");
6
7
  const identifier_1 = require("../../../dataflow/environments/identifier");
7
8
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
8
9
  const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
@@ -20,6 +21,7 @@ const built_in_ambient_state_1 = require("../../../dataflow/internal/process/fun
20
21
  const plot_objects_1 = require("./plot-objects");
21
22
  const data_flow_1 = require("./data-flow");
22
23
  const test_functions_1 = require("./function-info/test-functions");
24
+ const base_operators_1 = require("../../../dataflow/environments/default-builtin-config/base-operators");
23
25
  /** the node whose value R echoes for a statement, `undefined` if the statement yields nothing visible */
24
26
  function echoedValue(node, dataflow, invisible, seen = new Set()) {
25
27
  /* an assignment returns its value invisibly: `x <- 1`, `names(x) <- v` and `assign("x", 1)` print nothing */
@@ -66,7 +68,7 @@ function echoedValue(node, dataflow, invisible, seen = new Set()) {
66
68
  const Assigning = [built_in_proc_name_1.BuiltInProcName.Assignment, built_in_proc_name_1.BuiltInProcName.SuperAssignment, built_in_proc_name_1.BuiltInProcName.Replacement, built_in_proc_name_1.BuiltInProcName.TableAssignment];
67
69
  function isAssignment(node, dataflow) {
68
70
  const vertex = node === undefined ? undefined : dataflow.graph.getVertex(node.info.id);
69
- return (r_binary_op_1.RBinaryOp.is(node) && r_binary_op_1.RBinaryOp.getOperatorInfo(node)?.usedAs === 'assignment') || Assigning.some(p => vertex_1.DfgVertex.hasOrigin(vertex, p));
71
+ return (r_binary_op_1.RBinaryOp.is(node) && r_binary_op_1.RBinaryOp.getOperatorInfo(node)?.usedAs === base_operators_1.OperatorUsedAs.Assignment) || Assigning.some(p => vertex_1.DfgVertex.hasOrigin(vertex, p));
70
72
  }
71
73
  /** whether the list is a `( )` group rather than a `{ }` block, which is what makes its value visible */
72
74
  function grouped(node) {
@@ -161,7 +163,7 @@ function collectImplicitEchoes(ast, dataflow, accountedFor, invisible, result) {
161
163
  continue;
162
164
  }
163
165
  const inputs = (0, data_flow_1.inputVariablesAt)(dataflow, ast, echoed.info.id);
164
- result.push({ nodeId: echoed.info.id, functionName: echoName(echoed, dataflow), value: 'stdout', implicit: true, inputVariables: inputs.length > 0 ? inputs : undefined });
166
+ result.push({ nodeId: echoed.info.id, functionName: echoName(echoed, dataflow), value: dependency_values_1.StdOut, implicit: true, inputVariables: inputs.length > 0 ? inputs : undefined });
165
167
  }
166
168
  }
167
169
  }
@@ -1,4 +1,4 @@
1
- import { type DependencyInfo } from './dependencies-query-format';
1
+ import type { DependencyInfo } from './dependencies-query-format';
2
2
  import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
3
3
  import type { QueryRun } from './dependencies-query-executor';
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.describePlots = describePlots;
4
- const dependencies_query_format_1 = require("./dependencies-query-format");
4
+ const dependency_values_1 = require("./dependency-values");
5
5
  const vertex_1 = require("../../../dataflow/graph/vertex");
6
6
  const edge_1 = require("../../../dataflow/graph/edge");
7
7
  const identifier_1 = require("../../../dataflow/environments/identifier");
@@ -16,7 +16,7 @@ const TitleArguments = {
16
16
  };
17
17
  const DefaultTitleArgument = { argName: 'main' };
18
18
  function isResolved(value) {
19
- return value !== undefined && value !== dependencies_query_format_1.Unknown && value !== dependencies_query_format_1.Constant;
19
+ return value !== undefined && value !== dependency_values_1.Unknown && value !== dependency_values_1.Constant;
20
20
  }
21
21
  function titleOf(call, { dataflow, config, formals }, ctx) {
22
22
  /* a call handed nothing states no title */
@@ -5,7 +5,7 @@ import type { ParsedQueryLine } from '../../query';
5
5
  import Joi from 'joi';
6
6
  import { executeDiceQuery } from './dice-query-executor';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
- import type { CommandCompletions } from '../../../cli/repl/core';
8
+ import type { CommandCompletions } from '../../../cli/repl/completion';
9
9
  import type { FlowrConfig } from '../../../config';
10
10
  import { type SliceQueryOptions } from '../slice-query-options';
11
11
  /**
@@ -44,6 +44,7 @@ declare function diceQueryCompleter(line: readonly string[], startingNewArg: boo
44
44
  export declare const DiceQueryDefinition: {
45
45
  readonly title: "Dice Query";
46
46
  readonly executor: typeof executeDiceQuery;
47
+ readonly perQueryResults: true;
47
48
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => boolean;
48
49
  readonly fromLine: typeof diceQueryLineParser;
49
50
  readonly completer: typeof diceQueryCompleter;
@@ -47,6 +47,7 @@ function diceQueryCompleter(line, startingNewArg, _config) {
47
47
  exports.DiceQueryDefinition = {
48
48
  title: 'Dice Query',
49
49
  executor: dice_query_executor_1.executeDiceQuery,
50
+ perQueryResults: true,
50
51
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => (0, slice_query_options_1.summarizeSliceResults)(formatter, 'dice', queryResults, result, (_, q) => q ? `Dice from {${q.from.join(', ')}} to {${q.to.join(', ')}}` : 'Dice'),
51
52
  fromLine: diceQueryLineParser,
52
53
  completer: diceQueryCompleter,
@@ -76,8 +76,7 @@ function makeCallMatcher(constraint) {
76
76
  function findCallersMatchingConstraints(cg, start, constraints, expandDeps) {
77
77
  const visited = new Set();
78
78
  const toVisit = [start];
79
- while (toVisit.length > 0) {
80
- const cur = toVisit.pop();
79
+ for (let cur; (cur = toVisit.pop()) !== undefined;) {
81
80
  if (visited.has(cur)) {
82
81
  continue;
83
82
  }
@@ -56,6 +56,7 @@ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly stri
56
56
  export declare const DoesCallQueryDefinition: {
57
57
  readonly title: "Does-Call Query";
58
58
  readonly executor: typeof executeDoesCallQuery;
59
+ readonly perQueryResults: true;
59
60
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
60
61
  readonly fromLine: typeof doesCallQueryLineParser;
61
62
  readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
@@ -71,6 +71,7 @@ function doesCallQueryLineParser(output, line, _config) {
71
71
  exports.DoesCallQueryDefinition = {
72
72
  title: 'Does-Call Query',
73
73
  executor: does_call_query_executor_1.executeDoesCallQuery,
74
+ perQueryResults: true,
74
75
  asciiSummarizer: async (formatter, processed, queryResults, result) => {
75
76
  const out = queryResults;
76
77
  result.push(`Query: ${(0, ansi_1.bold)('does-call', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
@@ -6,7 +6,7 @@ import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/nod
6
6
  import { FileRole } from '../../../project/context/flowr-file';
7
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
8
8
  import type { FlowrConfig } from '../../../config';
9
- import type { CommandCompletions } from '../../../cli/repl/core';
9
+ import type { CommandCompletions } from '../../../cli/repl/completion';
10
10
  /**
11
11
  * Returns the content(s) of all files matching the given pattern.
12
12
  */
@@ -1,3 +1,4 @@
1
+ import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
3
  import Joi from 'joi';
3
4
  import type { ParsedQueryLine } from '../../query';
@@ -17,7 +18,7 @@ export interface FunctionInfoQuery extends BaseQueryFormat {
17
18
  /** the bare function/symbol name to look up */
18
19
  readonly name: string;
19
20
  /** restrict the package list to these names; every exporting package when omitted */
20
- readonly packages?: readonly string[];
21
+ readonly packages?: readonly BrandedNamespace[];
21
22
  }
22
23
  /** what the signature database states about `name` in one exporting package */
23
24
  export interface FunctionInfoPackageHit {
@@ -1,3 +1,4 @@
1
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
2
3
  /**
3
4
  * flowR's own modeling of one built-in entry naming a function, read off the built-in definitions the analyzer
@@ -7,7 +8,7 @@ import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flow
7
8
  export interface BuiltinModel {
8
9
  readonly kind: 'function' | 'constant' | 'replacement';
9
10
  /** the package the entry names it under, e.g. `stats` for `sd`; `undefined` for an unqualified entry like most of `base` */
10
- readonly namespace?: string;
11
+ readonly namespace?: BrandedNamespace;
11
12
  /** {@link BuiltInProcName} value, for a `function` entry */
12
13
  readonly processor?: string;
13
14
  readonly assumePrimitive: boolean;
@@ -19,4 +20,4 @@ export interface BuiltinModel {
19
20
  readonly configKeys: readonly string[];
20
21
  }
21
22
  /** every built-in the analyzer states for the bare name `name`, one entry per namespace it is declared under, empty when it states none */
22
- export declare function builtinModelsOf(name: string, ctx: ReadOnlyFlowrAnalyzerContext): readonly BuiltinModel[];
23
+ export declare function builtinModelsOf(name: BrandedIdentifier, ctx: ReadOnlyFlowrAnalyzerContext): readonly BuiltinModel[];
@@ -98,7 +98,7 @@ function mergeQueries(queries) {
98
98
  };
99
99
  }
100
100
  /** format version range string from survivors and declared constraints, honest about gaps */
101
- function rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap) {
101
+ function rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap) {
102
102
  if (survivors.length === 0) {
103
103
  if (unsatisfiable) {
104
104
  return declaredConstraints.join(' ') || '<contradiction>';
@@ -127,7 +127,7 @@ function guessPackage(name, cap, surviving, evidence, { used, linkedWith, couple
127
127
  package: name,
128
128
  base: surviving.base,
129
129
  declaredConstraints,
130
- range: rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap),
130
+ range: rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap),
131
131
  minVersion: survivors.length > 0 ? survivors[0] : undefined,
132
132
  maxVersion: survivors.length > 0 ? survivors[survivors.length - 1] : undefined,
133
133
  candidateCount: survivors.length,
@@ -261,7 +261,7 @@ async function executeGuessDepVersionsQuery({ analyzer }, queries) {
261
261
  const versions = s.survivors.map(e => e.ver);
262
262
  return (0, objects_1.compactRecord)({
263
263
  package: alt,
264
- range: rangeString(versions, false, s.unsatisfiable, s.declaredRange, s.declaredConstraints, cap),
264
+ range: rangeString(versions, { nonContiguous: false, unsatisfiable: s.unsatisfiable }, s.declaredRange, s.declaredConstraints, cap),
265
265
  minVersion: versions[0],
266
266
  maxVersion: versions[versions.length - 1],
267
267
  candidateCount: versions.length,
@@ -3,6 +3,7 @@ import Joi from 'joi';
3
3
  import type { ParsedQueryLine } from '../../query';
4
4
  import { type OutputFormatter } from '../../../util/text/ansi';
5
5
  import { type VersionString } from '../../../util/r-version';
6
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
6
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
7
8
  import { VersionSelection, type FlowrConfig } from '../../../config';
8
9
  import { executeGuessDepVersionsQuery } from './guess-dep-versions-query-executor';
@@ -20,7 +21,7 @@ import type { RVersionOrigin } from '../../../project/context/flowr-analyzer-con
20
21
  export interface GuessDepVersionsQuery extends BaseQueryFormat {
21
22
  readonly type: 'guess-dep-versions';
22
23
  /** restrict the guess to these packages; omit to guess for every declared and used dependency */
23
- readonly packages?: readonly string[];
24
+ readonly packages?: readonly BrandedNamespace[];
24
25
  /** only consider versions released on or before this day, written `YYYY.MM.DD` (also `YYYY` or `YYYY.MM`) */
25
26
  readonly date?: string;
26
27
  /** cap the number of candidate versions listed per dependency in the result (default {@link DefaultCandidateCap}) */
@@ -39,7 +40,7 @@ export interface GuessExplodeOptions {
39
40
  /** iterate each dependency's versions newest-first (default) or oldest-first */
40
41
  readonly order?: 'newest' | 'oldest';
41
42
  /** a version to prefer per dependency when it survives the constraints (package name to version) */
42
- readonly prefer?: Readonly<Record<string, VersionString>>;
43
+ readonly prefer?: Readonly<Record<BrandedNamespace, VersionString>>;
43
44
  /** cap the number of combinations considered; the ones that cannot be loaded together are skipped, not returned */
44
45
  readonly limit?: number;
45
46
  }
@@ -105,7 +106,7 @@ export interface GuessedDependency {
105
106
  /** set when the constraints contradict each other so that no version can satisfy them all */
106
107
  readonly unsatisfiable?: boolean;
107
108
  /** the other packages this one shares a version with, so its range is not independent of theirs */
108
- readonly linkedWith?: readonly string[];
109
+ readonly linkedWith?: readonly BrandedNamespace[];
109
110
  /**
110
111
  * The other packages whose version requirements this one's version choice interacts with, so the two cannot be
111
112
  * picked independently (`A 0.2.5` requiring `B == 0.2.1` while `A 0.3.0` requires `B == 0.3.2`). A partner marked
@@ -140,7 +141,7 @@ export interface GuessedDependency {
140
141
  */
141
142
  readonly orphan?: boolean;
142
143
  /** the undefined orphan function names that inferred this package (only set when {@link orphan}), e.g. `['ggplot']` */
143
- readonly orphanFunctions?: readonly string[];
144
+ readonly orphanFunctions?: readonly BrandedIdentifier[];
144
145
  /** per {@link orphanFunctions} entry, where the undefined call is and why it was pinned on this package */
145
146
  readonly orphanEvidence?: readonly OrphanEvidenceView[];
146
147
  /**
@@ -29,6 +29,7 @@ export declare const HappensBeforeKey: {
29
29
  export declare const HappensBeforeQueryDefinition: {
30
30
  readonly title: "Happens-Before Query";
31
31
  readonly executor: typeof executeHappensBefore;
32
+ readonly perQueryResults: true;
32
33
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
33
34
  readonly schema: Joi.ObjectSchema<any>;
34
35
  };
@@ -28,6 +28,7 @@ exports.HappensBeforeKey = {
28
28
  exports.HappensBeforeQueryDefinition = {
29
29
  title: 'Happens-Before Query',
30
30
  executor: happens_before_query_executor_1.executeHappensBefore,
31
+ perQueryResults: true,
31
32
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
32
33
  const out = queryResults;
33
34
  result.push((0, query_print_1.queryHeader)('happens-before', formatter, out['.meta'].timing));
@@ -22,8 +22,7 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
22
22
  const results = {};
23
23
  const nast = await analyzer.normalize();
24
24
  const df = await analyzer.dataflow();
25
- const ctx = analyzer.inspectContext();
26
- const defaultConfig = addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
25
+ const defaultConfig = await analyzer.derive(resolveDefaultConfig, () => resolveDefaultConfig(analyzer));
27
26
  const packages = unqualifiedPackages(analyzer, df.environment);
28
27
  for (const query of queries) {
29
28
  const criteria = Array.isArray(query.criterion)
@@ -47,6 +46,11 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
47
46
  results
48
47
  };
49
48
  }
49
+ /** The default classifier config with the configured entries added, its searches (e.g. linter rules) resolved. */
50
+ async function resolveDefaultConfig(analyzer) {
51
+ const ctx = analyzer.inspectContext();
52
+ return addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
53
+ }
50
54
  /**
51
55
  * The packages whose exports are usable without a namespace: those R has on its search path at the end of the
52
56
  * program, the ones the project declares, and the base packages R attaches on startup.
@@ -87,7 +91,7 @@ async function resolveSearches(analyzer, config) {
87
91
  }
88
92
  else if (value === undefined || Array.isArray(value)) {
89
93
  // entries may be written as `pkg::fn` strings in the configuration, which only mean the namespaced function once parsed
90
- result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(e) : e);
94
+ result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(String(e)) : e);
91
95
  }
92
96
  else {
93
97
  const searchResult = await (0, flowr_search_executor_1.runSearch)(value, analyzer);
@@ -3,7 +3,7 @@ import { InputTraceType, InputType } from './input-types';
3
3
  export { InputTraceType, InputType } from './input-types';
4
4
  import type { DataflowGraph } from '../../../dataflow/graph/graph';
5
5
  import type { MergeableRecord } from '../../../util/objects';
6
- import { Identifier } from '../../../dataflow/environments/identifier';
6
+ import { Identifier, type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
7
7
  import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
8
8
  import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
9
9
  /**
@@ -13,18 +13,18 @@ import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
13
13
  */
14
14
  export interface LinkedInputObject {
15
15
  /** the name of the object, e.g. `input` */
16
- readonly name: string;
16
+ readonly name: BrandedIdentifier;
17
17
  /** how reads of the object (or of its fields) are to be classified */
18
18
  readonly type: InputType;
19
19
  /**
20
20
  * If given, the object only counts as linked if the function binding it declares all of these parameters as well
21
21
  * (e.g., shiny's `function(input, output, session)`). Without this, every `input` would be treated as the framework's.
22
22
  */
23
- readonly withParams?: readonly string[];
23
+ readonly withParams?: readonly BrandedIdentifier[];
24
24
  /** the package that has to be attached for this object to exist, e.g. `shiny` */
25
25
  readonly requires?: string;
26
26
  /** if given, only these fields are inputs (`session$clientData` is, `session$userData` is not) and the object itself is none */
27
- readonly fields?: readonly string[];
27
+ readonly fields?: readonly BrandedIdentifier[];
28
28
  /** how the framework declares the entries of this object, so a read of `input$n` links to the `textInput("n", ...)` defining it */
29
29
  readonly declaredBy?: LinkedInputDeclaration;
30
30
  }
@@ -33,7 +33,7 @@ export interface LinkedInputDeclaration {
33
33
  /** the declaring calls, e.g. shiny's `textInput`, `selectInput`, ... */
34
34
  readonly calls: readonly Identifier[];
35
35
  /** the name of the argument holding the entry's name */
36
- readonly argName: string;
36
+ readonly argName: BrandedIdentifier;
37
37
  /** the index of that argument when it is passed positionally */
38
38
  readonly argIdx: number;
39
39
  }
@@ -45,7 +45,7 @@ export interface LinkedInputEntryPoint {
45
45
  /** the call taking the function, e.g. `shiny::shinyApp` */
46
46
  readonly call: Identifier;
47
47
  /** the name of the argument holding the function */
48
- readonly argName: string;
48
+ readonly argName: BrandedIdentifier;
49
49
  /** the index of that argument when it is passed positionally */
50
50
  readonly argIdx: number;
51
51
  /** which {@link LinkedInputObject} the framework binds to each parameter, by position; `undefined` leaves one alone */
@@ -55,7 +55,7 @@ export interface LinkedInputEntryPoint {
55
55
  export interface NarrowingFunction {
56
56
  readonly call: Identifier;
57
57
  /** the name of the bounding argument */
58
- readonly argName: string;
58
+ readonly argName: BrandedIdentifier;
59
59
  /** the index of the bounding argument when it is passed positionally */
60
60
  readonly argIdx: number;
61
61
  }
@@ -79,7 +79,7 @@ export interface InputSource extends MergeableRecord {
79
79
  * Argument name when this source originates from a named argument of the criterion function call,
80
80
  * or the accessed field when it originates from a {@link LinkedInputObject} (e.g. `n` for `input$n`).
81
81
  */
82
- name?: string;
82
+ name?: BrandedIdentifier;
83
83
  /** the concrete scalar value when the source is a constant or a pure alias of one */
84
84
  value?: ConstantValue;
85
85
  /** where the framework entry this source reads is declared, e.g. the `textInput("n", ...)` behind an `input$n` */
@@ -135,4 +135,4 @@ export interface InputClassifierConfig<Functions extends InputClassifierFunction
135
135
  * For the scope escape analysis, pass on the full, non-reduced DFG as `fullDfg`, and the packages attached in the
136
136
  * program as `packages` so that bare calls only match the entries of packages that are actually in scope.
137
137
  */
138
- export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<string>, environment?: REnvironmentInformation): InputSources;
138
+ export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<BrandedNamespace>, environment?: REnvironmentInformation): InputSources;
@@ -819,7 +819,7 @@ function isBoundAsLinkedObject(node, obj, idMap) {
819
819
  return true;
820
820
  }
821
821
  for (const fn of enclosingFunctions(node, idMap)) {
822
- const params = new Set(fn.parameters.map(p => p.name.content));
822
+ const params = new Set(fn.parameters.map(p => identifier_1.Identifier.getName(p.name.content)));
823
823
  if (params.has(obj.name)) {
824
824
  return obj.withParams.every(p => params.has(p));
825
825
  }
@@ -45,7 +45,10 @@ async function executeLinterQuery({ analyzer }, queries) {
45
45
  results.results[ruleName] = { error: new Error(`skipped due to resource pressure (gas: critical), see ${gas_1.GasWikiRef}`) };
46
46
  continue;
47
47
  }
48
- results.results[ruleName] = await (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
48
+ /* the first rule may be the one to compute the graph, the others share the walks for call targets in it */
49
+ const run = () => (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
50
+ const graph = analyzer.peekDataflow()?.graph;
51
+ results.results[ruleName] = await (graph === undefined ? run() : graph.sharingTargetWalks(run));
49
52
  }
50
53
  /* rendered here, not when printing, so an api client gets it too */
51
54
  const format = queries.map(q => q.format).find(assert_1.isNotUndefined);
@@ -8,7 +8,7 @@ import { type ConfiguredLintingRule, LintingResultCertainty } from '../../../lin
8
8
  import { type OutputFormatter } from '../../../util/text/ansi';
9
9
  import type { FlowrConfig } from '../../../config';
10
10
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
11
- import type { CommandCompletions } from '../../../cli/repl/core';
11
+ import type { CommandCompletions } from '../../../cli/repl/completion';
12
12
  import { type LintResultsByRule, LinterOutputFormat } from '../../../linter/linter-output';
13
13
  export interface LinterQuery extends BaseQueryFormat {
14
14
  readonly type: 'linter';
@@ -39,7 +39,7 @@ export declare const LinterQueryDefinition: {
39
39
  readonly completer: typeof linterQueryCompleter;
40
40
  readonly fromLine: typeof linterQueryLineParser;
41
41
  readonly syntax: "@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>";
42
- readonly schema: Joi.ObjectSchema<any>;
42
+ readonly schema: Joi.ObjectSchema;
43
43
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly import("../../query").Query[], certainty: LintingResultCertainty | undefined) => ((string & {
44
44
  __brand?: "node-id";
45
45
  }) | (number & {
@@ -46,7 +46,8 @@ function linterQueryLineParser(output, line, _config) {
46
46
  let tags = undefined;
47
47
  const rest = [...line];
48
48
  while (rest.length > 0 && [rulesPrefix, formatPrefix, tagsPrefix].some(p => rest[0].startsWith(p))) {
49
- const argument = rest.shift();
49
+ const argument = rest[0];
50
+ rest.shift();
50
51
  if (argument.startsWith(formatPrefix)) {
51
52
  format = formatFromInput(output, argument);
52
53
  continue;
@@ -104,6 +105,7 @@ function linterQueryCompleter(line, startingNewArg, _config) {
104
105
  retriever_1.fileProtocol
105
106
  ] };
106
107
  }
108
+ let linterQuerySchema;
107
109
  exports.LinterQueryDefinition = {
108
110
  title: 'Linter Query',
109
111
  executor: linter_query_executor_1.executeLinterQuery,
@@ -146,15 +148,18 @@ exports.LinterQueryDefinition = {
146
148
  completer: linterQueryCompleter,
147
149
  fromLine: linterQueryLineParser,
148
150
  syntax: '@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>',
149
- schema: joi_1.default.object({
150
- type: joi_1.default.string().valid('linter').required().description('The type of the query.'),
151
- format: joi_1.default.string().valid(...Object.values(linter_output_1.LinterOutputFormat)).optional().description('Print the findings in a machine-readable format instead of the human-readable summary.'),
152
- rules: joi_1.default.array().items(joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)), joi_1.default.object({
153
- name: joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)).required(),
154
- config: joi_1.default.object()
155
- })).description('The rules to lint for. If unset, all rules will be included.'),
156
- tags: joi_1.default.array().items(joi_1.default.string().valid(...Object.values(linter_tags_1.LintingRuleTag))).optional().description('Lint for every rule carrying one of these tags, e.g. cmd-check for the R CMD check rules.')
157
- }).description('The linter query lints for the given set of rules and returns the result.'),
151
+ /* built on first use, as the rules are not yet known while this module loads */
152
+ get schema() {
153
+ return linterQuerySchema ??= joi_1.default.object({
154
+ type: joi_1.default.string().valid('linter').required().description('The type of the query.'),
155
+ format: joi_1.default.string().valid(...Object.values(linter_output_1.LinterOutputFormat)).optional().description('Print the findings in a machine-readable format instead of the human-readable summary.'),
156
+ rules: joi_1.default.array().items(joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)), joi_1.default.object({
157
+ name: joi_1.default.string().valid(...Object.keys(linter_rules_1.LintingRules)).required(),
158
+ config: joi_1.default.object()
159
+ })).description('The rules to lint for. If unset, all rules will be included.'),
160
+ tags: joi_1.default.array().items(joi_1.default.string().valid(...Object.values(linter_tags_1.LintingRuleTag))).optional().description('Lint for every rule carrying one of these tags, e.g. cmd-check for the R CMD check rules.')
161
+ }).description('The linter query lints for the given set of rules and returns the result.');
162
+ },
158
163
  flattenInvolvedNodes: (queryResults, _queries, certainty) => {
159
164
  const out = queryResults;
160
165
  return Object.values(out.results).flatMap(v => {
@@ -169,7 +174,7 @@ exports.LinterQueryDefinition = {
169
174
  /** cap on findings shown per certainty before collapsing to a `+N more` line; the full set is in `:query*` JSON */
170
175
  const MaxFindingsShown = 10;
171
176
  function addLintingRuleResult(ruleName, results, result, formatter) {
172
- const rule = linter_rules_1.LintingRules[ruleName];
177
+ const rule = (0, linter_rules_1.getLintingRule)(ruleName);
173
178
  const header = `${(0, ansi_1.bold)(rule.info.name, formatter)} (${ruleName})`;
174
179
  if (linter_format_1.LintingResults.isError(results)) {
175
180
  result.push(` ╰ ${header}:`);
@@ -20,6 +20,7 @@ declare function originQueryLineParser(output: ReplOutput, line: readonly string
20
20
  export declare const OriginQueryDefinition: {
21
21
  readonly title: "Origin Query";
22
22
  readonly executor: typeof executeOriginQuery;
23
+ readonly perQueryResults: true;
23
24
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
24
25
  readonly fromLine: typeof originQueryLineParser;
25
26
  readonly completer: typeof criteriaQueryCompleter;
@@ -25,6 +25,7 @@ function originQueryLineParser(output, line, _config) {
25
25
  exports.OriginQueryDefinition = {
26
26
  title: 'Origin Query',
27
27
  executor: origin_query_executor_1.executeOriginQuery,
28
+ perQueryResults: true,
28
29
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
29
30
  const out = queryResults;
30
31
  result.push((0, query_print_1.queryHeader)('origin', formatter, out['.meta'].timing));
@@ -1,3 +1,4 @@
1
+ import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
3
  import { executeProjectQuery } from './project-query-executor';
3
4
  import Joi from 'joi';
@@ -29,7 +30,7 @@ export interface ProjectDependencyStats {
29
30
  readonly covered: number;
30
31
  /** The first few runtime dependencies with the version the signature database resolved them to, if any. */
31
32
  readonly first: {
32
- name: string;
33
+ name: BrandedNamespace;
33
34
  base: boolean;
34
35
  dbVersion?: string;
35
36
  }[];
@@ -25,6 +25,7 @@ export declare function fdefBoundaryParser(argument: string): boolean;
25
25
  export declare const ProvenanceQueryDefinition: {
26
26
  readonly title: "Provenance Query";
27
27
  readonly executor: typeof executeProvenanceQuery;
28
+ readonly perQueryResults: true;
28
29
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
29
30
  readonly fromLine: (output: import("../../../cli/repl/commands/repl-main").ReplOutput, line: readonly string[], _config: import("../../..").FlowrConfig) => import("../../query").ParsedQueryLine<"provenance">;
30
31
  readonly completer: typeof criteriaQueryCompleter;
@@ -21,6 +21,7 @@ function fdefBoundaryParser(argument) {
21
21
  exports.ProvenanceQueryDefinition = {
22
22
  title: 'Provenance Query',
23
23
  executor: provenance_query_executor_1.executeProvenanceQuery,
24
+ perQueryResults: true,
24
25
  asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
25
26
  const out = queryResults;
26
27
  const df = await analyzer.dataflow();
@@ -21,6 +21,7 @@ declare function resolveValueLineParser(output: ReplOutput, line: readonly strin
21
21
  export declare const ResolveValueQueryDefinition: {
22
22
  readonly title: "Resolve Value Query";
23
23
  readonly executor: typeof executeResolveValueQuery;
24
+ readonly perQueryResults: true;
24
25
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
25
26
  readonly fromLine: typeof resolveValueLineParser;
26
27
  readonly completer: typeof criteriaQueryCompleter;
@@ -29,6 +29,7 @@ function resolveValueLineParser(output, line, _config) {
29
29
  exports.ResolveValueQueryDefinition = {
30
30
  title: 'Resolve Value Query',
31
31
  executor: resolve_value_query_executor_1.executeResolveValueQuery,
32
+ perQueryResults: true,
32
33
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
33
34
  const out = queryResults;
34
35
  if (out === undefined || typeof out !== 'object' || !('.meta' in out)) {
@@ -2,24 +2,27 @@ import type { BasicQueryData } from '../../base-query-format';
2
2
  import type { SignatureQuery, SignatureQueryResult, SignaturePackageView, SignatureFunctionView } from './signature-query-format';
3
3
  import { type PackageSignatureSource } from '../../../project/sigdb/reader';
4
4
  import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
5
- import type { CommandCompletions } from '../../../cli/repl/core';
5
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
6
+ import type { CommandCompletions } from '../../../cli/repl/completion';
6
7
  import { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl } from '../../../util/r-package-urls';
7
8
  export { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl };
9
+ /** where a package's documentation and sources live */
10
+ type DocOrigin = {
11
+ readonly base: boolean;
12
+ readonly cran: boolean;
13
+ };
8
14
  /**
9
15
  * Best-effort documentation link: R's own manual for a base package, rdrr.io's `/cran/<pkg>/man/<fn>` for CRAN.
10
16
  * Base R skips rdrr.io since it serves an older release, so anything R has gained since is a dead link there.
11
17
  */
12
- export declare function helpPageUrl(pkg: string, fn: string, opts: {
13
- base: boolean;
14
- cran: boolean;
15
- }): string | undefined;
18
+ export declare function helpPageUrl(pkg: BrandedNamespace, fn: BrandedIdentifier, opts: DocOrigin): string | undefined;
16
19
  /**
17
20
  * The detailed view of a single function within a package: signature, properties, definition location, call
18
21
  * graph, and for a CRAN package a deep link into the read-only mirror; `version` defaults to the source's latest.
19
22
  */
20
- export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: string, fnName: string, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
23
+ export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: BrandedNamespace, fnName: BrandedIdentifier, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
21
24
  /** the full view of a package: version, kind, export breakdown, dependencies, and every function's view */
22
- export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: string, resolved?: string): SignaturePackageView | undefined;
25
+ export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: BrandedNamespace, resolved?: string): SignaturePackageView | undefined;
23
26
  /**
24
27
  * Tab-completer for `:query \@signature` / `:signature query`: package names in the first position, a package's
25
28
  * function names in the second (and after `pkg::`). Version specs and flags are left alone. Enumerating functions