@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
@@ -9,6 +9,7 @@ const linter_tags_1 = require("../../linter-tags");
9
9
  const identifier_1 = require("../../../dataflow/environments/identifier");
10
10
  const vertex_1 = require("../../../dataflow/graph/vertex");
11
11
  const df_helper_1 = require("../../../dataflow/graph/df-helper");
12
+ const call_contracts_1 = require("../../../dataflow/fn/guards/call-contracts");
12
13
  const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props");
13
14
  const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
14
15
  const r_parameter_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-parameter");
@@ -32,7 +33,7 @@ function targetsOf(id, name, df, idMap, ctx, { packages, rewritesFormals }) {
32
33
  /* a built-in also calls the functions it is handed (`lapply(x, f)`), so only the origins tell what is called */
33
34
  const origins = df_helper_1.Dataflow.origin(df.graph, id) ?? [];
34
35
  if (!origins.some(o => o.type === 3 /* OriginType.BuiltInFunctionOrigin */)) {
35
- const defs = (0, cmd_check_util_1.calledDefinitions)(df.graph, id, idMap);
36
+ const defs = df_helper_1.Dataflow.calleeDefinitionsOf(df.graph, id);
36
37
  if (defs.length > 0) {
37
38
  const direct = defs.every(d => (0, cmd_check_util_1.boundName)(d, idMap) === identifier_1.Identifier.getName(name));
38
39
  return !direct && rewritesFormals ? undefined : { formals: defs.map(cmd_check_util_1.formalNames), certain: direct };
@@ -45,8 +46,6 @@ function targetsOf(id, name, df, idMap, ctx, { packages, rewritesFormals }) {
45
46
  const known = packageFormals(origins.length === 1 && origins[0].type === 3 /* OriginType.BuiltInFunctionOrigin */ ? origins[0].fn.name : name, ctx);
46
47
  return known === undefined ? undefined : { formals: [known], certain: false };
47
48
  }
48
- /** the replacement functions that rewrite a function, after which its formals are no longer those of its definition */
49
- const FormalsRewriters = new Set(['formals<-', 'body<-', 'args<-']);
50
49
  /** how R would match the arguments of `call` to `formals`, the problems it would run into */
51
50
  function mismatchesOf(call, formals, partial) {
52
51
  const dots = formals.indexOf(Dots);
@@ -124,11 +123,11 @@ exports.CALL_ARGUMENTS = {
124
123
  let checkedCalls = 0;
125
124
  const add = (node, r, certain = true) => results.push({ ...(0, cmd_check_util_1.at)(node, certain), ...r });
126
125
  const calls = [...df.graph.verticesOfType(vertex_1.VertexType.FunctionCall)];
127
- const rewritesFormals = calls.some(([, v]) => FormalsRewriters.has(identifier_1.Identifier.getName(v.name)));
126
+ const rewritesFormals = calls.some(([, v]) => call_contracts_1.CallContracts.FormalsRewriters.has(identifier_1.Identifier.getName(v.name)));
128
127
  for (const [id, vertex] of calls) {
129
128
  const node = idMap.get(id);
130
129
  /* quoted code is data, as codetools sees it too */
131
- if (!r_function_call_1.RFunctionCall.isNamed(node) || !pkg.isPackageCode(node.info.file) || (0, cmd_check_util_1.isQuoted)(df.graph, id, idMap)) {
130
+ if (!r_function_call_1.RFunctionCall.isNamed(node) || !pkg.isPackageCode(node.info.file) || df_helper_1.Dataflow.isWithinQuoted(id, df.graph)) {
132
131
  continue;
133
132
  }
134
133
  const targets = targetsOf(id, vertex.name, df, idMap, ctx, { packages: config.checkPackageFunctions, rewritesFormals });
@@ -162,7 +161,7 @@ exports.CALL_ARGUMENTS = {
162
161
  }
163
162
  const parent = idMap.get(node.info.parent ?? '');
164
163
  /* the formal `...` and an argument named `...` (`switch(x, ... = 1)`, `alist(... = )`) use no dots */
165
- if (!r_symbol_1.RSymbol.is(node) || r_parameter_1.RParameter.is(parent) || (r_argument_1.RArgument.is(parent) && parent.name === node) || (0, cmd_check_util_1.isQuoted)(df.graph, node.info.id, idMap)) {
164
+ if (!r_symbol_1.RSymbol.is(node) || r_parameter_1.RParameter.is(parent) || (r_argument_1.RArgument.is(parent) && parent.name === node) || df_helper_1.Dataflow.isWithinQuoted(node.info.id, df.graph)) {
166
165
  continue;
167
166
  }
168
167
  const name = identifier_1.Identifier.getName(node.content);
@@ -29,8 +29,6 @@ export interface PackageInfo {
29
29
  }
30
30
  /** Collects the {@link PackageInfo} of the analyzed project; code without a file or DESCRIPTION counts as package code. */
31
31
  export declare function packageInfo(ctx: ReadOnlyFlowrAnalyzerContext): PackageInfo;
32
- /** All packages the DESCRIPTION declares in any dependency field. */
33
- export declare function allDeclared(info: PackageInfo): Set<BrandedNamespace>;
34
32
  /** The name a function definition is bound to by a plain assignment (`f <- function() ...`). */
35
33
  export declare function boundName(def: RNode<ParentInformation>, idMap: AstIdMap): string | undefined;
36
34
  /** Every node of the normalized project, each once (unlike the values of the id map). */
@@ -44,10 +42,6 @@ export declare function topLevelDefinitions(ast: NormalizedAst, name: (n: Brande
44
42
  export declare function formalNames(def: RFunctionDefinition<ParentInformation>): BrandedIdentifier[];
45
43
  /** Whether the node with the given id is (nested) within the given definition. */
46
44
  export declare function isWithin(id: NodeId, def: NodeId, idMap: AstIdMap): boolean;
47
- /** The function definitions a call reaches by its `Calls` edges. */
48
- export declare function calledDefinitions(graph: DataflowGraph, call: NodeId, idMap: AstIdMap): RFunctionDefinition<ParentInformation>[];
49
- /** Whether the node or an ancestor is quoted or otherwise evaluated elsewhere (`quote(...)`, a data mask). */
50
- export declare function isQuoted(graph: DataflowGraph, id: NodeId, idMap: AstIdMap): boolean;
51
45
  /** The packages `R CMD check` takes as declared without a DESCRIPTION entry: the base packages but `methods` and `stats4`. */
52
46
  export declare function isStandardPackage(pkg: BrandedNamespace): boolean;
53
47
  /** The pretty printers of a rule: `query` describes a result, the full one is its message and location. */
@@ -5,14 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DataFile = exports.DataSetExtensions = exports.DependencyFields = exports.at = void 0;
7
7
  exports.packageInfo = packageInfo;
8
- exports.allDeclared = allDeclared;
9
8
  exports.boundName = boundName;
10
9
  exports.projectNodes = projectNodes;
11
10
  exports.topLevelDefinitions = topLevelDefinitions;
12
11
  exports.formalNames = formalNames;
13
12
  exports.isWithin = isWithin;
14
- exports.calledDefinitions = calledDefinitions;
15
- exports.isQuoted = isQuoted;
16
13
  exports.isStandardPackage = isStandardPackage;
17
14
  exports.printer = printer;
18
15
  exports.packageCalls = packageCalls;
@@ -24,7 +21,6 @@ const flowr_file_1 = require("../../../project/context/flowr-file");
24
21
  const package_files_1 = require("./package-files");
25
22
  const flowr_description_file_1 = require("../../../project/plugins/file-plugins/files/flowr-description-file");
26
23
  const r_function_definition_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
27
- const edge_1 = require("../../../dataflow/graph/edge");
28
24
  const r_base_packages_1 = require("../../../util/r-base-packages");
29
25
  const r_project_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-project");
30
26
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
@@ -63,10 +59,6 @@ function packageInfo(ctx) {
63
59
  || (!excluded.has(file) && (codeDirs.length === 0 || codeDirs.some(d => path_1.default.normalize(file).startsWith(d))))
64
60
  };
65
61
  }
66
- /** All packages the DESCRIPTION declares in any dependency field. */
67
- function allDeclared(info) {
68
- return new Set([...info.declared.values()].flat());
69
- }
70
62
  /** The name a function definition is bound to by a plain assignment (`f <- function() ...`). */
71
63
  function boundName(def, idMap) {
72
64
  const parent = def.info.parent === undefined ? undefined : idMap.get(def.info.parent);
@@ -111,26 +103,6 @@ function isWithin(id, def, idMap) {
111
103
  }
112
104
  return false;
113
105
  }
114
- /** The function definitions a call reaches by its `Calls` edges. */
115
- function calledDefinitions(graph, call, idMap) {
116
- const defs = [];
117
- for (const [target, edge] of graph.edgesFrom(call)) {
118
- const def = edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Calls) ? idMap.get(target) : undefined;
119
- if (r_function_definition_1.RFunctionDefinition.is(def)) {
120
- defs.push(def);
121
- }
122
- }
123
- return defs;
124
- }
125
- /** Whether the node or an ancestor is quoted or otherwise evaluated elsewhere (`quote(...)`, a data mask). */
126
- function isQuoted(graph, id, idMap) {
127
- for (let cur = idMap.get(id); cur !== undefined; cur = cur.info.parent === undefined ? undefined : idMap.get(cur.info.parent)) {
128
- if (graph.edgesTo(cur.info.id).values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.NonStandardEvaluation))) {
129
- return true;
130
- }
131
- }
132
- return false;
133
- }
134
106
  /** The packages `R CMD check` takes as declared without a DESCRIPTION entry: the base packages but `methods` and `stats4`. */
135
107
  function isStandardPackage(pkg) {
136
108
  return (0, r_base_packages_1.isBaseRPackage)(pkg) && pkg !== 'methods' && pkg !== 'stats4';
@@ -17,6 +17,7 @@ const r_for_loop_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-for-l
17
17
  const r_repeat_loop_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop");
18
18
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
19
19
  const function_semantics_1 = require("../../../dataflow/fn/function-semantics");
20
+ const df_helper_1 = require("../../../dataflow/graph/df-helper");
20
21
  const flowr_namespace_file_1 = require("../../../project/plugins/file-plugins/files/flowr-namespace-file");
21
22
  const linter_util_1 = require("../../linter-util");
22
23
  const cmd_check_util_1 = require("./cmd-check-util");
@@ -55,7 +56,7 @@ function reachedCalls(def, df, idMap, follow) {
55
56
  return false;
56
57
  }
57
58
  result.push({ id: node.info.id, name: identifier_1.Identifier.getName((0, linter_util_1.builtInOf)(df.graph, node.info.id) ?? vertex.name), via });
58
- for (const callee of follow ? (0, cmd_check_util_1.calledDefinitions)(df.graph, node.info.id, idMap) : []) {
59
+ for (const callee of follow ? df_helper_1.Dataflow.calleeDefinitionsOf(df.graph, node.info.id) : []) {
59
60
  if (!visited.has(callee.info.id)) {
60
61
  visited.add(callee.info.id);
61
62
  work.push({ def: callee, via: via ?? node.info.id });
@@ -24,7 +24,7 @@ function formalNames(def) {
24
24
  /** the subsetting generics dispatch internally on an argument list that varies by method, so a method may take any */
25
25
  const SubsetGenerics = new Set(['[', '[[', '$']);
26
26
  /** the operators for which a method with as many arguments as the generic is fine whatever their names */
27
- const OperatorGenerics = new Set(['+', '-', '*', '/', '^', '%%', '%/%', '&', '|', '!', '==', '!=', '<', '<=', '>=', '>']);
27
+ const OperatorGenerics = new Set(group_generics_1.RGroupGenerics.Ops);
28
28
  /** whether a method with the formals `mArgs` is consistent with the generic `gName` of formals `gArgs` (`tools::checkS3methods`) */
29
29
  function consistent(gName, gArgs, mName, mArgs) {
30
30
  if (gName === 'round' && mArgs[0] === 'x') {
@@ -0,0 +1,30 @@
1
+ import { LintingRuleCertainty } from '../linter-format';
2
+ import { type FunctionsMetadata, type FunctionsResult } from './function-finder-util';
3
+ import { LintingRuleTag } from '../linter-tags';
4
+ import { Identifier } from '../../dataflow/environments/identifier';
5
+ import type { MergeableRecord } from '../../util/objects';
6
+ import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
+ export interface InteractiveFunctionsConfig extends MergeableRecord {
8
+ /** The functions that only do their job in an interactive session, by default every built-in tagged {@link SemanticCallTag.Interactive} */
9
+ fns: readonly Identifier[];
10
+ }
11
+ export declare const INTERACTIVE_FUNCTIONS: {
12
+ readonly createSearch: (config: InteractiveFunctionsConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with"], ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<ParentInformation, import("../../search/flowr-search").FlowrSearchElement<ParentInformation>[]>>>;
13
+ readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, import("../../search/flowr-search").FlowrSearchElement<ParentInformation>[]>, config: InteractiveFunctionsConfig, data: import("../..").ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
14
+ results: FunctionsResult[];
15
+ '.meta': FunctionsMetadata;
16
+ }>;
17
+ readonly prettyPrint: {
18
+ readonly query: (r: FunctionsResult, metadata: unknown) => string;
19
+ readonly full: (r: FunctionsResult, metadata: unknown) => string;
20
+ };
21
+ readonly info: {
22
+ readonly name: "Interactive Functions";
23
+ readonly tags: readonly [LintingRuleTag.Reproducibility, LintingRuleTag.Smell, LintingRuleTag.Robustness];
24
+ readonly certainty: LintingRuleCertainty.BestEffort;
25
+ readonly description: "Finds calls that only do their job in an interactive session, such as `View`, `edit`, `browser`, or `debug`, left in a script, where `Rscript` skips or stops at them. A call in the branch an `interactive()` check takes is fine, one within a function is uncertain, as the function may only be meant for interactive use.";
26
+ readonly defaultConfig: (ctx: import("../../project/context/flowr-analyzer-context").ReadOnlyFlowrAnalyzerContext) => {
27
+ fns: readonly Identifier[];
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERACTIVE_FUNCTIONS = void 0;
4
+ const linter_format_1 = require("../linter-format");
5
+ const function_finder_util_1 = require("./function-finder-util");
6
+ const linter_tags_1 = require("../linter-tags");
7
+ const identifier_1 = require("../../dataflow/environments/identifier");
8
+ const built_in_props_1 = require("../../dataflow/environments/built-in-props");
9
+ const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
10
+ const r_if_then_else_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-if-then-else");
11
+ const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
12
+ const r_function_definition_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
13
+ const r_unary_op_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-unary-op");
14
+ const r_binary_op_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-binary-op");
15
+ const r_expression_list_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-expression-list");
16
+ const r_while_loop_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-while-loop");
17
+ const r_argument_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
18
+ /** the calls asking whether the session is interactive */
19
+ const InteractiveChecks = new Set(['interactive', 'is_interactive']);
20
+ /**
21
+ * Whether `condition` evaluating to `holds` means the session is interactive: `interactive()` holding, `!interactive()`
22
+ * failing, and what `&&`, `||`, `isTRUE`, and parentheses make of them (`if(!interactive() || n == 0) ... else View(d)`).
23
+ */
24
+ function impliesInteractive(condition, holds) {
25
+ if (r_expression_list_1.RExpressionList.is(condition) && condition.children.length === 1) {
26
+ return impliesInteractive(condition.children[0], holds);
27
+ }
28
+ else if (r_unary_op_1.RUnaryOp.is(condition) && condition.operator === '!') {
29
+ return impliesInteractive(condition.operand, !holds);
30
+ }
31
+ else if (r_binary_op_1.RBinaryOp.is(condition) && (condition.operator === '&&' || condition.operator === '||')) {
32
+ /* `a && b` holds only if both do, `a || b` fails only if both do: one of them implying it is enough */
33
+ const either = (condition.operator === '&&') === holds;
34
+ const [lhs, rhs] = [impliesInteractive(condition.lhs, holds), impliesInteractive(condition.rhs, holds)];
35
+ return either ? lhs || rhs : lhs && rhs;
36
+ }
37
+ else if (r_function_call_1.RFunctionCall.isNamed(condition)) {
38
+ const name = identifier_1.Identifier.getName(condition.functionName.content);
39
+ if (name === 'isTRUE') {
40
+ return holds && impliesInteractive(r_argument_1.RArgument.valueOf(condition.arguments[0]), true);
41
+ }
42
+ return holds && InteractiveChecks.has(name);
43
+ }
44
+ return false;
45
+ }
46
+ /** what a control dependency on `node` depends on: the condition of an `if` or a loop, the left side of `&&` and `||`, or the call itself (`stopifnot(interactive())`) */
47
+ function conditionOf(node) {
48
+ if (r_if_then_else_1.RIfThenElse.is(node) || r_while_loop_1.RWhileLoop.is(node)) {
49
+ return node.condition;
50
+ }
51
+ else if (r_binary_op_1.RBinaryOp.is(node)) {
52
+ return node.lhs;
53
+ }
54
+ return node;
55
+ }
56
+ /**
57
+ * Whether the call only runs in an interactive session, as one of the conditions it runs under says so
58
+ * (`if(interactive()) View(df)`, `interactive() && View(df)`, `if(!interactive()) return(); View(df)`).
59
+ */
60
+ function guarded(id, graph, idMap) {
61
+ return graph.getVertex(id)?.cds?.some(cd => cd.when !== undefined && impliesInteractive(conditionOf(idMap.get(cd.id)), cd.when)) === true;
62
+ }
63
+ /** whether the call sits in a function, which the code may only call interactively */
64
+ function inFunction(node, idMap) {
65
+ return model_1.RNode.iterateParents(node, idMap).some(r_function_definition_1.RFunctionDefinition.is);
66
+ }
67
+ exports.INTERACTIVE_FUNCTIONS = {
68
+ createSearch: config => function_finder_util_1.functionFinderUtil.createSearch(config.fns),
69
+ processSearchResult: async (elements, config, data) => {
70
+ const idMap = (await data.normalize()).idMap;
71
+ const graph = (await data.dataflow()).graph;
72
+ return function_finder_util_1.functionFinderUtil.processSearchResult(elements, config, data, found => found.flatMap(element => guarded(element.node.info.id, graph, idMap) ? []
73
+ /* a function may be meant for interactive use only, the script itself is not */
74
+ : [Object.assign(element, { certainty: inFunction(element.node, idMap) ? linter_format_1.LintingResultCertainty.Uncertain : linter_format_1.LintingResultCertainty.Certain })]));
75
+ },
76
+ prettyPrint: function_finder_util_1.functionFinderUtil.prettyPrint('an interactive session, which Rscript does not have'),
77
+ info: {
78
+ name: 'Interactive Functions',
79
+ tags: [linter_tags_1.LintingRuleTag.Reproducibility, linter_tags_1.LintingRuleTag.Smell, linter_tags_1.LintingRuleTag.Robustness],
80
+ certainty: linter_format_1.LintingRuleCertainty.BestEffort,
81
+ description: 'Finds calls that only do their job in an interactive session, such as `View`, `edit`, `browser`, or `debug`, left in a script, where `Rscript` skips or stops at them. A call in the branch an `interactive()` check takes is fine, one within a function is uncertain, as the function may only be meant for interactive use.',
82
+ defaultConfig: ctx => ({
83
+ fns: ctx.env.deriveFromIndex(index => index.with(built_in_props_1.SemanticCallTag.Interactive))
84
+ })
85
+ }
86
+ };
87
+ //# sourceMappingURL=interactive-functions.js.map
@@ -138,7 +138,7 @@ function sharedCache(arg, graph, idMap, inSession, absent) {
138
138
  return arg === undefined ? absent : arg.content.str !== 'session';
139
139
  }
140
140
  else if (r_function_call_1.RFunctionCall.isNamed(arg)) {
141
- return (0, cmd_check_util_1.calledDefinitions)(graph, arg.info.id, idMap).some(fn => sharedCache(r_expression_list_1.RExpressionList.is(fn.body) ? fn.body.children.at(-1) : fn.body, graph, idMap, inSession, false));
141
+ return df_helper_1.Dataflow.calleeDefinitionsOf(graph, arg.info.id).some(fn => sharedCache(r_expression_list_1.RExpressionList.is(fn.body) ? fn.body.children.at(-1) : fn.body, graph, idMap, inSession, false));
142
142
  }
143
143
  const defs = df_helper_1.Dataflow.targetsOf(graph, arg.info.id, edge_1.EdgeType.Reads);
144
144
  return r_symbol_1.RSymbol.is(arg) && (defs.length === 0 || defs.some(d => !inSession(d)));
@@ -10,7 +10,7 @@ export declare function isInstalledResourceFile(file: string | undefined): boole
10
10
  * Whether the variable use `id` resolves to a local definition, a parameter, or a built-in (function or
11
11
  * constant such as `T`, `pi`). Broader than `Dataflow.origin`, which misses built-in constants.
12
12
  */
13
- export declare function useResolvesToDefinitionOrBuiltin(graph: DataflowGraph, id: NodeId): boolean;
13
+ export declare function useResolvesToDefinitionOrBuiltin(graph: DataflowGraph, id: NodeId, seen?: Set<NodeId>): boolean;
14
14
  /**
15
15
  * Whether any edge incident to `id` marks it as non-standard-evaluated (quoted), e.g. `quote`/`substitute`.
16
16
  * A loop body is marked as non-standard-evaluated too, but it is evaluated, so it does not count here.
@@ -14,6 +14,7 @@ const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
14
14
  const r_access_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-access");
15
15
  const r_function_definition_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
16
16
  const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
17
+ const built_in_proc_name_1 = require("../../dataflow/environments/built-in-proc-name");
17
18
  /**
18
19
  * Path heuristic for an R package `inst/` resource (installed verbatim, not namespace source). Fallback for
19
20
  * the authoritative `FileRole.Install`, covering requests that bypass the file-role plugins.
@@ -26,7 +27,7 @@ const ResolveEdges = edge_1.EdgeType.Reads | edge_1.EdgeType.DefinedByOnCall;
26
27
  * Whether the variable use `id` resolves to a local definition, a parameter, or a built-in (function or
27
28
  * constant such as `T`, `pi`). Broader than `Dataflow.origin`, which misses built-in constants.
28
29
  */
29
- function useResolvesToDefinitionOrBuiltin(graph, id) {
30
+ function useResolvesToDefinitionOrBuiltin(graph, id, seen = new Set([id])) {
30
31
  for (const [target, edge] of graph.edgesFrom(id)) {
31
32
  if (edge_1.DfEdge.doesNotIncludeType(edge, ResolveEdges) || edge_1.DfEdge.includesType(edge, edge_1.EdgeType.NonStandardEvaluation)) {
32
33
  continue;
@@ -35,7 +36,12 @@ function useResolvesToDefinitionOrBuiltin(graph, id) {
35
36
  return true;
36
37
  }
37
38
  const targetVtx = graph.getVertex(target);
38
- if (vertex_1.DfgVertex.isVariableDefinition(targetVtx) || vertex_1.DfgVertex.isFunctionDefinition(targetVtx)) {
39
+ /* a value is what `attach(list(a = 1))` binds the name to */
40
+ if (vertex_1.DfgVertex.isVariableDefinition(targetVtx) || vertex_1.DfgVertex.isFunctionDefinition(targetVtx) || vertex_1.DfgVertex.isValue(targetVtx)) {
41
+ return true;
42
+ }
43
+ /* a name written without a definition vertex of its own is defined by its value (`list2env(list(a = 1), globalenv())`), or by the `attach` it names a data set for (`attach(mtcars)`) */
44
+ if (vertex_1.DfgVertex.isUse(targetVtx) && !seen.has(target) && (df_helper_1.Dataflow.targetsOf(graph, target, edge_1.EdgeType.DefinedBy).length > 0 || df_helper_1.Dataflow.targetsOf(graph, target, edge_1.EdgeType.Reads).some(t => vertex_1.DfgVertex.hasOrigin(graph.getVertex(t), built_in_proc_name_1.BuiltInProcName.Attach)) || useResolvesToDefinitionOrBuiltin(graph, target, seen.add(target)))) {
39
45
  return true;
40
46
  }
41
47
  }
@@ -12,6 +12,7 @@ const flowr_search_filters_1 = require("../../search/flowr-search-filters");
12
12
  const assert_1 = require("../../util/assert");
13
13
  const range_1 = require("../../util/range");
14
14
  const flowr_file_1 = require("../../project/context/flowr-file");
15
+ const r_datasets_1 = require("../../util/r-datasets");
15
16
  const r_base_packages_1 = require("../../util/r-base-packages");
16
17
  const unused_import_1 = require("./unused-import");
17
18
  const defaultmap_1 = require("../../util/collections/defaultmap");
@@ -44,11 +45,14 @@ function declaredGlobalVariables(graph, ctx) {
44
45
  }
45
46
  return names;
46
47
  }
48
+ /** what {@link getArgumentStringValue} gives for a value it cannot tell, as the dependencies query has it */
49
+ const UnknownValue = 'unknown';
47
50
  /** the calls binding the name they are handed as a string, which flowR does not link to the reads of that name */
48
51
  const NameBindingFunctions = new Set(['assign', 'delayedAssign']);
49
52
  /**
50
53
  * The names bound by the `assign(name, value)` calls of the code, as far as flowR resolves `name`:
51
54
  * `assign(paste0("year", i), ...)` in a loop over `2000:2025` binds `year2000` to `year2025`.
55
+ * `undefined` if one of them binds a name flowR cannot tell (`lapply(1:3, function(i) assign(paste0("g", i), i))`), which may be any.
52
56
  */
53
57
  function assignedNames(graph, ctx) {
54
58
  const names = new Set();
@@ -57,10 +61,12 @@ function assignedNames(graph, ctx) {
57
61
  continue;
58
62
  }
59
63
  const values = (0, resolve_argument_1.getArgumentStringValue)(ctx.config.solver.variables, graph, vertex, 0, 'x', true, ctx);
60
- for (const str of values?.values().flatMap(v => [...v]) ?? []) {
61
- if (str !== undefined) {
62
- names.add(str);
63
- }
64
+ const found = values === undefined ? [] : [...values.values().flatMap(v => [...v])];
65
+ if (found.length === 0 || found.some(str => str === undefined || str === UnknownValue)) {
66
+ return undefined;
67
+ }
68
+ for (const str of found) {
69
+ names.add(str);
64
70
  }
65
71
  }
66
72
  return names;
@@ -128,9 +134,14 @@ exports.UNDEFINED_SYMBOL = {
128
134
  ...r_base_packages_1.AttachedBasePackages.map(n => deps.getDependency(n)).filter(assert_1.isNotUndefined)
129
135
  ];
130
136
  /* a package may re-export what it imports, as dplyr does tibble's `as_tibble` */
131
- const src = deps.signatures().sources();
137
+ const db = deps.signatures();
138
+ const src = db.sources();
132
139
  const importedByLoaded = new Set(loadedPackages.flatMap(p => src.isBaseR(p.name) ? [] : (0, unused_import_1.nonBaseImports)(src, p.name, p.resolvedVersion)));
133
- const isExportedByLoadedPackage = (0, defaultmap_1.memoize)((name) => loadedPackages.some(p => p.has(name)) || (importedByLoaded.size > 0 && deps.packagesExporting(name).some(p => importedByLoaded.has(p))));
140
+ const exportsOf = (0, defaultmap_1.memoize)((pkg) => new Set(db.exportsOf(pkg)?.exported ?? []));
141
+ const loadedNames = new Set(loadedPackages.map(p => p.name));
142
+ /* the database records no data sets, which a loaded package makes available as lazy data */
143
+ const isDatasetOfLoadedPackage = (name) => (0, r_datasets_1.datasetShape)(name, undefined, pkg => loadedNames.has(pkg)) !== undefined;
144
+ const isExportedByLoadedPackage = (0, defaultmap_1.memoize)((name) => loadedPackages.some(p => p.has(name)) || isDatasetOfLoadedPackage(name) || [...importedByLoaded].some(p => exportsOf(p).has(name)));
134
145
  // hint an unloaded package that exports `name` (e.g. `ggplot` -> `ggplot2`), from the package database
135
146
  const attached = new Set(r_base_packages_1.AttachedBasePackages);
136
147
  const hintPackagesFor = (name) => deps.packagesExporting(name).filter(p => !attached.has(p)).slice(0, MaxHintPackages);
@@ -170,7 +181,7 @@ exports.UNDEFINED_SYMBOL = {
170
181
  return suppress('declaredGlobal');
171
182
  }
172
183
  // forward-referenced closure binding flowR's dataflow did not link (unconditional bindings only)
173
- if ((0, undefined_symbol_util_1.isDefinedInEnclosingScope)(graph, scopeDefined, id, name) || (kind === 'variable' && namespace === undefined && boundByAssign.has(name))) {
184
+ if ((0, undefined_symbol_util_1.isDefinedInEnclosingScope)(graph, scopeDefined, id, name) || (kind === 'variable' && namespace === undefined && (boundByAssign === undefined || boundByAssign.has(name)))) {
174
185
  return suppress('enclosingScope');
175
186
  }
176
187
  // consumed by non-standard evaluation (quoting), hence not an ordinary read
@@ -18,8 +18,8 @@ export declare const USELESS_LOOP: {
18
18
  readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, useLessLoopConfig: UselessLoopConfig, data: import("../..").ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
19
19
  results: {
20
20
  name: string;
21
- certainty: import("../linter-format").LintingResultCertainty;
22
21
  loc: SourceLocation;
22
+ certainty: import("../linter-format").LintingResultCertainty;
23
23
  involvedId: import("../..").NodeId | import("../..").NodeId[] | undefined;
24
24
  }[];
25
25
  '.meta': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "2.17.5",
3
+ "version": "2.17.6",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -9,6 +9,7 @@ const flowr_cache_1 = require("../cache/flowr-cache");
9
9
  const config_1 = require("../../config");
10
10
  const r_version_1 = require("../../util/r-version");
11
11
  const arrays_1 = require("../../util/collections/arrays");
12
+ const guarded_source_1 = require("../sigdb/guarded-source");
12
13
  const signature_db_1 = require("../sigdb/signature-db");
13
14
  /**
14
15
  * Manages the project's dependencies, their versions, and their interplay with {@link FlowrAnalyzerPackageVersionsPlugin}s.
@@ -65,7 +66,7 @@ class FlowrAnalyzerDependenciesContext extends abstract_flowr_analyzer_context_1
65
66
  if (!(0, config_1.isSigDbEnabled)(this.ctx.config)) {
66
67
  return [];
67
68
  }
68
- return this.plugins.flatMap(p => [...p.signatureSources(this.ctx.config)]);
69
+ return this.plugins.flatMap(p => p.signatureSources(this.ctx.config).map(source => (0, guarded_source_1.withGuards)(source)));
69
70
  }
70
71
  signatureOf(id, version) {
71
72
  const pkg = identifier_1.Identifier.getNamespace(id);
@@ -18,6 +18,7 @@ import type { FlowrFileProvider } from './context/flowr-file';
18
18
  import type { Tree } from 'web-tree-sitter';
19
19
  import type { CallGraph } from '../dataflow/graph/call-graph';
20
20
  import { type TaintAnalysisBuilder } from '../taint-analysis/builder/taint-analysis';
21
+ import '../abstract-interpretation/branch-paths-interpreter';
21
22
  import type { InvalidationEvent } from './cache/flowr-cache';
22
23
  import type { GasOverrides } from '../gas';
23
24
  import type { FnInfo } from '../dataflow/environments/query-fn-props';
@@ -10,6 +10,8 @@ const files_1 = require("../util/files");
10
10
  const tree_sitter_normalize_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize");
11
11
  const tree_sitter_executor_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
12
12
  const taint_analysis_1 = require("../taint-analysis/builder/taint-analysis");
13
+ /* the guards of functions read how code is reached, which the abstract interpreter works out */
14
+ require("../abstract-interpretation/branch-paths-interpreter");
13
15
  const vertex_1 = require("../dataflow/graph/vertex");
14
16
  const df_helper_1 = require("../dataflow/graph/df-helper");
15
17
  /**
@@ -171,11 +173,9 @@ function qualifyInBackground(graph) {
171
173
  const calls = Array.from(graph.verticesOfType(vertex_1.VertexType.FunctionCall), ([id]) => id);
172
174
  let next = 0;
173
175
  const step = () => {
174
- graph.sharingTargetWalks(() => {
175
- for (const end = Math.min(next + 256, calls.length); next < end; next++) {
176
- df_helper_1.Dataflow.qualify(calls[next], graph, false);
177
- }
178
- });
176
+ for (const end = Math.min(next + 256, calls.length); next < end; next++) {
177
+ df_helper_1.Dataflow.qualify(calls[next], graph, false);
178
+ }
179
179
  if (next < calls.length) {
180
180
  later(step);
181
181
  }
@@ -35,14 +35,15 @@ function noteZstdSupport() {
35
35
  /** resolve the effective features (everything defaults to on) */
36
36
  function resolveFeatures(f) {
37
37
  if (f === undefined) {
38
- return { signatures: true, callGraphs: true, locations: true, dependencies: true, classes: true };
38
+ return { signatures: true, callGraphs: true, locations: true, dependencies: true, classes: true, contracts: true };
39
39
  }
40
40
  return {
41
41
  signatures: f.signatures ?? true,
42
42
  callGraphs: f.callGraphs ?? true,
43
43
  locations: f.locations ?? true,
44
44
  dependencies: f.dependencies ?? true,
45
- classes: f.classes ?? true
45
+ classes: f.classes ?? true,
46
+ contracts: f.contracts ?? true
46
47
  };
47
48
  }
48
49
  /** an ascending list with its duplicates dropped, so a class named twice in one version is stored once */
@@ -100,6 +101,8 @@ function buildBlob(p, strings, tier, feats) {
100
101
  const fns = new Pool();
101
102
  const deps = new Pool();
102
103
  const classes = new Pool();
104
+ const contracts = new Pool();
105
+ const contractOf = {};
103
106
  const sig = (params) => {
104
107
  if (!feats.signatures || params.length === 0) {
105
108
  return -1;
@@ -129,7 +132,14 @@ function buildBlob(p, strings, tier, feats) {
129
132
  feats.locations && f.file ? strings.str(f.file) : -1, feats.locations ? f.line ?? -1 : -1];
130
133
  const topic = f.topic && f.topic !== f.name ? strings.str(f.topic) : -1;
131
134
  const rec = f.reexportOf ? [...base, topic, strings.str(f.reexportOf)] : topic >= 0 ? [...base, topic] : base;
132
- return fns.intern(rec.join(','), rec);
135
+ if (!feats.contracts || f.guards === undefined) {
136
+ return fns.intern(rec.join(','), rec);
137
+ }
138
+ const text = JSON.stringify(f.guards);
139
+ const contract = contracts.intern(text, f.guards);
140
+ const idx = fns.intern(`${rec.join(',')}|${contract}`, rec);
141
+ contractOf[idx] = contract;
142
+ return idx;
133
143
  };
134
144
  const depList = (list) => {
135
145
  // sorted by (type, name) for a canonical, poolable form
@@ -190,7 +200,7 @@ function buildBlob(p, strings, tier, feats) {
190
200
  sources[version] = strings.str(info.source);
191
201
  }
192
202
  }
193
- const blob = { sigs: sigs.items, cgs: cgs.items, fns: fns.items, versions, deps: deps.items, depsByVersion, dates, noncran: noncran.length ? noncran : undefined, sources: Object.keys(sources).length ? sources : undefined, classes: classes.items.length ? classes.items : undefined, classesByVersion: Object.keys(classesByVersion).length ? classesByVersion : undefined };
203
+ const blob = { sigs: sigs.items, cgs: cgs.items, fns: fns.items, versions, deps: deps.items, depsByVersion, dates, noncran: noncran.length ? noncran : undefined, sources: Object.keys(sources).length ? sources : undefined, classes: classes.items.length ? classes.items : undefined, classesByVersion: Object.keys(classesByVersion).length ? classesByVersion : undefined, contracts: contracts.items.length ? contracts.items : undefined, contractOf: contracts.items.length ? contractOf : undefined };
194
204
  return { blob, versionCount, functionCount };
195
205
  }
196
206
  /**
@@ -7,6 +7,7 @@ import type { BrandedIdentifier, BrandedNamespace } from '../../dataflow/environ
7
7
  import type { SigDict } from './dict';
8
8
  import { type DepType, type LibraryExports, type PkgBlob, type PkgBlobTuple, type SigClassInfo, type SigDbPkgMeta } from './schema';
9
9
  import type { ArgProps } from '../../dataflow/environments/built-in-props';
10
+ import type { StatedGuards } from '../../dataflow/fn/guards/built-in-guards';
10
11
  /** the CRAN status of a version, used to build (or skip) its source-tarball link */
11
12
  export interface CranBlobInfo {
12
13
  readonly latest: string;
@@ -45,6 +46,8 @@ export interface DecodedFunction {
45
46
  readonly topic?: string;
46
47
  /** the package this name is re-exported from, see {@link SigFunctionInfo.reexportOf} */
47
48
  readonly reexportOf?: string;
49
+ /** what a call has to fulfill to return normally: as the database stores it (see {@link SigFunctionInfo.guards}), or as far as another source knows, see {@link withGuards} */
50
+ readonly guards?: StatedGuards;
48
51
  }
49
52
  /**
50
53
  * The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
@@ -39,6 +39,9 @@ function hasEntries(record) {
39
39
  */
40
40
  const blobTuple = (b) => {
41
41
  const head = [b.sigs, b.cgs, b.fns, b.versions, b.noncran ?? [], b.deps, b.depsByVersion];
42
+ if (b.contracts?.length) {
43
+ return [...head, b.dates, b.sources ?? {}, b.classes ?? [], b.classesByVersion ?? {}, b.contracts, b.contractOf ?? {}];
44
+ }
42
45
  if (b.classes?.length) {
43
46
  return [...head, b.dates, b.sources ?? {}, b.classes, b.classesByVersion ?? {}];
44
47
  }
@@ -50,7 +53,7 @@ const blobTuple = (b) => {
50
53
  exports.blobTuple = blobTuple;
51
54
  /** the inverse of {@link blobTuple}: rebuild a {@link PkgBlob} from its on-disk tuple */
52
55
  function tupleToBlob(t) {
53
- return { sigs: t[0], cgs: t[1], fns: t[2], versions: t[3], noncran: t[4]?.length ? t[4] : undefined, deps: t[5] ?? [], depsByVersion: t[6] ?? {}, dates: t[7] ?? {}, sources: t[8], classes: t[9], classesByVersion: t[10] };
56
+ return { sigs: t[0], cgs: t[1], fns: t[2], versions: t[3], noncran: t[4]?.length ? t[4] : undefined, deps: t[5] ?? [], depsByVersion: t[6] ?? {}, dates: t[7] ?? {}, sources: t[8], classes: t[9]?.length ? t[9] : undefined, classesByVersion: t[10], contracts: t[11]?.length ? t[11] : undefined, contractOf: t[12] };
54
57
  }
55
58
  /**
56
59
  * The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
@@ -72,6 +75,11 @@ function transitiveCallees(functions, name) {
72
75
  }
73
76
  return [...reached].sort();
74
77
  }
78
+ /** the contract the blob stores for one of its function records, if any */
79
+ function contractOf(blob, fnIdx) {
80
+ const idx = blob.contractOf?.[fnIdx];
81
+ return idx === undefined ? undefined : blob.contracts?.[idx];
82
+ }
75
83
  /** decode one of a blob's function records against the global string dictionary */
76
84
  function decodeFunction(strings, blob, fnIdx) {
77
85
  const [nameIdx, sigIdx, cgIdx, bits, fileIdx, line, topicIdx, reexportIdx] = blob.fns[fnIdx];
@@ -89,6 +97,7 @@ function decodeFunction(strings, blob, fnIdx) {
89
97
  name,
90
98
  topic: topicIdx !== undefined && topicIdx >= 0 ? strings.at(topicIdx) : undefined,
91
99
  reexportOf: reexportIdx !== undefined ? strings.at(reexportIdx) : undefined,
100
+ guards: contractOf(blob, fnIdx),
92
101
  file: fileIdx >= 0 ? strings.at(fileIdx) : undefined,
93
102
  line,
94
103
  exported: isExportedEntry(bits, name),
@@ -0,0 +1,6 @@
1
+ import type { PackageSignatureSource } from './reader';
2
+ /**
3
+ * The source answering every function with its {@link DecodedFunction.guards}, taken from {@link builtInGuards} for a
4
+ * base package where the source itself records none, so a reader sees them the same way whichever source they come from.
5
+ */
6
+ export declare function withGuards(this: void, source: PackageSignatureSource): PackageSignatureSource;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withGuards = withGuards;
4
+ const built_in_guards_1 = require("../../dataflow/fn/guards/built-in-guards");
5
+ /**
6
+ * The source answering every function with its {@link DecodedFunction.guards}, taken from {@link builtInGuards} for a
7
+ * base package where the source itself records none, so a reader sees them the same way whichever source they come from.
8
+ */
9
+ function withGuards(source) {
10
+ const add = (pkg, fn) => {
11
+ const guards = fn === undefined || fn.guards !== undefined || !source.isBaseR(pkg) ? undefined : (0, built_in_guards_1.builtInGuards)(fn.name, pkg);
12
+ return guards === undefined ? fn : { ...fn, guards };
13
+ };
14
+ const overrides = {
15
+ functionByName: (pkg, name, version) => add(pkg, source.functionByName(pkg, name, version)),
16
+ functions: (pkg, version) => source.functions(pkg, version)?.map(fn => add(pkg, fn))
17
+ };
18
+ return new Proxy(source, {
19
+ get(target, property, receiver) {
20
+ const own = overrides[property];
21
+ if (own !== undefined) {
22
+ return own;
23
+ }
24
+ const value = Reflect.get(target, property, receiver);
25
+ return typeof value === 'function' ? value.bind(target) : value;
26
+ }
27
+ });
28
+ }
29
+ //# sourceMappingURL=guarded-source.js.map