@eagleoutice/flowr 2.17.5 → 2.17.6

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 (357) hide show
  1. package/README.md +13 -51
  2. package/abstract-interpretation/absint-inference.d.ts +4 -4
  3. package/abstract-interpretation/absint-inference.js +11 -11
  4. package/abstract-interpretation/abstract-semantics.d.ts +2 -1
  5. package/abstract-interpretation/branch-paths-interpreter.d.ts +1 -0
  6. package/abstract-interpretation/branch-paths-interpreter.js +60 -0
  7. package/abstract-interpretation/branch-paths.d.ts +60 -0
  8. package/abstract-interpretation/branch-paths.js +120 -0
  9. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +6 -1
  10. package/abstract-interpretation/data-frame/dataframe-semantics.js +60 -1
  11. package/abstract-interpretation/data-frame/semantics.js +4 -10
  12. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
  13. package/cli/repl/core.js +51 -0
  14. package/control-flow/cfg-dead-code.js +12 -7
  15. package/data/packed.d.ts +10 -0
  16. package/data/packed.js +33 -0
  17. package/data/r-base-guards.generated.d.ts +7 -0
  18. package/data/r-base-guards.generated.js +12 -0
  19. package/data/r-datasets.generated.d.ts +4 -0
  20. package/data/r-datasets.generated.js +10 -0
  21. package/data/r-formals.generated.d.ts +4 -0
  22. package/data/r-formals.generated.js +10 -0
  23. package/data/r-group-method-guards.generated.d.ts +3 -0
  24. package/data/r-group-method-guards.generated.js +8 -0
  25. package/dataflow/environments/ambient-effect.d.ts +1000 -0
  26. package/dataflow/environments/ambient-effect.js +234 -0
  27. package/dataflow/environments/ambient-state-name.d.ts +45 -2
  28. package/dataflow/environments/ambient-state-name.js +61 -3
  29. package/dataflow/environments/apply-kill.js +11 -4
  30. package/dataflow/environments/built-in-kinds.d.ts +4 -46
  31. package/dataflow/environments/built-in-kinds.js +6 -2
  32. package/dataflow/environments/built-in-props.d.ts +16 -4
  33. package/dataflow/environments/built-in-props.js +11 -3
  34. package/dataflow/environments/built-in.d.ts +6 -1
  35. package/dataflow/environments/built-in.js +13 -36
  36. package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
  37. package/dataflow/environments/default-builtin-config/base-functions.js +110 -52
  38. package/dataflow/environments/default-builtin-config/base-language.d.ts +1 -1
  39. package/dataflow/environments/default-builtin-config/base-language.js +11 -8
  40. package/dataflow/environments/default-builtin-config/dev-tooling.js +1 -1
  41. package/dataflow/environments/default-builtin-config/file-io.js +6 -4
  42. package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +1 -1
  43. package/dataflow/environments/default-builtin-config/graphics-devices.js +24 -14
  44. package/dataflow/environments/default-builtin-config/guard-builders.d.ts +16 -0
  45. package/dataflow/environments/default-builtin-config/guard-builders.js +29 -0
  46. package/dataflow/environments/default-builtin-config/guards-primitive-lang.d.ts +15 -0
  47. package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +228 -0
  48. package/dataflow/environments/default-builtin-config/guards-primitive-ops.d.ts +11 -0
  49. package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +154 -0
  50. package/dataflow/environments/default-builtin-config/guards.d.ts +9 -0
  51. package/dataflow/environments/default-builtin-config/guards.js +211 -0
  52. package/dataflow/environments/default-builtin-config/index.d.ts +3 -3
  53. package/dataflow/environments/default-builtin-config/index.js +22 -7
  54. package/dataflow/environments/default-builtin-config/media-formats.js +4 -4
  55. package/dataflow/environments/default-builtin-config/package-spatial.js +2 -1
  56. package/dataflow/environments/default-builtin-config/package-tidyverse.js +3 -2
  57. package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
  58. package/dataflow/environments/default-builtin-config/package-utils.js +5 -2
  59. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
  60. package/dataflow/environments/default-builtin-config/parallel-execution.js +3 -1
  61. package/dataflow/environments/default-builtin-config/r-formals.d.ts +13 -0
  62. package/dataflow/environments/default-builtin-config/r-formals.js +110 -0
  63. package/dataflow/environments/default-builtin-config/shared-configs.d.ts +138 -77
  64. package/dataflow/environments/default-builtin-config/shared-configs.js +52 -88
  65. package/dataflow/environments/default-builtin-config/statistics.d.ts +1 -1
  66. package/dataflow/environments/default-builtin-config/statistics.js +4 -1
  67. package/dataflow/environments/diff.js +5 -2
  68. package/dataflow/environments/environment.d.ts +20 -0
  69. package/dataflow/environments/environment.js +39 -4
  70. package/dataflow/environments/group-generics.d.ts +5 -1
  71. package/dataflow/environments/group-generics.js +13 -3
  72. package/dataflow/environments/guard-facts.d.ts +169 -0
  73. package/dataflow/environments/guard-facts.js +26 -0
  74. package/dataflow/environments/identifier.d.ts +9 -1
  75. package/dataflow/environments/identifier.js +5 -0
  76. package/dataflow/environments/pkg-name.d.ts +1 -0
  77. package/dataflow/environments/query-fn-props.d.ts +3 -5
  78. package/dataflow/environments/query-fn-props.js +44 -21
  79. package/dataflow/environments/removal-marker.d.ts +2 -0
  80. package/dataflow/environments/removal-marker.js +5 -0
  81. package/dataflow/eval/resolve/resolve-strings.d.ts +2 -5
  82. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  83. package/dataflow/extractor.js +24 -15
  84. package/dataflow/fn/condition-handlers.d.ts +2 -0
  85. package/dataflow/fn/condition-handlers.js +3 -1
  86. package/dataflow/fn/frame-reflection.d.ts +4 -2
  87. package/dataflow/fn/frame-reflection.js +16 -0
  88. package/dataflow/fn/function-props.js +15 -22
  89. package/dataflow/fn/function-semantics.d.ts +31 -1
  90. package/dataflow/fn/function-semantics.js +15 -0
  91. package/dataflow/fn/guards/built-in-guards.d.ts +112 -0
  92. package/dataflow/fn/guards/built-in-guards.js +199 -0
  93. package/dataflow/fn/guards/call-contracts.d.ts +97 -0
  94. package/dataflow/fn/guards/call-contracts.js +331 -0
  95. package/dataflow/fn/guards/condition-grouping.d.ts +20 -0
  96. package/dataflow/fn/guards/condition-grouping.js +135 -0
  97. package/dataflow/fn/guards/function-guards.d.ts +112 -0
  98. package/dataflow/fn/guards/function-guards.js +1549 -0
  99. package/dataflow/fn/guards/group-method-guards.d.ts +28 -0
  100. package/dataflow/fn/guards/group-method-guards.js +56 -0
  101. package/dataflow/fn/guards/guard-claims.d.ts +125 -0
  102. package/dataflow/fn/guards/guard-claims.js +678 -0
  103. package/dataflow/fn/guards/guard-knowledge.d.ts +41 -0
  104. package/dataflow/fn/guards/guard-knowledge.js +180 -0
  105. package/dataflow/fn/guards/guard-term-syntax.d.ts +9 -0
  106. package/dataflow/fn/guards/guard-term-syntax.js +210 -0
  107. package/dataflow/fn/guards/guard-term.d.ts +136 -0
  108. package/dataflow/fn/guards/guard-term.js +550 -0
  109. package/dataflow/fn/guards/stated-guards.d.ts +13 -0
  110. package/dataflow/fn/guards/stated-guards.js +35 -0
  111. package/dataflow/fn/higher-order-function.d.ts +2 -0
  112. package/dataflow/fn/higher-order-function.js +1 -0
  113. package/dataflow/fn/strict-function.d.ts +4 -0
  114. package/dataflow/fn/strict-function.js +66 -17
  115. package/dataflow/graph/ambient-access.d.ts +4 -1
  116. package/dataflow/graph/ambient-access.js +8 -2
  117. package/dataflow/graph/closure-frames.js +1 -1
  118. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  119. package/dataflow/graph/dataflowgraph-builder.js +2 -2
  120. package/dataflow/graph/df-helper.d.ts +6 -0
  121. package/dataflow/graph/df-helper.js +15 -0
  122. package/dataflow/graph/graph.d.ts +12 -6
  123. package/dataflow/graph/graph.js +21 -28
  124. package/dataflow/info.d.ts +2 -1
  125. package/dataflow/info.js +3 -1
  126. package/dataflow/internal/dispatch-linking.d.ts +3 -1
  127. package/dataflow/internal/dispatch-linking.js +1 -0
  128. package/dataflow/internal/linker.d.ts +2 -0
  129. package/dataflow/internal/linker.js +115 -6
  130. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
  131. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +5 -2
  132. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +2 -1
  133. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -57
  134. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +471 -295
  135. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +13 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
  137. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +106 -19
  138. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  139. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +24 -3
  140. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +1 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +33 -11
  142. package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +4 -0
  143. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +4 -4
  144. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +23 -7
  145. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  146. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +19 -2
  147. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +347 -46
  148. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
  149. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -0
  150. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +110 -16
  151. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -0
  152. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +9 -2
  153. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  154. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -2
  155. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -0
  156. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +28 -0
  157. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +16 -6
  158. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +6 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +37 -2
  160. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +4 -0
  161. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -1
  162. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  163. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +55 -11
  164. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
  165. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -10
  166. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  167. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -0
  168. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +64 -7
  169. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -1
  170. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +160 -20
  171. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
  172. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +6 -0
  173. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +142 -4
  174. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
  175. package/dataflow/internal/process/functions/call/quoted.js +23 -4
  176. package/dataflow/processor.d.ts +2 -0
  177. package/documentation/data/dfg/doc-ambient.d.ts +4 -0
  178. package/documentation/data/dfg/doc-ambient.js +74 -0
  179. package/documentation/wiki-dataflow-graph.js +10 -4
  180. package/documentation/wiki-linter.js +12 -0
  181. package/documentation/wiki-query.js +112 -1
  182. package/linter/linter-rules.d.ts +41 -1
  183. package/linter/linter-rules.js +5 -1
  184. package/linter/rules/call-contracts.d.ts +40 -0
  185. package/linter/rules/call-contracts.js +56 -0
  186. package/linter/rules/cmd-check/bogus-return.js +1 -1
  187. package/linter/rules/cmd-check/call-arguments.js +5 -6
  188. package/linter/rules/cmd-check/cmd-check-util.d.ts +0 -6
  189. package/linter/rules/cmd-check/cmd-check-util.js +0 -28
  190. package/linter/rules/cmd-check/package-hooks.js +2 -1
  191. package/linter/rules/cmd-check/s-three-method-consistency.js +1 -1
  192. package/linter/rules/interactive-functions.d.ts +30 -0
  193. package/linter/rules/interactive-functions.js +87 -0
  194. package/linter/rules/process-state-in-session.js +1 -1
  195. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  196. package/linter/rules/undefined-symbol-util.js +8 -2
  197. package/linter/rules/undefined-symbol.js +18 -7
  198. package/linter/rules/useless-loop.d.ts +1 -1
  199. package/package.json +1 -1
  200. package/project/context/flowr-analyzer-dependencies-context.js +2 -1
  201. package/project/flowr-analyzer.d.ts +1 -0
  202. package/project/flowr-analyzer.js +5 -5
  203. package/project/sigdb/build.js +14 -4
  204. package/project/sigdb/decode.d.ts +3 -0
  205. package/project/sigdb/decode.js +10 -1
  206. package/project/sigdb/guarded-source.d.ts +6 -0
  207. package/project/sigdb/guarded-source.js +29 -0
  208. package/project/sigdb/reader.d.ts +5 -0
  209. package/project/sigdb/reader.js +27 -1
  210. package/project/sigdb/schema.d.ts +24 -2
  211. package/queries/catalog/absint-query/absint-query-format.d.ts +6 -3
  212. package/queries/catalog/absint-query/absint-query-format.js +57 -2
  213. package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +6 -2
  214. package/queries/catalog/ambient-access-query/ambient-access-query-format.js +48 -3
  215. package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -2
  216. package/queries/catalog/cluster-query/cluster-query-format.js +19 -2
  217. package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +5 -2
  218. package/queries/catalog/code-clones-query/code-clones-query-format.js +34 -2
  219. package/queries/catalog/config-query/config-query-format.d.ts +5 -2
  220. package/queries/catalog/config-query/config-query-format.js +41 -2
  221. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +5 -2
  222. package/queries/catalog/control-flow-query/control-flow-query-format.js +19 -2
  223. package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +72 -0
  224. package/queries/catalog/data-columns-query/data-columns-query-format.js +215 -0
  225. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +5 -2
  226. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +38 -2
  227. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -2
  228. package/queries/catalog/dataflow-query/dataflow-query-format.js +18 -2
  229. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  230. package/queries/catalog/dependencies-query/dependencies-query-format.js +8 -3
  231. package/queries/catalog/dependencies-query/function-info/other-path-functions.js +1 -1
  232. package/queries/catalog/dependencies-query/function-info/tagged-functions.d.ts +11 -0
  233. package/queries/catalog/dependencies-query/function-info/tagged-functions.js +18 -0
  234. package/queries/catalog/dice-query/dice-query-format.d.ts +7 -2
  235. package/queries/catalog/dice-query/dice-query-format.js +34 -2
  236. package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -4
  237. package/queries/catalog/does-call-query/does-call-query-format.js +114 -2
  238. package/queries/catalog/files-query/files-query-format.d.ts +5 -2
  239. package/queries/catalog/files-query/files-query-format.js +45 -2
  240. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +6 -3
  241. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +303 -2
  242. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +8 -4
  243. package/queries/catalog/happens-before-query/happens-before-query-format.js +37 -2
  244. package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -2
  245. package/queries/catalog/id-map-query/id-map-query-format.js +18 -2
  246. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +5 -2
  247. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +29 -2
  248. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +37 -0
  249. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +125 -0
  250. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -2
  251. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +54 -2
  252. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -2
  253. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +23 -2
  254. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -2
  255. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +15 -2
  256. package/queries/catalog/linter-query/linter-query-format.d.ts +8 -2
  257. package/queries/catalog/linter-query/linter-query-format.js +69 -4
  258. package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -3
  259. package/queries/catalog/location-map-query/location-map-query-format.js +70 -2
  260. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -2
  261. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +18 -2
  262. package/queries/catalog/origin-query/origin-query-format.d.ts +6 -3
  263. package/queries/catalog/origin-query/origin-query-format.js +29 -2
  264. package/queries/catalog/project-query/project-query-format.d.ts +6 -3
  265. package/queries/catalog/project-query/project-query-format.js +98 -2
  266. package/queries/catalog/provenance-query/provenance-query-format.d.ts +6 -3
  267. package/queries/catalog/provenance-query/provenance-query-format.js +30 -2
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +9 -2
  269. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +38 -2
  270. package/queries/catalog/search-query/search-query-format.d.ts +5 -2
  271. package/queries/catalog/search-query/search-query-format.js +23 -2
  272. package/queries/catalog/signature-query/signature-query-executor.js +3 -1
  273. package/queries/catalog/signature-query/signature-query-format.d.ts +3 -0
  274. package/queries/catalog/signature-query/signature-query-render.js +23 -0
  275. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +13 -2
  276. package/queries/catalog/static-slice-query/static-slice-query-format.js +55 -2
  277. package/queries/catalog/taint-query/taint-query-format.d.ts +6 -3
  278. package/queries/catalog/taint-query/taint-query-format.js +28 -2
  279. package/queries/query.d.ts +48 -27
  280. package/queries/query.js +6 -4
  281. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -0
  282. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -0
  283. package/r-bridge/shell.js +7 -2
  284. package/reconstruct/reconstruct.js +18 -3
  285. package/slicing/static/removal-slice.js +4 -3
  286. package/slicing/static/slice-call.d.ts +11 -0
  287. package/slicing/static/slice-call.js +43 -2
  288. package/slicing/static/static-slicer.d.ts +2 -0
  289. package/slicing/static/static-slicer.js +137 -21
  290. package/slicing/static/visiting-queue.d.ts +2 -0
  291. package/slicing/static/visiting-queue.js +4 -0
  292. package/util/flowr-version.d.ts +1 -1
  293. package/util/flowr-version.js +2 -2
  294. package/util/objects.d.ts +2 -0
  295. package/util/objects.js +5 -0
  296. package/util/r-datasets.d.ts +27 -0
  297. package/util/r-datasets.js +45 -0
  298. package/util/text/playground-link.d.ts +2 -0
  299. package/util/text/playground-link.js +2 -0
  300. package/queries/catalog/absint-query/absint-query-executor.d.ts +0 -6
  301. package/queries/catalog/absint-query/absint-query-executor.js +0 -61
  302. package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +0 -6
  303. package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +0 -50
  304. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +0 -6
  305. package/queries/catalog/cluster-query/cluster-query-executor.js +0 -21
  306. package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +0 -6
  307. package/queries/catalog/code-clones-query/code-clones-query-executor.js +0 -38
  308. package/queries/catalog/config-query/config-query-executor.d.ts +0 -6
  309. package/queries/catalog/config-query/config-query-executor.js +0 -45
  310. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +0 -6
  311. package/queries/catalog/control-flow-query/control-flow-query-executor.js +0 -21
  312. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +0 -6
  313. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +0 -40
  314. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +0 -6
  315. package/queries/catalog/dataflow-query/dataflow-query-executor.js +0 -20
  316. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +0 -9
  317. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +0 -18
  318. package/queries/catalog/dice-query/dice-query-executor.d.ts +0 -8
  319. package/queries/catalog/dice-query/dice-query-executor.js +0 -37
  320. package/queries/catalog/does-call-query/does-call-query-executor.d.ts +0 -6
  321. package/queries/catalog/does-call-query/does-call-query-executor.js +0 -116
  322. package/queries/catalog/files-query/files-query-executor.d.ts +0 -6
  323. package/queries/catalog/files-query/files-query-executor.js +0 -47
  324. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +0 -6
  325. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +0 -307
  326. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +0 -7
  327. package/queries/catalog/happens-before-query/happens-before-query-executor.js +0 -40
  328. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +0 -6
  329. package/queries/catalog/id-map-query/id-map-query-executor.js +0 -20
  330. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -6
  331. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +0 -31
  332. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +0 -4
  333. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +0 -58
  334. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +0 -7
  335. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +0 -25
  336. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +0 -7
  337. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +0 -17
  338. package/queries/catalog/linter-query/linter-query-executor.d.ts +0 -9
  339. package/queries/catalog/linter-query/linter-query-executor.js +0 -62
  340. package/queries/catalog/location-map-query/location-map-query-executor.d.ts +0 -7
  341. package/queries/catalog/location-map-query/location-map-query-executor.js +0 -73
  342. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +0 -6
  343. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +0 -20
  344. package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -6
  345. package/queries/catalog/origin-query/origin-query-executor.js +0 -31
  346. package/queries/catalog/project-query/project-query-executor.d.ts +0 -6
  347. package/queries/catalog/project-query/project-query-executor.js +0 -103
  348. package/queries/catalog/provenance-query/provenance-query-executor.d.ts +0 -6
  349. package/queries/catalog/provenance-query/provenance-query-executor.js +0 -33
  350. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +0 -10
  351. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +0 -40
  352. package/queries/catalog/search-query/search-query-executor.d.ts +0 -6
  353. package/queries/catalog/search-query/search-query-executor.js +0 -25
  354. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +0 -14
  355. package/queries/catalog/static-slice-query/static-slice-query-executor.js +0 -59
  356. package/queries/catalog/taint-query/taint-query-executor.d.ts +0 -7
  357. package/queries/catalog/taint-query/taint-query-executor.js +0 -30
@@ -6,14 +6,14 @@ const define_helpers_1 = require("./define-helpers");
6
6
  const built_in_proc_name_1 = require("../built-in-proc-name");
7
7
  const built_in_eval_name_1 = require("../built-in-eval-name");
8
8
  const built_in_props_1 = require("../built-in-props");
9
- const ambient_state_name_1 = require("../ambient-state-name");
9
+ const ambient_effect_1 = require("../ambient-effect");
10
10
  const shared_configs_1 = require("./shared-configs");
11
11
  /** The built-in definitions of reading and writing files and data formats. */
12
12
  exports.IoDefinitions = [
13
13
  /* `here` joins its arguments below the project root, which stays implicit */
14
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("here" /* PkgName.Here */, 'here'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, props: built_in_props_1.CallProp.Pure, ambient: [{ type: "read-state" /* AmbientStateAccessType.ReadState */, state: ambient_state_name_1.AmbientStateName.projectRoot }, { type: "read-state" /* AmbientStateAccessType.ReadState */, state: ambient_state_name_1.AmbientStateName.workingDirectory }], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value }) }, { evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
14
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("here" /* PkgName.Here */, 'here'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, props: built_in_props_1.CallProp.Pure, ambient: [ambient_effect_1.Ambient.projectRoot.reads, ambient_effect_1.Ambient.wd.reads], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value }) }, { evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
15
15
  /* naming the script fixes the root, which must hold that file */
16
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("here" /* PkgName.Here */, 'i_am'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, ambient: { type: "set-state" /* AmbientStateAccessType.SetState */, state: ambient_state_name_1.AmbientStateName.projectRoot }, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
16
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("here" /* PkgName.Here */, 'i_am'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, ambient: ambient_effect_1.Ambient.projectRoot.writes, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
17
17
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("dotenv" /* PkgName.Dotenv */, 'load_dot_env'), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, readAllArguments: true, hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, ambient: shared_configs_1.SetsAnyEnvVar, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
18
18
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("readr" /* PkgName.Readr */, 'read_csv', 'read_csv2', 'read_lines', 'read_delim', 'read_fwf', 'read_tsv', 'read_table', 'read_log', 'read_lines_raw', 'read_lines_chunked', 'read_rds'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.readsFile)('file')),
19
19
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("xlsx" /* PkgName.Xlsx */, 'read.xlsx', 'read.xlsx2'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.readsFile)('file')),
@@ -66,7 +66,9 @@ exports.IoDefinitions = [
66
66
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("seqinr" /* PkgName.Seqinr */, 'write.fasta'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ sequences: shared_signatures_1.Forced.Value, names: shared_signatures_1.Forced.Value, 'file.out': shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
67
67
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("xml2" /* PkgName.Xml2 */, 'read_html', 'read_xml'), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Resource, encoding: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }),
68
68
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("xml2" /* PkgName.Xml2 */, 'download_html', 'download_xml'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: shared_configs_1.Downloads, sig: (0, shared_signatures_1.sig)({ url: shared_signatures_1.Forced.Resource, file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written, '...': shared_signatures_1.Forced.Value }) }),
69
- (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_exists', 'dir_exists', 'file_info', 'file_size', 'dir_info'), ...(0, define_helpers_1.base)('file.exists', 'file.size', 'file.info', 'file.mtime', 'Sys.readlink')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Resource }) }),
69
+ (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_exists', 'dir_exists', 'file_info', 'file_size', 'dir_info'), ...(0, define_helpers_1.base)('file.exists', 'file.size', 'file.info', 'file.mtime', 'file.mode', 'Sys.readlink')],
70
+ /* the mode of a file is what the creation mask let through when it was written */
71
+ built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.umask.reads, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Resource }) }),
70
72
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("config" /* PkgName.Config */, 'get'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ value: shared_signatures_1.Forced.Value, config: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource, use_parent: shared_signatures_1.Forced.Flag }) }),
71
73
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_move'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible, libFn: true, tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, new_path: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written }) }),
72
74
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_copy', 'dir_copy', 'link_create'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, new_path: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written, '...': built_in_props_1.ArgProp.Flag }) }),
@@ -1,3 +1,3 @@
1
1
  import { BuiltInProcName } from '../built-in-proc-name';
2
2
  /** The built-in definitions of base graphics, grDevices, ggplot2, and other plotting packages. */
3
- export declare const GraphicsDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.S7MakeConstructor>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>];
3
+ export declare const GraphicsDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.S7MakeConstructor>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>];
@@ -7,6 +7,7 @@ const identifier_1 = require("../identifier");
7
7
  const built_in_proc_name_1 = require("../built-in-proc-name");
8
8
  const nse_kind_1 = require("../../internal/process/functions/call/nse-kind");
9
9
  const built_in_props_1 = require("../built-in-props");
10
+ const ambient_effect_1 = require("../ambient-effect");
10
11
  const deprecation_info_1 = require("../deprecation-info");
11
12
  const shared_configs_1 = require("./shared-configs");
12
13
  const vertex_1 = require("../../graph/vertex");
@@ -15,35 +16,44 @@ exports.GraphicsDefinitions = [
15
16
  /* data-masking without a data argument, e.g. `aes(x, y)` */
16
17
  (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'aes', 'vars'), ...(0, define_helpers_1.pkg)("dplyr" /* PkgName.Dplyr */, 'join_by'), ...identifier_1.Identifier.fromAllIn(["tibble" /* PkgName.Tibble */, "dplyr" /* PkgName.Dplyr */, "tidyr" /* PkgName.TidyR */], ['tibble', 'tribble'])], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { markArgsAsMasked: nse_kind_1.NseArguments.All }),
17
18
  /* they open a device that writes the plot to the file they are given, under the name each of them uses */
18
- (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'png', 'jpeg', 'bmp', 'tiff', 'svg', 'cairo_pdf'), ...(0, define_helpers_1.pkg)("rasterpdf" /* PkgName.RasterPdf */, 'raster_pdf'), ...(0, define_helpers_1.pkg)("ragg" /* PkgName.Ragg */, 'agg_png', 'agg_jpeg', 'agg_tiff', 'agg_ppm', 'agg_webp')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: shared_configs_1.OpenDevice, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, width: shared_signatures_1.Forced.Value, height: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
19
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'pdf', 'postscript', 'xfig', 'bitmap', 'pictex'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: shared_configs_1.OpenDevice, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource, type: shared_signatures_1.Forced.Value, height: shared_signatures_1.Forced.Value, width: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
19
+ (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'png', 'jpeg', 'bmp', 'tiff', 'svg', 'cairo_pdf'), ...(0, define_helpers_1.pkg)("rasterpdf" /* PkgName.RasterPdf */, 'raster_pdf'), ...(0, define_helpers_1.pkg)("ragg" /* PkgName.Ragg */, 'agg_png', 'agg_jpeg', 'agg_tiff', 'agg_ppm', 'agg_webp')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.device.opens, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, width: shared_signatures_1.Forced.Value, height: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
20
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'pdf', 'postscript', 'xfig', 'bitmap', 'pictex'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.device.opens, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource, type: shared_signatures_1.Forced.Value, height: shared_signatures_1.Forced.Value, width: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
20
21
  /* devices that draw on the screen or into memory instead */
21
- (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.new'), ...(0, define_helpers_1.pkg)("lattice" /* PkgName.Lattice */, 'trellis.device')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.OpenDevice, tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
22
+ (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.new'), ...(0, define_helpers_1.pkg)("lattice" /* PkgName.Lattice */, 'trellis.device')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.device.opens, tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
22
23
  /* platform-specific devices, `dev.new()` opens the right one */
23
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'X11', 'x11', 'windows', 'quartz', 'win.graph', 'win.metafile', 'win.print'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.OpenDevice, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Deprecated] }, define_helpers_1.Primitive),
24
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'X11', 'x11', 'windows', 'quartz', 'win.graph', 'win.metafile', 'win.print'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.device.opens, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Deprecated] }, define_helpers_1.Primitive),
24
25
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("car" /* PkgName.Car */, 'Import'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.readsFile)('file')),
25
26
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("DiagrammeR" /* PkgName.DiagrammeR */, 'import_graph'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.readsFile)('graph_file')),
26
27
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("DiagrammeR" /* PkgName.DiagrammeR */, 'open_graph'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.readsFile)('file')),
27
28
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("car" /* PkgName.Car */, 'Export'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
28
29
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("visNetwork" /* PkgName.VisNetwork */, 'visSave'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.writesFile)('file', 'graph')),
29
30
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("DiagrammeR" /* PkgName.DiagrammeR */, 'save_graph'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, (0, define_helpers_1.writesFile)('file', 'graph')),
30
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'ggsave'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, readAllArguments: true, hasUnknownSideEffects: shared_configs_1.LinkToLastGgPlot, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, plot: shared_signatures_1.Forced.Value, device: built_in_props_1.ArgProp.Flag, path: built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Optional, scale: built_in_props_1.ArgProp.Flag, width: built_in_props_1.ArgProp.Flag, height: built_in_props_1.ArgProp.Flag, units: built_in_props_1.ArgProp.Flag, dpi: built_in_props_1.ArgProp.Flag, limitsize: built_in_props_1.ArgProp.Flag, bg: built_in_props_1.ArgProp.Flag, 'create.dir': built_in_props_1.ArgProp.Flag, '...': built_in_props_1.ArgProp.Flag }) }),
31
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("cowplot" /* PkgName.Cowplot */, 'ggsave2'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, readAllArguments: true, hasUnknownSideEffects: shared_configs_1.LinkToLastGgPlot, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
31
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'ggsave'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, readAllArguments: true, ambient: ambient_effect_1.Ambient.lastPlot.reads, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, plot: shared_signatures_1.Forced.Value, device: built_in_props_1.ArgProp.Flag, path: built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Optional, scale: built_in_props_1.ArgProp.Flag, width: built_in_props_1.ArgProp.Flag, height: built_in_props_1.ArgProp.Flag, units: built_in_props_1.ArgProp.Flag, dpi: built_in_props_1.ArgProp.Flag, limitsize: built_in_props_1.ArgProp.Flag, bg: built_in_props_1.ArgProp.Flag, 'create.dir': built_in_props_1.ArgProp.Flag, '...': built_in_props_1.ArgProp.Flag }) }),
32
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("cowplot" /* PkgName.Cowplot */, 'ggsave2'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, libFn: true, readAllArguments: true, ambient: ambient_effect_1.Ambient.lastPlot.reads, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ filename: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
32
33
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("svglite" /* PkgName.Svglite */, 'svglite'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource, '...': shared_signatures_1.Forced.Value }) }),
33
34
  /* `qplot` creates a plot like the ones above and is deprecated on top of it; registered after them so this definition is the one that sticks */
34
35
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'qplot'), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Deprecated] }, { overrides: true, assumePrimitive: true }),
35
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.off'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, libFn: true, ambient: { type: "close-device" /* AmbientStateAccessType.CloseDevice */ }, hasUnknownSideEffects: shared_configs_1.LinkToLastPlot, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Closes, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
36
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'graphics.off'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, libFn: true, ambient: { type: "close-device" /* AmbientStateAccessType.CloseDevice */, all: true }, hasUnknownSideEffects: shared_configs_1.LinkToLastPlot, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Closes, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
37
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.cur', 'dev.list', 'dev.size', 'dev.capabilities'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, libFn: true, ambient: shared_configs_1.ReadDevices, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
36
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.off'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, libFn: true, ambient: ambient_effect_1.Ambient.device.closes, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Closes, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
37
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'graphics.off'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, libFn: true, ambient: { ...ambient_effect_1.Ambient.device.closes, member: 'every' }, tags: [built_in_props_1.SemanticCallTag.Graphics, built_in_props_1.SemanticCallTag.Closes, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
38
+ /* `dev.copy` opens a device holding what the active one holds, the others put that on disk and leave the devices as they are */
39
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.copy'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: [ambient_effect_1.Ambient.device.reads, ambient_effect_1.Ambient.device.opens], tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
40
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.print', 'dev.copy2pdf', 'dev.copy2eps', 'savePlot'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: [ambient_effect_1.Ambient.device.reads, ambient_effect_1.Ambient.files.writes], tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
41
+ /* they measure in the coordinates of the plot */
42
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'strwidth', 'strheight', 'grconvertX', 'grconvertY', 'xinch', 'yinch', 'xyinch'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: shared_configs_1.ReadsPlot, tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
43
+ /* grid draws on the device, a new page starts a new plot */
44
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grid" /* PkgName.Grid */, 'grid.newpage'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.plot.resets, tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
45
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grid" /* PkgName.Grid */, 'grid.rect', 'grid.lines', 'grid.points', 'grid.text', 'grid.polygon', 'grid.circle', 'grid.segments', 'grid.draw', 'grid.raster', 'grid.polyline', 'grid.path', 'grid.xaxis', 'grid.yaxis', 'grid.grill', 'grid.abline', 'grid.curve', 'grid.arrows', 'grid.roundrect', 'pushViewport', 'popViewport', 'upViewport', 'downViewport'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.plot.adds, tags: [built_in_props_1.SemanticCallTag.Graphics] }, define_helpers_1.Primitive),
46
+ /* `dev.next` and `dev.prev` only name another device, they switch to none */
47
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.cur', 'dev.list', 'dev.size', 'dev.capabilities', 'dev.next', 'dev.prev'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, libFn: true, ambient: { ...ambient_effect_1.Ambient.device.reads, member: 'every' }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
38
48
  /* switching the active device makes its graphics state the one in effect */
39
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.set', 'dev.next', 'dev.prev'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, libFn: true, ambient: { type: "switch-device" /* AmbientStateAccessType.SwitchDevice */ }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ which: built_in_props_1.ArgProp.Forced }) }),
49
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'dev.set'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, libFn: true, ambient: ambient_effect_1.Ambient.device.switches, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ which: built_in_props_1.ArgProp.Forced }) }),
40
50
  (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'make_constructor'), ...(0, define_helpers_1.pkg)("S7" /* PkgName.S7 */, 'new_class')], built_in_proc_name_1.BuiltInProcName.S7MakeConstructor, { mode: [vertex_1.FunctionDispatch.S7], classDecl: { system: "s7" /* ClassSystem.S7 */, nameArg: { idx: 0, name: 'name' }, containsArg: { idx: 1, name: 'parent' }, memberArgs: [{ name: 'properties', typed: true }], virtualArg: { name: 'abstract' } } }, define_helpers_1.Primitive),
41
- (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'par'), ...(0, define_helpers_1.pkg)("tinyplot" /* PkgName.TinyPlot */, 'tpar')], built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: { type: "set-graphics" /* AmbientStateAccessType.SetGraphics */, queryOnUnnamedStrings: true, queryLinksTo: shared_configs_1.LinkToLastPlot, keys: { from: 'argument-names', ignore: ['no.readonly'] } }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': 0, 'no.readonly': 0 }) }),
51
+ (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'par'), ...(0, define_helpers_1.pkg)("tinyplot" /* PkgName.TinyPlot */, 'tpar')], built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: [ambient_effect_1.Ambient.par.reads, { ...ambient_effect_1.Ambient.par.reads, member: { from: 'unnamed', quoted: true }, when: 'query', handsBack: true }, { ...ambient_effect_1.Ambient.par.writes, member: { from: 'argument-names', ignore: ['no.readonly'] }, unless: 'query' }, { ...ambient_effect_1.Ambient.plot.reads, when: 'query' }], tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': 0, 'no.readonly': 0 }) }),
42
52
  /* they arrange the device or change its colors, which every later plot on it picks up */
43
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'layout', 'screen', 'close.screen'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: { type: "set-graphics" /* AmbientStateAccessType.SetGraphics */ }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
44
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'split.screen'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, ambient: { type: "set-graphics" /* AmbientStateAccessType.SetGraphics */ }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
53
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'layout', 'screen', 'close.screen'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: [ambient_effect_1.Ambient.par.reads, ambient_effect_1.Ambient.par.writes], tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
54
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("graphics" /* PkgName.Graphics */, 'split.screen'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, ambient: [ambient_effect_1.Ambient.par.reads, ambient_effect_1.Ambient.par.writes], tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
45
55
  /* the palette, other than the parameters above, is shared by all devices */
46
- (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'palette'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: { type: "set-palette" /* AmbientStateAccessType.SetPalette */ }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ value: built_in_props_1.ArgProp.Forced }) }),
56
+ (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'palette'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: [ambient_effect_1.Ambient.palette.reads, { ...ambient_effect_1.Ambient.palette.writes, unless: 'no-arguments' }], tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ value: built_in_props_1.ArgProp.Forced }) }),
47
57
  (0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("ggplot2" /* PkgName.GgPlot2 */, 'theme_set'), ...(0, define_helpers_1.pkg)("testthat" /* PkgName.Testthat */, 'context'), ...(0, define_helpers_1.base)('library.dynam'), ...(0, define_helpers_1.pkg)("remotes" /* PkgName.Remotes */, 'install_local'), ...(0, define_helpers_1.pkg)("devtools" /* PkgName.Devtools */, 'install_local')], built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, libFn: true, props: built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ chname: built_in_props_1.ArgProp.NoDefault, package: built_in_props_1.ArgProp.NoDefault, 'lib.loc': built_in_props_1.ArgProp.NoDefault, verbose: 0, 'file.ext': 0, '...': 0 }) }),
48
58
  (0, define_helpers_1.fn)((0, define_helpers_1.pkg)("tinyplot" /* PkgName.TinyPlot */, 'tinytheme'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, hasUnknownSideEffects: true, libFn: true, sig: (0, shared_signatures_1.sig)({ chname: built_in_props_1.ArgProp.NoDefault, package: built_in_props_1.ArgProp.NoDefault, 'lib.loc': built_in_props_1.ArgProp.NoDefault, verbose: 0, 'file.ext': 0, '...': 0 }) }),
49
59
  (0, define_helpers_1.fn)(identifier_1.Identifier.fromAllIn(["htmlwidgets" /* PkgName.HtmlWidgets */, 'DT'], ['JS']), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, tags: [built_in_props_1.SemanticCallTag.JavaScript], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value | built_in_props_1.ArgProp.Injectable }) }),
@@ -0,0 +1,16 @@
1
+ import { type GuardFacts, type RCondition, type RFailure, type ReturnedValue, type RValueTypes } from '../guard-facts';
2
+ import type { BrandedIdentifier } from '../identifier';
3
+ export declare const Numeric: number;
4
+ export declare const Atomic: number;
5
+ export declare const is: (...predicates: readonly BrandedIdentifier[]) => RCondition;
6
+ export declare const not: (...predicates: readonly BrandedIdentifier[]) => RCondition;
7
+ export declare const any: (...conditions: readonly RCondition[]) => RCondition;
8
+ export declare const all: (...conditions: readonly RCondition[]) => RCondition;
9
+ export declare const fail: (requires: RCondition, message: string, more?: Omit<RFailure, "requires" | "message">) => RFailure;
10
+ export declare const fails: (requires: RCondition, message: string, more?: Omit<RFailure, "requires" | "message">) => readonly RFailure[];
11
+ /** what R fails on unless the value has a class attribute, which may bring a method of its own */
12
+ export declare const dispatched: (requires: RCondition, message: string) => readonly RFailure[];
13
+ export declare const Computes: GuardFacts;
14
+ export declare const Returns: (types: RValueTypes, more?: Omit<ReturnedValue, "types">) => GuardFacts;
15
+ /** The same facts for each of the names. */
16
+ export declare const each: (facts: GuardFacts, ...names: readonly BrandedIdentifier[]) => Record<BrandedIdentifier, GuardFacts>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.each = exports.Returns = exports.Computes = exports.dispatched = exports.fails = exports.fail = exports.all = exports.any = exports.not = exports.is = exports.Atomic = exports.Numeric = void 0;
4
+ const guard_facts_1 = require("../guard-facts");
5
+ /* the words the guard fact tables are written in */
6
+ exports.Numeric = guard_facts_1.RValueType.Integer | guard_facts_1.RValueType.Double;
7
+ exports.Atomic = guard_facts_1.RValueType.Logical | exports.Numeric | guard_facts_1.RValueType.Complex | guard_facts_1.RValueType.Character | guard_facts_1.RValueType.Raw;
8
+ const is = (...predicates) => predicates.length === 1 ? { is: predicates[0] } : { any: predicates.map(p => ({ is: p })) };
9
+ exports.is = is;
10
+ const not = (...predicates) => ({ all: predicates.map(p => ({ not: { is: p } })) });
11
+ exports.not = not;
12
+ const any = (...conditions) => ({ any: conditions });
13
+ exports.any = any;
14
+ const all = (...conditions) => ({ all: conditions });
15
+ exports.all = all;
16
+ const fail = (requires, message, more = {}) => ({ requires, message, ...more });
17
+ exports.fail = fail;
18
+ const fails = (requires, message, more = {}) => [(0, exports.fail)(requires, message, more)];
19
+ exports.fails = fails;
20
+ /** what R fails on unless the value has a class attribute, which may bring a method of its own */
21
+ const dispatched = (requires, message) => (0, exports.fails)(requires, message, { dispatches: true });
22
+ exports.dispatched = dispatched;
23
+ exports.Computes = { computes: true };
24
+ const Returns = (types, more = {}) => ({ returns: { types, ...more } });
25
+ exports.Returns = Returns;
26
+ /** The same facts for each of the names. */
27
+ const each = (facts, ...names) => Object.fromEntries(names.map(name => [name, facts]));
28
+ exports.each = each;
29
+ //# sourceMappingURL=guard-builders.js.map
@@ -0,0 +1,15 @@
1
+ import { BuiltInProcName } from '../built-in-proc-name';
2
+ import { type GuardFacts } from '../guard-facts';
3
+ import type { BrandedIdentifier } from '../identifier';
4
+ /**
5
+ * What R checks of the arguments of the primitives of its language, its accessors and replacement functions, and the functions
6
+ * handing out environments and calling into compiled code, and what they return, each verified against R.
7
+ * An internal generic dispatches on a classed first argument, so a method may let anything through and return anything,
8
+ * which states a failure of it only for an unclassed value (`unlessClassed`, `dispatches`) and what it returns as a case.
9
+ * The primitives left out ask nothing of their arguments that flowR could state, or are syntax:
10
+ * `@` (the `.Data` pseudo slot works on anything, S4 and S7 dispatch), `@<-`, `unclass`, `c`, `quote`, `.Internal`, `::`, `:::`,
11
+ * `<-`, `<<-`, `=`, `{`, `function`, `repeat`, `break`, `next`, `return`, `browser`, `.cache_class`, and `missing`, whose argument is syntax.
12
+ */
13
+ export declare const PrimitiveLanguageGuardFacts: Readonly<Record<BrandedIdentifier, GuardFacts>>;
14
+ /** The functions {@link PrimitiveLanguageGuardFacts} speaks about that nothing else defines. */
15
+ export declare const PrimitiveLanguageDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInReplacementDefinition];
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrimitiveLanguageDefinitions = exports.PrimitiveLanguageGuardFacts = void 0;
4
+ const built_in_proc_name_1 = require("../built-in-proc-name");
5
+ const built_in_props_1 = require("../built-in-props");
6
+ const guard_facts_1 = require("../guard-facts");
7
+ const define_helpers_1 = require("./define-helpers");
8
+ const shared_signatures_1 = require("./shared-signatures");
9
+ const guard_builders_1 = require("./guard-builders");
10
+ const { Null, Logical, Integer, Double, Character, List, Function: Fn, Environment, Language, Expression } = guard_facts_1.RValueType;
11
+ const length = (op, to) => ({ length: op, to });
12
+ /** the condition holds of the value of another formal of the call */
13
+ const on = (formal, holds) => ({ on: formal, holds });
14
+ /** what R fails on unless the value of `formal` has a class attribute, which may bring a method of its own */
15
+ const unlessClassed = (formal, failure) => ({ ...failure, requires: (0, guard_builders_1.any)(on(formal, (0, guard_builders_1.is)('is.object')), failure.requires) });
16
+ const Scalar = length('==', 1);
17
+ /* a condition of more than one value only warned before R 4.2, which went by the first one */
18
+ const Condition = [
19
+ (0, guard_builders_1.fail)(length('>=', 1), 'argument is of length zero'),
20
+ (0, guard_builders_1.fail)(length('<=', 1), 'the condition has length > 1', { since: '4.2.0' }),
21
+ (0, guard_builders_1.fail)({ not: { is: 'is.na' } }, 'missing value where TRUE/FALSE needed', { since: '4.2.0' }),
22
+ (0, guard_builders_1.fail)((0, guard_builders_1.any)(length('>=', 2), { not: { is: 'is.na' } }), 'missing value where TRUE/FALSE needed', { until: '4.2.0' })
23
+ ];
24
+ const NotSubsettable = 'object of type ... is not subsettable';
25
+ const Dollar = (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), (0, guard_builders_1.all)((0, guard_builders_1.is)('is.recursive'), { not: { is: 'is.function' } })), '$ operator is invalid for atomic vectors', { dispatches: true });
26
+ const Subsettable = (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment', 'is.symbol'), NotSubsettable);
27
+ const ElementSubsettable = (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.symbol'), NotSubsettable);
28
+ /* what holds no attributes, though setting none at all, or `NULL`, works on everything */
29
+ /* before R 4.6 a primitive took attributes as well, which changed it everywhere */
30
+ const attributable = (failing) => [failing((0, guard_builders_1.all)((0, guard_builders_1.not)('is.null'), (0, guard_builders_1.not)('is.symbol'))), { ...failing((0, guard_builders_1.not)('is.primitive')), since: '4.6.0' }];
31
+ const UnlessNullValue = (holds, message) => (0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', (0, guard_builders_1.is)('is.null')), holds), message);
32
+ const NameString = (message) => [
33
+ (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.character'), message),
34
+ (0, guard_builders_1.fail)(Scalar, message),
35
+ (0, guard_builders_1.fail)({ not: { is: 'is.na' } }, message),
36
+ (0, guard_builders_1.fail)({ compare: '>=', of: ['nchar'], to: 1 }, 'attempt to use zero-length variable name')
37
+ ];
38
+ const OneString = (message) => [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.character'), message), (0, guard_builders_1.fail)(Scalar, message)];
39
+ const NativeName = { '.NAME': [(0, guard_builders_1.fail)((0, guard_builders_1.not)('is.null', 'is.numeric', 'is.logical', 'is.complex', 'is.raw', 'is.function', 'is.environment', 'is.symbol', 'is.call'), 'first argument must be a string (of length 1) or native symbol reference')] };
40
+ /* `length(x) <- n` and `dim(x) <- d` truncate a number towards zero */
41
+ const Extent = [
42
+ (0, guard_builders_1.fail)(Scalar, "wrong length for 'value' argument"),
43
+ (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.numeric', 'is.character', 'is.object')), 'invalid value'),
44
+ (0, guard_builders_1.fail)({ not: { is: 'is.na' } }, 'invalid value'),
45
+ (0, guard_builders_1.fail)((0, guard_builders_1.any)({ not: { is: 'is.numeric' } }, { compare: '>', to: -1 }), 'invalid value')
46
+ ];
47
+ /**
48
+ * What R checks of the arguments of the primitives of its language, its accessors and replacement functions, and the functions
49
+ * handing out environments and calling into compiled code, and what they return, each verified against R.
50
+ * An internal generic dispatches on a classed first argument, so a method may let anything through and return anything,
51
+ * which states a failure of it only for an unclassed value (`unlessClassed`, `dispatches`) and what it returns as a case.
52
+ * The primitives left out ask nothing of their arguments that flowR could state, or are syntax:
53
+ * `@` (the `.Data` pseudo slot works on anything, S4 and S7 dispatch), `@<-`, `unclass`, `c`, `quote`, `.Internal`, `::`, `:::`,
54
+ * `<-`, `<<-`, `=`, `{`, `function`, `repeat`, `break`, `next`, `return`, `browser`, `.cache_class`, and `missing`, whose argument is syntax.
55
+ */
56
+ exports.PrimitiveLanguageGuardFacts = {
57
+ '[': { asks: { x: [{ ...Subsettable, dispatches: true }] }, computes: true },
58
+ '[[': { asks: { x: [{ ...ElementSubsettable, dispatches: true }] }, computes: true },
59
+ '$': { asks: { x: [Dollar] }, computes: true },
60
+ '@': guard_builders_1.Computes,
61
+ '.subset': { asks: { x: [Subsettable] }, computes: true },
62
+ '.subset2': { asks: { x: [ElementSubsettable] }, computes: true },
63
+ '[<-': { asks: { x: [{ ...Subsettable, dispatches: true }] } },
64
+ '[[<-': { asks: { x: [{ ...ElementSubsettable, dispatches: true }] } },
65
+ '$<-': { asks: { x: [{ ...ElementSubsettable, dispatches: true }] } },
66
+ 'attr': { asks: { x: [], which: OneString("exactly one attribute 'which' must be given") }, computes: true },
67
+ 'attr<-': { asks: { x: attributable(holds => UnlessNullValue(holds, 'cannot set an attribute on ...')), which: NameString("'name' must be non-null character string"), value: [] } },
68
+ 'attributes': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(List | Null) },
69
+ 'attributes<-': {
70
+ asks: {
71
+ x: [(0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', length('==', 0)), (0, guard_builders_1.not)('is.symbol')), 'cannot set an attribute on ...'), { ...(0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', length('==', 0)), (0, guard_builders_1.not)('is.primitive')), 'cannot set an attribute on ...'), since: '4.6.0' }],
72
+ value: [(0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), (0, guard_builders_1.all)((0, guard_builders_1.is)('is.list'), { not: { is: 'is.pairlist' } })), 'attributes must be a list or NULL')]
73
+ }
74
+ },
75
+ 'class': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Character, { nonEmpty: true }) },
76
+ 'class<-': {
77
+ asks: {
78
+ x: [UnlessNullValue((0, guard_builders_1.not)('is.null'), 'attempt to set an attribute on NULL'), (0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', length('==', 0)), (0, guard_builders_1.not)('is.symbol')), 'cannot set an attribute on ...'), { ...(0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', length('==', 0)), (0, guard_builders_1.not)('is.primitive')), 'cannot set an attribute on ...'), since: '4.6.0' }],
79
+ value: [(0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment'), "attempt to set invalid 'class' attribute")]
80
+ }
81
+ },
82
+ 'oldClass': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Character | Null) },
83
+ 'oldClass<-': {
84
+ asks: {
85
+ x: attributable(holds => (0, guard_builders_1.fail)((0, guard_builders_1.any)(on('value', length('==', 0)), holds), 'cannot set an attribute on ...')),
86
+ value: [(0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.character'), length('==', 0)), "attempt to set invalid 'class' attribute")]
87
+ }
88
+ },
89
+ 'dim': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Integer | Null, { notNA: true, count: true, dispatchesOn: 'x' }) },
90
+ 'dim<-': {
91
+ asks: {
92
+ x: [unlessClassed('x', UnlessNullValue((0, guard_builders_1.is)('is.atomic', 'is.list', 'is.expression'), 'invalid first argument, must be vector (list or atomic)'))],
93
+ value: [
94
+ unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.null', 'is.atomic'), 'invalid second argument, must be vector or NULL')),
95
+ unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), length('>=', 1)), 'length-0 dimension vector is invalid')),
96
+ unlessClassed('x', (0, guard_builders_1.fail)({ not: { is: 'anyNA' } }, 'the dims contain missing values')),
97
+ unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), { compare: '==', of: ['prod', 'as.integer'], to: { on: 'x', of: ['length'] } }), 'dims [product ...] do not match the length of object [...]'))
98
+ ]
99
+ }
100
+ },
101
+ 'dimnames': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(List | Null, { dispatchesOn: 'x' }) },
102
+ 'dimnames<-': {
103
+ asks: {
104
+ x: [unlessClassed('x', UnlessNullValue({ not: { is: 'is.null', of: 'dim' } }, "'dimnames' applied to non-array"))],
105
+ value: [unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.null', 'is.list'), "'dimnames' must be a list"))]
106
+ }
107
+ },
108
+ 'names': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Character | Null, { dispatchesOn: 'x' }) },
109
+ 'names<-': {
110
+ asks: {
111
+ x: [unlessClassed('x', UnlessNullValue((0, guard_builders_1.not)('is.null', 'is.function', 'is.environment', 'is.symbol'), 'names() applied to a non-vector'))],
112
+ value: [
113
+ unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment'), "cannot coerce type ... to vector of type 'character'")),
114
+ unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), { compare: '<=', of: ['length'], to: { on: 'x', of: ['length'] } }), "'names' attribute [...] must be the same length as the vector [...]"))
115
+ ]
116
+ }
117
+ },
118
+ 'levels<-': { asks: { x: attributable(holds => unlessClassed('x', UnlessNullValue(holds, 'cannot set an attribute on ...'))), value: [] } },
119
+ 'length<-': {
120
+ asks: {
121
+ x: [unlessClassed('x', (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment', 'is.symbol', 'is.call'), 'cannot set length of non-(vector or list)'))],
122
+ value: Extent.map(f => unlessClassed('x', f))
123
+ }
124
+ },
125
+ 'storage.mode<-': { asks: { x: [], value: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.character'), "'value' must be non-null character string"), (0, guard_builders_1.fail)(length('>=', 1), "'value' must be non-null character string")] } },
126
+ 'environment<-': {
127
+ asks: {
128
+ fun: [UnlessNullValue((0, guard_builders_1.not)('is.null', 'is.symbol'), 'cannot set an attribute on ...')],
129
+ value: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.environment', 'is.null'), 'replacement object is not an environment')]
130
+ }
131
+ },
132
+ 'list': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(List) },
133
+ 'expression': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Expression) },
134
+ /* `nchar(NA_character_)` is `NA` */
135
+ 'call': { asks: { name: [...OneString('first argument must be a character string'), (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.na'), { compare: '>=', of: ['nchar'], to: 1 }), 'attempt to use zero-length variable name')] }, ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Language) },
136
+ 'as.call': { asks: { x: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.list', 'is.call', 'is.expression'), 'invalid argument list'), (0, guard_builders_1.fail)(length('>=', 1), 'invalid length 0 argument')] }, ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Language) },
137
+ 'substitute': { asks: { expr: [], env: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.null', 'is.environment', 'is.list'), 'invalid environment specified')] } },
138
+ 'invisible': { asks: { x: [] }, computes: true, returns: 'argument' },
139
+ '(': { asks: { x: [] }, computes: true, returns: 'argument' },
140
+ 'as.environment': {
141
+ asks: {
142
+ x: [
143
+ (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.null', 'is.logical', 'is.complex', 'is.raw', 'is.function', 'is.symbol', 'is.call', 'is.expression', 'is.pairlist'), "invalid object for 'as.environment'", { dispatches: true }),
144
+ (0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.list', 'is.environment'), length('>=', 1)), "invalid 'pos' argument", { dispatches: true })
145
+ ]
146
+ },
147
+ opensFrame: true
148
+ },
149
+ 'pos.to.env': { asks: { x: [(0, guard_builders_1.fail)(length('>=', 1), "invalid 'pos' argument"), (0, guard_builders_1.fail)({ not: { is: 'anyNA' } }, "invalid 'pos' argument")] } },
150
+ 'baseenv': (0, guard_builders_1.Returns)(Environment),
151
+ 'emptyenv': (0, guard_builders_1.Returns)(Environment),
152
+ 'globalenv': (0, guard_builders_1.Returns)(Environment),
153
+ /* `...elt(2.9)` takes the second, `...elt(TRUE)` the first */
154
+ '...elt': {
155
+ asks: {
156
+ n: [
157
+ (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.numeric', 'is.logical', 'is.object'), "indexing '...' with an invalid index"),
158
+ (0, guard_builders_1.fail)(Scalar, "indexing '...' with an invalid index"),
159
+ (0, guard_builders_1.fail)({ not: { is: 'is.na' } }, "indexing '...' with non-positive index"),
160
+ (0, guard_builders_1.fail)({ compare: '>=', to: 1 }, "indexing '...' with non-positive index"),
161
+ (0, guard_builders_1.fail)({ compare: '<=', of: ['trunc'], to: { call: '...length' } }, 'the ... list contains fewer than ... elements')
162
+ ]
163
+ },
164
+ computes: true
165
+ },
166
+ '...length': { ...guard_builders_1.Computes, returns: { types: Integer, scalar: true, notNA: true, count: true } },
167
+ '...names': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Character | Null) },
168
+ 'nargs': { ...guard_builders_1.Computes, returns: { types: Integer, scalar: true, notNA: true, count: true } },
169
+ 'missing': { singleResult: true, returns: { types: Logical, scalar: true, notNA: true } },
170
+ 'on.exit': { asks: { expr: [], add: [(0, guard_builders_1.fail)(length('>=', 1), "invalid 'add' argument")], after: [(0, guard_builders_1.fail)(length('>=', 1), "invalid 'lifo' argument")] } },
171
+ 'switch': { asks: { EXPR: [(0, guard_builders_1.fail)(Scalar, 'EXPR must be a length 1 vector'), (0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment', 'is.symbol', 'is.call', 'is.pairlist'), 'EXPR must be a length 1 vector')] } },
172
+ 'UseMethod': { asks: { generic: OneString("'generic' argument must be a character string") } },
173
+ 'standardGeneric': { asks: { f: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.character'), "argument to 'standardGeneric' must be a non-empty character string"), (0, guard_builders_1.fail)(length('>=', 1), "argument to 'standardGeneric' must be a non-empty character string")] } },
174
+ 'forceAndCall': { asks: { n: [], FUN: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.function'), 'attempt to apply non-function')] } },
175
+ 'Exec': { asks: { expr: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.call'), '"expr" must be a call expression', { since: '4.4.0' })] }, opensFrame: true },
176
+ 'declare': (0, guard_builders_1.Returns)(Null),
177
+ 'if': { asks: { cond: Condition } },
178
+ 'while': { asks: { cond: Condition } },
179
+ /* a classed environment is not looped over either */
180
+ 'for': { asks: { var: [], seq: [(0, guard_builders_1.fail)((0, guard_builders_1.not)('is.function', 'is.environment', 'is.symbol', 'is.call'), 'invalid for() loop sequence')] } },
181
+ '~': (0, guard_builders_1.Returns)(Language),
182
+ ':': {
183
+ asks: {
184
+ from: [(0, guard_builders_1.fail)(length('>=', 1), 'argument of length 0'), (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.numeric', 'is.logical', 'is.complex', 'is.character', 'is.object'), 'NA/NaN argument')],
185
+ to: [(0, guard_builders_1.fail)(length('>=', 1), 'argument of length 0'), (0, guard_builders_1.fail)((0, guard_builders_1.is)('is.numeric', 'is.logical', 'is.complex', 'is.character', 'is.object'), 'NA/NaN argument')]
186
+ },
187
+ ...guard_builders_1.Computes,
188
+ ...(0, guard_builders_1.Returns)(Integer | Double)
189
+ },
190
+ ...(0, guard_builders_1.each)({ asks: NativeName }, '.C', '.Call', '.External', '.External2', '.Fortran', '.Call.graphics', '.External.graphics'),
191
+ '.Primitive': { asks: { name: OneString('string argument required') }, ...(0, guard_builders_1.Returns)(Fn) },
192
+ '.class2': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Character, { nonEmpty: true }) },
193
+ '.isMethodsDispatchOn': (0, guard_builders_1.Returns)(Logical, { scalar: true, notNA: true }),
194
+ ...(0, guard_builders_1.each)({ asks: { obj: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.function', 'is.character'), 'argument must be a function')] } }, '.primTrace', '.primUntrace'),
195
+ 'tracemem': { asks: { x: [(0, guard_builders_1.fail)((0, guard_builders_1.not)('is.null', 'is.function', 'is.environment'), 'argument must not be a function')] }, ...(0, guard_builders_1.Returns)(Character, { scalar: true, notNA: true }) },
196
+ 'untracemem': { asks: { x: [(0, guard_builders_1.fail)({ not: { is: 'is.function' } }, 'argument must not be a function')] }, ...(0, guard_builders_1.Returns)(Null) },
197
+ 'retracemem': { asks: { x: [(0, guard_builders_1.fail)({ not: { is: 'is.function' } }, 'argument must not be a function')], previous: [(0, guard_builders_1.fail)((0, guard_builders_1.any)((0, guard_builders_1.is)('is.null'), (0, guard_builders_1.all)((0, guard_builders_1.is)('is.character'), Scalar)), "invalid 'previous' argument")] }, ...(0, guard_builders_1.Returns)(Null | Character) },
198
+ 'interactive': (0, guard_builders_1.Returns)(Logical, { scalar: true, notNA: true }),
199
+ 'proc.time': { ...guard_builders_1.Computes, ...(0, guard_builders_1.Returns)(Double) },
200
+ /* before R 4.3 a longer one went by its first element */
201
+ 'gc.time': { asks: { on: [(0, guard_builders_1.fail)(length('>=', 1), 'NA in coercion to boolean'), (0, guard_builders_1.fail)(Scalar, "'length = n' in coercion to 'logical(1)'", { since: '4.3.0' }), (0, guard_builders_1.fail)({ not: { is: 'is.na' } }, 'NA in coercion to boolean', { since: '4.3.0' })] }, ...(0, guard_builders_1.Returns)(Double) },
202
+ 'lazyLoadDBfetch': { asks: { key: [], file: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.character'), 'not a proper file name')] } },
203
+ 'unCfillPOSIXlt': { asks: { x: [(0, guard_builders_1.fail)((0, guard_builders_1.is)('is.list'), 'a valid "POSIXlt" object is a list of at least 9 elements'), (0, guard_builders_1.fail)({ compare: '>=', of: ['length', 'unclass'], to: 9 }, 'a valid "POSIXlt" object is a list of at least 9 elements')] }, ...(0, guard_builders_1.Returns)(List) },
204
+ /* `asS4(1)` is S4 without a class attribute, so this tells nothing of the type */
205
+ 'isS4': { predicate: { yes: guard_facts_1.AnyType } },
206
+ /* the number of levels, which a comparison can bound like a length */
207
+ 'nlevels': { measures: 'single' }
208
+ };
209
+ const Value = (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value });
210
+ /** The functions {@link PrimitiveLanguageGuardFacts} speaks about that nothing else defines. */
211
+ exports.PrimitiveLanguageDefinitions = [
212
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('attr'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, which: shared_signatures_1.Forced.Value, exact: shared_signatures_1.Forced.Flag }) }, define_helpers_1.Primitive),
213
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('.subset', '.subset2'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
214
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('attributes', 'unclass', '.class2', 'untracemem', 'unCfillPOSIXlt'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: Value }, define_helpers_1.Primitive),
215
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('nlevels'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: Value }),
216
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('isS4'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ object: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
217
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('tracemem'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: Value }, define_helpers_1.Primitive),
218
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('retracemem'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, previous: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
219
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('gc.time'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ on: shared_signatures_1.Forced.Flag }) }, define_helpers_1.Primitive),
220
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('.isMethodsDispatchOn'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ onOff: shared_signatures_1.Forced.Flag }) }, define_helpers_1.Primitive),
221
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('.primTrace', '.primUntrace'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ obj: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
222
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('lazyLoadDBfetch'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ key: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Value, compressed: shared_signatures_1.Forced.Value, hook: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
223
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('forceAndCall'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ n: shared_signatures_1.Forced.Value, FUN: shared_signatures_1.Forced.Value, '...': built_in_props_1.ArgProp.Value }) }, define_helpers_1.Primitive),
224
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('Exec'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value, envir: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
225
+ (0, define_helpers_1.fn)((0, define_helpers_1.base)('declare'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': 0 }) }, define_helpers_1.Primitive),
226
+ (0, define_helpers_1.replacement)((0, define_helpers_1.base)('oldClass', 'storage.mode'), ['<-', '<<-'], { readIndices: true, props: built_in_props_1.CallProp.Scope })
227
+ ];
228
+ //# sourceMappingURL=guards-primitive-lang.js.map
@@ -0,0 +1,11 @@
1
+ import { BuiltInProcName } from '../built-in-proc-name';
2
+ import { type GuardFacts } from '../guard-facts';
3
+ import type { BrandedIdentifier } from '../identifier';
4
+ /**
5
+ * What the operators and the functions of the `Ops`, `Summary`, `Complex`, and `matrixOps` groups ask of their arguments, together with
6
+ * R's sequences and its type predicates and coercions, each read off R 4.6.1.
7
+ * What is asked of a value that may dispatch holds only without a class attribute.
8
+ */
9
+ export declare const PrimitiveOpsGuardFacts: Readonly<Record<BrandedIdentifier, GuardFacts>>;
10
+ /** The functions above nothing else defines. */
11
+ export declare const PrimitiveOpsGuardDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>];