@eagleoutice/flowr 2.14.4 → 2.15.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 (381) hide show
  1. package/README.md +76 -63
  2. package/abstract-interpretation/absint-inference.d.ts +347 -0
  3. package/abstract-interpretation/{absint-visitor.js → absint-inference.js} +327 -97
  4. package/abstract-interpretation/abstract-semantics.d.ts +246 -0
  5. package/abstract-interpretation/abstract-semantics.js +3 -0
  6. package/abstract-interpretation/data-frame/{mappers/arguments.d.ts → arguments.d.ts} +18 -16
  7. package/abstract-interpretation/data-frame/{mappers/arguments.js → arguments.js} +20 -21
  8. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +52 -0
  9. package/abstract-interpretation/data-frame/dataframe-semantics.js +1656 -0
  10. package/abstract-interpretation/data-frame/resolve-args.js +4 -4
  11. package/abstract-interpretation/data-frame/semantics.d.ts +15 -21
  12. package/abstract-interpretation/data-frame/semantics.js +27 -29
  13. package/abstract-interpretation/data-frame/shape-inference.d.ts +28 -24
  14. package/abstract-interpretation/data-frame/shape-inference.js +14 -79
  15. package/abstract-interpretation/domains/interval-domain.d.ts +5 -1
  16. package/abstract-interpretation/domains/interval-domain.js +25 -33
  17. package/abstract-interpretation/domains/multi-value-state-domain.d.ts +6 -3
  18. package/abstract-interpretation/domains/multi-value-state-domain.js +24 -4
  19. package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -6
  20. package/abstract-interpretation/domains/partial-product-domain.js +26 -43
  21. package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -6
  22. package/abstract-interpretation/domains/positive-interval-domain.js +3 -29
  23. package/abstract-interpretation/domains/product-domain.d.ts +1 -1
  24. package/abstract-interpretation/domains/set-range-domain.d.ts +6 -0
  25. package/abstract-interpretation/domains/set-range-domain.js +29 -62
  26. package/abstract-interpretation/domains/state-abstract-domain.d.ts +9 -2
  27. package/abstract-interpretation/domains/state-abstract-domain.js +26 -37
  28. package/abstract-interpretation/domains/{state-domain-like.d.ts → state-domain.d.ts} +10 -6
  29. package/abstract-interpretation/domains/{state-domain-like.js → state-domain.js} +1 -1
  30. package/abstract-interpretation/value-semantics.d.ts +113 -0
  31. package/abstract-interpretation/value-semantics.js +115 -0
  32. package/benchmark/slicer.js +12 -6
  33. package/benchmark/stats/feature-counts.d.ts +2 -1
  34. package/benchmark/stats/feature-counts.js +25 -1
  35. package/benchmark/stats/stats.d.ts +4 -0
  36. package/benchmark/summarizer/second-phase/graph.js +7 -0
  37. package/cli/repl/commands/repl-parse.js +11 -22
  38. package/cli/repl/parser/slice-query-parser.d.ts +2 -0
  39. package/cli/repl/parser/slice-query-parser.js +1 -0
  40. package/config.d.ts +30 -205
  41. package/config.js +37 -3
  42. package/control-flow/cfg-properties.d.ts +5 -0
  43. package/control-flow/cfg-properties.js +25 -7
  44. package/control-flow/control-flow-graph.d.ts +11 -37
  45. package/control-flow/control-flow-graph.js +33 -77
  46. package/control-flow/semantic-cfg-guided-visitor.d.ts +63 -320
  47. package/control-flow/semantic-cfg-guided-visitor.js +65 -320
  48. package/dataflow/environments/built-in-config.d.ts +2 -0
  49. package/dataflow/environments/built-in-proc-name.d.ts +4 -0
  50. package/dataflow/environments/built-in-proc-name.js +4 -0
  51. package/dataflow/environments/built-in-props.d.ts +192 -82
  52. package/dataflow/environments/built-in-props.js +336 -106
  53. package/dataflow/environments/built-in.d.ts +21 -9
  54. package/dataflow/environments/built-in.js +43 -12
  55. package/dataflow/environments/default-builtin-config.d.ts +3219 -313
  56. package/dataflow/environments/default-builtin-config.js +803 -1012
  57. package/dataflow/environments/environment.d.ts +26 -49
  58. package/dataflow/environments/environment.js +34 -47
  59. package/dataflow/environments/group-generics.d.ts +11 -2
  60. package/dataflow/environments/group-generics.js +22 -3
  61. package/dataflow/environments/identifier.d.ts +106 -6
  62. package/dataflow/environments/identifier.js +19 -1
  63. package/dataflow/environments/query-fn-props.d.ts +16 -8
  64. package/dataflow/environments/query-fn-props.js +45 -21
  65. package/dataflow/environments/resolve-by-name.js +9 -2
  66. package/dataflow/environments/scoping.d.ts +5 -0
  67. package/dataflow/environments/scoping.js +11 -0
  68. package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
  69. package/dataflow/eval/resolve/alias-tracking.js +20 -2
  70. package/dataflow/eval/resolve/resolve-numbers.d.ts +182 -7
  71. package/dataflow/eval/resolve/resolve-numbers.js +44 -9
  72. package/dataflow/eval/resolve/resolve-strings.d.ts +79 -2
  73. package/dataflow/eval/resolve/resolve-strings.js +16 -7
  74. package/dataflow/eval/resolve/resolve.d.ts +5 -22
  75. package/dataflow/eval/resolve/resolve.js +24 -34
  76. package/dataflow/eval/values/general.d.ts +7 -1
  77. package/dataflow/eval/values/general.js +17 -3
  78. package/dataflow/eval/values/string/string-constants.d.ts +16 -15
  79. package/dataflow/eval/values/string/string-constants.js +59 -27
  80. package/dataflow/extractor.d.ts +2 -1
  81. package/dataflow/extractor.js +16 -4
  82. package/dataflow/fn/argument-roles.d.ts +35 -0
  83. package/dataflow/fn/argument-roles.js +252 -0
  84. package/dataflow/fn/class-declaration.d.ts +148 -0
  85. package/dataflow/fn/class-declaration.js +317 -0
  86. package/dataflow/fn/condition-handlers.d.ts +5 -0
  87. package/dataflow/fn/condition-handlers.js +13 -0
  88. package/dataflow/fn/exceptions-of-function.d.ts +21 -7
  89. package/dataflow/fn/exceptions-of-function.js +74 -43
  90. package/dataflow/fn/frame-reflection.d.ts +46 -0
  91. package/dataflow/fn/frame-reflection.js +169 -0
  92. package/dataflow/fn/function-props.d.ts +32 -0
  93. package/dataflow/fn/function-props.js +160 -0
  94. package/dataflow/fn/higher-order-function.d.ts +23 -5
  95. package/dataflow/fn/higher-order-function.js +64 -18
  96. package/dataflow/fn/strict-function.d.ts +24 -2
  97. package/dataflow/fn/strict-function.js +49 -19
  98. package/dataflow/graph/call-graph.js +10 -2
  99. package/dataflow/graph/df-helper.d.ts +1 -12
  100. package/dataflow/graph/df-helper.js +2 -19
  101. package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
  102. package/dataflow/graph/diff-dataflow-graph.js +2 -2
  103. package/dataflow/graph/graph.d.ts +39 -188
  104. package/dataflow/graph/graph.js +46 -163
  105. package/dataflow/graph/match-args.d.ts +34 -2
  106. package/dataflow/graph/match-args.js +45 -12
  107. package/dataflow/graph/vertex.d.ts +8 -0
  108. package/dataflow/info.d.ts +7 -5
  109. package/dataflow/info.js +1 -5
  110. package/dataflow/internal/control-flow.js +20 -17
  111. package/dataflow/internal/linker.d.ts +8 -37
  112. package/dataflow/internal/linker.js +22 -55
  113. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -2
  114. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -8
  115. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -4
  116. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +8 -14
  117. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +43 -50
  118. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +4 -1
  119. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +5 -2
  120. package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.d.ts +23 -0
  121. package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.js +24 -0
  122. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +2 -2
  123. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -1
  124. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +0 -4
  125. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +73 -27
  126. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -11
  127. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +131 -92
  128. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +17 -12
  129. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +187 -99
  130. package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +4 -0
  131. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -0
  132. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +2 -3
  133. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +4 -3
  134. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -1
  135. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -2
  136. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +0 -1
  137. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -1
  138. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +31 -0
  139. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +101 -0
  140. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +2 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +7 -0
  142. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +23 -21
  143. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +1 -2
  144. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +2 -2
  145. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +22 -1
  146. package/dataflow/internal/process/functions/call/common.d.ts +4 -6
  147. package/dataflow/internal/process/functions/call/common.js +2 -2
  148. package/dataflow/internal/process/functions/call/deferred.d.ts +1 -1
  149. package/dataflow/internal/process/functions/call/deferred.js +2 -2
  150. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +5 -3
  151. package/dataflow/internal/process/functions/call/known-call-handling.js +6 -4
  152. package/dataflow/internal/process/functions/call/named-call-handling.js +19 -13
  153. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -2
  154. package/dataflow/internal/process/functions/call/quoted.js +144 -28
  155. package/dataflow/origin/dfg-get-origin.js +23 -10
  156. package/dataflow/processor.d.ts +2 -1
  157. package/dataflow/processor.js +6 -0
  158. package/documentation/data/interface/doc-writing-code.js +2 -0
  159. package/documentation/doc-util/doc-search.js +1 -1
  160. package/documentation/wiki-absint.d.ts +11 -14
  161. package/documentation/wiki-absint.js +73 -59
  162. package/documentation/wiki-core.js +64 -24
  163. package/documentation/wiki-linter.js +1 -0
  164. package/documentation/wiki-query.js +82 -264
  165. package/documentation/wiki-signature-database.js +17 -5
  166. package/gas.d.ts +91 -47
  167. package/gas.js +97 -13
  168. package/index.d.ts +31 -0
  169. package/index.js +52 -0
  170. package/linter/linter-rules.d.ts +87 -23
  171. package/linter/linter-rules.js +3 -1
  172. package/linter/rules/absolute-path.d.ts +1 -1
  173. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  174. package/linter/rules/dataframe-access-validation.js +10 -8
  175. package/linter/rules/dead-code.d.ts +1 -1
  176. package/linter/rules/deprecated-functions.js +14 -5
  177. package/linter/rules/file-path-validity.d.ts +1 -1
  178. package/linter/rules/naming-convention.d.ts +1 -1
  179. package/linter/rules/naming-convention.js +13 -2
  180. package/linter/rules/network-functions.d.ts +10 -5
  181. package/linter/rules/network-functions.js +48 -36
  182. package/linter/rules/no-leaked-credentials.d.ts +1 -1
  183. package/linter/rules/problematic-inputs.d.ts +1 -1
  184. package/linter/rules/problematic-inputs.js +1 -1
  185. package/linter/rules/seeded-randomness.d.ts +3 -2
  186. package/linter/rules/seeded-randomness.js +7 -3
  187. package/linter/rules/software-has-license.d.ts +1 -1
  188. package/linter/rules/software-has-tests.d.ts +1 -1
  189. package/linter/rules/stop-with-call-arg.d.ts +1 -1
  190. package/linter/rules/syntactically-valid.d.ts +1 -1
  191. package/linter/rules/unclosed-connection.d.ts +3 -3
  192. package/linter/rules/unclosed-connection.js +3 -4
  193. package/linter/rules/undefined-symbol.d.ts +1 -1
  194. package/linter/rules/unescaped-arguments.d.ts +161 -0
  195. package/linter/rules/unescaped-arguments.js +293 -0
  196. package/linter/rules/unused-definition.d.ts +1 -1
  197. package/linter/rules/unused-definition.js +49 -4
  198. package/linter/rules/unused-import.d.ts +1 -1
  199. package/linter/rules/useless-loop.d.ts +1 -1
  200. package/package.json +3 -198
  201. package/project/context/flowr-analyzer-environment-context.d.ts +12 -1
  202. package/project/context/flowr-analyzer-environment-context.js +33 -1
  203. package/project/context/flowr-analyzer-files-context.d.ts +24 -1
  204. package/project/context/flowr-analyzer-files-context.js +42 -21
  205. package/project/context/flowr-analyzer-functions-context.d.ts +8 -0
  206. package/project/context/flowr-analyzer-functions-context.js +2 -0
  207. package/project/context/flowr-analyzer-gas-context.d.ts +9 -1
  208. package/project/context/flowr-analyzer-gas-context.js +21 -0
  209. package/project/context/flowr-file.d.ts +16 -1
  210. package/project/context/flowr-file.js +26 -2
  211. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +19 -20
  212. package/project/plugins/file-plugins/files/flowr-description-file.js +55 -41
  213. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +9 -4
  214. package/project/plugins/file-plugins/files/flowr-jupyter-file.js +11 -3
  215. package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +6 -9
  216. package/project/plugins/file-plugins/files/flowr-manifest-files.js +5 -21
  217. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +11 -12
  218. package/project/plugins/file-plugins/files/flowr-namespace-file.js +48 -61
  219. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +3 -12
  220. package/project/plugins/file-plugins/files/flowr-news-file.js +2 -19
  221. package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +145 -0
  222. package/project/plugins/file-plugins/files/flowr-rd-file.js +676 -0
  223. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +122 -422
  224. package/project/plugins/file-plugins/files/flowr-rda-file.js +517 -1005
  225. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +8 -2
  226. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +10 -1
  227. package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +7 -2
  228. package/project/plugins/file-plugins/files/flowr-sweave-file.js +9 -1
  229. package/project/plugins/file-plugins/files/flowr-sysdata-file.d.ts +17 -0
  230. package/project/plugins/file-plugins/files/flowr-sysdata-file.js +40 -0
  231. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -0
  232. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +3 -1
  233. package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.d.ts +58 -0
  234. package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.js +95 -0
  235. package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.d.ts +23 -0
  236. package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.js +33 -0
  237. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +33 -72
  238. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +17 -15
  239. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +20 -37
  240. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +29 -53
  241. package/project/plugins/package-version-plugins/package.js +2 -1
  242. package/project/plugins/plugin-registry.d.ts +3 -1
  243. package/project/plugins/plugin-registry.js +11 -0
  244. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +20 -4
  245. package/project/sigdb/build.d.ts +9 -15
  246. package/project/sigdb/build.js +63 -42
  247. package/project/sigdb/decode.d.ts +10 -4
  248. package/project/sigdb/decode.js +60 -21
  249. package/project/sigdb/memory-source.d.ts +4 -0
  250. package/project/sigdb/memory-source.js +8 -0
  251. package/project/sigdb/reader.d.ts +50 -100
  252. package/project/sigdb/reader.js +84 -105
  253. package/project/sigdb/schema.d.ts +90 -26
  254. package/project/sigdb/schema.js +12 -6
  255. package/queries/base-query-format.d.ts +7 -0
  256. package/queries/base-query-format.js +29 -0
  257. package/queries/catalog/absint-query/absint-query-executor.js +8 -6
  258. package/queries/catalog/absint-query/absint-query-format.d.ts +20 -9
  259. package/queries/catalog/absint-query/absint-query-format.js +32 -19
  260. package/queries/catalog/call-context-query/call-context-query-executor.js +3 -3
  261. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -1
  262. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  263. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  264. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
  265. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  266. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  267. package/queries/catalog/dependencies-query/dependencies-query-executor.js +33 -7
  268. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  269. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +2 -2
  270. package/queries/catalog/dependencies-query/function-info/derived-functions.js +14 -4
  271. package/queries/catalog/dependencies-query/function-info/read-functions.js +7 -121
  272. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +1 -1
  273. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +2 -2
  274. package/queries/catalog/dependencies-query/function-info/visualize-functions.js +4 -46
  275. package/queries/catalog/dependencies-query/function-info/write-functions.js +3 -76
  276. package/queries/catalog/dependencies-query/implicit-echo.js +2 -2
  277. package/queries/catalog/dependencies-query/link-devices.d.ts +2 -2
  278. package/queries/catalog/dependencies-query/link-devices.js +6 -7
  279. package/queries/catalog/dice-query/dice-query-executor.js +1 -1
  280. package/queries/catalog/dice-query/dice-query-format.d.ts +1 -1
  281. package/queries/catalog/does-call-query/does-call-query-executor.js +4 -0
  282. package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -1
  283. package/queries/catalog/files-query/files-query-format.d.ts +1 -1
  284. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +1 -1
  285. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  286. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  287. package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -1
  288. package/queries/catalog/input-sources-query/input-source-functions.js +2 -2
  289. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -17
  290. package/queries/catalog/input-sources-query/input-sources-query-format.js +11 -27
  291. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
  292. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +3 -8
  293. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -11
  294. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +4 -0
  295. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +60 -0
  296. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +35 -0
  297. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +63 -0
  298. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -6
  299. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +3 -8
  300. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -11
  301. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +3 -8
  302. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -12
  303. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  304. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  305. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  306. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  307. package/queries/catalog/provenance-query/provenance-query-format.d.ts +3 -8
  308. package/queries/catalog/provenance-query/provenance-query-format.js +2 -14
  309. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  310. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  311. package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -10
  312. package/queries/catalog/signature-query/signature-query-executor.js +87 -93
  313. package/queries/catalog/signature-query/signature-query-format.d.ts +20 -5
  314. package/queries/catalog/signature-query/signature-query-format.js +16 -4
  315. package/queries/catalog/signature-query/signature-query-render.js +18 -4
  316. package/queries/catalog/slice-query-options.d.ts +14 -0
  317. package/queries/catalog/slice-query-options.js +15 -0
  318. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +2 -1
  319. package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -2
  320. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -3
  321. package/queries/catalog/static-slice-query/static-slice-query-format.js +7 -5
  322. package/queries/query-function-filter.d.ts +8 -3
  323. package/queries/query-function-filter.js +16 -6
  324. package/queries/query.d.ts +38 -38
  325. package/queries/query.js +30 -4
  326. package/r-bridge/lang-4.x/ast/model/model.d.ts +5 -0
  327. package/r-bridge/lang-4.x/ast/model/model.js +14 -0
  328. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  329. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +1 -0
  330. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  331. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  332. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  333. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  334. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  335. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
  336. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  337. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  338. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  339. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  340. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  341. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
  342. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  343. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  344. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  345. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  346. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  347. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  348. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  349. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +17 -9
  350. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +35 -27
  351. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -22
  352. package/reconstruct/reconstruct.d.ts +9 -20
  353. package/reconstruct/reconstruct.js +66 -28
  354. package/search/flowr-search-filters.d.ts +7 -6
  355. package/search/flowr-search-filters.js +6 -4
  356. package/search/search-executor/search-enrichers.d.ts +10 -10
  357. package/search/search-executor/search-enrichers.js +32 -3
  358. package/search/search-executor/search-transformer.js +15 -23
  359. package/slicing/criterion/parse.js +2 -12
  360. package/slicing/static/slice-call.js +1 -8
  361. package/slicing/static/static-slicer.js +1 -1
  362. package/util/collections/bimap.js +14 -6
  363. package/util/objects.js +16 -17
  364. package/util/r-value.d.ts +5 -4
  365. package/util/record.d.ts +38 -3
  366. package/util/record.js +48 -1
  367. package/util/simple-df/dfg-ascii.js +1 -1
  368. package/util/text/strings.d.ts +5 -0
  369. package/util/text/strings.js +10 -0
  370. package/util/version.js +2 -2
  371. package/abstract-interpretation/absint-visitor.d.ts +0 -223
  372. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -19
  373. package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -151
  374. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +0 -287
  375. package/abstract-interpretation/data-frame/mappers/function-mapper.js +0 -1096
  376. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -15
  377. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -207
  378. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +0 -6
  379. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +0 -25
  380. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +0 -31
  381. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +0 -56
@@ -4,6 +4,7 @@ exports.ReadFunctions = void 0;
4
4
  const built_in_props_1 = require("../../../../dataflow/environments/built-in-props");
5
5
  const derived_functions_1 = require("./derived-functions");
6
6
  const other_path_functions_1 = require("./other-path-functions");
7
+ const source_functions_1 = require("./source-functions");
7
8
  const ReadFunctionsWithMore = [
8
9
  { package: 'base', name: 'parse', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
9
10
  { package: 'utils', name: 'read.table', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
@@ -11,8 +12,6 @@ const ReadFunctionsWithMore = [
11
12
  { package: 'utils', name: 'read.csv2', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
12
13
  { package: 'utils', name: 'read.delim', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
13
14
  { package: 'utils', name: 'read.delim2', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
14
- { package: 'base', name: 'read.dcf', argIdx: 0, argName: 'file', resolveValue: true },
15
- { package: 'utils', name: 'read.fwf', argIdx: 0, argName: 'file', resolveValue: true },
16
15
  { package: 'base', name: 'file', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
17
16
  { package: 'base', name: 'url', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
18
17
  { package: 'base', name: 'gzfile', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
@@ -22,82 +21,15 @@ const ReadFunctionsWithMore = [
22
21
  { package: 'base', name: 'fifo', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
23
22
  { package: 'base', name: 'unz', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
24
23
  { package: 'base', name: 'matrix', argIdx: 0, argName: 'data', resolveValue: true },
25
- /* `data(mtcars)` names the dataset as a symbol (or as a string with `character.only`), just like `library` */
26
24
  { package: 'utils', name: 'data', argIdx: 0, resolveValue: 'library', ignoreIf: 'arg-missing' },
27
- { package: 'base', name: 'readRenviron', argIdx: 0, argName: 'path', resolveValue: true },
28
- { package: 'readr', name: 'read_csv', argIdx: 0, argName: 'file', resolveValue: true },
29
- { package: 'readr', name: 'read_csv2', argIdx: 0, argName: 'file', resolveValue: true },
30
- { package: 'readr', name: 'read_lines', argIdx: 0, argName: 'file', resolveValue: true },
31
- { package: 'readr', name: 'read_delim', argIdx: 0, argName: 'file', resolveValue: true },
32
- { package: 'readr', name: 'read_fwf', argIdx: 0, argName: 'file', resolveValue: true },
33
- { package: 'readr', name: 'read_tsv', argIdx: 0, argName: 'file', resolveValue: true },
34
- { package: 'readr', name: 'read_table', argIdx: 0, argName: 'file', resolveValue: true },
35
- { package: 'readr', name: 'read_log', argIdx: 0, argName: 'file', resolveValue: true },
36
- { package: 'readr', name: 'read_lines_raw', argIdx: 0, argName: 'file', resolveValue: true },
37
- { package: 'readr', name: 'read_lines_chunked', argIdx: 0, argName: 'file', resolveValue: true },
38
- { package: 'readr', name: 'read_rds', argIdx: 0, argName: 'file', resolveValue: true },
39
25
  { package: 'readr', name: 'clipboard' },
40
- { package: 'xlsx', name: 'read.xlsx', argIdx: 0, argName: 'file', resolveValue: true },
41
- { package: 'xlsx', name: 'read.xlsx2', argIdx: 0, argName: 'file', resolveValue: true },
42
- { package: 'data.table', name: 'fread', argIdx: 0, argName: 'file', resolveValue: true },
43
- { package: 'haven', name: 'read_sas', argIdx: 0, argName: 'file', resolveValue: true },
44
- { package: 'haven', name: 'read_sav', argIdx: 0, argName: 'file', resolveValue: true },
45
- { package: 'haven', name: 'read_por', argIdx: 0, argName: 'file', resolveValue: true },
46
- { package: 'haven', name: 'read_dta', argIdx: 0, argName: 'file', resolveValue: true },
47
- { package: 'haven', name: 'read_xpt', argIdx: 0, argName: 'file', resolveValue: true },
48
- { package: 'feather', name: 'read_feather', argIdx: 0, argName: 'file', resolveValue: true },
49
- { package: 'foreign', name: 'read.arff', argIdx: 0, argName: 'file', resolveValue: true },
50
- { package: 'foreign', name: 'read.dbf', argIdx: 0, argName: 'file', resolveValue: true },
51
- { package: 'foreign', name: 'read.dta', argIdx: 0, argName: 'file', resolveValue: true },
52
- { package: 'foreign', name: 'read.epiinfo', argIdx: 0, argName: 'file', resolveValue: true },
53
- { package: 'foreign', name: 'read.mtp', argIdx: 0, argName: 'file', resolveValue: true },
54
- { package: 'foreign', name: 'read.octave', argIdx: 0, argName: 'file', resolveValue: true },
55
- { package: 'foreign', name: 'read.spss', argIdx: 0, argName: 'file', resolveValue: true },
56
- { package: 'foreign', name: 'read.ssd', argIdx: 0, argName: 'file', resolveValue: true },
57
- { package: 'foreign', name: 'read.systat', argIdx: 0, argName: 'file', resolveValue: true },
58
- { package: 'foreign', name: 'read.xport', argIdx: 0, argName: 'file', resolveValue: true },
59
- { package: 'car', name: 'Import', argIdx: 0, argName: 'file', resolveValue: true },
60
- { package: 'magick', name: 'image_read', argIdx: 0, argName: 'path', resolveValue: true },
61
- { package: 'magick', name: 'image_read_svg', argIdx: 0, argName: 'path', resolveValue: true },
62
- { package: 'magick', name: 'image_read_pdf', argIdx: 0, argName: 'path', resolveValue: true },
63
- { package: 'magick', name: 'image_read_video', argIdx: 0, argName: 'path', resolveValue: true },
64
- { package: 'LIM', name: 'Read', argIdx: 0, argName: 'file', resolveValue: true },
65
- { package: 'sourcetools', name: 'read', argIdx: 0, argName: 'path', resolveValue: true },
66
- { package: 'sourcetools', name: 'read_lines', argIdx: 0, argName: 'path', resolveValue: true },
67
- { package: 'sourcetools', name: 'read_bytes', argIdx: 0, argName: 'path', resolveValue: true },
68
- { package: 'sourcetools', name: 'read_lines_bytes', argIdx: 0, argName: 'path', resolveValue: true },
69
26
  { package: 'sourcetools', name: 'tokenize', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
70
- { package: 'sourcetools', name: 'tokenize_file', argIdx: 0, argName: 'path', resolveValue: true },
71
- { package: 'expss', name: 'read_spss', argIdx: 0, argName: 'file', resolveValue: true },
72
- { package: 'SimPhe', name: 'read.geno', argIdx: 0, argName: 'fname', resolveValue: true },
73
27
  { package: 'ape', name: 'read.tree', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
74
- { package: 'geomorph', name: 'readland.tps', argIdx: 0, argName: 'file', resolveValue: true },
75
- { package: 'readxl', name: 'read_excel', argIdx: 0, argName: 'path', resolveValue: true },
76
- { package: 'readxl', name: 'read_xls', argIdx: 0, argName: 'path', resolveValue: true },
77
- { package: 'readxl', name: 'read_xlsx', argIdx: 0, argName: 'path', resolveValue: true },
78
- { package: 'sf', name: 'read_sf', argIdx: 0, argName: 'dsn', resolveValue: true },
79
- { package: 'sf', name: 'st_read', argIdx: 0, argName: 'dsn', resolveValue: true },
80
- { package: 'rgdal', name: 'readOGR', argIdx: 0, argName: 'dsn', resolveValue: true },
81
- { package: 'rgdal', name: 'ogrInfo', argIdx: 0, argName: 'dsn', resolveValue: true },
82
- { package: 'rgdal', name: 'ogrFIDs', argIdx: 0, argName: 'dsn', resolveValue: true },
83
- { package: 'rgdal', name: 'OGRSpatialRef', argIdx: 0, argName: 'dsn', resolveValue: true },
84
- { package: 'rgdal', name: 'ogrListLayers', argIdx: 0, argName: 'dsn', resolveValue: true },
85
- { package: 'rgdal', name: 'readGDAL', argIdx: 0, argName: 'fname', resolveValue: true },
86
- { package: 'readstata13', name: 'read.dta13', argIdx: 0, argName: 'file', resolveValue: true },
87
- { package: 'arrow', name: 'read_parquet', argIdx: 0, argName: 'file', resolveValue: true },
88
- { package: 'maptools', name: 'readShapePoly', argIdx: 0, argName: 'fn', resolveValue: true },
89
- { package: 'XLConnect', name: 'readWorksheetFromFile', argIdx: 0, argName: 'file', resolveValue: true },
90
- { package: 'XLConnect', name: 'readNamedRegionFromFile', argIdx: 0, argName: 'file', resolveValue: true },
91
- { package: 'XLConnect', name: 'loadWorkbook', argIdx: 0, argName: 'filename', resolveValue: true },
92
- { package: 'DiagrammeR', name: 'import_graph', argIdx: 0, argName: 'graph_file', resolveValue: true },
93
- { package: 'DiagrammeR', name: 'open_graph', argIdx: 0, argName: 'file', resolveValue: true },
94
28
  { package: 'highcharter', name: 'download_map_data', argIdx: 0, argName: 'url', resolveValue: true, defaultValue: 'custom/world.js' },
95
29
  { name: 'read_html', argIdx: 0, argName: 'x', resolveValue: true },
96
30
  { package: 'rvest', name: 'read_html_live', argIdx: 0, argName: 'url', resolveValue: true },
97
- { package: 'stats', name: 'read.ftable', argIdx: 0, argName: 'file', resolveValue: true },
98
31
  { package: 'DBI', name: 'dbReadTable', argIdx: 1, argName: 'name', resolveValue: true },
99
32
  { package: 'DBI', name: 'dbReadTableArrow', argIdx: 1, argName: 'name', resolveValue: true },
100
- { package: 'jsonlite', name: 'read_json', argIdx: 0, argName: 'path', resolveValue: true },
101
33
  { package: 'rpolars', name: 'pl_read_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
102
34
  { package: 'rpolars', name: 'pl_read_csv', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
103
35
  { package: 'rpolars', name: 'pl_read_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
@@ -106,63 +38,17 @@ const ReadFunctionsWithMore = [
106
38
  { package: 'rpolars', name: 'pl_scan_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
107
39
  { package: 'rpolars', name: 'pl_scan_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
108
40
  { package: 'rpolars', name: 'pl_scan_parquet', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
109
- { package: 'rio', name: 'import', argIdx: 0, argName: 'file', resolveValue: true },
110
- { package: 'rio', name: 'import_list', argIdx: 0, argName: 'file', resolveValue: true },
111
- { package: 'openxlsx', name: 'read.xlsx', argIdx: 0, argName: 'xlsxFile', resolveValue: true },
112
- { package: 'openxlsx', name: 'loadWorkbook', argIdx: 0, argName: 'file', resolveValue: true },
113
- { package: 'readODS', name: 'read_ods', argIdx: 0, argName: 'path', resolveValue: true },
114
- { package: 'vroom', name: 'vroom', argIdx: 0, argName: 'file', resolveValue: true },
115
41
  { package: 'compiler', name: 'loadcmp', argIdx: 0, argName: 'file', resolveValue: true },
116
42
  { package: 'compiler', name: 'cmpfile', argIdx: 0, argName: 'infile', resolveValue: true },
117
- /* image / raster */
118
- { package: 'jpeg', name: 'readJPEG', argIdx: 0, argName: 'source', resolveValue: true },
119
- { package: 'png', name: 'readPNG', argIdx: 0, argName: 'source', resolveValue: true },
120
- { package: 'tiff', name: 'readTIFF', argIdx: 0, argName: 'source', resolveValue: true },
121
- { package: 'imager', name: 'load.image', argIdx: 0, argName: 'file', resolveValue: true },
122
- { package: 'imager', name: 'load.video', argIdx: 0, argName: 'file', resolveValue: true },
123
- { package: 'imager', name: 'load.dir', argIdx: 0, argName: 'path', resolveValue: true },
124
- { package: 'OpenImageR', name: 'readImage', argIdx: 0, argName: 'path', resolveValue: true },
125
- { package: 'EBImage', name: 'readImage', argIdx: 0, argName: 'files', resolveValue: true },
126
- /* audio / video */
127
- { package: 'av', name: 'av_video_images', argIdx: 0, argName: 'video', resolveValue: true },
128
- { package: 'av', name: 'read_audio_bin', argIdx: 0, argName: 'audio', resolveValue: true },
129
- { package: 'av', name: 'read_audio_fft', argIdx: 0, argName: 'audio', resolveValue: true },
130
- { package: 'tuneR', name: 'readWave', argIdx: 0, argName: 'filename', resolveValue: true },
131
- { package: 'tuneR', name: 'readMP3', argIdx: 0, argName: 'file', resolveValue: true },
132
- { package: 'tuneR', name: 'readMidi', argIdx: 0, argName: 'file', resolveValue: true },
133
- { package: 'seewave', name: 'read.audacity', argIdx: 0, argName: 'file', resolveValue: true },
134
- { package: 'audio', name: 'load.wave', argIdx: 0, argName: 'where', resolveValue: true },
135
- /* geospatial (no `raster::stack`: only the name is matched on and `utils::stack` shares it) */
136
- { package: 'terra', name: 'rast', argIdx: 0, argName: 'x', resolveValue: true },
137
- { package: 'terra', name: 'vect', argIdx: 0, argName: 'x', resolveValue: true },
138
- { package: 'raster', name: 'raster', argIdx: 0, argName: 'x', resolveValue: true },
139
- { package: 'raster', name: 'brick', argIdx: 0, argName: 'x', resolveValue: true },
140
- { package: 'raster', name: 'shapefile', argIdx: 0, argName: 'x', resolveValue: true },
141
- { package: 'stars', name: 'read_stars', argIdx: 0, argName: '.x', resolveValue: true },
142
- { package: 'stars', name: 'read_ncdf', argIdx: 0, argName: '.x', resolveValue: true },
143
- { package: 'maptools', name: 'readShapeLines', argIdx: 0, argName: 'fn', resolveValue: true },
144
- { package: 'maptools', name: 'readShapePoints', argIdx: 0, argName: 'fn', resolveValue: true },
145
- { package: 'maptools', name: 'readShapeSpatial', argIdx: 0, argName: 'fn', resolveValue: true },
146
- /* array / binary science formats */
147
- { package: 'ncdf4', name: 'nc_open', argIdx: 0, argName: 'filename', resolveValue: true },
148
- { package: 'RNetCDF', name: 'open.nc', argIdx: 0, argName: 'con', resolveValue: true },
149
- { package: 'R.matlab', name: 'readMat', argIdx: 0, argName: 'con', resolveValue: true },
150
- { package: 'rhdf5', name: 'h5read', argIdx: 0, argName: 'file', resolveValue: true },
151
- { package: 'rhdf5', name: 'h5ls', argIdx: 0, argName: 'file', resolveValue: true },
152
- { package: 'fst', name: 'read_fst', argIdx: 0, argName: 'path', resolveValue: true },
153
- { package: 'qs', name: 'qread', argIdx: 0, argName: 'file', resolveValue: true },
154
43
  { package: 'yaml', name: 'read_yaml', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
155
- /* phylogeny / sequence */
156
- { package: 'ape', name: 'read.nexus', argIdx: 0, argName: 'file', resolveValue: true },
157
- { package: 'ape', name: 'read.nexus.data', argIdx: 0, argName: 'file', resolveValue: true },
158
- { package: 'ape', name: 'read.dna', argIdx: 0, argName: 'file', resolveValue: true },
159
- { package: 'ape', name: 'read.FASTA', argIdx: 0, argName: 'file', resolveValue: true },
160
- { package: 'seqinr', name: 'read.fasta', argIdx: 0, argName: 'file', resolveValue: true },
161
- /* shinyjs - loads an external JavaScript file */
162
44
  { package: 'shinyjs', name: 'extendShinyjs', argIdx: 0, argName: 'script', resolveValue: true, ignoreIf: 'arg-missing' }
163
45
  ];
46
+ /* the built-in configuration leads: it is where flowR states what a call does, and the entries below are the
47
+ exceptions that need more than a resource argument. For a call naming no package the first entry able to
48
+ apply answers, so a name several packages export is read the way the configuration states it.
49
+ `source` reads a file too, but it is the `sourced` category that reports it, so it stays out of this one */
164
50
  exports.ReadFunctions = [
165
- ...ReadFunctionsWithMore,
166
- ...(0, derived_functions_1.functionInfosFromProps)(built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads, [...ReadFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions])
51
+ ...(0, derived_functions_1.functionInfosFromProps)([built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], [...ReadFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions, ...source_functions_1.SourceFunctions]),
52
+ ...ReadFunctionsWithMore
167
53
  ];
168
54
  //# sourceMappingURL=read-functions.js.map
@@ -1,7 +1,7 @@
1
1
  import type { FunctionInfo } from './function-info';
2
2
  import { BuiltInIndex } from '../../../../dataflow/environments/query-fn-props';
3
3
  /**
4
- * The statistical tests, read back from the {@link CallProp.Statistics} built-ins so the dependency query and
4
+ * The statistical tests, read back from the {@link SemanticCallTag.Statistics} built-ins so the dependency query and
5
5
  * the built-in configuration cannot disagree about them. Every one of them names the package it belongs to,
6
6
  * which is what keeps `stats::t.test` a test and drops a `t.test` of somebody else's package.
7
7
  * Label a built-in `Statistics` and it shows up here.
@@ -5,13 +5,13 @@ const identifier_1 = require("../../../../dataflow/environments/identifier");
5
5
  const built_in_props_1 = require("../../../../dataflow/environments/built-in-props");
6
6
  const query_fn_props_1 = require("../../../../dataflow/environments/query-fn-props");
7
7
  /**
8
- * The statistical tests, read back from the {@link CallProp.Statistics} built-ins so the dependency query and
8
+ * The statistical tests, read back from the {@link SemanticCallTag.Statistics} built-ins so the dependency query and
9
9
  * the built-in configuration cannot disagree about them. Every one of them names the package it belongs to,
10
10
  * which is what keeps `stats::t.test` a test and drops a `t.test` of somebody else's package.
11
11
  * Label a built-in `Statistics` and it shows up here.
12
12
  */
13
13
  function statisticsFunctions(index = query_fn_props_1.BuiltInIndex.default()) {
14
- return index.with(built_in_props_1.CallProp.Statistics).map(call => ({
14
+ return index.with(built_in_props_1.SemanticCallTag.Statistics).map(call => ({
15
15
  name: identifier_1.Identifier.getName(call),
16
16
  package: identifier_1.Identifier.getNamespace(call)
17
17
  }));
@@ -5,54 +5,12 @@ const default_builtin_config_1 = require("../../../../dataflow/environments/defa
5
5
  const LinkToPlotCreation = [
6
6
  { type: 'link-to-last-call', callName: default_builtin_config_1.PlotCreate }
7
7
  ];
8
- /**
9
- * The package that actually exports a plotting call that flowR groups with ggplot2's: a namespaced call is only
10
- * counted when it names the package the function belongs to, so `ggthemes::theme_wsj()` would otherwise be dropped.
11
- * A name several packages define (`theme_map` in both cowplot and ggthemes) is left out and matches either way.
12
- */
13
- const PlotFunctionsByPackage = {
14
- factoextra: ['fviz_cluster', 'fviz_dend', 'fviz_mca', 'fviz_mca_biplot', 'fviz_mca_ind', 'fviz_mca_var', 'fviz_pca',
15
- 'fviz_pca_biplot', 'fviz_pca_ind', 'fviz_pca_var', 'fviz_screeplot'],
16
- ggExtra: ['ggMarginal', 'removeGrid', 'removeGridX', 'removeGridY', 'rotateTextX'],
17
- survminer: ['ggsurvplot', 'ggsurvplot_add_all', 'theme_survminer'],
18
- cowplot: ['ggdraw'],
19
- forecast: ['ggseasonplot'],
20
- ggcorrplot: ['ggcorrplot'],
21
- ggdendro: ['ggdendrogram'],
22
- plotly: ['ggplotly'],
23
- gridExtra: ['grid.arrange'],
24
- ggmap: ['qmap'],
25
- ggpubr: ['gradient_color'],
26
- ggalt: ['geom_dumbbell', 'geom_encircle'],
27
- ggthemes: [
28
- 'scale_color_calc', 'scale_color_canva', 'scale_color_colorblind', 'scale_color_continuous_tableau',
29
- 'scale_color_economist', 'scale_color_excel', 'scale_color_excel_new', 'scale_color_few',
30
- 'scale_color_fivethirtyeight', 'scale_color_gdocs', 'scale_color_gradient2_tableau',
31
- 'scale_color_gradient_tableau', 'scale_color_hc', 'scale_color_pander', 'scale_color_ptol',
32
- 'scale_color_solarized', 'scale_color_stata', 'scale_color_tableau', 'scale_color_wsj', 'scale_colour_calc',
33
- 'scale_colour_canva', 'scale_colour_colorblind', 'scale_colour_economist', 'scale_colour_excel',
34
- 'scale_colour_excel_new', 'scale_colour_few', 'scale_colour_fivethirtyeight', 'scale_colour_gdocs',
35
- 'scale_colour_gradient2_tableau', 'scale_colour_gradient_tableau', 'scale_colour_hc', 'scale_colour_pander',
36
- 'scale_colour_ptol', 'scale_colour_solarized', 'scale_colour_stata', 'scale_colour_tableau', 'scale_colour_wsj',
37
- 'scale_fill_calc', 'scale_fill_canva', 'scale_fill_colorblind', 'scale_fill_continuous_tableau',
38
- 'scale_fill_economist', 'scale_fill_excel', 'scale_fill_excel_new', 'scale_fill_few',
39
- 'scale_fill_fivethirtyeight', 'scale_fill_gdocs', 'scale_fill_gradient2_tableau', 'scale_fill_gradient_tableau',
40
- 'scale_fill_hc', 'scale_fill_pander', 'scale_fill_ptol', 'scale_fill_solarized', 'scale_fill_stata',
41
- 'scale_fill_tableau', 'scale_fill_wsj', 'scale_linetype_stata', 'scale_shape_calc', 'scale_shape_circlefill',
42
- 'scale_shape_cleveland', 'scale_shape_few', 'scale_shape_stata', 'scale_shape_tableau', 'scale_shape_tremmel',
43
- 'theme_base', 'theme_calc', 'theme_clean', 'theme_economist', 'theme_economist_white', 'theme_excel',
44
- 'theme_excel_new', 'theme_few', 'theme_fivethirtyeight', 'theme_foundation', 'theme_gdocs', 'theme_hc',
45
- 'theme_igray', 'theme_pander', 'theme_par', 'theme_solarized', 'theme_solarized_2', 'theme_solid',
46
- 'theme_stata', 'theme_tufte', 'theme_wsj'
47
- ]
48
- };
49
- /** {@link PlotFunctionsByPackage} inverted: the owning package of a name, `ggplot2` unless another package claims it */
50
- const PlotFunctionOwner = new Map(Object.entries(PlotFunctionsByPackage).flatMap(([pkg, names]) => names.map(name => [name, pkg])));
51
- /** Names that several packages define, so pinning any of them would drop the calls to the others. */
52
- const AmbiguousPlotFunctions = new Set(['theme_map', 'wrap_by']);
53
8
  /** the {@link FunctionInfo} for a ggplot-style call, qualified with the package that really exports it */
54
9
  function ggStyle(name, linkTo) {
55
- const owner = AmbiguousPlotFunctions.has(name) ? undefined : PlotFunctionOwner.get(name) ?? 'ggplot2';
10
+ /* the configuration is what knows who exports these; more than one owner means pinning it would drop the
11
+ calls to the others (`theme_map` is cowplot's as well as ggthemes'), and none means it is ggplot2's own */
12
+ const owners = (0, default_builtin_config_1.plotFunctionOwners)(name);
13
+ const owner = owners.length === 1 ? owners[0] : owners.length === 0 ? 'ggplot2' : undefined;
56
14
  return { ...(owner ? { package: owner } : {}), name, ...(linkTo ? { linkTo } : {}) };
57
15
  }
58
16
  exports.VisualizeFunctions =
@@ -11,7 +11,6 @@ const OutputRedirects = [
11
11
  ];
12
12
  const WriteFunctionsWithMore = [
13
13
  { package: 'base', name: 'save.image', argIdx: 0, argName: 'file', resolveValue: true, defaultValue: '.RData' },
14
- { package: 'base', name: 'dump', argIdx: 1, argName: 'file', resolveValue: true },
15
14
  { package: 'utils', name: 'write.csv', argIdx: 1, argName: 'file', resolveValue: true },
16
15
  {
17
16
  package: 'base',
@@ -37,26 +36,6 @@ const WriteFunctionsWithMore = [
37
36
  { package: 'cli', name: 'cli_abort', linkTo: OutputRedirects, resolveValue: false },
38
37
  { package: 'base', name: 'file', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-read', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
39
38
  { package: 'base', name: 'url', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-read', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
40
- { package: 'readr', name: 'write_csv', argIdx: 1, argName: 'file', resolveValue: true },
41
- { package: 'readr', name: 'write_csv2', argIdx: 1, argName: 'file', resolveValue: true },
42
- { package: 'readr', name: 'write_delim', argIdx: 1, argName: 'file', resolveValue: true },
43
- { package: 'readr', name: 'write_excel_csv', argIdx: 1, argName: 'file', resolveValue: true },
44
- { package: 'readr', name: 'write_excel_csv2', argIdx: 1, argName: 'file', resolveValue: true },
45
- { package: 'readr', name: 'write_file', argIdx: 1, argName: 'file', resolveValue: true },
46
- { package: 'readr', name: 'write_tsv', argIdx: 1, argName: 'file', resolveValue: true },
47
- { package: 'readr', name: 'write_lines', argIdx: 1, argName: 'file', resolveValue: true },
48
- { package: 'readr', name: 'write_rds', argIdx: 1, argName: 'file', resolveValue: true },
49
- { package: 'haven', name: 'write_sas', argIdx: 1, argName: 'file', resolveValue: true },
50
- { package: 'haven', name: 'write_sav', argIdx: 1, argName: 'file', resolveValue: true },
51
- { package: 'haven', name: 'write_dta', argIdx: 1, argName: 'file', resolveValue: true },
52
- { package: 'haven', name: 'write_xpt', argIdx: 1, argName: 'file', resolveValue: true },
53
- { package: 'feather', name: 'write_feather', argIdx: 1, argName: 'file', resolveValue: true },
54
- { package: 'foreign', name: 'write.arff', argIdx: 1, argName: 'file', resolveValue: true },
55
- { package: 'foreign', name: 'write.dbf', argIdx: 1, argName: 'file', resolveValue: true },
56
- { package: 'foreign', name: 'write.dta', argIdx: 1, argName: 'file', resolveValue: true },
57
- { package: 'foreign', name: 'write.foreign', argIdx: 1, argName: 'file', resolveValue: true },
58
- { package: 'xlsx', name: 'write.xlsx', argIdx: 1, argName: 'file', resolveValue: true },
59
- { package: 'xlsx', name: 'write.xlsx2', argIdx: 1, argName: 'file', resolveValue: true },
60
39
  { package: 'grDevices', name: 'jpeg', argIdx: 0, argName: 'filename', resolveValue: true },
61
40
  { package: 'grDevices', name: 'png', argIdx: 0, argName: 'filename', resolveValue: true },
62
41
  { package: 'grDevices', name: 'windows', argIdx: 0, argName: 'file', resolveValue: true },
@@ -71,33 +50,15 @@ const WriteFunctionsWithMore = [
71
50
  { package: 'ragg', name: 'agg_tiff', argIdx: 0, argName: 'filename', resolveValue: true },
72
51
  { package: 'ragg', name: 'agg_ppm', argIdx: 0, argName: 'filename', resolveValue: true },
73
52
  { package: 'ragg', name: 'agg_webp', argIdx: 0, argName: 'filename', resolveValue: true },
74
- { package: 'car', name: 'Export', argIdx: 0, argName: 'file', resolveValue: true },
75
53
  { package: 'LIM', name: 'PrintMat', linkTo: OutputRedirects, resolveValue: true },
76
54
  // write_spss/write_stata moved sjmisc -> sjlabelled, so do not pin a namespace (match either); write_sas also lives in haven
77
55
  { name: 'write_spss', argIdx: 1, argName: 'path', resolveValue: true },
78
56
  { name: 'write_stata', argIdx: 1, argName: 'path', resolveValue: true },
79
- { package: 'ape', name: 'write.tree', argIdx: 1, argName: 'file', resolveValue: true },
80
- { package: 'ape', name: 'write.nexus', argIdx: 1, argName: 'file', resolveValue: true },
81
- { package: 'ape', name: 'write.phyloXML', argIdx: 1, argName: 'file', resolveValue: true },
82
- { package: 'Claddis', name: 'write_nexus_matrix', argIdx: 1, argName: 'file_name', resolveValue: true },
83
- { package: 'Claddis', name: 'write_tnt_matrix', argIdx: 1, argName: 'file_name', resolveValue: true },
84
- { package: 'rgdal', name: 'writeOGR', argIdx: 1, argName: 'dsn', resolveValue: true },
85
- { package: 'rgdal', name: 'writeGDAL', argIdx: 1, argName: 'fname', resolveValue: true },
86
- { package: 'arrow', name: 'write_parquet', argIdx: 1, argName: 'sink', resolveValue: true },
87
- { package: 'sf', name: 'st_write', argIdx: 1, argName: 'dsn', resolveValue: true },
88
57
  { package: 'sf', name: 'write_sf', argIdx: 1, argName: 'dsn', resolveValue: true, ignoreIf: 'arg-missing' },
89
- { package: 'maptools', name: 'writePolyShape', argIdx: 1, argName: 'fn', resolveValue: true },
90
- { package: 'XLConnect', name: 'writeNamedRegionToFile', argIdx: 0, argName: 'file', resolveValue: true },
91
- { package: 'XLConnect', name: 'writeWorksheetToFile', argIdx: 0, argName: 'file', resolveValue: true },
92
- { package: 'visNetwork', name: 'visSave', argIdx: 1, argName: 'file', resolveValue: true },
93
- { package: 'DiagrammeR', name: 'save_graph', argIdx: 1, argName: 'file', resolveValue: true },
94
58
  { package: 'DiagrammeR', name: 'export_graph', argName: 'file_name', resolveValue: true },
95
- { package: 'ggplot2', name: 'ggsave', argIdx: 0, argName: 'filename', resolveValue: true },
96
- { package: 'cowplot', name: 'ggsave2', argIdx: 0, argName: 'filename', resolveValue: true },
97
59
  { package: 'tinyplot', name: 'tinyplot', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
98
60
  { package: 'tinyplot', name: 'plt', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
99
61
  { package: 'highcharter', name: 'hc_exporting', argName: 'filename', resolveValue: true },
100
- { package: 'jsonlite', name: 'write_json', argIdx: 1, argName: 'path', resolveValue: true },
101
62
  { package: 'rpolars', name: 'sink_ipc', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
102
63
  { package: 'rpolars', name: 'sink_csv', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
103
64
  { package: 'rpolars', name: 'sink_ndjson', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
@@ -107,54 +68,20 @@ const WriteFunctionsWithMore = [
107
68
  { package: 'rpolars', name: 'write_csv', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
108
69
  { package: 'rpolars', name: 'write_ndjson', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
109
70
  { package: 'rpolars', name: 'write_parquet', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
110
- { package: 'data.table', name: 'fwrite', argIdx: 1, argName: 'file', resolveValue: true },
111
- { package: 'writexl', name: 'write_xlsx', argIdx: 1, argName: 'path', resolveValue: true },
112
- { package: 'openxlsx', name: 'write.xlsx', argIdx: 1, argName: 'file', resolveValue: true },
113
- { package: 'vroom', name: 'vroom_write', argIdx: 1, argName: 'file', resolveValue: true },
114
- { package: 'vroom', name: 'vroom_write_lines', argIdx: 1, argName: 'file', resolveValue: true },
115
- { package: 'rio', name: 'export', argIdx: 1, argName: 'file', resolveValue: true },
116
- { package: 'rio', name: 'export_list', argIdx: 1, argName: 'file', resolveValue: true },
117
71
  { package: 'magick', name: 'image_write', argIdx: 1, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
118
72
  { package: 'compiler', name: 'cmpfile', argIdx: 1, argName: 'outfile', resolveValue: true },
119
73
  /* image / raster */
120
74
  { package: 'jpeg', name: 'writeJPEG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
121
75
  { package: 'png', name: 'writePNG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
122
- { package: 'tiff', name: 'writeTIFF', argIdx: 1, argName: 'where', resolveValue: true },
123
- { package: 'imager', name: 'make.video', argIdx: 1, argName: 'file', resolveValue: true },
124
- { package: 'OpenImageR', name: 'writeImage', argIdx: 1, argName: 'file_name', resolveValue: true },
125
- { package: 'EBImage', name: 'writeImage', argIdx: 1, argName: 'files', resolveValue: true },
126
- { package: 'gifski', name: 'gifski', argIdx: 1, argName: 'gif_file', resolveValue: true },
127
- { package: 'gifski', name: 'save_gif', argIdx: 1, argName: 'gif_file', resolveValue: true },
128
- { package: 'svglite', name: 'svglite', argIdx: 0, argName: 'file', resolveValue: true },
129
76
  /* audio / video */
130
- { package: 'av', name: 'av_encode_video', argIdx: 1, argName: 'output', resolveValue: true },
131
- { package: 'av', name: 'av_audio_convert', argIdx: 1, argName: 'output', resolveValue: true },
132
- { package: 'av', name: 'av_capture_graphics', argIdx: 1, argName: 'output', resolveValue: true },
133
- { package: 'tuneR', name: 'writeWave', argIdx: 1, argName: 'filename', resolveValue: true },
134
77
  { package: 'seewave', name: 'savewav', argName: 'filename', resolveValue: true, defaultValue: '<wave-name>' },
135
- { package: 'audio', name: 'save.wave', argIdx: 1, argName: 'where', resolveValue: true },
136
78
  /* geospatial */
137
- { package: 'terra', name: 'writeRaster', argIdx: 1, argName: 'filename', resolveValue: true },
138
- { package: 'terra', name: 'writeVector', argIdx: 1, argName: 'filename', resolveValue: true },
139
- { package: 'terra', name: 'writeCDF', argIdx: 1, argName: 'filename', resolveValue: true },
140
- { package: 'raster', name: 'writeRaster', argIdx: 1, argName: 'filename', resolveValue: true },
141
- { package: 'stars', name: 'write_stars', argIdx: 1, argName: 'dsn', resolveValue: true },
142
79
  /* array / binary science formats */
143
- { package: 'ncdf4', name: 'nc_create', argIdx: 0, argName: 'filename', resolveValue: true },
144
- { package: 'RNetCDF', name: 'create.nc', argIdx: 0, argName: 'filename', resolveValue: true },
145
- { package: 'R.matlab', name: 'writeMat', argIdx: 0, argName: 'con', resolveValue: true },
146
- { package: 'rhdf5', name: 'h5write', argIdx: 1, argName: 'file', resolveValue: true },
147
- { package: 'rhdf5', name: 'h5createFile', argIdx: 0, argName: 'file', resolveValue: true },
148
- { package: 'fst', name: 'write_fst', argIdx: 1, argName: 'path', resolveValue: true },
149
- { package: 'qs', name: 'qsave', argIdx: 1, argName: 'file', resolveValue: true },
150
- { package: 'yaml', name: 'write_yaml', argIdx: 1, argName: 'file', resolveValue: true },
151
80
  /* phylogeny / sequence */
152
- { package: 'ape', name: 'write.dna', argIdx: 1, argName: 'file', resolveValue: true },
153
- { package: 'ape', name: 'write.nexus.data', argIdx: 1, argName: 'file', resolveValue: true },
154
- { package: 'seqinr', name: 'write.fasta', argIdx: 2, argName: 'file.out', resolveValue: true }
155
81
  ];
82
+ /* the configuration leads here too, see {@link ReadFunctions} */
156
83
  exports.WriteFunctions = [
157
- ...WriteFunctionsWithMore,
158
- ...(0, derived_functions_1.functionInfosFromProps)(built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes, [...WriteFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions, ...read_functions_1.ReadFunctions])
84
+ ...(0, derived_functions_1.functionInfosFromProps)([built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], [...WriteFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions, ...read_functions_1.ReadFunctions]),
85
+ ...WriteFunctionsWithMore
159
86
  ];
160
87
  //# sourceMappingURL=write-functions.js.map
@@ -90,8 +90,8 @@ function callName(node, dataflow) {
90
90
  if (name === undefined) {
91
91
  return undefined;
92
92
  }
93
- const props = (0, query_fn_props_1.queryFnProps)(name, { environment: dataflow.environment })?.props ?? 0;
94
- return (props & (built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Graphics)) !== 0 || test_functions_1.ExpectFunctionNames.test(identifier_1.Identifier.getName(name))
93
+ const props = (0, query_fn_props_1.queryFnProps)(name, { environment: dataflow.environment });
94
+ return built_in_props_1.CallProps.hasAny(props, [built_in_props_1.CallProp.Invisible, built_in_props_1.SemanticCallTag.Graphics]) || test_functions_1.ExpectFunctionNames.test(identifier_1.Identifier.getName(name))
95
95
  ? undefined : name;
96
96
  }
97
97
  /** what to report the echo under: the called name, or the operator or lexeme producing the value */
@@ -10,7 +10,7 @@ import type { DataflowInformation } from '../../../dataflow/info';
10
10
  * {@link DependencyInfo#parts}: the addons drawn onto it, plus the device opener and closer around it.
11
11
  * Closing a device ends the plot, so an addon after it builds whatever device is open then, not this file.
12
12
  *
13
- * Openers are the `write` entries that draw ({@link CallProp.Graphics}), closers the calls that end a device
14
- * ({@link CallProp.Closes}), and the order is the one the source states.
13
+ * Openers are the `write` entries that draw ({@link SemanticCallTag.Graphics}), closers the calls that end a device
14
+ * ({@link SemanticCallTag.Closes}), and the order is the one the source states.
15
15
  */
16
16
  export declare function linkPlotsToDevices(written: readonly DependencyInfo[], plots: DependencyInfo[], dataflow: DataflowInformation, ast: NormalizedAst): void;
@@ -5,9 +5,8 @@ const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props"
5
5
  const built_in_props_1 = require("../../../dataflow/environments/built-in-props");
6
6
  const vertex_1 = require("../../../dataflow/graph/vertex");
7
7
  const range_1 = require("../../../util/range");
8
- /** the {@link CallProp} bits of the call `id` makes */
9
- function propsOf(id, dataflow) {
10
- return (0, query_fn_props_1.callFnProps)(id, dataflow)?.props ?? 0;
8
+ function callHas(id, dataflow, props) {
9
+ return built_in_props_1.CallProps.hasAny((0, query_fn_props_1.callFnProps)(id, dataflow), props);
11
10
  }
12
11
  /**
13
12
  * Names the file each visualization lands in, and the statements that build it.
@@ -18,15 +17,15 @@ function propsOf(id, dataflow) {
18
17
  * {@link DependencyInfo#parts}: the addons drawn onto it, plus the device opener and closer around it.
19
18
  * Closing a device ends the plot, so an addon after it builds whatever device is open then, not this file.
20
19
  *
21
- * Openers are the `write` entries that draw ({@link CallProp.Graphics}), closers the calls that end a device
22
- * ({@link CallProp.Closes}), and the order is the one the source states.
20
+ * Openers are the `write` entries that draw ({@link SemanticCallTag.Graphics}), closers the calls that end a device
21
+ * ({@link SemanticCallTag.Closes}), and the order is the one the source states.
23
22
  */
24
23
  function linkPlotsToDevices(written, plots, dataflow, ast) {
25
24
  const opened = new Map(written
26
- .filter(w => w.value !== undefined && (propsOf(w.nodeId, dataflow) & built_in_props_1.CallProp.Graphics) !== 0)
25
+ .filter(w => w.value !== undefined && callHas(w.nodeId, dataflow, built_in_props_1.SemanticCallTag.Graphics))
27
26
  .map(w => [w.nodeId, w.value]));
28
27
  const closed = new Set(dataflow.graph.vertices(true)
29
- .filter(([id, v]) => vertex_1.FunctionCallVertex.is(v) && (propsOf(id, dataflow) & built_in_props_1.CallProp.Closes) !== 0)
28
+ .filter(([id, v]) => vertex_1.FunctionCallVertex.is(v) && callHas(id, dataflow, built_in_props_1.SemanticCallTag.Closes))
30
29
  .map(([id]) => id));
31
30
  const plotAt = new Map(plots.map((p, index) => [p.nodeId, index]));
32
31
  const located = [...opened.keys(), ...closed, ...plotAt.keys()]
@@ -15,7 +15,7 @@ async function executeDiceQuery({ analyzer }, queries) {
15
15
  const ast = await analyzer.normalize();
16
16
  const df = await analyzer.dataflow();
17
17
  for (const query of queries) {
18
- const key = JSON.stringify(query);
18
+ const key = (0, slice_query_options_1.sliceResultKey)(query);
19
19
  if (results[key]) {
20
20
  log_1.log.warn(`Duplicate key for dice-query: ${key}, skipping...`);
21
21
  continue;
@@ -44,7 +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 asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
47
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
48
48
  readonly fromLine: typeof diceQueryLineParser;
49
49
  readonly completer: typeof diceQueryCompleter;
50
50
  readonly syntax: "@dice (<crit>;...->crit;...)[iIcB] <code | file://path>";
@@ -66,6 +66,10 @@ function makeCallMatcher(constraint) {
66
66
  const matchersOr = constraint.calls.map(makeCallMatcher);
67
67
  return (vtx, cg) => matchersOr.some(m => m(vtx, cg));
68
68
  }
69
+ case 'one-of': {
70
+ const matchersOneOf = constraint.calls.map(makeCallMatcher);
71
+ return (vtx, cg) => matchersOneOf.filter(m => m(vtx, cg)).length === 1;
72
+ }
69
73
  default: {
70
74
  throw new Error(`Unhandled constraint type ${JSON.stringify(constraint)}`);
71
75
  }
@@ -19,6 +19,12 @@ interface CallsWithNameConstraint {
19
19
  readonly nameExact?: boolean;
20
20
  }
21
21
  interface CallsConstraints {
22
+ /**
23
+ * How to combine the given constraints:
24
+ * `and` requires every constraint to be satisfied by some call reached during the walk,
25
+ * `or` requires at least one of them to match a reached call,
26
+ * and `one-of` requires exactly one of them to match a reached call.
27
+ */
22
28
  readonly type: 'and' | 'or' | 'one-of';
23
29
  readonly calls: readonly CallsConstraint[];
24
30
  }
@@ -50,7 +56,7 @@ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly stri
50
56
  export declare const DoesCallQueryDefinition: {
51
57
  readonly title: "Does-Call Query";
52
58
  readonly executor: typeof executeDoesCallQuery;
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>;
59
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
54
60
  readonly fromLine: typeof doesCallQueryLineParser;
55
61
  readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
56
62
  readonly schema: Joi.ObjectSchema<any>;
@@ -29,7 +29,7 @@ declare function filesQueryCompleter(line: readonly string[], startingNewArg: bo
29
29
  export declare const FilesQueryDefinition: {
30
30
  readonly title: "Files Query";
31
31
  readonly executor: typeof executeFileQuery;
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
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
33
33
  readonly completer: typeof filesQueryCompleter;
34
34
  readonly fromLine: typeof filesQueryLineParser;
35
35
  readonly syntax: "@files [role:<r1>,<r2>,...] <code | file://path>";
@@ -186,7 +186,7 @@ declare function guessDepVersionsLineParser(_output: ReplOutput, line: readonly
186
186
  export declare const GuessDepVersionsQueryDefinition: {
187
187
  readonly title: "Guess Dependency Versions Query";
188
188
  readonly executor: typeof executeGuessDepVersionsQuery;
189
- readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly import("../../query").Query[]) => true;
189
+ readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly import("../../query").Query[]) => true;
190
190
  readonly fromLine: typeof guessDepVersionsLineParser;
191
191
  readonly syntax: "@guess-dep-versions [<pkg> ...] [(clean | <=YYYY.MM.DD)] [--date YYYY.MM.DD] [--max <n>] [--iterations <n>] [--disabled <letters>] [--explode [--oldest] [--limit <n>] [--prefer <pkg>=<ver>]] <code | file://path>";
192
192
  readonly schema: Joi.ObjectSchema<any>;
@@ -28,7 +28,7 @@ export declare const HappensBeforeKey: {
28
28
  export declare const HappensBeforeQueryDefinition: {
29
29
  readonly title: "Happens-Before Query";
30
30
  readonly executor: typeof executeHappensBefore;
31
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
31
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
32
32
  readonly schema: Joi.ObjectSchema<any>;
33
33
  readonly flattenInvolvedNodes: () => never[];
34
34
  };
@@ -11,7 +11,7 @@ export interface IdMapQueryResult extends BaseQueryResult {
11
11
  export declare const IdMapQueryDefinition: {
12
12
  readonly title: "Id-Map Query";
13
13
  readonly executor: typeof executeIdMapQuery;
14
- readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
14
+ readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
15
15
  readonly schema: Joi.ObjectSchema<any>;
16
16
  readonly flattenInvolvedNodes: () => never[];
17
17
  };
@@ -8,7 +8,7 @@ import { BuiltInIndex } from '../../../dataflow/environments/query-fn-props';
8
8
  */
9
9
  export declare const LinkedInputObjects: readonly LinkedInputObject[];
10
10
  /**
11
- * The functions whose result is bounded no matter what flows in, read back from the {@link CallProp.Narrows}
11
+ * The functions whose result is bounded no matter what flows in, read back from the {@link SemanticCallTag.Narrows}
12
12
  * built-ins: with an {@link ArgProp.Bounds} parameter the result is one of that argument's values (`match.arg`
13
13
  * and its `choices`), without one it is a count, an index, or a logical of the call's own making. Label a
14
14
  * built-in `Narrows` (in the {@link DefaultBuiltinConfig} or your own definitions) and it shows up here.
@@ -29,14 +29,14 @@ exports.LinkedInputObjects = [
29
29
  { name: 'session', type: simple_input_classifier_1.InputType.User, withParams: ['input', 'output'], requires: 'shiny', fields: ['clientData', 'request'] }
30
30
  ];
31
31
  /**
32
- * The functions whose result is bounded no matter what flows in, read back from the {@link CallProp.Narrows}
32
+ * The functions whose result is bounded no matter what flows in, read back from the {@link SemanticCallTag.Narrows}
33
33
  * built-ins: with an {@link ArgProp.Bounds} parameter the result is one of that argument's values (`match.arg`
34
34
  * and its `choices`), without one it is a count, an index, or a logical of the call's own making. Label a
35
35
  * built-in `Narrows` (in the {@link DefaultBuiltinConfig} or your own definitions) and it shows up here.
36
36
  */
37
37
  function narrowingFunctions(index = query_fn_props_1.BuiltInIndex.default()) {
38
38
  const bounds = new Map(index.params(built_in_props_1.ArgProp.Bounds).map(p => [identifier_1.Identifier.getName(p.call), p]));
39
- return index.with(built_in_props_1.CallProp.Narrows).map(call => {
39
+ return index.with(built_in_props_1.SemanticCallTag.Narrows).map(call => {
40
40
  const bound = bounds.get(identifier_1.Identifier.getName(call));
41
41
  return bound === undefined ? { call } : { call, argName: bound.name, argIdx: bound.index };
42
42
  });