@eagleoutice/flowr 2.15.5 → 2.15.9

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 (630) hide show
  1. package/README.md +39 -280
  2. package/abstract-interpretation/absint-inference.d.ts +5 -5
  3. package/abstract-interpretation/absint-inference.js +12 -12
  4. package/abstract-interpretation/abstract-semantics.d.ts +10 -10
  5. package/abstract-interpretation/data-frame/arguments.d.ts +9 -9
  6. package/abstract-interpretation/data-frame/arguments.js +11 -11
  7. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +1 -1
  8. package/abstract-interpretation/data-frame/dataframe-semantics.js +14 -14
  9. package/abstract-interpretation/unsupported-functions.d.ts +0 -1
  10. package/abstract-interpretation/unsupported-functions.js +1 -2
  11. package/abstract-interpretation/value-semantics.d.ts +1 -1
  12. package/abstract-interpretation/value-semantics.js +2 -3
  13. package/benchmark/calibration.d.ts +0 -2
  14. package/benchmark/calibration.js +0 -5
  15. package/benchmark/slicer.d.ts +2 -2
  16. package/benchmark/slicer.js +4 -4
  17. package/benchmark/stats/size-of.d.ts +1 -1
  18. package/benchmark/stats/size-of.js +2 -2
  19. package/benchmark/summarizer/first-phase/process.d.ts +1 -1
  20. package/benchmark/summarizer/first-phase/process.js +1 -1
  21. package/benchmark/summarizer/second-phase/graph.d.ts +1 -1
  22. package/benchmark/summarizer/second-phase/graph.js +1 -1
  23. package/cli/benchmark-app.js +3 -3
  24. package/cli/common/options.d.ts +0 -16
  25. package/cli/common/options.js +0 -3
  26. package/cli/common/scripts-info.d.ts +0 -16
  27. package/cli/compile-cache.d.ts +1 -0
  28. package/cli/compile-cache.js +19 -0
  29. package/cli/flowr-main-options.d.ts +5 -0
  30. package/cli/flowr-main-options.js +6 -0
  31. package/cli/flowr.d.ts +13 -0
  32. package/cli/flowr.js +27 -2
  33. package/cli/repl/commands/repl-clipboard.d.ts +4 -1
  34. package/cli/repl/commands/repl-clipboard.js +4 -1
  35. package/cli/repl/commands/repl-main.d.ts +0 -2
  36. package/cli/repl/commands/repl-main.js +0 -5
  37. package/cli/repl/commands/repl-normalize.js +3 -0
  38. package/cli/repl/commands/repl-parse.js +27 -0
  39. package/cli/repl/commands/repl-signature.js +17 -1
  40. package/cli/script-core/summarizer-core.js +0 -9
  41. package/cli/summarizer-app.d.ts +0 -3
  42. package/cli/wiki.d.ts +2 -2
  43. package/cli/wiki.js +18 -2
  44. package/config.d.ts +54 -5
  45. package/config.js +44 -8
  46. package/control-flow/cfg-dead-code.js +5 -4
  47. package/control-flow/cfg-properties.d.ts +2 -2
  48. package/control-flow/cfg-properties.js +2 -2
  49. package/control-flow/control-flow-graph.d.ts +32 -10
  50. package/control-flow/control-flow-graph.js +22 -10
  51. package/control-flow/diff-cfg.js +3 -2
  52. package/control-flow/happens-before.d.ts +6 -0
  53. package/control-flow/happens-before.js +42 -0
  54. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  55. package/control-flow/semantic-cfg-guided-visitor.js +5 -2
  56. package/control-flow/simple-visitor.d.ts +2 -7
  57. package/control-flow/simple-visitor.js +2 -6
  58. package/control-flow/useless-loop.d.ts +2 -2
  59. package/control-flow/useless-loop.js +11 -8
  60. package/core/pipeline-executor.d.ts +2 -2
  61. package/core/pipeline-executor.js +2 -2
  62. package/core/steps/all/core/20-dataflow.d.ts +2 -2
  63. package/core/steps/all/static-slicing/00-slice.d.ts +1 -1
  64. package/core/steps/all/static-slicing/00-slice.js +1 -1
  65. package/core/steps/all/static-slicing/10-reconstruct.js +1 -1
  66. package/core/steps/pipeline/default-pipelines.d.ts +16 -16
  67. package/core/steps/pipeline/pipeline.d.ts +1 -6
  68. package/data/r-base-packages.generated.d.ts +2 -2
  69. package/data/r-base-packages.generated.js +4 -4
  70. package/dataflow/cluster.js +1 -1
  71. package/dataflow/environments/apply-kill.d.ts +4 -0
  72. package/dataflow/environments/apply-kill.js +43 -8
  73. package/dataflow/environments/built-in-config.d.ts +7 -2
  74. package/dataflow/environments/built-in-config.js +7 -5
  75. package/dataflow/environments/built-in-eval-name.d.ts +4 -2
  76. package/dataflow/environments/built-in-eval-name.js +3 -1
  77. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  78. package/dataflow/environments/built-in-proc-name.js +2 -0
  79. package/dataflow/environments/built-in-props.d.ts +23 -7
  80. package/dataflow/environments/built-in-props.js +27 -10
  81. package/dataflow/environments/built-in.d.ts +5 -6
  82. package/dataflow/environments/built-in.js +12 -16
  83. package/dataflow/environments/data-masking-functions.js +1 -1
  84. package/dataflow/environments/default-builtin-config.d.ts +278 -32
  85. package/dataflow/environments/default-builtin-config.js +139 -85
  86. package/dataflow/environments/environment.d.ts +16 -19
  87. package/dataflow/environments/environment.js +54 -48
  88. package/dataflow/environments/frame-memory.d.ts +54 -69
  89. package/dataflow/environments/frame-memory.js +146 -190
  90. package/dataflow/environments/identifier.d.ts +69 -9
  91. package/dataflow/environments/identifier.js +99 -13
  92. package/dataflow/environments/query-fn-props.d.ts +8 -2
  93. package/dataflow/environments/query-fn-props.js +20 -12
  94. package/dataflow/environments/reference-to-maybe.js +1 -1
  95. package/dataflow/environments/removal-marker.d.ts +7 -0
  96. package/dataflow/environments/removal-marker.js +20 -0
  97. package/dataflow/environments/resolve-by-name.d.ts +8 -8
  98. package/dataflow/environments/resolve-by-name.js +15 -12
  99. package/dataflow/environments/resolve-helper.d.ts +26 -4
  100. package/dataflow/environments/resolve-helper.js +27 -4
  101. package/dataflow/eval/resolve/alias-tracking.d.ts +17 -17
  102. package/dataflow/eval/resolve/alias-tracking.js +57 -32
  103. package/dataflow/eval/resolve/node-value.d.ts +15 -28
  104. package/dataflow/eval/resolve/node-value.js +26 -45
  105. package/dataflow/eval/resolve/resolve-argument.js +21 -2
  106. package/dataflow/eval/resolve/resolve-get.d.ts +28 -0
  107. package/dataflow/eval/resolve/resolve-get.js +49 -0
  108. package/dataflow/eval/resolve/resolve-numbers.d.ts +4 -2
  109. package/dataflow/eval/resolve/resolve-numbers.js +4 -2
  110. package/dataflow/eval/resolve/resolve-operators.d.ts +4 -1
  111. package/dataflow/eval/resolve/resolve-operators.js +7 -3
  112. package/dataflow/eval/resolve/resolve-strings.d.ts +6 -3
  113. package/dataflow/eval/resolve/resolve-strings.js +29 -5
  114. package/dataflow/eval/resolve/resolve-working-directory.js +2 -8
  115. package/dataflow/eval/resolve/resolve.js +27 -15
  116. package/dataflow/eval/values/general.js +13 -12
  117. package/dataflow/eval/values/intervals/interval-constants.d.ts +10 -2
  118. package/dataflow/eval/values/intervals/interval-constants.js +10 -2
  119. package/dataflow/eval/values/logical/logical-constants.d.ts +1 -8
  120. package/dataflow/eval/values/logical/logical-constants.js +1 -23
  121. package/dataflow/eval/values/r-value.d.ts +8 -9
  122. package/dataflow/eval/values/r-value.js +8 -8
  123. package/dataflow/eval/values/scalar/scalar-constants.d.ts +1 -12
  124. package/dataflow/eval/values/scalar/scalar-constants.js +0 -14
  125. package/dataflow/eval/values/sets/set-constants.d.ts +1 -4
  126. package/dataflow/eval/values/sets/set-constants.js +0 -11
  127. package/dataflow/eval/values/string/string-constants.d.ts +4 -18
  128. package/dataflow/eval/values/string/string-constants.js +3 -18
  129. package/dataflow/eval/values/vectors/vector-constants.d.ts +1 -1
  130. package/dataflow/eval/values/vectors/vector-constants.js +1 -1
  131. package/dataflow/extractor.js +176 -13
  132. package/dataflow/fn/argument-roles.d.ts +10 -12
  133. package/dataflow/fn/argument-roles.js +16 -22
  134. package/dataflow/fn/class-declaration.d.ts +8 -30
  135. package/dataflow/fn/class-declaration.js +12 -37
  136. package/dataflow/fn/exceptions-of-function.d.ts +3 -16
  137. package/dataflow/fn/exceptions-of-function.js +5 -21
  138. package/dataflow/fn/frame-reflection.d.ts +5 -19
  139. package/dataflow/fn/frame-reflection.js +14 -29
  140. package/dataflow/fn/function-props.d.ts +9 -10
  141. package/dataflow/fn/function-props.js +16 -20
  142. package/dataflow/fn/function-semantics.d.ts +130 -0
  143. package/dataflow/fn/function-semantics.js +89 -0
  144. package/dataflow/fn/higher-order-function.d.ts +8 -16
  145. package/dataflow/fn/higher-order-function.js +17 -28
  146. package/dataflow/fn/recursive-function.js +1 -1
  147. package/dataflow/fn/strict-function.d.ts +8 -20
  148. package/dataflow/fn/strict-function.js +20 -38
  149. package/dataflow/graph/call-graph.d.ts +9 -0
  150. package/dataflow/graph/call-graph.js +15 -14
  151. package/dataflow/graph/dataflowgraph-builder.d.ts +18 -23
  152. package/dataflow/graph/dataflowgraph-builder.js +18 -29
  153. package/dataflow/graph/df-helper.d.ts +22 -109
  154. package/dataflow/graph/df-helper.js +20 -64
  155. package/dataflow/graph/diff-dataflow-graph.d.ts +5 -0
  156. package/dataflow/graph/diff-dataflow-graph.js +12 -7
  157. package/dataflow/graph/edge.d.ts +1 -0
  158. package/dataflow/graph/edge.js +1 -0
  159. package/dataflow/graph/graph-helper.d.ts +26 -1
  160. package/dataflow/graph/graph-helper.js +53 -2
  161. package/dataflow/graph/graph.d.ts +42 -7
  162. package/dataflow/graph/graph.js +43 -9
  163. package/dataflow/graph/match-args.d.ts +16 -12
  164. package/dataflow/graph/match-args.js +68 -26
  165. package/dataflow/graph/vertex.d.ts +38 -57
  166. package/dataflow/graph/vertex.js +38 -66
  167. package/dataflow/info.d.ts +5 -2
  168. package/dataflow/info.js +3 -1
  169. package/dataflow/internal/control-flow.d.ts +13 -12
  170. package/dataflow/internal/control-flow.js +13 -12
  171. package/dataflow/internal/linker.d.ts +24 -15
  172. package/dataflow/internal/linker.js +115 -33
  173. package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +1 -1
  174. package/dataflow/internal/process/functions/call/argument/make-argument.js +17 -1
  175. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +6 -8
  176. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +8 -7
  177. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +17 -3
  178. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +112 -39
  179. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +10 -2
  180. package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.d.ts +1 -1
  181. package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.d.ts +21 -0
  182. package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +99 -0
  183. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +56 -13
  184. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +179 -45
  185. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -0
  186. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +46 -5
  187. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +49 -13
  188. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +119 -22
  189. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +5 -1
  190. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +62 -28
  191. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +2 -2
  192. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +7 -2
  193. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +9 -2
  194. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +26 -10
  195. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +3 -3
  196. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +13 -10
  197. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -2
  198. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +36 -22
  199. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +2 -2
  200. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +7 -7
  201. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -2
  202. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +1 -1
  203. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +7 -11
  204. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +5 -5
  205. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +7 -7
  206. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -0
  207. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +28 -7
  208. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +5 -5
  209. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +1 -1
  210. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +2 -2
  211. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -2
  212. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +12 -14
  213. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -2
  214. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +3 -4
  215. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -2
  216. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +21 -13
  217. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +12 -0
  218. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -0
  219. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +29 -11
  220. package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
  221. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +15 -12
  222. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +5 -5
  223. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +28 -35
  224. package/dataflow/internal/process/functions/call/common.d.ts +7 -1
  225. package/dataflow/internal/process/functions/call/common.js +17 -7
  226. package/dataflow/internal/process/functions/call/deferred.d.ts +1 -3
  227. package/dataflow/internal/process/functions/call/deferred.js +20 -10
  228. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -4
  229. package/dataflow/internal/process/functions/call/known-call-handling.js +17 -8
  230. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -1
  231. package/dataflow/internal/process/functions/call/named-call-handling.js +5 -4
  232. package/dataflow/internal/process/functions/call/nse.d.ts +1 -2
  233. package/dataflow/internal/process/functions/call/nse.js +13 -15
  234. package/dataflow/internal/process/functions/call/quoted.d.ts +3 -4
  235. package/dataflow/internal/process/functions/call/quoted.js +96 -42
  236. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +2 -2
  237. package/dataflow/internal/process/functions/process-parameter.d.ts +4 -1
  238. package/dataflow/internal/process/functions/process-parameter.js +4 -1
  239. package/dataflow/internal/process/process-named-call.d.ts +2 -2
  240. package/dataflow/internal/process/process-named-call.js +3 -3
  241. package/dataflow/origin/dfg-get-origin.d.ts +1 -1
  242. package/dataflow/origin/dfg-get-origin.js +17 -10
  243. package/dataflow/origin/dfg-get-symbol-refs.d.ts +2 -2
  244. package/dataflow/origin/dfg-get-symbol-refs.js +2 -2
  245. package/dataflow/processor.d.ts +10 -0
  246. package/documentation/data/dfg/doc-data-dfg-util.d.ts +2 -2
  247. package/documentation/data/dfg/doc-data-dfg-util.js +2 -2
  248. package/documentation/data/faq/faqs.d.ts +2 -1
  249. package/documentation/data/faq/faqs.js +12 -3
  250. package/documentation/data/server/doc-data-server-messages.d.ts +2 -1
  251. package/documentation/data/server/doc-data-server-messages.js +2 -1
  252. package/documentation/doc-capabilities.d.ts +13 -7
  253. package/documentation/doc-capabilities.js +445 -126
  254. package/documentation/doc-util/doc-auto-gen.d.ts +4 -2
  255. package/documentation/doc-util/doc-auto-gen.js +22 -4
  256. package/documentation/doc-util/doc-cfg.js +2 -2
  257. package/documentation/doc-util/doc-code.d.ts +8 -2
  258. package/documentation/doc-util/doc-code.js +36 -7
  259. package/documentation/doc-util/doc-dfg.d.ts +2 -0
  260. package/documentation/doc-util/doc-dfg.js +4 -3
  261. package/documentation/doc-util/doc-env.d.ts +2 -1
  262. package/documentation/doc-util/doc-env.js +2 -1
  263. package/documentation/doc-util/doc-escape.d.ts +2 -2
  264. package/documentation/doc-util/doc-escape.js +2 -2
  265. package/documentation/doc-util/doc-files.d.ts +0 -2
  266. package/documentation/doc-util/doc-files.js +2 -3
  267. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  268. package/documentation/doc-util/doc-query.d.ts +2 -1
  269. package/documentation/doc-util/doc-query.js +4 -3
  270. package/documentation/doc-util/doc-repl.d.ts +1 -1
  271. package/documentation/doc-util/doc-repl.js +1 -1
  272. package/documentation/doc-util/doc-search.js +2 -2
  273. package/documentation/doc-util/doc-server-message.js +2 -2
  274. package/documentation/doc-util/doc-sigdb.js +1 -1
  275. package/documentation/doc-util/doc-structure.d.ts +10 -3
  276. package/documentation/doc-util/doc-structure.js +10 -3
  277. package/documentation/doc-util/doc-timings.d.ts +19 -0
  278. package/documentation/doc-util/doc-timings.js +44 -0
  279. package/documentation/doc-util/doc-types.d.ts +8 -6
  280. package/documentation/doc-util/doc-types.js +11 -8
  281. package/documentation/index.d.ts +1 -0
  282. package/documentation/index.js +1 -0
  283. package/documentation/wiki-core.js +3 -0
  284. package/documentation/wiki-create-linting-rules.js +1 -1
  285. package/documentation/wiki-dataflow-graph.js +19 -20
  286. package/documentation/wiki-engine.js +13 -2
  287. package/documentation/wiki-helper-objects.d.ts +9 -0
  288. package/documentation/wiki-helper-objects.js +102 -0
  289. package/documentation/wiki-linter.js +154 -16
  290. package/documentation/wiki-linting-and-testing.js +99 -6
  291. package/documentation/wiki-mk/doc-context.d.ts +33 -29
  292. package/documentation/wiki-mk/doc-context.js +1 -0
  293. package/documentation/wiki-mk/doc-maker.d.ts +1 -1
  294. package/documentation/wiki-mk/doc-maker.js +18 -2
  295. package/documentation/wiki-query.js +44 -0
  296. package/documentation/wiki-setup.js +28 -3
  297. package/documentation/wiki-signature-database.js +7 -3
  298. package/gas.d.ts +3 -2
  299. package/index.d.ts +18 -3
  300. package/index.js +29 -3
  301. package/linter/linter-executor.js +2 -2
  302. package/linter/linter-format.d.ts +9 -3
  303. package/linter/linter-format.js +2 -0
  304. package/linter/linter-rules.d.ts +118 -98
  305. package/linter/linter-rules.js +3 -1
  306. package/linter/rules/absolute-path.d.ts +10 -10
  307. package/linter/rules/absolute-path.js +9 -12
  308. package/linter/rules/dataframe-access-validation.d.ts +2 -2
  309. package/linter/rules/dataframe-access-validation.js +17 -4
  310. package/linter/rules/dead-code.d.ts +2 -2
  311. package/linter/rules/dead-code.js +1 -1
  312. package/linter/rules/deprecated-functions.d.ts +5 -5
  313. package/linter/rules/deprecated-functions.js +8 -8
  314. package/linter/rules/file-path-validity.d.ts +7 -7
  315. package/linter/rules/file-path-validity.js +4 -4
  316. package/linter/rules/function-finder-util.d.ts +0 -6
  317. package/linter/rules/function-finder-util.js +7 -2
  318. package/linter/rules/namespace-access.d.ts +42 -0
  319. package/linter/rules/namespace-access.js +78 -0
  320. package/linter/rules/naming-convention.d.ts +3 -3
  321. package/linter/rules/naming-convention.js +7 -3
  322. package/linter/rules/network-functions.d.ts +5 -5
  323. package/linter/rules/network-functions.js +5 -6
  324. package/linter/rules/no-leaked-credentials.d.ts +3 -3
  325. package/linter/rules/no-leaked-credentials.js +4 -5
  326. package/linter/rules/problematic-inputs.d.ts +5 -5
  327. package/linter/rules/problematic-inputs.js +13 -21
  328. package/linter/rules/roxygen-arguments.d.ts +1 -1
  329. package/linter/rules/roxygen-arguments.js +4 -3
  330. package/linter/rules/seeded-randomness.d.ts +6 -5
  331. package/linter/rules/seeded-randomness.js +15 -13
  332. package/linter/rules/software-has-license.d.ts +2 -2
  333. package/linter/rules/software-has-license.js +2 -2
  334. package/linter/rules/software-has-tests.d.ts +3 -3
  335. package/linter/rules/software-has-tests.js +2 -2
  336. package/linter/rules/stop-with-call-arg.d.ts +1 -1
  337. package/linter/rules/stop-with-call-arg.js +16 -3
  338. package/linter/rules/syntactically-valid.d.ts +3 -3
  339. package/linter/rules/syntactically-valid.js +2 -2
  340. package/linter/rules/unclosed-connection.d.ts +3 -3
  341. package/linter/rules/unclosed-connection.js +23 -12
  342. package/linter/rules/undefined-symbol-util.d.ts +3 -1
  343. package/linter/rules/undefined-symbol-util.js +9 -7
  344. package/linter/rules/undefined-symbol.d.ts +4 -4
  345. package/linter/rules/undefined-symbol.js +4 -4
  346. package/linter/rules/unescaped-arguments.d.ts +37 -37
  347. package/linter/rules/unescaped-arguments.js +20 -21
  348. package/linter/rules/unused-definition.d.ts +3 -3
  349. package/linter/rules/unused-definition.js +63 -26
  350. package/linter/rules/unused-import.d.ts +4 -4
  351. package/linter/rules/unused-import.js +14 -5
  352. package/linter/rules/useless-loop.d.ts +3 -3
  353. package/linter/rules/useless-loop.js +3 -3
  354. package/package.json +6 -4
  355. package/project/context/flowr-analyzer-context.d.ts +5 -0
  356. package/project/context/flowr-analyzer-context.js +5 -0
  357. package/project/context/flowr-analyzer-dependencies-context.d.ts +3 -3
  358. package/project/context/flowr-analyzer-environment-context.d.ts +20 -1
  359. package/project/context/flowr-analyzer-environment-context.js +24 -1
  360. package/project/context/flowr-analyzer-files-context.d.ts +9 -5
  361. package/project/context/flowr-analyzer-files-context.js +56 -22
  362. package/project/context/flowr-analyzer-functions-context.d.ts +1 -6
  363. package/project/context/flowr-analyzer-functions-context.js +1 -7
  364. package/project/context/flowr-analyzer-gas-context.d.ts +7 -0
  365. package/project/context/flowr-analyzer-gas-context.js +6 -1
  366. package/project/dependency-version-space.d.ts +7 -0
  367. package/project/dependency-version-space.js +2 -2
  368. package/project/flowr-analyzer-builder.d.ts +14 -4
  369. package/project/flowr-analyzer-builder.js +3 -1
  370. package/project/flowr-analyzer.d.ts +3 -3
  371. package/project/flowr-analyzer.js +1 -3
  372. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
  373. package/project/plugins/file-plugins/files/flowr-description-file.js +2 -2
  374. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
  375. package/project/plugins/file-plugins/files/flowr-namespace-file.js +1 -1
  376. package/project/plugins/file-plugins/files/flowr-rda-file.js +8 -6
  377. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +3 -3
  378. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +33 -10
  379. package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +2 -2
  380. package/project/plugins/file-plugins/files/flowr-sweave-file.js +2 -2
  381. package/project/plugins/file-plugins/files/r-fun-tab.d.ts +4 -67
  382. package/project/plugins/file-plugins/files/r-fun-tab.js +6 -653
  383. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +4 -1
  384. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +4 -1
  385. package/project/plugins/flowr-analyzer-plugin.d.ts +1 -1
  386. package/project/plugins/flowr-analyzer-plugin.js +1 -1
  387. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +0 -19
  388. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +4 -51
  389. package/project/sigdb/codec.d.ts +0 -4
  390. package/project/sigdb/codec.js +1 -8
  391. package/project/sigdb/decode.d.ts +5 -4
  392. package/project/sigdb/decode.js +13 -18
  393. package/project/sigdb/dict.d.ts +35 -0
  394. package/project/sigdb/dict.js +97 -0
  395. package/project/sigdb/hash.d.ts +7 -2
  396. package/project/sigdb/manifest.d.ts +0 -2
  397. package/project/sigdb/manifest.js +2 -6
  398. package/project/sigdb/memory-source.js +2 -1
  399. package/project/sigdb/reader.d.ts +5 -4
  400. package/project/sigdb/reader.js +34 -26
  401. package/project/sigdb/schema.d.ts +0 -2
  402. package/project/sigdb/schema.js +1 -7
  403. package/project/sigdb/signature-db.d.ts +9 -1
  404. package/project/sigdb/signature-db.js +8 -0
  405. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
  406. package/queries/catalog/call-context-query/call-context-query-executor.js +5 -4
  407. package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
  408. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -2
  409. package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -1
  410. package/queries/catalog/dependencies-query/dependencies-query-executor.js +40 -6
  411. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +33 -54
  412. package/queries/catalog/dependencies-query/dependencies-query-format.js +37 -13
  413. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +3 -2
  414. package/queries/catalog/dependencies-query/function-info/derived-functions.js +5 -5
  415. package/queries/catalog/dependencies-query/function-info/read-functions.d.ts +6 -1
  416. package/queries/catalog/dependencies-query/function-info/read-functions.js +12 -9
  417. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +2 -2
  418. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +1 -2
  419. package/queries/catalog/dependencies-query/function-info/write-functions.d.ts +9 -1
  420. package/queries/catalog/dependencies-query/function-info/write-functions.js +17 -6
  421. package/queries/catalog/dependencies-query/implicit-echo.js +28 -5
  422. package/queries/catalog/dependencies-query/link-devices.js +23 -10
  423. package/queries/catalog/dice-query/dice-query-executor.js +2 -14
  424. package/queries/catalog/does-call-query/does-call-query-executor.js +1 -2
  425. package/queries/catalog/files-query/files-query-format.d.ts +1 -1
  426. package/queries/catalog/function-info-query/function-info-query-executor.d.ts +7 -0
  427. package/queries/catalog/function-info-query/function-info-query-executor.js +38 -0
  428. package/queries/catalog/function-info-query/function-info-query-format.d.ts +48 -0
  429. package/queries/catalog/function-info-query/function-info-query-format.js +54 -0
  430. package/queries/catalog/function-info-query/function-origin.d.ts +22 -0
  431. package/queries/catalog/function-info-query/function-origin.js +46 -0
  432. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +2 -1
  433. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  434. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  435. package/queries/catalog/input-sources-query/input-source-functions.d.ts +2 -2
  436. package/queries/catalog/input-sources-query/input-source-functions.js +1 -2
  437. package/queries/catalog/input-sources-query/input-sources-query-executor.js +2 -2
  438. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +4 -2
  439. package/queries/catalog/input-sources-query/input-sources-query-format.js +24 -24
  440. package/queries/catalog/input-sources-query/input-types.d.ts +2 -2
  441. package/queries/catalog/input-sources-query/input-types.js +2 -2
  442. package/queries/catalog/input-sources-query/simple-input-classifier.js +6 -6
  443. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -2
  444. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +1 -1
  445. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +6 -7
  446. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +4 -4
  447. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +8 -7
  448. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -2
  449. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
  450. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +1 -1
  451. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  452. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -11
  453. package/queries/catalog/signature-query/signature-query-executor.js +124 -63
  454. package/queries/catalog/signature-query/signature-query-format.d.ts +21 -0
  455. package/queries/catalog/signature-query/signature-query-format.js +5 -1
  456. package/queries/catalog/signature-query/signature-query-render.js +28 -3
  457. package/queries/catalog/slice-query-options.d.ts +19 -2
  458. package/queries/catalog/slice-query-options.js +19 -3
  459. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +2 -2
  460. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -17
  461. package/queries/query-function-filter.d.ts +1 -0
  462. package/queries/query-function-filter.js +1 -0
  463. package/queries/query.d.ts +13 -2
  464. package/queries/query.js +4 -1
  465. package/r-bridge/data/data.d.ts +1435 -450
  466. package/r-bridge/data/data.js +1063 -478
  467. package/r-bridge/data/get.d.ts +1 -6
  468. package/r-bridge/data/get.js +0 -32
  469. package/r-bridge/data/types.d.ts +3 -0
  470. package/r-bridge/init.d.ts +7 -2
  471. package/r-bridge/init.js +10 -5
  472. package/r-bridge/lang-4.x/ast/model/model.d.ts +10 -8
  473. package/r-bridge/lang-4.x/ast/model/model.js +9 -10
  474. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +4 -4
  475. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +5 -5
  476. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +1 -1
  477. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +4 -4
  478. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +4 -4
  479. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +4 -4
  480. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +4 -4
  481. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -4
  482. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -6
  483. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -2
  484. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +4 -4
  485. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +4 -4
  486. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +4 -4
  487. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +4 -4
  488. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +4 -4
  489. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +4 -4
  490. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +5 -5
  491. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -1
  492. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +6 -4
  493. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +4 -0
  494. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +4 -3
  495. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +4 -3
  496. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +4 -4
  497. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +5 -5
  498. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -1
  499. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +5 -5
  500. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -1
  501. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +4 -4
  502. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +4 -4
  503. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +4 -20
  504. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -43
  505. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +11 -0
  506. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +18 -3
  507. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +0 -5
  508. package/r-bridge/lang-4.x/ast/model/processing/role.js +0 -13
  509. package/r-bridge/lang-4.x/ast/model/versions.d.ts +2 -0
  510. package/r-bridge/lang-4.x/ast/model/versions.js +3 -1
  511. package/r-bridge/lang-4.x/ast/parser/json/parser.js +3 -2
  512. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.d.ts +2 -2
  513. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +2 -2
  514. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.d.ts +1 -1
  515. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +1 -1
  516. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +1 -1
  517. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +10 -2
  518. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.d.ts +2 -2
  519. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -2
  520. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.d.ts +1 -1
  521. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +1 -1
  522. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.d.ts +3 -1
  523. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.js +3 -1
  524. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.d.ts +5 -1
  525. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -1
  526. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.d.ts +3 -1
  527. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +3 -1
  528. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.d.ts +1 -1
  529. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +1 -1
  530. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.d.ts +1 -1
  531. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -1
  532. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +39 -2
  533. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.d.ts +1 -1
  534. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +1 -1
  535. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.d.ts +1 -1
  536. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.js +2 -1
  537. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.d.ts +1 -1
  538. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +1 -1
  539. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +2 -2
  540. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -2
  541. package/r-bridge/lang-4.x/convert-values.d.ts +6 -0
  542. package/r-bridge/lang-4.x/convert-values.js +6 -0
  543. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  544. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +2 -2
  545. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +1 -1
  546. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +15 -2
  547. package/r-bridge/parser.d.ts +1 -1
  548. package/r-bridge/parser.js +1 -1
  549. package/r-bridge/retriever.d.ts +0 -21
  550. package/r-bridge/retriever.js +5 -63
  551. package/r-bridge/roxygen2/documentation-provider.d.ts +2 -2
  552. package/r-bridge/roxygen2/documentation-provider.js +2 -2
  553. package/r-bridge/shell-executor.js +1 -1
  554. package/r-bridge/shell.d.ts +4 -4
  555. package/r-bridge/shell.js +58 -35
  556. package/reconstruct/inline/source-inline-map.d.ts +15 -22
  557. package/reconstruct/inline/source-inline-map.js +63 -70
  558. package/reconstruct/reconstruct.d.ts +1 -1
  559. package/reconstruct/reconstruct.js +5 -2
  560. package/search/flowr-search-builder.d.ts +17 -16
  561. package/search/flowr-search-builder.js +9 -8
  562. package/search/flowr-search-filters.d.ts +1 -13
  563. package/search/flowr-search-filters.js +4 -13
  564. package/search/search-executor/search-enrichers.d.ts +2 -2
  565. package/search/search-executor/search-enrichers.js +3 -3
  566. package/search/search-executor/search-generators.d.ts +0 -3
  567. package/search/search-executor/search-transformer.d.ts +0 -3
  568. package/slicing/criterion/parse.d.ts +24 -20
  569. package/slicing/criterion/parse.js +34 -24
  570. package/slicing/static/fingerprint.js +6 -12
  571. package/slicing/static/slice-call.d.ts +1 -1
  572. package/slicing/static/slice-call.js +28 -9
  573. package/slicing/static/static-slicer.js +3 -4
  574. package/slicing/static/visiting-queue.d.ts +3 -1
  575. package/slicing/static/visiting-queue.js +25 -14
  576. package/util/accessor.d.ts +22 -0
  577. package/util/accessor.js +3 -0
  578. package/util/assert.d.ts +14 -8
  579. package/util/assert.js +25 -8
  580. package/util/collections/arrays.d.ts +11 -7
  581. package/util/collections/arrays.js +14 -14
  582. package/util/collections/defaultmap.d.ts +5 -0
  583. package/util/collections/defaultmap.js +14 -0
  584. package/util/diff-graph.d.ts +1 -2
  585. package/util/diff-graph.js +0 -1
  586. package/util/files.d.ts +20 -34
  587. package/util/files.js +36 -51
  588. package/util/glob.js +1 -1
  589. package/util/json.d.ts +0 -7
  590. package/util/json.js +0 -15
  591. package/util/logic.d.ts +5 -0
  592. package/util/logic.js +6 -1
  593. package/util/mermaid/dfg.d.ts +2 -1
  594. package/util/mermaid/dfg.js +7 -6
  595. package/util/mermaid/mermaid.d.ts +1 -0
  596. package/util/mermaid/mermaid.js +1 -0
  597. package/util/numbers.d.ts +0 -5
  598. package/util/numbers.js +0 -9
  599. package/util/objects.d.ts +3 -3
  600. package/util/objects.js +3 -3
  601. package/util/quads.d.ts +2 -2
  602. package/util/quads.js +1 -1
  603. package/util/r-base-packages.d.ts +14 -1
  604. package/util/r-base-packages.js +21 -1
  605. package/util/r-package-urls.d.ts +33 -0
  606. package/util/r-package-urls.js +79 -0
  607. package/util/r-version.d.ts +8 -2
  608. package/util/r-version.js +8 -2
  609. package/util/range.d.ts +173 -54
  610. package/util/range.js +221 -75
  611. package/util/record.d.ts +7 -6
  612. package/util/record.js +7 -6
  613. package/util/simple-df/dfg-ascii.js +6 -6
  614. package/util/summarizer.d.ts +2 -15
  615. package/util/summarizer.js +0 -15
  616. package/util/text/args.d.ts +2 -2
  617. package/util/text/args.js +2 -2
  618. package/util/text/playground-link.d.ts +17 -28
  619. package/util/text/playground-link.js +42 -18
  620. package/util/text/r-highlight.d.ts +20 -0
  621. package/util/text/r-highlight.js +171 -0
  622. package/util/text/strings.d.ts +6 -0
  623. package/util/text/strings.js +11 -2
  624. package/util/version.js +2 -2
  625. package/cli/run-script.d.ts +0 -7
  626. package/cli/run-script.js +0 -17
  627. package/project/sigdb/signature-match.d.ts +0 -18
  628. package/project/sigdb/signature-match.js +0 -32
  629. package/util/text/text.d.ts +0 -5
  630. package/util/text/text.js +0 -24
@@ -5,752 +5,1737 @@ export declare const flowrCapabilities: {
5
5
  readonly capabilities: readonly [{
6
6
  readonly name: "Names and Identifiers";
7
7
  readonly id: "names-and-identifiers";
8
- readonly description: "The recognition of syntactical and non-syntactical names, including their resolutions to corresponding definitions.";
8
+ readonly description: `Every name an R program writes down, the ${string} it is written in, and the ${string} it resolves to.`;
9
9
  readonly example: (parser: import("../parser").KnownParser) => Promise<string>;
10
10
  readonly capabilities: readonly [{
11
11
  readonly name: "Form";
12
12
  readonly id: "form";
13
+ readonly description: `A name is written plainly, ${string}, ${string}, or ${string} that reads it as one.`;
13
14
  readonly capabilities: readonly [{
14
15
  readonly name: "Normal";
15
16
  readonly id: "name-normal";
16
17
  readonly supported: "fully";
17
- readonly description: "_Recognize symbol uses like `a`, `plot`, ..._ (i.e., \"normal variables or function calls\").";
18
+ readonly description: `_A name written as R's grammar allows it, like \`a\` or \`plot\`._ Every other form ends up as one of these, and a ${string} links it to the definitions that may reach it.`;
18
19
  readonly url: [{
19
- readonly name: string;
20
- readonly href: "https://adv-r.hadley.nz/names-values.html#binding-basics";
20
+ name: string;
21
+ href: string;
21
22
  }, {
22
- readonly name: string;
23
- readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Identifiers-1";
23
+ name: string;
24
+ href: string;
24
25
  }];
25
26
  }, {
26
27
  readonly name: "Quoted";
27
28
  readonly id: "name-quoted";
28
29
  readonly supported: "fully";
29
- readonly description: "_Recognize `\"a\"`, `'plot'`, ..._ In general, R allows to envelop names in quotations to allow for special characters such as spaces in variable names. However, this only works in the context of definitions. To access these names as variables, one has to either use function such as `get` or escape the name with backticks.";
30
+ readonly description: `_A name given as a string, like \`"a"\` or \`'plot'\`._ Such a name may hold spaces, but R accepts the quotes only where it is defined, so reading it back needs ${string} or a ${string}.`;
31
+ readonly example: string;
30
32
  readonly url: [{
31
- readonly name: string;
32
- readonly href: "https://adv-r.hadley.nz/names-values.html#non-syntactic";
33
+ name: string;
34
+ href: string;
33
35
  }];
34
36
  }, {
35
37
  readonly name: "Escaped";
36
38
  readonly id: "name-escaped";
37
39
  readonly supported: "fully";
38
- readonly description: "_Recognize `` `a` ``, `` `plot` ``, ..._";
40
+ readonly description: `_A name escaped in backticks, like \`\` \`a\` \`\` or \`\` \`my var\` \`\`._ It binds and resolves like a ${string}, the syntax only lifts the grammar's restriction on the characters it may hold.`;
41
+ readonly example: string;
39
42
  readonly url: [{
40
- readonly name: string;
41
- readonly href: "https://adv-r.hadley.nz/names-values.html#non-syntactic";
43
+ name: string;
44
+ href: string;
42
45
  }];
43
46
  }, {
44
47
  readonly name: "Created";
45
48
  readonly id: "name-created";
46
- readonly supported: "partially";
47
- readonly description: "_Recognize functions which resolve strings as identifiers, such as `get`, ..._";
49
+ readonly code: readonly ["get", "get0", "mget", "exists", "match.fun"];
50
+ readonly supported: "fully";
51
+ readonly description: `_A call that reads a string argument as the name it spells, such as \`get\`, \`get0\`, \`mget\`, \`exists\`, \`match.fun\`, and \`assign\`._ The string counts as a use of that name, or for \`assign\` as a ${string}. A name only known at runtime (\`get(Sys.getenv("V"))\`) is not linked.`;
52
+ readonly example: string;
53
+ readonly url: [{
54
+ name: string;
55
+ href: string;
56
+ }];
57
+ }, {
58
+ readonly name: "Resolved Name";
59
+ readonly id: "name-created-resolved";
60
+ readonly code: readonly ["paste0", "paste", "file.path"];
61
+ readonly supported: "fully";
62
+ readonly description: `_A ${string} whose string argument is not a literal but folds to one._ Covers ${string}, variables holding one, and \`paste0\`/\`paste\`/\`file.path\` over constants, each followed like a written-out name.`;
63
+ readonly example: string;
48
64
  readonly url: [{
49
- readonly name: "flowr#633";
50
- readonly href: string;
65
+ name: string;
66
+ href: string;
51
67
  }];
52
68
  }];
53
69
  }, {
54
70
  readonly name: "Resolution";
55
71
  readonly id: "resolution";
72
+ readonly description: `Which definitions a name may reach, through the ${string} around it, the ${string} a program builds, and the ${string} below them.`;
56
73
  readonly capabilities: readonly [{
57
74
  readonly name: "Global Scope";
58
75
  readonly id: "global-scope";
76
+ readonly code: readonly ["globalenv"];
59
77
  readonly supported: "fully";
60
- readonly description: "_For example, tracking a big table of current identifier bindings_";
78
+ readonly description: `_Resolve a name against the bindings of the global environment, whenever no enclosing ${string} binds it._ Every top-level definition that may still be active is linked, so a use after an \`if\` reaches both branches' definitions.`;
79
+ readonly example: string;
80
+ readonly url: [{
81
+ name: string;
82
+ href: string;
83
+ }];
61
84
  }, {
62
85
  readonly name: "Lexicographic Scope";
63
86
  readonly id: "lexicographic-scope";
64
87
  readonly supported: "fully";
65
- readonly description: "_For example, support function definition scopes_";
88
+ readonly description: `_Resolve a name to the innermost enclosing definition, and only to the ${string} when no enclosing one binds it._ Where a ${string} is written decides what its body sees, not where it is called.`;
89
+ readonly example: string;
90
+ readonly url: [{
91
+ name: string;
92
+ href: string;
93
+ }, {
94
+ name: string;
95
+ href: string;
96
+ }];
66
97
  }, {
67
98
  readonly name: "Closures";
68
99
  readonly id: "closures";
69
100
  readonly supported: "partially";
70
- readonly description: "_Handling [function factories](https://adv-r.hadley.nz/function-factories.html) and friends._ Currently, we do not have enough tests to be sure.";
101
+ readonly description: `_Two closures from the same factory keep independent state in R, as every call of the factory makes an environment of its own._ We keep one environment per ${string} instead, so a \`<<-\` in one closure is read as reaching the binding the other captured.`;
102
+ readonly example: string;
103
+ readonly url: [{
104
+ name: string;
105
+ href: string;
106
+ }, {
107
+ name: string;
108
+ href: string;
109
+ }];
110
+ }, {
111
+ readonly name: "Closure Capture";
112
+ readonly id: "closure-capture";
113
+ readonly supported: "fully";
114
+ readonly description: "_A function captures the environment it was defined in, not the values that were in it._ So it sees a write made to that environment after its definition, a sibling closure's `<<-` included.";
115
+ readonly example: string;
116
+ readonly url: [{
117
+ name: string;
118
+ href: string;
119
+ }, {
120
+ name: string;
121
+ href: string;
122
+ }];
71
123
  }, {
72
124
  readonly name: "Dynamic Environment Resolution";
73
125
  readonly id: "dynamic-environment-resolution";
74
- readonly supported: "partially";
75
- readonly description: "_For example, using `new.env` and friends. Supports `new.env`/`new.environment`/`rlang::new_environment`, `assign`/`get`/`local` with `envir=`, dollar-sign access (`e$x`), `attach`, `with`/`within`, and env-variable aliasing (`alias <- e`). Static parent-argument resolution (`parent = e`, `parent = emptyenv()`) is supported._";
126
+ readonly code: readonly ["new.env"];
127
+ readonly description: `_An environment a program builds and names itself, rather than one a ${string} opens._ Covers \`new.env\`, \`assign\`/\`get\`/\`local\` with \`envir=\`, \`e$x\`, \`attach\`, \`with\`, and aliasing such an environment through a variable.`;
128
+ readonly example: string;
76
129
  readonly capabilities: readonly [{
77
- readonly name: "Environment in Conditionals";
78
- readonly id: "environment-in-conditionals";
79
- readonly supported: "partially";
80
- readonly description: "_Tracking environment assignments and reads across if-then-else branches. flowR propagates envState through branch merging, but cross-branch name resolution inside the env is not guaranteed._";
81
- }, {
82
- readonly name: "Environment in Loops";
83
- readonly id: "environment-in-loops";
84
- readonly supported: "partially";
85
- readonly description: "_Tracking environment assignments inside loop constructs (for, while, repeat). The env variable is correctly attributed in each iteration body, but dynamic key generation (e.g., `paste0`) prevents static name resolution._";
130
+ readonly name: "Environment in Control Flow";
131
+ readonly id: "environment-in-control-flow";
132
+ readonly supported: "fully";
133
+ readonly description: "_Track environment assignments and reads across branches and loop bodies, a key built at run time such as `paste0(\"k\", i)` included._";
86
134
  }, {
87
135
  readonly name: "Environment Parent";
88
136
  readonly id: "environment-parent";
89
137
  readonly supported: "partially";
90
- readonly description: "_Specifying a parent for a newly-created environment (`new.env(parent = e)`, `new.env(parent = emptyenv())`). Tracked-env-variable parents and `emptyenv()`/`NULL` are resolved statically; dynamic or unknown parents fall back to the default (`parent.frame()`)._";
138
+ readonly description: "_Specifying a parent for a newly-created environment from a dynamic or unknown expression (`new.env(parent = f())`)._ Such a parent falls back to the default (`parent.frame()`) instead of resolving.";
139
+ readonly url: [{
140
+ name: string;
141
+ href: string;
142
+ }];
143
+ }, {
144
+ readonly name: "Environment Parent (Tracked)";
145
+ readonly id: "environment-parent-tracked";
146
+ readonly supported: "fully";
147
+ readonly description: "_Specifying a parent for a newly-created environment from a tracked environment variable or a constant (`new.env(parent = e)`, `new.env(parent = emptyenv())`)._";
148
+ readonly url: [{
149
+ name: string;
150
+ href: string;
151
+ }];
91
152
  }, {
92
153
  readonly name: "Environment Alias";
93
154
  readonly id: "environment-alias";
94
155
  readonly supported: "partially";
95
- readonly description: "_Aliasing a tracked environment variable (`alias <- e`). The `envState` snapshot at assignment time is propagated, so assigns made BEFORE the alias are visible through it. Assigns made AFTER the alias to the original variable are not reflected._";
156
+ readonly description: `_Aliasing a tracked environment variable (\`alias <- e\`), which binds a second name to the same environment rather than a copy._ A write to the original made after the alias is not reflected through it, unlike a ${string}.`;
96
157
  }, {
97
- readonly name: "With / Within";
158
+ readonly name: "Environment Alias Read";
159
+ readonly id: "environment-alias-read";
160
+ readonly supported: "fully";
161
+ readonly description: "_Reading through an aliased tracked environment variable (`alias <- e`)._ Every assign made up to the alias is visible through it.";
162
+ }, {
163
+ readonly name: "With";
98
164
  readonly id: "environment-with";
165
+ readonly code: readonly ["with"];
166
+ readonly supported: "fully";
167
+ readonly description: "_Evaluating an expression inside a named environment with `with(data, expr)`._ Reads of names the tracked env defines resolve, including through a computed `data` argument or a nested call.";
168
+ }, {
169
+ readonly name: "Parent Frame";
170
+ readonly id: "parent-frame";
171
+ readonly code: readonly ["parent.frame"];
99
172
  readonly supported: "partially";
100
- readonly description: "_Evaluating an expression inside a named environment with `with(data, expr)` or `within(data, expr)`. When `data` is a tracked env variable, reads of names defined in that env resolve correctly. Writes inside `expr` are ephemeral (not persisted back to the env)._";
173
+ readonly description: "_Reading via `parent.frame()$name`, and a write escaping through `eval.parent(quote(name <- value))`._ Works only one call away, and storing the frame first drops the binding.";
174
+ readonly url: [{
175
+ name: string;
176
+ href: string;
177
+ }];
101
178
  }, {
102
179
  readonly name: "Dynamic Variable Removal";
103
180
  readonly id: "dynamic-variable-removal";
181
+ readonly code: readonly ["rm", "sys.frame"];
104
182
  readonly supported: "partially";
105
183
  readonly description: "_Support for `rm(list=..., envir=sys.frame(N))` removing variables from a specific call frame. Currently handles negative and zero offsets from within depth-1 functions._";
106
184
  }];
185
+ readonly url: [{
186
+ name: string;
187
+ href: string;
188
+ }];
107
189
  }, {
108
190
  readonly name: "Environment Sharing";
109
191
  readonly id: "environment-sharing";
110
- readonly supported: "not";
111
- readonly description: "_Handling side-effects by environments which are not copied when modified_";
192
+ readonly supported: "partially";
193
+ readonly description: `_Handling side-effects through environments, which act as reference types and are not copied when modified._ A write through a parameter is kept as an unknown side effect of the call (see ${string} and ${string}).`;
194
+ readonly example: string;
195
+ readonly url: [{
196
+ name: string;
197
+ href: string;
198
+ }, {
199
+ name: string;
200
+ href: string;
201
+ }];
112
202
  }, {
113
203
  readonly name: "Search Type";
114
204
  readonly id: "search-type";
115
205
  readonly supported: "fully";
116
- readonly description: "_Separating the resolution for functions and symbols._";
206
+ readonly description: `_Resolve a name in call position only against function definitions, a name in value position against every binding._ This is why the \`c <- 1\` below does not shadow the ${string} to \`c\`.`;
207
+ readonly example: string;
208
+ readonly url: [{
209
+ name: string;
210
+ href: string;
211
+ }];
117
212
  }, {
118
213
  readonly name: "Search Path";
119
214
  readonly id: "search-path";
120
- readonly supported: "partially";
121
- readonly description: "_Handling [R's search path](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Search-path) as explained in [Advanced R](https://adv-r.hadley.nz/environments.html#search-path)._ Attached packages and `attach`ed environments are placed below `.GlobalEnv` (so global bindings shadow package exports, matching R), attaching inside/through function calls propagates to the caller, and re-attaching is a no-op. Not yet handled: dynamic `search`/`fn_env` manipulation.";
215
+ readonly code: readonly ["attach"];
216
+ readonly supported: "fully";
217
+ readonly description: `_Resolve a name against the packages [the search path](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Search-path) holds, whenever no scope in the script binds it._ Attached packages sit below \`.GlobalEnv\`, so a ${string} shadows an export.`;
218
+ readonly example: string;
219
+ readonly url: [{
220
+ name: string;
221
+ href: string;
222
+ }, {
223
+ name: string;
224
+ href: string;
225
+ }];
226
+ }, {
227
+ readonly name: "Dynamic Search Path";
228
+ readonly id: "dynamic-search-path";
229
+ readonly code: readonly ["search", "searchpaths"];
230
+ readonly supported: "not";
231
+ readonly description: "_Programmatically inspecting or mutating the search path with `search()`, `searchpaths()`, or detaching by position._ None of this is modelled, and `search()` reads as an unknown call.";
232
+ readonly example: string;
233
+ readonly url: [{
234
+ name: string;
235
+ href: string;
236
+ }];
122
237
  }, {
123
238
  readonly name: "Namespaces";
124
239
  readonly id: "namespaces";
125
240
  readonly supported: "partially";
126
- readonly description: "_Handling R's namespaces as explained in [Advanced R](https://adv-r.hadley.nz/environments.html#namespaces)_";
241
+ readonly description: `_Separate what a package's namespace holds from what attaching it puts on the ${string}._ The imports environment a package carries for itself is not modelled.`;
242
+ readonly url: [{
243
+ name: string;
244
+ href: string;
245
+ }];
127
246
  }, {
128
247
  readonly name: "Accessing Exported Names";
129
248
  readonly id: "accessing-exported-names";
130
- readonly supported: "partially";
131
- readonly description: "_Resolving calls with `::` to their origin._ Accessing external files is allowed, although the name of packages etc. is not resolved correctly.";
249
+ readonly code: readonly ["::"];
250
+ readonly supported: "fully";
251
+ readonly description: `_Resolve a name written \`pkg::name\` to the export it names, no matter what the script binds._ This depends on what the ${string} knows, and an unresolved name stays unresolved rather than reported.`;
252
+ readonly example: string;
253
+ readonly url: [{
254
+ name: string;
255
+ href: string;
256
+ }];
132
257
  }, {
133
258
  readonly name: "Accessing Internal Names";
134
259
  readonly id: "accessing-internal-names";
135
- readonly supported: "partially";
136
- readonly description: "_Similar to `::` but for internal names._";
260
+ readonly code: readonly [":::"];
261
+ readonly supported: "fully";
262
+ readonly description: `_Resolve a name written \`pkg:::name\`, which reaches what the namespace keeps to itself._ Whether the name is genuinely internal rather than exported is not checked (see ${string}).`;
263
+ readonly example: string;
264
+ readonly url: [{
265
+ name: string;
266
+ href: string;
267
+ }];
268
+ }, {
269
+ readonly name: "Namespace Exports";
270
+ readonly id: "namespace-exports";
271
+ readonly code: readonly ["getNamespaceExports"];
272
+ readonly supported: "fully";
273
+ readonly description: `_Know which names a package's namespace declares exported versus keeps internal._ The ${string} checks a \`::\`/\`:::\` choice against what the ${string} records, which omits most internal names to stay small.`;
274
+ readonly example: string;
275
+ readonly url: [{
276
+ readonly name: "Writing R Extensions/Package namespaces";
277
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-namespaces";
278
+ }];
137
279
  }, {
138
280
  readonly name: "Library Loading";
139
281
  readonly id: "library-loading";
140
- readonly supported: "partially";
141
- readonly description: "_Resolve libraries identified with `library`, `require`, `attachNamespace`, ... and attach them to the search path_";
282
+ readonly code: readonly ["library", "require", "attachNamespace", "loadNamespace"];
283
+ readonly supported: "fully";
284
+ readonly description: `_Attach a package named by \`library\`, \`require\`, \`attachNamespace\`, ... to the ${string}._ From that point on an unbound name may resolve to one of its exports, while a binding in the script still shadows it.`;
285
+ readonly example: string;
286
+ readonly url: [{
287
+ name: string;
288
+ href: string;
289
+ }, {
290
+ name: string;
291
+ href: string;
292
+ }];
293
+ }, {
294
+ readonly name: "Library Unloading";
295
+ readonly id: "library-unloading";
296
+ readonly code: readonly ["detach", "unloadNamespace"];
297
+ readonly supported: "not";
298
+ readonly description: `_Undo a ${string} with \`detach\`, \`unloadNamespace\`, ..._ Neither is modelled, so a name used after \`detach\` still resolves to the package's export.`;
299
+ readonly example: string;
300
+ readonly url: [{
301
+ name: string;
302
+ href: string;
303
+ }];
142
304
  }, {
143
305
  readonly name: "Dynamic Scope Changes";
144
306
  readonly id: "dynamic-scope-changes";
307
+ readonly code: readonly ["local"];
308
+ readonly supported: "fully";
309
+ readonly description: `_Open a scope of its own with a plain [\`local\`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/local) block._ A name it binds is invisible outside, while a ${string} from within reaches the enclosing scope.`;
310
+ readonly example: string;
311
+ }, {
312
+ readonly name: "Local with Explicit Environment";
313
+ readonly id: "local-envir-argument";
145
314
  readonly supported: "partially";
146
- readonly description: "_Manually changing scopes like [`local`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/eval)_";
315
+ readonly description: "_Send `local`'s body to a specific environment._ `new.env()` and `globalenv()` work, but inside a function that already binds the name the write lands in that frame instead.";
316
+ readonly example: string;
317
+ readonly url: [{
318
+ readonly name: "`local`";
319
+ readonly href: "https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/local";
320
+ }];
147
321
  }, {
148
322
  readonly name: "Anonymous Bindings";
149
323
  readonly id: "anonymous-bindings";
324
+ readonly code: readonly ["Recall"];
150
325
  readonly supported: "fully";
151
- readonly description: "_Support for [`Recall`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/Recall)_";
326
+ readonly description: `_Resolve a call that does not name the function it runs, as [\`Recall\`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/Recall) does._ It is linked to the enclosing ${string}, the same way a call through the function's own name ${string}.`;
327
+ readonly example: string;
152
328
  }];
153
329
  }];
154
330
  }, {
155
331
  readonly name: "Expressions";
156
332
  readonly id: "expressions";
333
+ readonly description: `The ${string}, ${string}, ${string}, and ${string} an R program is built from.`;
157
334
  readonly capabilities: readonly [{
158
- readonly name: "Function Calls";
335
+ readonly name: "Calls";
159
336
  readonly id: "function-calls";
337
+ readonly description: `Everything that is a call in R, from \`f(x)\` over ${string} to a ${string}, with the ${string} it binds and the ${string} it may have.`;
160
338
  readonly capabilities: readonly [{
161
339
  readonly name: "Grouping";
162
340
  readonly id: "grouping";
163
341
  readonly supported: "fully";
164
- readonly description: "_Recognize groups done with `(`, `{`, ... (more precisely, their default mapping to the primitive implementations)._";
342
+ readonly description: `_Read \`(\` and \`{\` as the calls they are, mapped to their primitive implementations._ A group hands on the value of its last expression, so \`x <- { 1; 2 }\` binds \`x\` to \`2\`, and ${string} \`\` \`{\` \`\` replaces that meaning.`;
343
+ readonly example: string;
344
+ readonly url: [{
345
+ name: string;
346
+ href: string;
347
+ }];
165
348
  }, {
166
349
  readonly name: "Normal Call";
167
350
  readonly id: "call-normal";
168
351
  readonly supported: "fully";
169
- readonly description: "_Recognize and resolve calls like `f(x)`, `foo::bar(x, y)`, ..._";
352
+ readonly description: `_Link a call like \`f(x)\` or \`foo::bar(x, y)\` to the ${string} its name may resolve to, and its arguments to the formals they bind._ Every definition that may be active is linked, which over-approximates rather than picking one.`;
170
353
  readonly capabilities: readonly [{
171
354
  readonly name: "Unnamed Arguments";
172
355
  readonly id: "unnamed-arguments";
173
356
  readonly supported: "fully";
174
- readonly description: "_Recognize and resolve calls like `f(3)`, `foo::bar(3, c(1,2))`, ..._";
357
+ readonly description: `_An argument given without a name, like \`f(3)\`, which binds to a formal by position._ It is matched after every ${string} has taken its formal.`;
358
+ readonly url: [{
359
+ name: string;
360
+ href: string;
361
+ }];
175
362
  }, {
176
363
  readonly name: "Empty Arguments";
177
364
  readonly id: "empty-arguments";
178
365
  readonly supported: "fully";
179
- readonly description: "_Essentially a special form of an unnamed argument as in `foo::bar(3, ,42)`, ..._";
366
+ readonly description: `_An argument left out entirely, as the second one in \`foo::bar(3, ,42)\`._ It still takes a position, which is what makes \`m[1, ]\` an ${string} on one dimension.`;
367
+ readonly example: string;
368
+ readonly url: [{
369
+ name: string;
370
+ href: string;
371
+ }];
180
372
  }, {
181
373
  readonly name: "Named Arguments";
182
374
  readonly id: "named-arguments";
183
375
  readonly supported: "fully";
184
- readonly description: "_Recognize and resolve calls like `f(x = 3)`, `foo::bar(x = 3, y = 4)`, ..._";
376
+ readonly description: `_An argument given with a name, like \`f(x = 3)\`, which binds to the formal of that name._ Inside a call \`=\` names an argument rather than ${string}.`;
377
+ readonly url: [{
378
+ name: string;
379
+ href: string;
380
+ }];
185
381
  }, {
186
382
  readonly name: "String Arguments";
187
383
  readonly id: "string-arguments";
188
384
  readonly supported: "fully";
189
- readonly description: "_Recognize and resolve calls like `f('x' = 3)`, `foo::bar('x' = 3, \"y\" = 4)`, ..._";
385
+ readonly description: `_An argument whose name is written as a string, like \`f('x' = 3)\`._ It binds the same formal a ${string} would, the way a ${string} binds an ordinary one.`;
190
386
  }, {
191
387
  readonly name: "Resolve Arguments";
192
388
  readonly id: "resolve-arguments";
193
389
  readonly supported: "fully";
194
- readonly description: "_Correctly bind arguments (including [`pmatch`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/pmatch))._ Currently, we do not have a correct implementation for `pmatch`. Furthermore, more tests would be nice.";
390
+ readonly description: `_Match every argument of a call to the formal it binds, exact names first, then unique prefixes ([\`pmatch\`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/pmatch)), then ${string}._ A formal behind ${string} matches only exactly, and an ambiguous prefix binds nothing.`;
391
+ readonly example: string;
392
+ readonly url: [{
393
+ name: string;
394
+ href: string;
395
+ }];
195
396
  }, {
196
397
  readonly name: "Side-Effects in Argument";
197
398
  readonly id: "side-effects-in-argument";
198
399
  readonly supported: "partially";
199
- readonly description: "_Handle side-effects of arguments (e.g., `f(x <- 3)`, `f(x = y <- 3)`, ...)._ We have not enough tests to be sure";
400
+ readonly description: `_An argument that binds a name while it is evaluated, as \`f(x <- 3)\` does._ Whether the argument is ever forced is not modelled (see ${string}), so \`f <- function(a) 1; f(x <- 3)\` still believes \`x\` is 3.`;
401
+ readonly example: string;
402
+ readonly url: [{
403
+ name: string;
404
+ href: string;
405
+ }];
200
406
  }, {
201
407
  readonly name: "Side-Effects in Function Call";
202
408
  readonly id: "side-effects-in-function-call";
203
409
  readonly supported: "partially";
204
- readonly description: "_Handle side-effects of function calls (e.g., `setXTo(3)`, ...) for example achieved with the super assignment._ We need more tests and handlings. Furthermore, we do not detect side effects with external files, network, logging, etc.";
410
+ readonly description: `_A call that binds a name outside itself, as \`setXTo(3)\` does with a ${string}._ Such a write reaches the caller through several call levels, but one through a ${string} is missed.`;
411
+ readonly example: string;
412
+ readonly url: [{
413
+ name: string;
414
+ href: string;
415
+ }];
416
+ }];
417
+ readonly url: [{
418
+ name: string;
419
+ href: string;
205
420
  }];
206
421
  }, {
207
422
  readonly name: "Recursion";
208
423
  readonly id: "recursion";
209
424
  readonly supported: "fully";
210
- readonly description: "_Recognize and resolve recursive calls like `f(3)` inside the definition of `f`, ..._";
425
+ readonly description: `_A call to \`f\` inside the ${string} of \`f\`._ The name resolves to the definition it sits in, so the call links back to it rather than staying unresolved.`;
426
+ readonly example: string;
211
427
  }, {
212
428
  readonly name: "Anonymous Calls";
213
429
  readonly id: "call-anonymous";
214
430
  readonly supported: "fully";
215
- readonly description: "_Recognize and resolve calls like `(function(x) x)(3)`, `factory(0)()`, ..._";
431
+ readonly description: `_A call whose target is an expression rather than a name, like \`(function(x) x)(3)\` or \`factory(0)()\`._ It links to the ${string} that expression yields, without a name being involved.`;
432
+ readonly example: string;
433
+ readonly url: [{
434
+ name: string;
435
+ href: string;
436
+ }];
216
437
  }, {
217
438
  readonly name: "Infix Calls";
218
439
  readonly id: "infix-calls";
219
440
  readonly supported: "fully";
220
- readonly description: "_Recognize and resolve calls like `x + y`, `x %>% f(y)`, ..._";
441
+ readonly description: `_An operator written between its arguments, like \`x + y\` or \`x %>% f(y)\`._ It is the same ${string} as \`\` \`+\`(x, y) \`\`, which is why ${string} changes what it does.`;
442
+ readonly example: string;
443
+ readonly url: [{
444
+ name: string;
445
+ href: string;
446
+ }];
221
447
  }, {
222
448
  readonly name: "Redefinition of Built-In Functions/primitives";
223
449
  readonly id: "redefinition-of-built-in-functions-primitives";
224
- readonly supported: "partially";
225
- readonly description: "_Handle cases like `print <- function(x) x`, `` `for` <- function(a,b,c) a``, ..._ Currently, we can not handle all of them there are no tests. Still wip as part of desugaring";
450
+ readonly supported: "fully";
451
+ readonly description: `_A name that R defines being bound in the program, as in \`print <- function(x) x\` or \`\` \`for\` <- function(a,b,c) a \`\`._ The redefinition wins wherever the built-in would have been used, respecting ${string} and order. Only ${string} are exempt.`;
452
+ readonly example: string;
453
+ readonly url: [{
454
+ name: string;
455
+ href: string;
456
+ }];
226
457
  }, {
227
458
  readonly name: "Functions with global side effects";
228
459
  readonly id: "functions-with-global-side-effects";
229
460
  readonly supported: "partially";
230
- readonly description: "_Support functions like `setwd` which have an impact on the subsequent program._";
461
+ readonly description: `_A call that changes state the rest of the program reads without naming it, as \`setwd\` changes where a path points._ Only the ${string} is interpreted, while other ambient state such as ${string} stays an unknown side effect.`;
462
+ readonly example: string;
231
463
  }, {
232
464
  readonly name: "Working Directory";
233
465
  readonly id: "working-directory";
466
+ readonly code: readonly ["setwd", "getwd"];
234
467
  readonly supported: "partially";
235
- readonly description: "_Track the effective working directory across `setwd` (control-flow- and location-sensitive) to resolve relative file paths. Interprocedural, sourced, and loop cases are treated as unbounded rather than guessed._";
236
- }, {
237
- readonly name: "Index Access";
238
- readonly id: "index-access";
239
- readonly capabilities: readonly [{
240
- readonly name: "Single Bracket Access";
241
- readonly id: "single-bracket-access";
242
- readonly supported: "fully";
243
- readonly description: "_Detect calls like `x[i]`, `x[i, ,b]`, `x[3][y]`, ... This does not include the real separation of cells, which is handled extra._";
244
- }, {
245
- readonly name: "Double Bracket Access";
246
- readonly id: "double-bracket-access";
247
- readonly supported: "fully";
248
- readonly description: "_Detect calls like `x[[i]]`, `x[[i, b]]`, ... Similar to single bracket._";
249
- }, {
250
- readonly name: "Dollar Access";
251
- readonly id: "dollar-access";
252
- readonly supported: "fully";
253
- readonly description: "_Detect calls like `x$y`, `x$\"y\"`, `x$y$z`, ..._";
254
- }, {
255
- readonly name: "Slot Access";
256
- readonly id: "slot-access";
257
- readonly supported: "fully";
258
- readonly description: "_Detect calls like `x@y`, `x@y@z`, ..._";
259
- }, {
260
- readonly name: "Access with Argument-Names";
261
- readonly id: "access-with-argument-names";
262
- readonly supported: "fully";
263
- readonly description: "_Detect calls like `x[i = 3]`, `x[[i=]]`, ..._";
264
- }, {
265
- readonly name: "Access with Empty";
266
- readonly id: "access-with-empty";
267
- readonly supported: "fully";
268
- readonly description: "_Detect calls like `x[]`, `x[2,,42]`, ..._";
468
+ readonly description: "_Track the effective working directory across `setwd`, control-flow- and location-sensitive._ Interprocedural, sourced, and loop cases are treated as unbounded.";
469
+ }];
470
+ }, {
471
+ readonly name: "Index Access";
472
+ readonly id: "index-access";
473
+ readonly description: "The bracket, double-bracket, dollar, and slot forms for picking an element out of a container, with names, empty positions, and multiple indices.";
474
+ readonly capabilities: readonly [{
475
+ readonly name: "Single Bracket Access";
476
+ readonly id: "single-bracket-access";
477
+ readonly code: readonly ["["];
478
+ readonly supported: "fully";
479
+ readonly description: `_The \`[\` call, as in \`x[i]\`, \`x[i, ,b]\`, or \`x[3][y]\`._ The container is read as a whole without separating the cell an index picks, and writing through it is a ${string}.`;
480
+ readonly example: string;
481
+ readonly url: [{
482
+ name: string;
483
+ href: string;
269
484
  }, {
270
- readonly name: "Subsetting (Multiple Indices)";
271
- readonly id: "subsetting-multiple";
272
- readonly supported: "fully";
273
- readonly description: "_Detect calls like `x[i > 3]`, `x[c(1,3)]`, ..._";
485
+ name: string;
486
+ href: string;
274
487
  }];
275
488
  }, {
276
- readonly name: "Operators";
277
- readonly id: "operators";
278
- readonly capabilities: readonly [{
279
- readonly name: "Unary Operator";
280
- readonly id: "unary-operator";
281
- readonly supported: "fully";
282
- readonly description: "_Recognize and resolve calls like `+3`, `-3`, ..._";
489
+ readonly name: "Double Bracket Access";
490
+ readonly id: "double-bracket-access";
491
+ readonly code: readonly ["[["];
492
+ readonly supported: "fully";
493
+ readonly description: `_The \`[[\` call, as in \`x[[i]]\` or \`x[[i, b]]\`._ Read like ${string}, without modelling the difference in what R returns.`;
494
+ readonly example: string;
495
+ readonly url: [{
496
+ name: string;
497
+ href: string;
283
498
  }, {
284
- readonly name: "Binary Operator";
285
- readonly id: "binary-operator";
286
- readonly supported: "fully";
287
- readonly description: "_Recognize and resolve calls like `3 + 4`, `3 * 4`, ..._";
288
- readonly capabilities: readonly [{
289
- readonly name: "Special Operator";
290
- readonly id: "special-operator";
291
- readonly supported: "fully";
292
- readonly description: "_Recognize and resolve calls like `3 %in% 4`, `3 %*% 4`, ..._";
293
- }, {
294
- readonly name: "Model Formula";
295
- readonly id: "model-formula";
296
- readonly supported: "partially";
297
- readonly description: "_Recognize and resolve calls like `y ~ x`, `y ~ x + z`, ... including their implicit redefinitions of some functions._ Currently, we do not handle their redefinition and only treat model formulas as normal binary operators";
298
- }, {
299
- readonly name: "Assignments and Bindings";
300
- readonly id: "assignments-and-bindings";
301
- readonly capabilities: readonly [{
302
- readonly name: "Local Left Assignment";
303
- readonly id: "local-left-assignment";
304
- readonly supported: "fully";
305
- readonly description: "_Handle `x <- 3`, `x$y <- 3`, ..._";
306
- }, {
307
- readonly name: "Local Right Assignment";
308
- readonly id: "local-right-assignment";
309
- readonly supported: "fully";
310
- readonly description: "_Handle `3 -> x`, `3 -> x$y`, ..._";
311
- }, {
312
- readonly name: "Local Equal Assignment";
313
- readonly id: "local-equal-assignment";
314
- readonly supported: "fully";
315
- readonly description: "_Handle `x = 3`, `x$y := 3`, ..._";
316
- }, {
317
- readonly name: "Local Table Assignment";
318
- readonly id: "local-table-assignment";
319
- readonly supported: "fully";
320
- readonly description: "_Handle `x[,a:=3,]`, ..._";
321
- }, {
322
- readonly name: "Super Left Assignment";
323
- readonly id: "super-left-assignment";
324
- readonly supported: "fully";
325
- readonly description: "_Handle `x <<- 42`, `x$y <<- 42`, ..._";
326
- }, {
327
- readonly name: "Super Right Assignment";
328
- readonly id: "super-right-assignment";
329
- readonly supported: "fully";
330
- readonly description: "_Handle `42 ->> x`, `42 ->> x$y`, ..._";
331
- }, {
332
- readonly name: "Return Value of Assignments";
333
- readonly id: "return-value-of-assignments";
334
- readonly supported: "fully";
335
- readonly description: "_Handle `x <- 3` returning `3`, e.g., in `x <- y <- 3`_";
336
- }, {
337
- readonly name: "Assignment Functions";
338
- readonly id: "assignment-functions";
339
- readonly supported: "partially";
340
- readonly description: "_Handle `assign(x, 3)`, `delayedAssign(x, 3)`, ..._ Currently we can not handle all of them and tests are rare.";
341
- }, {
342
- readonly name: "Range Assignment";
343
- readonly id: "range-assignment";
344
- readonly supported: "fully";
345
- readonly description: "_Handle `x[1:3] <- 3`, `x$y[1:3] <- 3`, ..._";
346
- }, {
347
- readonly name: "Replacement Functions";
348
- readonly id: "replacement-functions";
349
- readonly supported: "partially";
350
- readonly description: "_Handle `x[i] <- 3`, `x$y <- 3`, ... as `` `[<-`(x, 3) ``, ..._ Currently work in progress as part of the desugaring but still untested.";
351
- }, {
352
- readonly name: "Locked Bindings";
353
- readonly id: "locked-bindings";
354
- readonly supported: "not";
355
- readonly description: "_Handle `lockBinding(x, 3)`, ..._";
356
- }];
357
- }];
499
+ name: string;
500
+ href: string;
358
501
  }];
359
502
  }, {
360
- readonly name: "Control-Flow";
361
- readonly id: "control-flow";
362
- readonly capabilities: readonly [{
363
- readonly name: "if";
364
- readonly id: "if";
365
- readonly supported: "fully";
366
- readonly description: "_Handle `if (x) y else z`, `if (x) y`, ..._";
367
- }, {
368
- readonly name: "for loop";
369
- readonly id: "for-loop";
370
- readonly supported: "fully";
371
- readonly description: "_Handle `for (i in 1:3) print(i)`, ..._";
372
- }, {
373
- readonly name: "while loop";
374
- readonly id: "while-loop";
375
- readonly supported: "fully";
376
- readonly description: "_Handle `while (x) b`, ..._";
377
- }, {
378
- readonly name: "repeat loop";
379
- readonly id: "repeat-loop";
380
- readonly supported: "fully";
381
- readonly description: "_Handle `repeat {b; if (x) break}`, ..._";
382
- }, {
383
- readonly name: "break";
384
- readonly id: "break";
385
- readonly supported: "fully";
386
- readonly description: "_Handle `break` (including `break()`) ..._";
387
- }, {
388
- readonly name: "next";
389
- readonly id: "next";
390
- readonly supported: "fully";
391
- readonly description: "_Handle `next` (including `next()`) ..._";
392
- }, {
393
- readonly name: "switch";
394
- readonly id: "switch";
395
- readonly supported: "fully";
396
- readonly description: "_Handle `switch(3, \"a\", \"b\", \"c\")`, ..._";
397
- }, {
398
- readonly name: "return";
399
- readonly id: "return";
400
- readonly supported: "fully";
401
- readonly description: "_Handle `return(3)`, ... in function definitions_";
503
+ readonly name: "Dollar Access";
504
+ readonly id: "dollar-access";
505
+ readonly code: readonly ["$"];
506
+ readonly supported: "fully";
507
+ readonly description: "_The `$` call, as in `x$y`, `x$\"y\"`, or `x$y$z`, whose right side is a name rather than a value._ On a list `$` matches that name partially, so `l$al` reaches an element named `alpha`.";
508
+ readonly example: string;
509
+ readonly url: [{
510
+ name: string;
511
+ href: string;
512
+ }];
513
+ }, {
514
+ readonly name: "Slot Access";
515
+ readonly id: "slot-access";
516
+ readonly code: readonly ["@"];
517
+ readonly supported: "fully";
518
+ readonly description: `_The \`@\` call, which reads a slot of an ${string} object._ The slot name is read like any other access, without checking it against the class \`setClass\` declared.`;
519
+ readonly example: string;
520
+ readonly url: [{
521
+ name: string;
522
+ href: string;
523
+ }];
524
+ }, {
525
+ readonly name: "Access with Argument-Names";
526
+ readonly id: "access-with-argument-names";
527
+ readonly supported: "fully";
528
+ readonly description: `_An index given with a name, as in \`x[i = 3]\` or \`x[[i=]]\`._ It is matched like any other ${string} of the underlying \`[\` call.`;
529
+ }, {
530
+ readonly name: "Access with Empty";
531
+ readonly id: "access-with-empty";
532
+ readonly supported: "fully";
533
+ readonly description: `_An index left out, as in \`x[]\` or \`x[2,,42]\`._ The gap is an ${string} and still counts as a position.`;
534
+ }, {
535
+ readonly name: "Subsetting (Multiple Indices)";
536
+ readonly id: "subsetting-multiple";
537
+ readonly supported: "fully";
538
+ readonly description: `_An index that is a vector or a condition, as in \`x[i > 3]\` or \`x[c(1,3)]\`._ The index expression is read, but which elements it selects stays unknown, as ${string} are not evaluated.`;
539
+ readonly example: string;
540
+ readonly url: [{
541
+ name: string;
542
+ href: string;
402
543
  }, {
403
- readonly name: "Exceptions and Errors";
404
- readonly id: "exceptions-and-errors";
405
- readonly supported: "partially";
406
- readonly description: "_Handle `try`, `stop`, ..._";
544
+ name: string;
545
+ href: string;
546
+ }];
547
+ }];
548
+ }, {
549
+ readonly name: "Operators";
550
+ readonly id: "operators";
551
+ readonly description: "R's unary, binary, and special operators, the model formula, and every way a name can be bound to a value.";
552
+ readonly capabilities: readonly [{
553
+ readonly name: "Unary Operator";
554
+ readonly id: "unary-operator";
555
+ readonly supported: "fully";
556
+ readonly description: `_An operator written before its single argument, like \`+3\` or \`-3\`._ It is a ${string} of the operator's name with one argument.`;
557
+ readonly url: [{
558
+ name: string;
559
+ href: string;
407
560
  }];
408
561
  }, {
409
- readonly name: "Function Definitions";
410
- readonly id: "function-definitions";
562
+ readonly name: "Binary Operator";
563
+ readonly id: "binary-operator";
564
+ readonly supported: "fully";
565
+ readonly description: `_An operator written between its two arguments, like \`3 + 4\` or \`3 * 4\`._ It is a ${string} of the operator's name with both arguments, in the order ${string}.`;
411
566
  readonly capabilities: readonly [{
412
- readonly name: "Normal";
413
- readonly id: "normal-definition";
567
+ readonly name: "Special Operator";
568
+ readonly id: "special-operator";
569
+ readonly code: readonly ["%%"];
414
570
  readonly supported: "fully";
415
- readonly description: "_Handle `function() 3`, ..._";
571
+ readonly description: `_An operator whose name is spelled between percent signs, like \`3 %in% 4\` or \`3 %*% 4\`._ The name binds like any other, so a program may define \`%between%\` itself and the ${string} resolves to it.`;
572
+ readonly example: string;
573
+ readonly url: [{
574
+ name: string;
575
+ href: string;
576
+ }];
416
577
  }, {
417
- readonly name: "Formals";
418
- readonly id: "formals";
578
+ readonly name: "Model Formula";
579
+ readonly id: "model-formula";
580
+ readonly code: readonly ["~"];
581
+ readonly supported: "partially";
582
+ readonly description: `_A formula written with \`~\`, like \`y ~ x\` or \`y ~ x + z\`._ Its operands are ${string}: a bare \`y ~ x\` names columns rather than variables, so neither name is read.`;
583
+ readonly example: string;
584
+ }, {
585
+ readonly name: "Assignments and Bindings";
586
+ readonly id: "assignments-and-bindings";
587
+ readonly description: `Every way to bind a name to a value, with the ${string} and ${string} operators, the ${string}, or a write through a ${string}.`;
419
588
  readonly capabilities: readonly [{
420
- readonly name: "Named";
421
- readonly id: "formals-named";
589
+ readonly name: "Local Left Assignment";
590
+ readonly id: "local-left-assignment";
591
+ readonly code: readonly ["<-"];
422
592
  readonly supported: "fully";
423
- readonly description: "_Handle `function(x) x`, ..._";
593
+ readonly description: `_Bind a name in the current scope with \`<-\`, as in \`x <- 3\`._ A target that is an ${string} (\`x$y <- 3\`) rebinds the whole container through a ${string}.`;
594
+ readonly url: [{
595
+ name: string;
596
+ href: string;
597
+ }];
424
598
  }, {
425
- readonly name: "Default";
426
- readonly id: "formals-default";
599
+ readonly name: "Local Right Assignment";
600
+ readonly id: "local-right-assignment";
601
+ readonly code: readonly ["->"];
427
602
  readonly supported: "fully";
428
- readonly description: "_Handle `function(x = 3) x`, ..._";
603
+ readonly description: `_Bind a name with \`->\`, as in \`3 -> x\`._ Identical to ${string} with the sides swapped.`;
604
+ readonly url: [{
605
+ name: string;
606
+ href: string;
607
+ }];
429
608
  }, {
430
- readonly name: "Dot-Dot-Dot";
431
- readonly id: "formals-dot-dot-dot";
609
+ readonly name: "Local Equal Assignment";
610
+ readonly id: "local-equal-assignment";
432
611
  readonly supported: "fully";
433
- readonly description: "_Handle `function(...) 3`, ..._";
612
+ readonly description: `_Bind a name with \`=\`, as in \`x = 3\`._ This holds only at the start of an expression, as inside a call the same token gives a ${string} (\`f(a = 3)\`).`;
613
+ readonly example: string;
614
+ readonly url: [{
615
+ name: string;
616
+ href: string;
617
+ }];
434
618
  }, {
435
- readonly name: "Promises";
436
- readonly id: "formals-promises";
437
- readonly supported: "partially";
438
- readonly description: "_Handle `function(x = y) { y <- 3; x }`, `function(x = { x <- 3; x}) { x * x }`, ..._ A default argument resolves in the function's own environment and an argument passed in resolves in the caller's, both as R does it. We do not model _when_ a promise is forced: a `delayedAssign`ed expression is linked to every binding it may be forced against, which never misses the one that feeds it but may name others as well. What forcing _does_ is not modelled either, so the writes a promise performs when it is forced (`delayedAssign(\"x\", { x <- 99; 2 })`, where reading `x` yields `2` and leaves `x` at `99`) do not reach the reads that follow.";
439
- }];
440
- }, {
441
- readonly name: "Implicit Return";
442
- readonly id: "implicit-return";
443
- readonly supported: "fully";
444
- readonly description: "_Handle the return of `function() 3`, ..._";
445
- }, {
446
- readonly name: "Lambda Syntax";
447
- readonly id: "lambda-syntax";
448
- readonly supported: "fully";
449
- readonly description: "_Support `\\(x) x`, ..._";
450
- }];
451
- }, {
452
- readonly name: "Important Built-Ins";
453
- readonly id: "important-built-ins";
454
- readonly capabilities: readonly [{
455
- readonly name: "Non-Strict Logical Operators";
456
- readonly id: "non-strict-logical-operators";
457
- readonly supported: "fully";
458
- readonly description: "_Handle `&&`, `||`, ..._";
459
- }, {
460
- readonly name: "Pipe and Pipe-Bind";
461
- readonly id: "pipe-and-pipe-bind";
462
- readonly supported: "partially";
463
- readonly description: "_Handle the [new (4.1) pipe and pipe-bind syntax](https://www.r-bloggers.com/2021/05/the-new-r-pipe/): `|>`, and `=>`._; Similarly support the other pipe binds";
464
- }, {
465
- readonly name: "Sequencing";
466
- readonly id: "built-in-sequencing";
467
- readonly supported: "not";
468
- readonly description: "_Handle `:`, `seq`, ... by gathering value information using abstract interpretation._";
469
- }, {
470
- readonly name: "Internal and Primitive Functions";
471
- readonly id: "built-in-internal-and-primitive-functions";
472
- readonly supported: "partially";
473
- readonly description: "_Handle `.Internal`, `.Primitive`, ..._ In general we can not handle them as they refer to non-R code. We currently do not support them when used with the function.";
474
- }, {
475
- readonly name: "Options";
476
- readonly id: "built-in-options";
477
- readonly supported: "not";
478
- readonly description: "_Handle `options`, `getOption`, ..._ Currently, we do not support the function at all.";
479
- }, {
480
- readonly name: "Help";
481
- readonly id: "built-in-help";
482
- readonly supported: "partially";
483
- readonly description: "_Handle `help`, `?`, ..._ We do not support the function in a sensible way but just ignore it (although this does not happen resolved).";
484
- }, {
485
- readonly name: "Reflection / \"Computing on the Language\"";
486
- readonly id: "reflection-\"computing-on-the-language\"";
487
- readonly capabilities: readonly [{
488
- readonly name: "Get Function Structure";
489
- readonly id: "get-function-structure";
490
- readonly supported: "not";
491
- readonly description: "_Handle `body`, `formals`, `environment` to access the respective parts of a function._ We do not support the functions at all.";
619
+ readonly name: "Local Table Assignment";
620
+ readonly id: "local-table-assignment";
621
+ readonly code: readonly [":="];
622
+ readonly supported: "fully";
623
+ readonly description: `_Bind a column in place with data.table's \`:=\`, as in \`x[,a:=3,]\`._ It is read as a write to the table, not to a name, and which columns exist stays unknown (see ${string}).`;
492
624
  }, {
493
- readonly name: "Modify Function Structure";
494
- readonly id: "modify-function-structure";
495
- readonly supported: "not";
496
- readonly description: "_Handle `body<-`, `formals<-`, `environment<-` to modify the respective parts of a function._ We do not support the functions at all.";
625
+ readonly name: "Super Left Assignment";
626
+ readonly id: "super-left-assignment";
627
+ readonly code: readonly ["<<-"];
628
+ readonly supported: "fully";
629
+ readonly description: `_Bind a name in an enclosing scope with \`<<-\`, as in \`x <<- 42\`._ The write leaves the ${string} it sits in, which is what makes it a ${string}.`;
630
+ readonly url: [{
631
+ name: string;
632
+ href: string;
633
+ }];
497
634
  }, {
498
- readonly name: "Quoting";
499
- readonly id: "built-in-quoting";
500
- readonly supported: "partially";
501
- readonly description: "_Handle `quote`, `substitute`, `bquote`, ..._ A quoted argument is marked as [non-standard evaluation](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph#non-standard-evaluation) as a whole, so nothing within it counts as read. We model the escapes back to standard evaluation that a quoting function offers: rlang's `!!`/`!!!` (in `expr`, `quo`, `enquo`, ... and in data-masking arguments) and `bquote`'s `.()`. Base `quote`/`substitute` have no such escape, and `substitute` does not reach the caller's expression when used on a function argument.";
635
+ readonly name: "Super Right Assignment";
636
+ readonly id: "super-right-assignment";
637
+ readonly code: readonly ["->>"];
638
+ readonly supported: "fully";
639
+ readonly description: `_Bind a name in an enclosing scope with \`->>\`, as in \`42 ->> x\`._ Identical to ${string} with the sides swapped.`;
640
+ readonly url: [{
641
+ name: string;
642
+ href: string;
643
+ }];
644
+ }, {
645
+ readonly name: "Return Value of Assignments";
646
+ readonly id: "return-value-of-assignments";
647
+ readonly supported: "fully";
648
+ readonly description: "_An assignment is itself an expression that hands on the value it bound._ This is what makes `x <- y <- 3` bind both names and `print(x <- 4)` print `4`.";
649
+ readonly example: string;
502
650
  }, {
503
- readonly name: "Evaluation";
504
- readonly id: "built-in-evaluation";
651
+ readonly name: "Assignment Functions";
652
+ readonly id: "assignment-functions";
653
+ readonly code: readonly ["assign", "delayedAssign"];
505
654
  readonly supported: "partially";
506
- readonly description: "_Handle `eval`, `evalq`, `eval.parent`, ..._ `eval` of a string we can resolve is analyzed as if it were written in its place. A language object reaches the `eval` that forces it even across assignments, branches, loop iterations, and function calls, and its names resolve in the scope evaluating it, as R does. `eval(expr, envir)` runs elsewhere, so we mark the call as an unknown side effect instead of guessing. `evalq` quotes its first argument and we do not follow it into the given environment.";
655
+ readonly description: `_Bind a name given as a string, with \`assign\`, \`delayedAssign\`, ..._ The name has to be a ${string}, and what a delayed assignment does when forced is not modelled.`;
656
+ readonly example: string;
657
+ }, {
658
+ readonly name: "Range Assignment";
659
+ readonly id: "range-assignment";
660
+ readonly supported: "fully";
661
+ readonly description: `_Write to a range of a container, as in \`x[1:3] <- 3\`._ Like every ${string} it rebinds the whole container, as which cells the range covers is not tracked.`;
662
+ readonly example: string;
663
+ readonly url: [{
664
+ name: string;
665
+ href: string;
666
+ }, {
667
+ name: string;
668
+ href: string;
669
+ }];
507
670
  }, {
508
- readonly name: "String Templates";
509
- readonly id: "string-templates";
671
+ readonly name: "Replacement Functions";
672
+ readonly id: "replacement-functions";
510
673
  readonly supported: "partially";
511
- readonly description: "_Handle `glue::glue(\"{x}\")`, `cli::cli_alert_info(\"{.val {x}}\")`, `stringr::str_glue`/`str_interp`, ..._ The `{...}` of a template carries R code that runs where the call is, so we analyze it as if it were written there: it reads, it writes, and its side effects land in the calling scope. Doubled delimiters escape, `.open`/`.close` are honored when they are literal, and cli markup (`{.cls ...}`) contributes only the interpolations nested in it. A template aimed at another scope (`.envir`, `.con`, `glue_data`) is marked as an unknown side effect instead.";
674
+ readonly description: `_Read a write to a call, like \`x[i] <- 3\` or \`x$y <- 3\`, as the \`\` \`[<-\`(x, 3) \`\` R runs for it._ The name in front is both read and rebound. A ${string} in such a call (\`g(v, k = 2) <- 3\`) leaves its argument edge dangling.`;
675
+ readonly example: string;
676
+ readonly url: [{
677
+ name: string;
678
+ href: string;
679
+ }, {
680
+ name: string;
681
+ href: string;
682
+ }];
512
683
  }, {
513
- readonly name: "Parsing";
514
- readonly id: "built-in-parsing";
684
+ readonly name: "Locked Bindings";
685
+ readonly id: "locked-bindings";
686
+ readonly code: readonly ["lockEnvironment", "lockBinding"];
515
687
  readonly supported: "not";
516
- readonly description: "_Handle `parse`, `deparse`, ..._ We handle them as unknown function calls, but not specifically besides that.";
688
+ readonly description: `_A binding \`lockBinding\` (or \`lockEnvironment\`) makes constant._ Neither is recognized as a built-in, so the ${string} R would have rejected is read as an ordinary rebinding.`;
689
+ readonly example: string;
690
+ readonly url: [{
691
+ name: string;
692
+ href: string;
693
+ }];
517
694
  }];
518
695
  }];
696
+ readonly url: [{
697
+ name: string;
698
+ href: string;
699
+ }];
519
700
  }];
520
701
  }, {
521
- readonly name: "Literal Values";
522
- readonly id: "literal-values";
702
+ readonly name: "Control-Flow";
703
+ readonly id: "control-flow";
704
+ readonly description: "Conditionals, the three loop forms, their jumps, and how an error leaves a computation.";
523
705
  readonly capabilities: readonly [{
524
- readonly name: "Numbers";
525
- readonly id: "numbers";
706
+ readonly name: "if";
707
+ readonly id: "if";
708
+ readonly code: readonly ["if"];
526
709
  readonly supported: "fully";
527
- readonly description: "_Recognize numbers like `3`, `3.14`, `NA`, float-hex, ..._";
710
+ readonly description: `_The conditional \`if (x) y else z\`, and \`if (x) y\` without an alternative._ Both branches stay possible, so a name bound in either reaches a use below, and a missing \`else\` yields ${string}.`;
711
+ readonly example: string;
712
+ readonly url: [{
713
+ name: string;
714
+ href: string;
715
+ }];
528
716
  }, {
529
- readonly name: "Strings";
530
- readonly id: "strings";
717
+ readonly name: "for loop";
718
+ readonly id: "for-loop";
719
+ readonly code: readonly ["for"];
531
720
  readonly supported: "fully";
532
- readonly description: "_Recognize strings like `\"a\"`, `'b'`, ..._";
533
- readonly capabilities: readonly [{
534
- readonly name: "Raw Strings";
535
- readonly id: "raw-strings";
536
- readonly supported: "fully";
537
- readonly description: "_Recognize raw strings like `r\"(a)\"`, ..._";
721
+ readonly description: "_The loop `for (i in 1:3) print(i)`, which binds its variable in the surrounding scope._ The body is analyzed once for any number of iterations, so a name it binds also reaches its own next read, and `i` stays bound after the loop.";
722
+ readonly example: string;
723
+ readonly url: [{
724
+ name: string;
725
+ href: string;
538
726
  }];
539
727
  }, {
540
- readonly name: "Logical";
541
- readonly id: "logical";
728
+ readonly name: "while loop";
729
+ readonly id: "while-loop";
730
+ readonly code: readonly ["while"];
542
731
  readonly supported: "fully";
543
- readonly description: "_Recognize the logicals `TRUE` and `FALSE`, ..._";
732
+ readonly description: "_The loop `while (x) b`, whose condition is read before every iteration._ Whether the body ever runs is unknown, so a name it binds and the one bound before it both reach a use below.";
733
+ readonly example: string;
734
+ readonly url: [{
735
+ name: string;
736
+ href: string;
737
+ }];
544
738
  }, {
545
- readonly name: "NULL";
546
- readonly id: "null";
739
+ readonly name: "repeat loop";
740
+ readonly id: "repeat-loop";
741
+ readonly code: readonly ["repeat"];
547
742
  readonly supported: "fully";
548
- readonly description: "_Recognize `NULL`_";
743
+ readonly description: `_The loop \`repeat {b; if (x) break}\`, which only a ${string} or a ${string} leaves._ Like every loop the body is analyzed once, for any number of iterations.`;
744
+ readonly example: string;
745
+ readonly url: [{
746
+ name: string;
747
+ href: string;
748
+ }];
549
749
  }, {
550
- readonly name: "Inf and NaN";
551
- readonly id: "inf-and-nan";
750
+ readonly name: "break";
751
+ readonly id: "break";
752
+ readonly code: readonly ["break"];
552
753
  readonly supported: "fully";
553
- readonly description: "_Recognize `Inf` and `NaN`_";
554
- }];
555
- }];
556
- }, {
557
- readonly name: "Non-Standard Evaluations/Semantics";
558
- readonly id: "non-standard-evaluations-semantics";
559
- readonly capabilities: readonly [{
560
- readonly name: "Data Masking";
561
- readonly id: "data-masking";
562
- readonly supported: "partially";
563
- readonly description: "_Handle `subset(d, col > 1)`, dplyr verbs, `ggplot2::aes`, data.table `:=`, ..._ In a masked argument, a name the caller binds is read as that variable and any other name is taken to come from the data. Which names a data frame actually offers is unknown to us, so a column shadowing a variable of the same name still resolves to the variable. rlang's `!!`/`!!!` and its `:=` name-value pair are recognised; `[` on a `data.table` does not mask its `j`/`by` yet.";
564
- }, {
565
- readonly name: "Recycling";
566
- readonly id: "recycling";
567
- readonly supported: "not";
568
- readonly description: "_Handle recycling of vectors as explained in [Advanced R](https://adv-r.hadley.nz/vectors-chap.html)._ We do not support recycling.";
754
+ readonly description: "_Leave the innermost enclosing loop with `break` (`break()` included)._ The rest of the body becomes unreachable on that path, so what it would have bound does not reach a use after the loop.";
755
+ readonly example: string;
756
+ readonly url: [{
757
+ name: string;
758
+ href: string;
759
+ }];
760
+ }, {
761
+ readonly name: "next";
762
+ readonly id: "next";
763
+ readonly code: readonly ["next"];
764
+ readonly supported: "fully";
765
+ readonly description: "_Start the next iteration of the innermost enclosing loop with `next` (`next()` included)._ The rest of the body is skipped on that path, while the loop itself continues.";
766
+ readonly example: string;
767
+ readonly url: [{
768
+ name: string;
769
+ href: string;
770
+ }];
771
+ }, {
772
+ readonly name: "switch";
773
+ readonly id: "switch";
774
+ readonly code: readonly ["switch"];
775
+ readonly supported: "fully";
776
+ readonly description: "_Pick a branch by name or position with `switch`._ A branch left empty falls through to the next one, and every branch stays possible, as the selector does not narrow which of them runs.";
777
+ readonly example: string;
778
+ readonly url: [{
779
+ name: string;
780
+ href: string;
781
+ }];
782
+ }, {
783
+ readonly name: "return";
784
+ readonly id: "return";
785
+ readonly code: readonly ["return"];
786
+ readonly supported: "fully";
787
+ readonly description: `_Leave the enclosing ${string} with \`return(3)\`._ Its argument becomes a value of the call, next to the ${string} of whatever path does not return early.`;
788
+ readonly example: string;
789
+ readonly url: [{
790
+ name: string;
791
+ href: string;
792
+ }];
793
+ }, {
794
+ readonly name: "Exceptions and Errors";
795
+ readonly id: "exceptions-and-errors";
796
+ readonly code: readonly ["stop", "try", "tryCatch", "warning"];
797
+ readonly supported: "partially";
798
+ readonly description: `_A condition raised with \`stop\`/\`warning\` and caught with \`try\`/\`tryCatch\`._ The path on which a call throws before a write is not kept open, so \`tryCatch({ risky(); x <- 2 }, ...)\` loses \`x\`. A handler is read as an ordinary ${string}.`;
799
+ readonly example: string;
800
+ readonly url: [{
801
+ name: string;
802
+ href: string;
803
+ }, {
804
+ name: string;
805
+ href: string;
806
+ }];
807
+ }];
808
+ }, {
809
+ readonly name: "Function Definitions";
810
+ readonly id: "function-definitions";
811
+ readonly description: `The ${string} a function binds, their defaults, \`...\`, promises, and the value the call hands back.`;
812
+ readonly capabilities: readonly [{
813
+ readonly name: "Normal";
814
+ readonly id: "normal-definition";
815
+ readonly code: readonly ["function"];
816
+ readonly supported: "fully";
817
+ readonly description: `_A function written with \`function(x) x\`._ It opens a scope of its own, so its body resolves names in its ${string} rather than where the call happens.`;
818
+ readonly url: [{
819
+ name: string;
820
+ href: string;
821
+ }];
822
+ }, {
823
+ readonly name: "Formals";
824
+ readonly id: "formals";
825
+ readonly description: `The parameters a definition declares, with their ${string}, ${string}, ${string}, and the ${string} each is bound to.`;
826
+ readonly capabilities: readonly [{
827
+ readonly name: "Named";
828
+ readonly id: "formals-named";
829
+ readonly supported: "fully";
830
+ readonly description: "_A parameter written as a name, as `x` in `function(x) x`._ It binds that name in the body, where it shadows an enclosing binding of the same name.";
831
+ readonly url: [{
832
+ name: string;
833
+ href: string;
834
+ }];
835
+ }, {
836
+ readonly name: "Default";
837
+ readonly id: "formals-default";
838
+ readonly supported: "fully";
839
+ readonly description: "_A parameter with a default, as in `function(x = 3) x`._ The default is evaluated in the function's own scope, so it may read another parameter (`function(x, y = x * 2)`).";
840
+ readonly example: string;
841
+ readonly url: [{
842
+ name: string;
843
+ href: string;
844
+ }];
845
+ }, {
846
+ readonly name: "Dot-Dot-Dot";
847
+ readonly id: "formals-dot-dot-dot";
848
+ readonly supported: "fully";
849
+ readonly description: `_The variadic parameter \`...\`, which collects every argument no other formal took._ Passing it on keeps those arguments together, while a formal behind it is only matched by ${string}.`;
850
+ readonly example: string;
851
+ readonly url: [{
852
+ name: string;
853
+ href: string;
854
+ }];
855
+ }, {
856
+ readonly name: "Promises";
857
+ readonly id: "formals-promises";
858
+ readonly supported: "partially";
859
+ readonly description: `_An argument is a promise, evaluated where it was written but only when the body first reads it._ When that happens is not modelled, nor are the ${string}, so \`function(x = y) { y <- 3; x }\` does not tell us where \`y\` is read.`;
860
+ readonly example: string;
861
+ readonly url: [{
862
+ name: string;
863
+ href: string;
864
+ }, {
865
+ name: string;
866
+ href: string;
867
+ }];
868
+ }];
869
+ }, {
870
+ readonly name: "Implicit Return";
871
+ readonly id: "implicit-return";
872
+ readonly supported: "fully";
873
+ readonly description: `_A function hands back the value of the last expression it evaluates, without a ${string}._ Every path's last expression is such a value of the call.`;
874
+ readonly url: [{
875
+ name: string;
876
+ href: string;
877
+ }];
878
+ }, {
879
+ readonly name: "Lambda Syntax";
880
+ readonly id: "lambda-syntax";
881
+ readonly code: readonly ["\\("];
882
+ readonly supported: "fully";
883
+ readonly minRVersion: "4.1.0";
884
+ readonly description: `_The short form \`\\(x) x\` of a ${string}._ It is purely syntax and binds its ${string} and scopes its body exactly like the long form.`;
885
+ readonly example: string;
886
+ }];
887
+ }, {
888
+ readonly name: "Important Built-Ins";
889
+ readonly id: "important-built-ins";
890
+ readonly description: "The base-R functions we give a meaning of their own rather than treating as opaque calls, the ones that compute on the language included.";
891
+ readonly capabilities: readonly [{
892
+ readonly name: "Non-Strict Logical Operators";
893
+ readonly id: "non-strict-logical-operators";
894
+ readonly code: readonly ["&&", "||"];
895
+ readonly supported: "fully";
896
+ readonly description: "_The operators `&&` and `||`, which evaluate their right side only if the left one does not decide the result._ The right side is read as a path that may not run, unlike the vectorized `&`/`|`.";
897
+ readonly example: string;
898
+ readonly url: [{
899
+ name: string;
900
+ href: string;
901
+ }];
902
+ }, {
903
+ readonly name: "Pipe";
904
+ readonly id: "pipe-and-pipe-bind";
905
+ readonly code: readonly ["|>"];
906
+ readonly supported: "fully";
907
+ readonly minRVersion: "4.1.0";
908
+ readonly description: `_The [native pipe](https://www.r-bloggers.com/2021/05/the-new-r-pipe/) \`|>\`, which is syntax rather than a ${string}: the parser rewrites it._ The left-hand side becomes the first argument or fills the \`_\` placeholder.`;
909
+ readonly example: string;
910
+ readonly url: [{
911
+ name: string;
912
+ href: string;
913
+ }];
914
+ }, {
915
+ readonly name: "Pipe-Bind";
916
+ readonly id: "pipe-bind";
917
+ readonly code: readonly ["=>"];
918
+ readonly supported: "partially";
919
+ readonly minRVersion: "4.1.0";
920
+ readonly description: `_The experimental pipe-bind \`=>\`, which names what the ${string} hands on and which R only enables under \`_R_USE_PIPEBIND_\`._ It is off by default and needs \`engine.r-shell.pipeBind\`. Tree-sitter's grammar has no production for it.`;
921
+ readonly example: string;
922
+ readonly url: [{
923
+ name: string;
924
+ href: string;
925
+ }];
926
+ }, {
927
+ readonly name: "Sequencing";
928
+ readonly id: "built-in-sequencing";
929
+ readonly code: readonly [":", "seq", "seq_len", "seq_along", "rep"];
930
+ readonly supported: "partially";
931
+ readonly description: `_Give \`:\`, \`seq\`, ... the sequence they produce, gathered by abstract interpretation._ That value lets us reason about a ${string} bound or an ${string}, but \`seq\`, \`seq_len\`, \`seq_along\`, and \`rep\` are not folded even for literal arguments.`;
932
+ readonly example: string;
933
+ }, {
934
+ readonly name: "Internal and Primitive Functions";
935
+ readonly id: "built-in-internal-and-primitive-functions";
936
+ readonly code: readonly [".Internal", ".Primitive"];
937
+ readonly supported: "partially";
938
+ readonly description: `_The \`.Internal\` and \`.Primitive\` calls a base function reaches its C implementation through._ The call is kept and its arguments read, but the name \`.Primitive("sum")\` spells is not resolved the way a ${string} would be.`;
939
+ readonly example: string;
940
+ readonly url: [{
941
+ name: string;
942
+ href: string;
943
+ }];
944
+ }, {
945
+ readonly name: "Options";
946
+ readonly id: "built-in-options";
947
+ readonly code: readonly ["options", "getOption"];
948
+ readonly supported: "partially";
949
+ readonly description: `_The global options \`options\` sets and \`getOption\` reads._ Option values are not tracked, so \`getOption("digits")\` does not reach a preceding \`options(digits = 3)\`. Unlike the ${string} they are not interpreted at all.`;
950
+ readonly example: string;
951
+ }, {
952
+ readonly name: "Help";
953
+ readonly id: "built-in-help";
954
+ readonly code: readonly ["help", "help.search"];
955
+ readonly supported: "partially";
956
+ readonly description: `_The help calls \`?\`, \`??\`, \`help\`, ..._ \`?\` and \`??\` are recognized, but their topic is read as an ordinary ${string} where R only looks it up, and \`help\`/\`help.search\` are not known at all.`;
957
+ readonly example: string;
958
+ }, {
959
+ readonly name: "Reflection / \"Computing on the Language\"";
960
+ readonly id: "reflection-\"computing-on-the-language\"";
961
+ readonly description: `Code that reads or builds code, by ${string} an expression, ${string} it elsewhere, ${string} it from a string, or ${string}.`;
962
+ readonly capabilities: readonly [{
963
+ readonly name: "Get Function Structure";
964
+ readonly id: "get-function-structure";
965
+ readonly code: readonly ["body", "formals", "environment", "args"];
966
+ readonly supported: "partially";
967
+ readonly description: `_Read a part of a ${string} with \`body\`, \`formals\`, \`args\`, or \`environment\`._ What comes back is opaque, and the whole function is read, so asking only for \`formals(f)\` keeps all of \`f\`'s body in a slice.`;
968
+ readonly example: string;
969
+ readonly url: [{
970
+ name: string;
971
+ href: string;
972
+ }];
973
+ }, {
974
+ readonly name: "Modify Function Structure";
975
+ readonly id: "modify-function-structure";
976
+ readonly code: readonly ["body<-", "formals<-", "environment<-"];
977
+ readonly supported: "partially";
978
+ readonly description: `_Rewrite a part of a function with \`body<-\`, \`formals<-\`, or \`environment<-\`._ Like every ${string} it rebinds the name, so a later ${string} reaches the new part as well as the original one.`;
979
+ readonly example: string;
980
+ readonly url: [{
981
+ name: string;
982
+ href: string;
983
+ }];
984
+ }, {
985
+ readonly name: "Quoting";
986
+ readonly id: "built-in-quoting";
987
+ readonly code: readonly ["quote", "substitute", "bquote"];
988
+ readonly supported: "partially";
989
+ readonly description: `_Take an expression as a value with \`quote\`, \`substitute\`, \`bquote\`, ..._ A quoted argument is ${string}: the names in it are not read, and \`substitute\` does not reach the caller's expression.`;
990
+ readonly example: string;
991
+ readonly url: [{
992
+ name: string;
993
+ href: string;
994
+ }, {
995
+ name: string;
996
+ href: string;
997
+ }];
998
+ }, {
999
+ readonly name: "Evaluation";
1000
+ readonly id: "built-in-evaluation";
1001
+ readonly code: readonly ["eval", "evalq", "eval.parent"];
1002
+ readonly supported: "partially";
1003
+ readonly description: `_Run an expression that is a value with \`eval\`, \`evalq\`, \`eval.parent\`, ..._ \`eval(expr, envir)\` runs in an ${string} we may not know, so it is marked an unknown side effect.`;
1004
+ readonly example: string;
1005
+ readonly url: [{
1006
+ name: string;
1007
+ href: string;
1008
+ }, {
1009
+ name: string;
1010
+ href: string;
1011
+ }];
1012
+ }, {
1013
+ readonly name: "String Templates";
1014
+ readonly id: "string-templates";
1015
+ readonly code: readonly ["glue", "str_glue", "cli_alert_info"];
1016
+ readonly supported: "partially";
1017
+ readonly description: "_A string that reads the names inside it, as `glue::glue(\"{x}\")`, `cli::cli_alert_info(\"{.val {x}}\")`, or `stringr::str_glue` do._ Those names resolve in the scope of the template, and one aimed at another scope (`.envir`, `.con`, `glue_data`) becomes an unknown side effect.";
1018
+ readonly example: string;
1019
+ }, {
1020
+ readonly name: "Parsing";
1021
+ readonly id: "built-in-parsing";
1022
+ readonly code: readonly ["parse", "deparse"];
1023
+ readonly supported: "partially";
1024
+ readonly description: `_Turn text into an expression with \`parse\`, and an expression back into text with \`deparse\`._ What \`parse\` produces is only reached through ${string}, and \`deparse\` is not modelled beyond reading its argument.`;
1025
+ readonly example: string;
1026
+ readonly url: [{
1027
+ name: string;
1028
+ href: string;
1029
+ }, {
1030
+ name: string;
1031
+ href: string;
1032
+ }];
1033
+ }];
1034
+ }];
1035
+ }, {
1036
+ readonly name: "Literal Values";
1037
+ readonly id: "literal-values";
1038
+ readonly description: `The values written into the source itself, which is what a ${string} and an ${string} are read from.`;
1039
+ readonly capabilities: readonly [{
1040
+ readonly name: "Numbers";
1041
+ readonly id: "numbers";
1042
+ readonly supported: "fully";
1043
+ readonly description: "_Recognize numbers like `3`, `3.14`, the integer `3L`, hexadecimals such as `0xFF` and `0x1p3`, as well as the typed missings `NA_integer_`/`NA_real_`, ..._";
1044
+ readonly example: string;
1045
+ readonly capabilities: readonly [{
1046
+ readonly name: "Complex";
1047
+ readonly id: "numbers-complex";
1048
+ readonly supported: "fully";
1049
+ readonly description: "_Recognize the imaginary literals `1i`, `4.1i`, `1e-2i`, ..._ The value survives arithmetic and is told apart from `1L` and a plain `1`.";
1050
+ readonly example: string;
1051
+ readonly url: [{
1052
+ name: string;
1053
+ href: string;
1054
+ }];
1055
+ }];
1056
+ readonly url: [{
1057
+ name: string;
1058
+ href: string;
1059
+ }];
1060
+ }, {
1061
+ readonly name: "Strings";
1062
+ readonly id: "strings";
1063
+ readonly supported: "fully";
1064
+ readonly description: `_A string literal like \`"a"\` or \`'b'\`._ Its value is kept, which is what lets it stand for a ${string} or fold into a ${string}.`;
1065
+ readonly capabilities: readonly [{
1066
+ readonly name: "Raw Strings";
1067
+ readonly id: "raw-strings";
1068
+ readonly supported: "fully";
1069
+ readonly minRVersion: "4.1.0";
1070
+ readonly description: `_A raw string like \`r"(a)"\`, in which a backslash is no escape._ Its value is the same ${string} the quoted form would give.`;
1071
+ readonly example: string;
1072
+ }];
1073
+ readonly url: [{
1074
+ name: string;
1075
+ href: string;
1076
+ }];
1077
+ }, {
1078
+ readonly name: "Logical";
1079
+ readonly id: "logical";
1080
+ readonly code: readonly ["TRUE", "FALSE"];
1081
+ readonly supported: "fully";
1082
+ readonly description: "_Recognize the logicals `TRUE` and `FALSE`, ..._ Their short forms `T` and `F` are ordinary bindings and can be reassigned, while `TRUE` and `FALSE` are reserved.";
1083
+ readonly example: string;
1084
+ readonly url: [{
1085
+ name: string;
1086
+ href: string;
1087
+ }];
1088
+ }, {
1089
+ readonly name: "NULL";
1090
+ readonly id: "null";
1091
+ readonly code: readonly ["NULL"];
1092
+ readonly supported: "fully";
1093
+ readonly description: `_The \`NULL\` object, R's empty value._ It is what an \`if\` without an ${string} yields, and assigning it to a list element removes that element.`;
1094
+ readonly example: string;
1095
+ readonly url: [{
1096
+ name: string;
1097
+ href: string;
1098
+ }];
1099
+ }, {
1100
+ readonly name: "Inf and NaN";
1101
+ readonly id: "inf-and-nan";
1102
+ readonly code: readonly ["Inf", "NaN"];
1103
+ readonly supported: "fully";
1104
+ readonly description: `_The constants \`Inf\` and \`NaN\`, which arithmetic produces rather than errors on._ They are ordinary values here, and the predicates asking for them are not evaluated, as ${string}.`;
1105
+ readonly example: string;
1106
+ readonly url: [{
1107
+ name: string;
1108
+ href: string;
1109
+ }];
1110
+ }];
1111
+ }];
1112
+ }, {
1113
+ readonly name: "Non-Standard Evaluations/Semantics";
1114
+ readonly id: "non-standard-evaluations-semantics";
1115
+ readonly description: `The places where R does not evaluate an expression the way it is written, so a ${string} in it may mean something other than the binding it seems to read.`;
1116
+ readonly capabilities: readonly [{
1117
+ readonly name: "Data Masking";
1118
+ readonly id: "data-masking";
1119
+ readonly code: readonly ["subset"];
1120
+ readonly supported: "partially";
1121
+ readonly description: `_A call that evaluates its arguments against the columns of a data frame first, as \`subset(d, col > 1)\`, the dplyr verbs, \`ggplot2::aes\`, and data.table's ${string} do._ Which columns exist is unknown to us, so a column shadowing a variable still resolves to the variable.`;
1122
+ readonly example: string;
1123
+ readonly url: [{
1124
+ name: string;
1125
+ href: string;
1126
+ }];
1127
+ }, {
1128
+ readonly name: "Recycling";
1129
+ readonly id: "recycling";
1130
+ readonly supported: "not";
1131
+ readonly description: `_A shorter operand is repeated to the length of the longer one._ This is not modelled, so the operands are read but the length of what an ${string} produces is not derived from them.`;
1132
+ readonly example: string;
1133
+ readonly url: [{
1134
+ name: string;
1135
+ href: string;
1136
+ }, {
1137
+ name: string;
1138
+ href: string;
1139
+ }];
569
1140
  }, {
570
1141
  readonly name: "Vectorized Operator or Functions";
571
1142
  readonly id: "vectorized-operator-or-functions";
572
- readonly supported: "not";
573
- readonly description: "_Handle vectorized operations as explained in [Advanced R](https://adv-r.hadley.nz/perf-improve.html?q=vectorised#vectorise)._ We do not support vectorized operations.";
1143
+ readonly code: readonly ["ifelse"];
1144
+ readonly supported: "partially";
1145
+ readonly description: `_An operation applied to every element of a vector at once._ Comparisons, the reducing functions, and \`ifelse\` widen to the unknown value, so an ${string} selects an unknown set of elements.`;
1146
+ readonly example: string;
1147
+ readonly url: [{
1148
+ name: string;
1149
+ href: string;
1150
+ }];
574
1151
  }, {
575
1152
  readonly name: "Hooks";
576
1153
  readonly id: "hooks";
1154
+ readonly code: readonly ["on.exit", "setHook"];
577
1155
  readonly supported: "partially";
578
- readonly description: "_Handle hooks like [`userhooks`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/userhooks.html) and [`on.exit`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/on.exit)._ We support `on.exit` and rlang's [`on_load`/`run_on_load`/`on_package_load`](https://rlang.r-lib.org/reference/on_load.html), whose expressions we analyze where they are registered. `setHook` and the other user hooks are not modelled.";
1156
+ readonly description: `_Code registered to run at a point the program does not write out, with \`on.exit\` or \`userhooks\`._ An \`on.exit\` body runs when the ${string} it sits in ends, while \`setHook\` is not modelled.`;
1157
+ readonly example: string;
1158
+ readonly url: [{
1159
+ name: string;
1160
+ href: string;
1161
+ }, {
1162
+ readonly name: "R Definition/userhooks";
1163
+ readonly href: "https://stat.ethz.ch/R-manual/R-devel/library/base/html/userhooks.html";
1164
+ }];
579
1165
  }, {
580
1166
  readonly name: "Precedence";
581
1167
  readonly id: "precedence";
582
1168
  readonly supported: "fully";
583
- readonly description: "_Handle the precedence of operators as explained in the [Documentation](https://rdrr.io/r/base/Syntax.html)._ We handle the precedence of operators (implicitly with the parser).";
1169
+ readonly description: `_Which ${string} binds tighter, as the [documentation](https://rdrr.io/r/base/Syntax.html) lays it out._ It decides the shape of the tree the parser hands us, so \`-2^2\` is \`-(2^2)\` before anything else looks at it.`;
1170
+ readonly example: string;
1171
+ readonly url: [{
1172
+ name: string;
1173
+ href: string;
1174
+ }];
584
1175
  }, {
585
1176
  readonly name: "Attributes";
586
1177
  readonly id: "attributes";
1178
+ readonly description: `The data an object carries beside its value, which is where its ${string} and its shape live.`;
587
1179
  readonly capabilities: readonly [{
588
1180
  readonly name: "User-Defined";
589
1181
  readonly id: "user-defined";
590
- readonly supported: "not";
591
- readonly description: "_Handle [attributes](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Attributes) like `attr`, `attributes`, ..._ We do not support attributes.";
1182
+ readonly code: readonly ["attr", "attributes", "attr<-"];
1183
+ readonly supported: "partially";
1184
+ readonly description: `_An [attribute](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Attributes) a program sets itself, with \`attr\` or \`attributes\`._ Which attributes an object carries is not part of the value we track, so only the ${string} of the object itself is seen.`;
1185
+ readonly example: string;
1186
+ readonly url: [{
1187
+ name: string;
1188
+ href: string;
1189
+ }];
592
1190
  }, {
593
1191
  readonly name: "Built-In";
594
1192
  readonly id: "built-in";
595
- readonly supported: "not";
596
- readonly description: "_Handle built-in attributes like `dim`, ..._ We do not support them.";
1193
+ readonly code: readonly ["dim<-", "names<-", "class", "dim", "names"];
1194
+ readonly supported: "partially";
1195
+ readonly description: `_An attribute R gives a meaning of its own, such as \`dim\`, \`names\`, or the \`class\` that ${string} reads._ \`dim<-\`, \`names<-\`, and \`class<-\` track shape only on a data frame.`;
1196
+ readonly example: string;
1197
+ readonly url: [{
1198
+ name: string;
1199
+ href: string;
1200
+ }];
597
1201
  }];
598
1202
  }];
599
1203
  }, {
600
- readonly name: "Types";
601
- readonly id: "types";
1204
+ readonly name: "Object-Oriented Programming";
1205
+ readonly id: "object-oriented-programming";
1206
+ readonly description: `R's object systems, the class an object carries, and the ${string} that decides which function body a generic call runs.`;
602
1207
  readonly capabilities: readonly [{
603
- readonly name: "Primitive";
604
- readonly id: "types-primitive";
605
- readonly supported: "not";
606
- readonly description: "_Recognize and resolve primitive types like `numeric`, `character`, ..._ We do not support typing currently.";
607
- }, {
608
- readonly name: "Non-Primitive";
609
- readonly id: "types-non-primitive";
610
- readonly supported: "not";
611
- readonly description: "_Recognize and resolve non-primitive/composite types._ We do not support typing currently.";
612
- }, {
613
- readonly name: "Inference";
614
- readonly id: "types-inference";
615
- readonly supported: "not";
616
- readonly description: "_Infer types from the code._ We do not support typing currently.";
617
- }, {
618
- readonly name: "Coercion";
619
- readonly id: "types-coercion";
620
- readonly supported: "not";
621
- readonly description: "_Handle coercion of types._ We do not support typing currently.";
622
- }, {
623
- readonly name: "Object-Oriented Programming";
624
- readonly id: "object-oriented-programming";
1208
+ readonly name: "S3";
1209
+ readonly id: "oop-s3";
1210
+ readonly url: [{
1211
+ name: string;
1212
+ href: string;
1213
+ }, {
1214
+ name: string;
1215
+ href: string;
1216
+ }];
1217
+ readonly description: `_Classes and methods built on the ${string} and \`UseMethod\` dispatch._ A class is a string an object carries rather than a declaration, so what a call runs follows from the ${string} \`generic.class\` in scope.`;
1218
+ readonly example: string;
625
1219
  readonly capabilities: readonly [{
626
- readonly name: "S3";
627
- readonly id: "oop-s3";
1220
+ readonly name: "Class Construction";
1221
+ readonly id: "oop-s3-construction";
1222
+ readonly code: readonly ["class<-", "oldClass<-"];
1223
+ readonly supported: "fully";
1224
+ readonly description: `_Give an object its class with \`structure(..., class =)\`, \`class<-\`, or \`oldClass<-\`._ A class written as a ${string} is tracked and reaches the ${string} that follows it.`;
628
1225
  readonly url: [{
629
- readonly name: string;
630
- readonly href: "https://adv-r.hadley.nz/s3.html";
1226
+ name: string;
1227
+ href: string;
631
1228
  }];
632
- readonly supported: "partially";
633
- readonly description: "_Handle S3 classes and methods as one unit (with attributes etc.). Including Dispatch and Inheritance._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
634
1229
  }, {
635
- readonly name: "S4";
636
- readonly id: "oop-s4";
1230
+ readonly name: "Dispatch";
1231
+ readonly id: "oop-s3-dispatch";
1232
+ readonly code: readonly ["UseMethod"];
1233
+ readonly supported: "partially";
1234
+ readonly description: `_Route a generic call to the method that runs._ \`UseMethod\` links to every ${string} named \`generic.class\` in scope, so the ${string} an object carries narrows the target only where it is known (heavily over-approximating).`;
637
1235
  readonly url: [{
638
- readonly name: string;
639
- readonly href: "https://adv-r.hadley.nz/s4.html";
1236
+ name: string;
1237
+ href: string;
1238
+ }, {
1239
+ name: string;
1240
+ href: string;
640
1241
  }];
641
- readonly supported: "partially";
642
- readonly description: "_Handle S4 classes and methods as one unit. Including Dispatch and Inheritance_ We do not support typing currently and do not handle objects of these classes \"as units.\"";
643
1242
  }, {
644
- readonly name: "R6";
645
- readonly id: "oop-r6";
1243
+ readonly name: "Inheritance";
1244
+ readonly id: "oop-s3-inheritance";
1245
+ readonly code: readonly ["NextMethod"];
1246
+ readonly supported: "partially";
1247
+ readonly description: `_Walk the class vector with \`NextMethod\`._ It reaches the generic's ${string}, the one it stands in included, rather than only the next class in the vector.`;
646
1248
  readonly url: [{
647
- readonly name: string;
648
- readonly href: "https://adv-r.hadley.nz/r6.html";
1249
+ name: string;
1250
+ href: string;
1251
+ }, {
1252
+ name: string;
1253
+ href: string;
649
1254
  }];
1255
+ }];
1256
+ }, {
1257
+ readonly name: "S4";
1258
+ readonly id: "oop-s4";
1259
+ readonly url: [{
1260
+ name: string;
1261
+ href: string;
1262
+ }];
1263
+ readonly description: `_Formal classes and methods declared with \`setClass\`, \`setGeneric\`, and \`setMethod\`._ Unlike ${string} the class is declared, with named slots read through ${string}.`;
1264
+ readonly example: string;
1265
+ readonly capabilities: readonly [{
1266
+ readonly name: "Class Construction";
1267
+ readonly id: "oop-s4-construction";
1268
+ readonly code: readonly ["setClass"];
1269
+ readonly supported: "fully";
1270
+ readonly description: `_Declare a class with \`setClass\` and build one with \`new\`._ The \`new\` call is linked to the \`setClass\` that declared the class, and a slot is read through ${string} like any other access.`;
1271
+ readonly url: [{
1272
+ name: string;
1273
+ href: string;
1274
+ }];
1275
+ }, {
1276
+ readonly name: "Dispatch";
1277
+ readonly id: "oop-s4-dispatch";
1278
+ readonly code: readonly ["standardGeneric", "setGeneric", "setMethod"];
650
1279
  readonly supported: "partially";
651
- readonly description: "_Handle R6 classes and methods as one unit. We do not support typing, inheritance, private/active bindings, or handling objects fully \"as units.\"";
1280
+ readonly description: `_Route a generic call to the method \`setMethod\` registered._ The generic reaches its methods through the chain they register in, but the signature does not narrow which of them runs, as ${string} for the argument.`;
1281
+ readonly url: [{
1282
+ name: string;
1283
+ href: string;
1284
+ }];
652
1285
  }, {
653
- readonly name: "R7/S7";
654
- readonly id: "oop-r7-s7";
1286
+ readonly name: "Inheritance";
1287
+ readonly id: "oop-s4-inheritance";
1288
+ readonly code: readonly ["callNextMethod"];
1289
+ readonly supported: "not";
1290
+ readonly description: `_Reach a parent method with \`callNextMethod\`, and inherit through \`contains\`._ \`callNextMethod\` is left unresolved, so nothing links it to the ${string} it would call, unlike ${string}.`;
655
1291
  readonly url: [{
656
- readonly name: "R7";
657
- readonly href: "https://www.r-bloggers.com/2022/12/what-is-r7-a-new-oop-system-for-r/";
658
- }, {
659
- readonly name: "S7";
660
- readonly href: "https://cran.r-project.org/web/packages/S7/index.html";
1292
+ name: string;
1293
+ href: string;
661
1294
  }];
1295
+ }];
1296
+ }, {
1297
+ readonly name: "RC/R5";
1298
+ readonly id: "oop-rc";
1299
+ readonly code: readonly ["setRefClass"];
1300
+ readonly url: [{
1301
+ name: string;
1302
+ href: string;
1303
+ }];
1304
+ readonly supported: "partially";
1305
+ readonly description: `_Reference classes made with \`setRefClass\`, whose objects are mutable and thus behave like the ${string} they are built on._ \`$new()\` and \`$method()\` on an instance are unknown side effects, and no call links to the body it runs.`;
1306
+ readonly example: string;
1307
+ }, {
1308
+ readonly name: "R6";
1309
+ readonly id: "oop-r6";
1310
+ readonly code: readonly ["R6Class"];
1311
+ readonly url: [{
1312
+ name: string;
1313
+ href: string;
1314
+ }];
1315
+ readonly supported: "partially";
1316
+ readonly description: `_Classes made with \`R6::R6Class\`, read as one unit rather than as the environment behind them._ Like ${string} an R6 object is mutable, and typing, inheritance, private/active bindings, and handling objects fully "as units" are not supported.`;
1317
+ readonly example: string;
1318
+ }, {
1319
+ readonly name: "R7/S7";
1320
+ readonly id: "oop-r7-s7";
1321
+ readonly code: readonly ["new_class"];
1322
+ readonly url: [{
1323
+ readonly name: "R7";
1324
+ readonly href: "https://www.r-bloggers.com/2022/12/what-is-r7-a-new-oop-system-for-r/";
1325
+ }, {
1326
+ readonly name: "S7";
1327
+ readonly href: "https://cran.r-project.org/web/packages/S7/index.html";
1328
+ }];
1329
+ readonly supported: "partially";
1330
+ readonly description: `_Classes made with \`S7::new_class\`, read as one unit, dispatch and inheritance included._ ${string} is not supported, nor are objects handled fully "as units."`;
1331
+ readonly example: string;
1332
+ }, {
1333
+ readonly name: "Class-Based Dependency Attribution";
1334
+ readonly id: "oop-class-dependency-attribution";
1335
+ readonly supported: "partially";
1336
+ readonly description: `_Attribute the use of a class to the package that owns it, so a class use implies a dependency for library detection and version guessing._ It is the class counterpart of resolving a ${string}.`;
1337
+ readonly capabilities: readonly [{
1338
+ readonly name: "S3 class ownership";
1339
+ readonly id: "class-owner-s3";
662
1340
  readonly supported: "partially";
663
- readonly description: "_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
1341
+ readonly description: `_Attribute an ${string} class to the package that owns it._ Only a class written as a ${string} is attributed, not one from a variable or a \`c(...)\` vector.`;
664
1342
  }, {
665
- readonly name: "Class-Based Dependency Attribution";
666
- readonly id: "oop-class-dependency-attribution";
1343
+ readonly name: "S4 class ownership";
1344
+ readonly id: "class-owner-s4";
667
1345
  readonly supported: "partially";
668
- readonly description: "_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database's class-ownership map)._";
669
- readonly capabilities: readonly [{
670
- readonly name: "S3 class ownership";
671
- readonly id: "class-owner-s3";
672
- readonly supported: "partially";
673
- readonly description: "_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project's NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method(\"as.irts\",\"zoo\")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, \"zoo\")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor's export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._";
674
- }, {
675
- readonly name: "S4 class ownership";
676
- readonly id: "class-owner-s4";
677
- readonly supported: "partially";
678
- readonly description: "_A project's `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._";
679
- }];
1346
+ readonly description: `_Attribute an ${string} class to the package that owns it._ S4 ownership is not in the ${string}, so a bare class use is not attributed.`;
680
1347
  }];
681
1348
  }];
682
1349
  }, {
683
- readonly name: "Structure";
1350
+ readonly name: "R File Structure";
684
1351
  readonly id: "structure";
1352
+ readonly description: "The lexical shape of a source file, down to its line endings and encoding.";
685
1353
  readonly capabilities: readonly [{
686
1354
  readonly name: "Comments";
687
1355
  readonly id: "comments";
688
1356
  readonly supported: "fully";
689
- readonly description: "_Recognize comments like `# this is a comment`, ... and line-directives_";
1357
+ readonly description: `_A comment like \`# this is a comment\`, a shebang line included._ It is never read as code, so no ${string} in it resolves.`;
1358
+ readonly example: string;
1359
+ readonly url: [{
1360
+ name: string;
1361
+ href: string;
1362
+ }];
1363
+ }, {
1364
+ readonly name: "Line Directive";
1365
+ readonly id: "line-directive";
1366
+ readonly supported: "partially";
1367
+ readonly description: "_Recognize `#line n \"file\"` as its own node (r-shell only)._ It is parsed but never retargets a location, and tree-sitter reads it as a comment.";
1368
+ readonly example: string;
1369
+ readonly url: [{
1370
+ readonly name: "R Definition/parse";
1371
+ readonly href: "https://stat.ethz.ch/R-manual/R-devel/library/base/html/parse.html";
1372
+ }];
690
1373
  }, {
691
1374
  readonly name: "Semicolons";
692
1375
  readonly id: "semicolons";
693
1376
  readonly supported: "fully";
694
- readonly description: "_Recognize and resolve semicolons like `a; b; c`, ..._";
1377
+ readonly description: `_A semicolon separating two expressions on one line, as in \`a; b; c\`._ It says the same as a ${string}: the expressions run in the order they are written.`;
1378
+ readonly example: string;
1379
+ readonly url: [{
1380
+ name: string;
1381
+ href: string;
1382
+ }];
695
1383
  }, {
696
1384
  readonly name: "Newlines";
697
1385
  readonly id: "newlines";
698
1386
  readonly supported: "fully";
699
- readonly description: "_Recognize and resolve newlines like `a\nb\nc`, ..._";
1387
+ readonly description: "_Recognize and resolve newlines like `a\\nb\\nc`, where a newline ends an expression unless it is still incomplete._ A trailing operator or an unclosed bracket continues on the next line.";
1388
+ readonly example: string;
1389
+ readonly url: [{
1390
+ name: string;
1391
+ href: string;
1392
+ }];
1393
+ }, {
1394
+ readonly name: "Line Endings";
1395
+ readonly id: "line-endings";
1396
+ readonly supported: "fully";
1397
+ readonly description: "_Recognize `\\n` (Unix), `\\r\\n` (Windows), and a lone `\\r` (classic Mac)._ Normalized at the r-bridge boundary, with both engines.";
1398
+ readonly example: string;
1399
+ }, {
1400
+ readonly name: "Source Encoding";
1401
+ readonly id: "source-encoding";
1402
+ readonly supported: "fully";
1403
+ readonly description: `_UTF-8 beyond ASCII in ${string}, in a ${string}, and in names (plain as well as ${string})._ Such names bind and resolve like any other, with both engines.`;
1404
+ readonly example: string;
1405
+ readonly url: [{
1406
+ name: string;
1407
+ href: string;
1408
+ }];
1409
+ }, {
1410
+ readonly name: "Byte-Order Mark";
1411
+ readonly id: "byte-order-mark";
1412
+ readonly supported: "partially";
1413
+ readonly description: "_Recognize a UTF-8 byte-order mark at the start of a file._ The tree-sitter engine reads past it, the r-shell engine rejects the same input as unparsable.";
1414
+ }, {
1415
+ readonly name: "Syntax Errors";
1416
+ readonly id: "syntax-errors";
1417
+ readonly supported: "partially";
1418
+ readonly description: `_Handle source that does not parse._ The ${string} locates the region and offers a fix. The strict parser rejects the file, while tree-sitter's lax mode (off by default) drops the region.`;
1419
+ readonly example: string;
1420
+ readonly url: [{
1421
+ name: string;
1422
+ href: string;
1423
+ }];
1424
+ }, {
1425
+ readonly name: "Reserved Words";
1426
+ readonly id: "reserved-words";
1427
+ readonly supported: "partially";
1428
+ readonly description: `_Reject a syntactic keyword like \`\` \`if\` \`\` or \`\` \`function\` \`\` where R's grammar requires an expression._ The r-shell engine rejects \`\` if <- 5\`\`, while tree-sitter's grammar parses it as an ordinary ${string}.`;
1429
+ readonly example: string;
1430
+ readonly url: [{
1431
+ name: string;
1432
+ href: string;
1433
+ }];
1434
+ }];
1435
+ }, {
1436
+ readonly name: "Project";
1437
+ readonly id: "project";
1438
+ readonly description: `The files around the R code, from the ${string} and the packages a ${string} pins to what runs ${string}.`;
1439
+ readonly capabilities: readonly [{
1440
+ readonly name: "Package Metadata";
1441
+ readonly id: "project-metadata";
1442
+ readonly description: "The files that describe the package itself, what it needs, and what it offers.";
1443
+ readonly capabilities: readonly [{
1444
+ readonly name: "DESCRIPTION";
1445
+ readonly id: "project-description";
1446
+ readonly supported: "fully";
1447
+ readonly description: "_Read a package's `DESCRIPTION`._ Its DCF records give the package name, version, R version, dependency fields, and `Collate` order.";
1448
+ readonly url: [{
1449
+ name: string;
1450
+ href: string;
1451
+ }, {
1452
+ readonly name: "Writing R Extensions/The DESCRIPTION file";
1453
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file";
1454
+ }];
1455
+ }, {
1456
+ readonly name: "NAMESPACE";
1457
+ readonly id: "project-namespace";
1458
+ readonly supported: "fully";
1459
+ readonly description: `_Read a package's \`NAMESPACE\`._ Acts on \`import\`/\`importFrom\`, \`importClassesFrom\`/\`importMethodsFrom\` for ${string}, and \`export\`/\`S3method\`, which is what says whether a name is ${string}.`;
1460
+ readonly url: [{
1461
+ name: string;
1462
+ href: string;
1463
+ }, {
1464
+ readonly name: "Writing R Extensions/Package namespaces";
1465
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-namespaces";
1466
+ }];
1467
+ }, {
1468
+ readonly name: "Documentation (`.Rd`)";
1469
+ readonly id: "project-rd";
1470
+ readonly supported: "fully";
1471
+ readonly description: "_Read the `.Rd` pages under `man/`, their macros, and the indices beside them._ A documented name is tied back to the page that documents it.";
1472
+ readonly url: [{
1473
+ name: string;
1474
+ href: string;
1475
+ }, {
1476
+ readonly name: "Writing R Extensions/Rd format";
1477
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Rd-format";
1478
+ }];
1479
+ }, {
1480
+ readonly name: "NEWS";
1481
+ readonly id: "project-news";
1482
+ readonly supported: "fully";
1483
+ readonly description: "_Read a package's `NEWS`/`NEWS.md`._ We parse the versions it announces and what each changed, which is what a version guess is checked against.";
1484
+ readonly url: [{
1485
+ name: string;
1486
+ href: string;
1487
+ }, {
1488
+ readonly name: "Writing R Extensions/Package subdirectories";
1489
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-subdirectories";
1490
+ }];
1491
+ }, {
1492
+ readonly name: "Package Data (`sysdata.rda`)";
1493
+ readonly id: "project-sysdata";
1494
+ readonly supported: "partially";
1495
+ readonly description: "_Read the `R/sysdata.rda` a package keeps its internal data in, and the `data/` files it exports._ What those bindings hold is not reconstructed.";
1496
+ readonly url: [{
1497
+ name: string;
1498
+ href: string;
1499
+ }, {
1500
+ readonly name: "Writing R Extensions/Data in packages";
1501
+ readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Data-in-packages";
1502
+ }];
1503
+ }];
1504
+ }, {
1505
+ readonly name: "Dependency Managers";
1506
+ readonly id: "project-dependency-managers";
1507
+ readonly description: "The lockfiles and manifests a version manager pins a project's packages with.";
1508
+ readonly capabilities: readonly [{
1509
+ readonly name: "renv";
1510
+ readonly id: "version-manager-renv";
1511
+ readonly supported: "fully";
1512
+ readonly description: "_Read the configuration of [renv](https://rstudio.github.io/renv/), the most widespread R project-library manager._ The library it points at is neither installed nor restored.";
1513
+ readonly url: [{
1514
+ name: string;
1515
+ href: string;
1516
+ }, {
1517
+ readonly name: "renv";
1518
+ readonly href: "https://rstudio.github.io/renv/";
1519
+ }];
1520
+ }, {
1521
+ readonly name: "packrat";
1522
+ readonly id: "version-manager-packrat";
1523
+ readonly supported: "fully";
1524
+ readonly description: "_Read the configuration of [packrat](https://rstudio.github.io/packrat/), the predecessor of renv._ The `packrat/lib` library beside it is not loaded.";
1525
+ readonly url: [{
1526
+ name: string;
1527
+ href: string;
1528
+ }, {
1529
+ readonly name: "packrat";
1530
+ readonly href: "https://rstudio.github.io/packrat/";
1531
+ }];
1532
+ }, {
1533
+ readonly name: "rv";
1534
+ readonly id: "version-manager-rv";
1535
+ readonly supported: "fully";
1536
+ readonly description: "_Read the configuration of [rv](https://a2-ai.github.io/rv-docs/), a declarative project manager in the style of cargo._ Parses `rproject.toml` and the resolved `rv.lock`.";
1537
+ readonly url: [{
1538
+ name: string;
1539
+ href: string;
1540
+ }, {
1541
+ readonly name: "rv";
1542
+ readonly href: "https://a2-ai.github.io/rv-docs/";
1543
+ }];
1544
+ }, {
1545
+ readonly name: "uvr";
1546
+ readonly id: "version-manager-uvr";
1547
+ readonly supported: "fully";
1548
+ readonly description: "_Read the configuration of [uvr](https://github.com/nbafrank/uvr), an R project manager modelled on uv._ Parses `uvr.toml` and the `uvr.lock` beside it.";
1549
+ readonly url: [{
1550
+ name: string;
1551
+ href: string;
1552
+ }, {
1553
+ readonly name: "uvr";
1554
+ readonly href: "https://github.com/nbafrank/uvr";
1555
+ }];
1556
+ }, {
1557
+ readonly name: "Installed Library";
1558
+ readonly id: "project-library";
1559
+ readonly supported: "partially";
1560
+ readonly description: "_Read the package library a project installs into (`renv/library`, `packrat/lib`, or the platform library)._ Their code is not read.";
1561
+ readonly url: [{
1562
+ name: string;
1563
+ href: string;
1564
+ }];
1565
+ }];
1566
+ }, {
1567
+ readonly name: "Startup and Discovery";
1568
+ readonly id: "project-startup-and-discovery";
1569
+ readonly description: "What runs before a script does and what counts as part of the project at all.";
1570
+ readonly capabilities: readonly [{
1571
+ readonly name: "Startup Files";
1572
+ readonly id: "project-startup-files";
1573
+ readonly supported: "partially";
1574
+ readonly description: "_Read the files R runs or reads before a script (`.Rprofile`, `Rprofile.site`, `.Renviron`, `Renviron.site`)._ An `.Rprofile` is read as R code whose bindings precede the script, but variables set by an environment file are not interpreted.";
1575
+ readonly url: [{
1576
+ name: string;
1577
+ href: string;
1578
+ }, {
1579
+ readonly name: "R Definition/Startup";
1580
+ readonly href: "https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html";
1581
+ }];
1582
+ }, {
1583
+ readonly name: "Ignore Files";
1584
+ readonly id: "project-ignore-files";
1585
+ readonly supported: "fully";
1586
+ readonly description: "_Read the `.gitignore` and `.Rbuildignore` that say which files are not part of the project._ Follows gitignore globs and the regular expressions `R CMD build` uses.";
1587
+ readonly url: [{
1588
+ name: string;
1589
+ href: string;
1590
+ }, {
1591
+ readonly name: "gitignore";
1592
+ readonly href: "https://git-scm.com/docs/gitignore";
1593
+ }];
1594
+ }];
1595
+ }, {
1596
+ readonly name: "Pre-Processors/external Tooling";
1597
+ readonly id: "pre-processors-external-tooling";
1598
+ readonly description: "The tooling around R code rather than the R in it, such as roxygen2 blocks and woven documents.";
1599
+ readonly capabilities: readonly [{
1600
+ readonly name: "roxygen2";
1601
+ readonly id: "roxygen2";
1602
+ readonly supported: "partially";
1603
+ readonly description: `_Handle the roxygen2 blocks that precede a definition._ They are read as a ${string} and what a tag states does not reach ${string}, so an \`importFrom\` tag leaves the name below it unqualified.`;
1604
+ readonly example: string;
1605
+ readonly url: [{
1606
+ readonly name: "roxygen2";
1607
+ readonly href: "https://roxygen2.r-lib.org/";
1608
+ }];
1609
+ }];
700
1610
  }];
701
1611
  }, {
702
1612
  readonly name: "System, I/O, FFI, and Other Files";
703
1613
  readonly id: "system-i-o-ffi-and-other-files";
1614
+ readonly description: `Everything a program reaches for beyond its own code, from ${string} to calls it makes out of R.`;
704
1615
  readonly capabilities: readonly [{
705
1616
  readonly name: "Sourcing External Files";
706
1617
  readonly id: "sourcing-external-files";
1618
+ readonly code: readonly ["source", "sys.source"];
707
1619
  readonly supported: "partially";
708
- readonly description: "_Handle `source`, `sys.source`, ..._ We are currently working on supporting the inclusion of external files. Currently we can handle `source`.";
1620
+ readonly description: `_Pull another file's code into the analysis with \`source\`, \`sys.source\`, ..._ A sourced file's ${string} become visible to the code below the call. Only \`source\` is handled so far, and only where its path resolves.`;
1621
+ readonly example: string;
709
1622
  }, {
710
- readonly name: "Handling Binary Riles";
1623
+ readonly name: "Handling Binary Files";
711
1624
  readonly id: "handling-binary-riles";
712
- readonly supported: "not";
713
- readonly description: "_Handle files dumped with, e.g., [`save`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/save), ... due to their frequent usage._ We do not support binary files.";
1625
+ readonly code: readonly ["save", "load", "readRDS"];
1626
+ readonly supported: "partially";
1627
+ readonly description: "_Files a program writes objects to and reads them back from, with [`save`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/save), `load`, `readRDS`, ..._ A `load` binds names we cannot know, so neither the names nor the values behind them are reconstructed.";
1628
+ readonly example: string;
1629
+ readonly url: [{
1630
+ readonly name: "R Definition/save";
1631
+ readonly href: "https://stat.ethz.ch/R-manual/R-devel/library/base/html/save.html";
1632
+ }];
714
1633
  }, {
715
1634
  readonly name: "I/O";
716
1635
  readonly id: "i-o";
717
- readonly supported: "not";
718
- readonly description: "_Handle `read.csv`, `write.csv`, ..._ We do not support I/O for the time being but treat them as unknown function calls.";
1636
+ readonly code: readonly ["read.csv", "write.csv"];
1637
+ readonly supported: "partially";
1638
+ readonly description: `_Reading and writing data files with \`read.csv\`, \`write.csv\`, ..._ What a file contains does not enter the analysis, which is also why ${string} stay unknown.`;
1639
+ readonly example: string;
1640
+ readonly url: [{
1641
+ name: string;
1642
+ href: string;
1643
+ }];
719
1644
  }, {
720
1645
  readonly name: "Foreign Function Interface";
721
1646
  readonly id: "foreign-function-interface";
722
- readonly supported: "not";
723
- readonly description: "_Handle `.Fortran`, `C`,..._ We do not support FFI but treat them as unknown function calls.";
1647
+ readonly code: readonly [".C", ".Call", ".External", ".Fortran"];
1648
+ readonly supported: "partially";
1649
+ readonly description: `_Calling out to compiled code with \`.C\`, \`.Call\`, \`.External\`, \`.Fortran\`, ..._ The call carries an unknown side effect, like a write through a ${string}, and the foreign code itself is not analyzed.`;
1650
+ readonly example: string;
724
1651
  }, {
725
1652
  readonly name: "System Calls";
726
1653
  readonly id: "system-calls";
727
- readonly supported: "not";
728
- readonly description: "_Handle [`system`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/system), `system.*`, ..._ We do not support system calls but treat them as unknown function calls.";
1654
+ readonly code: readonly ["system", "system2"];
1655
+ readonly supported: "partially";
1656
+ readonly description: "_Handle [`system`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/system), `system.*`, ..._ An injectable command built from user input is flagged by the `problematic-inputs` and `unescaped-arguments` rules.";
1657
+ readonly example: string;
1658
+ readonly url: [{
1659
+ name: string;
1660
+ href: string;
1661
+ }];
729
1662
  }, {
730
1663
  readonly name: "R-Markdown files";
731
1664
  readonly id: "file:rmd";
732
- readonly supported: "fully";
733
- readonly description: "Support R-Markdown files as R sources.";
1665
+ readonly supported: "partially";
1666
+ readonly description: "Support R-Markdown files as R sources. Code chunks are extracted, but not inline `r expr` or the `params` of the YAML front matter.";
1667
+ readonly url: [{
1668
+ readonly name: "R Markdown";
1669
+ readonly href: "https://rmarkdown.rstudio.com/";
1670
+ }];
734
1671
  }, {
735
1672
  readonly name: "Jupyter Notebook";
736
1673
  readonly id: "file:ipynb";
737
1674
  readonly supported: "partially";
738
- readonly description: "Support Jupyter Notebooks as R sources.";
1675
+ readonly description: "Support Jupyter Notebooks as R sources. Cells are read in document order, not execution order, and the kernel is not checked.";
1676
+ readonly url: [{
1677
+ readonly name: "Jupyter Notebook Format";
1678
+ readonly href: "https://nbformat.readthedocs.io/en/latest/format_description.html";
1679
+ }];
739
1680
  }, {
740
1681
  readonly name: "Quarto";
741
1682
  readonly id: "file:qmd";
742
1683
  readonly supported: "partially";
743
- readonly description: "Support Quarto files as R sources.";
1684
+ readonly description: "Support Quarto files as R sources. Code chunks are extracted, but not inline `r expr` or the `params` of the YAML front matter.";
1685
+ readonly url: [{
1686
+ readonly name: "Quarto";
1687
+ readonly href: "https://quarto.org/";
1688
+ }];
744
1689
  }, {
745
1690
  readonly name: "Sweave";
746
1691
  readonly id: "file:rnw";
747
1692
  readonly supported: "partially";
748
- readonly description: "Support for Sweave files as R sources.";
1693
+ readonly description: "Support for Sweave files as R sources. Code chunks are extracted, `\\Sexpr{}` inline expressions are not.";
1694
+ readonly url: [{
1695
+ readonly name: "Sweave";
1696
+ readonly href: "https://stat.ethz.ch/R-manual/R-devel/library/utils/doc/Sweave.pdf";
1697
+ }];
749
1698
  }];
750
1699
  }, {
751
- readonly name: "Pre-Processors/external Tooling";
752
- readonly id: "pre-processors-external-tooling";
753
- readonly supported: "fully";
754
- readonly description: "_Handle pre-processors like `knitr`, `rmarkdown`, `roxygen2` ..._ We do not support pre-processors for the time being (being unable to handle things like `@importFrom`)";
1700
+ readonly name: "Types";
1701
+ readonly id: "types";
1702
+ readonly description: `What a value is, how we ${string} from the code, and the ${string} R applies between types.`;
1703
+ readonly capabilities: readonly [{
1704
+ readonly name: "Primitive";
1705
+ readonly id: "types-primitive";
1706
+ readonly code: readonly ["typeof", "mode"];
1707
+ readonly supported: "not";
1708
+ readonly description: `_The atomic types \`numeric\`, \`character\`, \`logical\`, ..._ \`typeof\`, \`class\`, and \`mode\` are not evaluated and resolve to the unknown top value, so not even a ${string} yields its type.`;
1709
+ readonly example: string;
1710
+ readonly url: [{
1711
+ name: string;
1712
+ href: string;
1713
+ }];
1714
+ }, {
1715
+ readonly name: "Non-Primitive";
1716
+ readonly id: "types-non-primitive";
1717
+ readonly supported: "not";
1718
+ readonly description: `_The composite types a list, a data frame, or an ${string} has._ None of them is tracked, so \`class(list(1, 2))\` resolves to the unknown top value.`;
1719
+ readonly url: [{
1720
+ name: string;
1721
+ href: string;
1722
+ }];
1723
+ }, {
1724
+ readonly name: "Inference";
1725
+ readonly id: "types-inference";
1726
+ readonly supported: "not";
1727
+ readonly description: `_Derive the type of an expression from the code that produces it._ A type predicate never narrows a ${string}, so \`if(is.numeric(1)) y <- 1 else y <- "a"\` still leaves \`y\` as both alternatives.`;
1728
+ }, {
1729
+ readonly name: "Coercion";
1730
+ readonly id: "types-coercion";
1731
+ readonly code: readonly ["as.integer", "as.numeric", "as.character"];
1732
+ readonly supported: "partially";
1733
+ readonly description: "_The type R silently converts a value to, as `c(1, \"a\")` or `TRUE + 1` do._ A vector is not unified, so `c(1, \"a\")` keeps a number beside a string, and the `as.*` converters are not evaluated.";
1734
+ readonly example: string;
1735
+ readonly url: [{
1736
+ name: string;
1737
+ href: string;
1738
+ }];
1739
+ }];
755
1740
  }];
756
1741
  };