@eagleoutice/flowr 2.12.3 → 2.13.1

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 (321) hide show
  1. package/README.md +42 -95
  2. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
  3. package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
  4. package/abstract-interpretation/data-frame/semantics.js +12 -16
  5. package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
  6. package/abstract-interpretation/domains/abstract-domain.js +146 -6
  7. package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
  8. package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
  9. package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
  10. package/abstract-interpretation/domains/interval-domain.js +111 -146
  11. package/abstract-interpretation/domains/lattice.d.ts +3 -3
  12. package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
  13. package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
  14. package/abstract-interpretation/domains/partial-product-domain.js +21 -54
  15. package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
  16. package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
  17. package/abstract-interpretation/domains/product-domain.d.ts +1 -1
  18. package/abstract-interpretation/domains/product-domain.js +4 -4
  19. package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
  20. package/abstract-interpretation/domains/set-range-domain.js +141 -200
  21. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
  22. package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
  23. package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
  24. package/abstract-interpretation/domains/singleton-domain.js +33 -72
  25. package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
  26. package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
  27. package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
  28. package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
  29. package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
  30. package/benchmark/slicer.d.ts +2 -2
  31. package/benchmark/slicer.js +6 -5
  32. package/cli/common/options.d.ts +20 -0
  33. package/cli/common/options.js +4 -0
  34. package/cli/common/scripts-info.d.ts +20 -0
  35. package/cli/flowr-main-options.d.ts +4 -0
  36. package/cli/flowr-main-options.js +5 -0
  37. package/cli/flowr.d.ts +5 -0
  38. package/cli/flowr.js +15 -7
  39. package/cli/repl/commands/repl-commands.d.ts +8 -0
  40. package/cli/repl/commands/repl-commands.js +16 -3
  41. package/cli/repl/commands/repl-query.js +50 -20
  42. package/cli/repl/commands/repl-signature.js +2 -2
  43. package/cli/repl/core.d.ts +14 -5
  44. package/cli/repl/core.js +32 -17
  45. package/cli/repl/parser/slice-query-parser.d.ts +69 -8
  46. package/cli/repl/parser/slice-query-parser.js +82 -13
  47. package/cli/repl/path-input.d.ts +6 -0
  48. package/cli/repl/path-input.js +41 -0
  49. package/cli/repl/print-version.js +3 -5
  50. package/cli/slicer-app.d.ts +4 -0
  51. package/cli/slicer-app.js +4 -2
  52. package/config.d.ts +56 -6
  53. package/config.js +134 -12
  54. package/control-flow/control-flow-graph.d.ts +3 -2
  55. package/control-flow/control-flow-graph.js +34 -14
  56. package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
  57. package/control-flow/semantic-cfg-guided-visitor.js +3 -0
  58. package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
  59. package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
  60. package/data/r-base-packages.generated.d.ts +1 -1
  61. package/data/r-base-packages.generated.js +3 -3
  62. package/data/sigdb/sigdb.remote.json +53 -53
  63. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  64. package/dataflow/environments/built-in-proc-name.js +2 -0
  65. package/dataflow/environments/built-in.d.ts +2 -0
  66. package/dataflow/environments/built-in.js +2 -0
  67. package/dataflow/environments/default-builtin-config.d.ts +3 -5
  68. package/dataflow/environments/default-builtin-config.js +2 -2
  69. package/dataflow/environments/environment.d.ts +9 -0
  70. package/dataflow/environments/environment.js +28 -7
  71. package/dataflow/environments/identifier.d.ts +1 -2
  72. package/dataflow/environments/identifier.js +1 -5
  73. package/dataflow/extractor.js +1 -2
  74. package/dataflow/graph/dataflowgraph-builder.js +42 -3
  75. package/dataflow/graph/df-helper.d.ts +15 -0
  76. package/dataflow/graph/df-helper.js +20 -0
  77. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
  78. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
  79. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
  80. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
  81. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
  82. package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
  83. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
  84. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
  86. package/documentation/data/faq/faqs.js +12 -1
  87. package/documentation/doc-readme.js +1 -1
  88. package/documentation/doc-util/doc-files.d.ts +2 -2
  89. package/documentation/doc-util/doc-files.js +4 -7
  90. package/documentation/doc-util/doc-query.d.ts +12 -9
  91. package/documentation/doc-util/doc-query.js +63 -28
  92. package/documentation/wiki-absint.js +1 -4
  93. package/documentation/wiki-analyzer.js +8 -3
  94. package/documentation/wiki-cfg.js +3 -2
  95. package/documentation/wiki-dataflow-graph.js +14 -4
  96. package/documentation/wiki-interface.js +30 -16
  97. package/documentation/wiki-mk/doc-maker.js +1 -1
  98. package/documentation/wiki-query.js +190 -30
  99. package/documentation/wiki-signature-database.d.ts +1 -1
  100. package/documentation/wiki-signature-database.js +53 -27
  101. package/linter/linter-output.d.ts +24 -0
  102. package/linter/linter-output.js +117 -0
  103. package/linter/linter-rules.d.ts +2 -4
  104. package/linter/rules/dataframe-access-validation.js +4 -4
  105. package/linter/rules/deprecated-functions.d.ts +2 -4
  106. package/linter/rules/deprecated-functions.js +58 -3
  107. package/linter/rules/undefined-symbol.js +18 -10
  108. package/linter/rules/unused-definition.js +24 -0
  109. package/package.json +5 -2
  110. package/project/context/flowr-analyzer-context.d.ts +61 -1
  111. package/project/context/flowr-analyzer-context.js +124 -3
  112. package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
  113. package/project/context/flowr-analyzer-dependencies-context.js +33 -3
  114. package/project/context/flowr-analyzer-files-context.d.ts +40 -0
  115. package/project/context/flowr-analyzer-files-context.js +171 -14
  116. package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
  117. package/project/context/flowr-analyzer-loading-order-context.js +20 -0
  118. package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
  119. package/project/context/flowr-analyzer-meta-context.js +64 -23
  120. package/project/context/flowr-file.d.ts +7 -0
  121. package/project/context/flowr-file.js +7 -0
  122. package/project/context/project-kind.d.ts +22 -0
  123. package/project/context/project-kind.js +27 -0
  124. package/project/dependency-version-space.d.ts +168 -0
  125. package/project/dependency-version-space.js +570 -0
  126. package/project/flowr-analyzer-builder.js +1 -1
  127. package/project/flowr-analyzer.d.ts +7 -0
  128. package/project/flowr-analyzer.js +9 -0
  129. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
  130. package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
  131. package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
  132. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
  133. package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
  134. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
  135. package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
  136. package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
  137. package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
  138. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  139. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  140. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
  141. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
  142. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
  143. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
  144. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
  145. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
  146. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
  147. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
  148. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
  149. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
  150. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
  151. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
  152. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
  153. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
  154. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
  155. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
  156. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
  157. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
  158. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
  159. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
  160. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
  161. package/project/plugins/flowr-analyzer-plugin.js +5 -0
  162. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
  163. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  164. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
  165. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
  166. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
  167. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
  168. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
  169. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
  170. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
  171. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
  172. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  175. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
  176. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
  177. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
  178. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
  179. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
  180. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
  181. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
  182. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
  183. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
  184. package/project/plugins/package-version-plugins/package.d.ts +4 -1
  185. package/project/plugins/package-version-plugins/package.js +8 -5
  186. package/project/plugins/plugin-registry.d.ts +11 -3
  187. package/project/plugins/plugin-registry.js +24 -5
  188. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
  189. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
  190. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
  191. package/project/sigdb/build.js +12 -2
  192. package/project/sigdb/decode.d.ts +7 -0
  193. package/project/sigdb/decode.js +35 -4
  194. package/project/sigdb/decompress.d.ts +2 -0
  195. package/project/sigdb/decompress.js +5 -0
  196. package/project/sigdb/manifest.d.ts +5 -0
  197. package/project/sigdb/manifest.js +37 -6
  198. package/project/sigdb/reader.d.ts +82 -2
  199. package/project/sigdb/reader.js +226 -14
  200. package/project/sigdb/schema.d.ts +31 -5
  201. package/project/sigdb/schema.js +7 -3
  202. package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
  203. package/project/sigdb/sigdb-version.js +119 -0
  204. package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
  205. package/queries/catalog/absint-query/absint-query-format.js +2 -0
  206. package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
  207. package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
  208. package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
  209. package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
  210. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
  211. package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
  212. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
  213. package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
  214. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
  215. package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
  216. package/queries/catalog/config-query/config-query-executor.js +17 -5
  217. package/queries/catalog/config-query/config-query-format.d.ts +19 -3
  218. package/queries/catalog/config-query/config-query-format.js +258 -98
  219. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
  220. package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
  221. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
  222. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
  223. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
  224. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
  225. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
  226. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
  227. package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
  228. package/queries/catalog/dice-query/dice-query-executor.js +6 -9
  229. package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
  230. package/queries/catalog/dice-query/dice-query-format.js +10 -6
  231. package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
  232. package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
  233. package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
  234. package/queries/catalog/files-query/files-query-format.d.ts +2 -0
  235. package/queries/catalog/files-query/files-query-format.js +2 -0
  236. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
  237. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +293 -0
  238. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +121 -0
  239. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +345 -0
  240. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  241. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  242. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
  243. package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
  244. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  245. package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
  246. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  247. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
  248. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  249. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
  250. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
  251. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
  252. package/queries/catalog/linter-query/linter-query-executor.js +11 -2
  253. package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
  254. package/queries/catalog/linter-query/linter-query-format.js +44 -21
  255. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  256. package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
  257. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
  258. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
  259. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  260. package/queries/catalog/origin-query/origin-query-format.js +2 -0
  261. package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
  262. package/queries/catalog/project-query/project-query-executor.js +19 -62
  263. package/queries/catalog/project-query/project-query-format.d.ts +7 -18
  264. package/queries/catalog/project-query/project-query-format.js +3 -18
  265. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  266. package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
  267. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
  269. package/queries/catalog/search-query/search-query-format.d.ts +1 -0
  270. package/queries/catalog/search-query/search-query-format.js +1 -0
  271. package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
  272. package/queries/catalog/signature-query/signature-query-executor.js +267 -57
  273. package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
  274. package/queries/catalog/signature-query/signature-query-format.js +41 -5
  275. package/queries/catalog/signature-query/signature-query-render.js +48 -6
  276. package/queries/catalog/slice-query-options.d.ts +49 -0
  277. package/queries/catalog/slice-query-options.js +50 -0
  278. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
  279. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
  280. package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
  281. package/queries/query-print.js +3 -1
  282. package/queries/query.d.ts +62 -2
  283. package/queries/query.js +9 -2
  284. package/r-bridge/data/data.d.ts +16 -0
  285. package/r-bridge/data/data.js +20 -0
  286. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
  287. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  288. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  289. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
  290. package/reconstruct/reconstruct.d.ts +18 -1
  291. package/reconstruct/reconstruct.js +42 -19
  292. package/slicing/criterion/parse.d.ts +4 -0
  293. package/slicing/criterion/parse.js +4 -0
  294. package/slicing/static/slice-call.js +17 -9
  295. package/slicing/static/static-slicer.d.ts +1 -1
  296. package/slicing/static/static-slicer.js +5 -4
  297. package/util/files.d.ts +19 -1
  298. package/util/files.js +45 -3
  299. package/util/glob.d.ts +19 -0
  300. package/util/glob.js +67 -0
  301. package/util/log.d.ts +12 -0
  302. package/util/log.js +17 -1
  303. package/util/logic.d.ts +6 -0
  304. package/util/logic.js +31 -1
  305. package/util/mermaid/dfg.js +17 -12
  306. package/util/mermaid/mermaid.js +2 -2
  307. package/util/objects.d.ts +5 -0
  308. package/util/objects.js +8 -0
  309. package/util/r-version.d.ts +9 -1
  310. package/util/r-version.js +27 -2
  311. package/util/schema.d.ts +18 -0
  312. package/util/schema.js +102 -4
  313. package/util/text/ansi.d.ts +4 -0
  314. package/util/text/ansi.js +27 -3
  315. package/util/text/strings.d.ts +9 -0
  316. package/util/text/strings.js +29 -0
  317. package/util/version.js +79 -6
  318. package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
  319. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
  320. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
  321. package/project/sigdb/version.js +0 -55
@@ -51,171 +51,81 @@ class StateAbstractDomain extends abstract_domain_1.AbstractDomain {
51
51
  bottom() {
52
52
  return this.create(lattice_1.Bottom);
53
53
  }
54
- equals(other) {
55
- if (this.value === other.value) {
56
- return true;
57
- }
58
- else if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom || this.value.size !== other.value.size) {
54
+ equalsValue(other) {
55
+ if (this.value.size !== other.value.size) {
59
56
  return false;
60
57
  }
61
- for (const [key, value] of this.value.entries()) {
58
+ for (const [key, currValue] of this.value.entries()) {
62
59
  const otherValue = other.get(key);
63
- if (otherValue === undefined || !value.equals(otherValue)) {
60
+ if (otherValue === undefined || !currValue.equals(otherValue)) {
64
61
  return false;
65
62
  }
66
63
  }
67
64
  return true;
68
65
  }
69
- leq(other) {
70
- if (this.value === other.value || this.value === lattice_1.Bottom) {
71
- return true;
72
- }
73
- else if (other.value === lattice_1.Bottom || this.value.size > other.value.size) {
66
+ leqValue(other) {
67
+ if (this.value.size > other.value.size) {
74
68
  return false;
75
69
  }
76
- for (const [key, value] of this.value.entries()) {
70
+ for (const [key, currValue] of this.value.entries()) {
77
71
  const otherValue = other.get(key);
78
- if (otherValue === undefined || !value.leq(otherValue)) {
72
+ if (otherValue === undefined || !currValue.leq(otherValue)) {
79
73
  return false;
80
74
  }
81
75
  }
82
76
  return true;
83
77
  }
84
- join(other) {
85
- if (this.value === lattice_1.Bottom) {
86
- return this.create(other.value);
87
- }
88
- else if (other.value === lattice_1.Bottom) {
89
- return this.create(this.value);
90
- }
91
- const result = this.create(this.value);
92
- for (const [key, value] of other.value.entries()) {
78
+ joinValue(other) {
79
+ const result = new Map(this.value);
80
+ for (const [key, otherValue] of other.value.entries()) {
93
81
  const currValue = result.get(key);
94
82
  if (currValue === undefined) {
95
- result.set(key, value);
83
+ result.set(key, otherValue);
96
84
  }
97
85
  else {
98
- result.set(key, currValue.join(value));
86
+ result.set(key, currValue.join(otherValue));
99
87
  }
100
88
  }
101
- return result;
89
+ return this.create(result);
102
90
  }
103
- meet(other) {
104
- if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
105
- return this.bottom();
106
- }
107
- const result = this.create(this.value);
108
- for (const key of result.value.keys()) {
109
- if (!other.has(key)) {
110
- result.remove(key);
111
- }
112
- }
113
- for (const [key, value] of other.value.entries()) {
114
- const currValue = result.get(key);
115
- if (currValue !== undefined) {
116
- result.set(key, currValue.meet(value));
91
+ meetValue(other) {
92
+ const result = new Map();
93
+ for (const [key, currValue] of this.value.entries()) {
94
+ const otherValue = other.value.get(key);
95
+ if (otherValue !== undefined) {
96
+ result.set(key, currValue.meet(otherValue));
117
97
  }
118
98
  }
119
- return result;
99
+ return this.create(result);
120
100
  }
121
- widen(other) {
122
- if (this.value === lattice_1.Bottom) {
123
- return this.create(other.value);
124
- }
125
- else if (other.value === lattice_1.Bottom) {
126
- return this.create(this.value);
127
- }
128
- const result = this.create(this.value);
129
- for (const [key, value] of other.value.entries()) {
101
+ widenValue(other) {
102
+ const result = new Map(this.value);
103
+ for (const [key, otherValue] of other.value.entries()) {
130
104
  const currValue = result.get(key);
131
105
  if (currValue === undefined) {
132
- result.set(key, value);
106
+ result.set(key, otherValue);
133
107
  }
134
108
  else {
135
- result.set(key, currValue.widen(value));
136
- }
137
- }
138
- return result;
139
- }
140
- narrow(other) {
141
- if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
142
- return this.bottom();
143
- }
144
- const result = this.create(this.value);
145
- for (const key of result.value.keys()) {
146
- if (!other.has(key)) {
147
- result.remove(key);
109
+ result.set(key, currValue.widen(otherValue));
148
110
  }
149
111
  }
150
- for (const [key, value] of other.value.entries()) {
151
- const currValue = result.get(key);
152
- if (currValue !== undefined) {
153
- result.set(key, currValue.narrow(value));
154
- }
155
- }
156
- return result;
157
- }
158
- concretize(limit) {
159
- if (this.value === lattice_1.Bottom) {
160
- return new Set();
161
- }
162
- let mappings = new Set([new Map()]);
163
- for (const [key, value] of this.value.entries()) {
164
- const concreteValues = value.concretize(limit);
165
- if (concreteValues === lattice_1.Top) {
166
- return lattice_1.Top;
167
- }
168
- const newMappings = new Set();
169
- for (const state of mappings) {
170
- for (const concrete of concreteValues) {
171
- if (newMappings.size > limit) {
172
- return lattice_1.Top;
173
- }
174
- const map = new Map(state);
175
- map.set(key, concrete);
176
- newMappings.add(map);
177
- }
178
- }
179
- mappings = newMappings;
180
- }
181
- return mappings;
112
+ return this.create(result);
182
113
  }
183
- abstract(concrete) {
184
- if (concrete === lattice_1.Top) {
185
- return this.top();
186
- }
187
- else if (concrete.size === 0) {
188
- return this.bottom();
189
- }
190
- const mapping = new Map();
191
- for (const concreteMapping of concrete) {
192
- for (const [key, value] of concreteMapping) {
193
- const set = mapping.get(key);
194
- if (set === undefined) {
195
- mapping.set(key, new Set([value]));
196
- }
197
- else {
198
- set.add(value);
199
- }
200
- }
201
- }
114
+ narrowValue(other) {
202
115
  const result = new Map();
203
- for (const [key, values] of mapping) {
204
- result.set(key, this.domain.abstract(values));
116
+ for (const [key, currValue] of this.value.entries()) {
117
+ const otherValue = other.value.get(key);
118
+ if (otherValue !== undefined) {
119
+ result.set(key, currValue.narrow(otherValue));
120
+ }
205
121
  }
206
122
  return this.create(result);
207
123
  }
208
- toJSON() {
209
- if (this.value === lattice_1.Bottom) {
210
- return this.value.description;
211
- }
124
+ jsonify() {
212
125
  return Object.fromEntries(this.value.entries().map(([key, value]) => [key, value.toJSON()]));
213
126
  }
214
- toString() {
215
- if (this.value === lattice_1.Bottom) {
216
- return lattice_1.BottomSymbol;
217
- }
218
- return '(' + this.value.entries().toArray().map(([key, value]) => `${abstract_domain_1.AbstractDomain.toString(key)} -> ${value.toString()}`).join(', ') + ')';
127
+ stringify() {
128
+ return '(' + this.value.entries().toArray().map(([key, value]) => `${key} -> ${value.toString()}`).join(', ') + ')';
219
129
  }
220
130
  isTop() {
221
131
  return this.value !== lattice_1.Bottom && this.value.size === 0;
@@ -3,7 +3,7 @@ import { type AnyAbstractDomain } from './abstract-domain';
3
3
  /**
4
4
  * An interface for state-like domains that store abstract values for AST nodes.
5
5
  */
6
- export interface StateDomainLike<Domain extends AnyAbstractDomain> {
6
+ export interface StateDomain<Domain extends AnyAbstractDomain> {
7
7
  /**
8
8
  * The underlying value domain of the state domain.
9
9
  */
@@ -28,7 +28,7 @@ export interface StateDomainLike<Domain extends AnyAbstractDomain> {
28
28
  /**
29
29
  * A type representing any state abstract domain that stores abstract values for AST nodes.
30
30
  */
31
- export type AnyStateDomain<Domain extends AnyAbstractDomain = AnyAbstractDomain> = AnyAbstractDomain & StateDomainLike<Domain>;
31
+ export type AnyStateDomain<Domain extends AnyAbstractDomain = AnyAbstractDomain> = AnyAbstractDomain & StateDomain<Domain>;
32
32
  /**
33
33
  * The type of the value abstract domain of a state abstract domain.
34
34
  * @template StateDomain - The state abstract domain to get the value abstract domain type for
@@ -0,0 +1,120 @@
1
+ import type { Ternary } from '../../util/logic';
2
+ /**
3
+ * A value abstract domain with abstraction function and a satisfiability check for concrete values.
4
+ */
5
+ export interface ValueDomain<T> {
6
+ /**
7
+ * Abstracts a list of concrete values into an abstract value of the value abstract domain.
8
+ */
9
+ from(...values: T[]): this;
10
+ /**
11
+ * Checks whether the current abstract value satisfies a concrete value (i.e. includes a concrete value).
12
+ * @see {@link Ternary} for the returned satisfiability result
13
+ */
14
+ satisfies(value: T): Ternary;
15
+ }
16
+ /**
17
+ * A string value abstract domain with string operations and a satisfiability check.
18
+ */
19
+ export interface StringDomain extends ValueDomain<string> {
20
+ /**
21
+ * Concatenates this string abstract value with another string abstract value.
22
+ */
23
+ concat(other: this): this;
24
+ satisfies(value: string, comparator?: StringComparator): Ternary;
25
+ }
26
+ /**
27
+ * A numeric value abstract domain with numeric operations and a satisfiability check.
28
+ */
29
+ export interface NumericDomain extends ValueDomain<number> {
30
+ /**
31
+ * Negates this numeric abstract value.
32
+ */
33
+ negate(): this;
34
+ /**
35
+ * Adds an numeric abstract value to this numeric abstract value.
36
+ */
37
+ add(other: this): this;
38
+ /**
39
+ * Subtracts an numeric abstract value from this numeric abstract value.
40
+ */
41
+ subtract(other: this): this;
42
+ /**
43
+ * Multiplies this numeric abstract value with another numeric abstract value.
44
+ */
45
+ multiply(other: this): this;
46
+ /**
47
+ * Divides this numeric abstract value by another numeric abstract value.
48
+ */
49
+ divide(other: this): this;
50
+ /**
51
+ * Gets the minimum of this numeric abstract value and another numeric abstract value.
52
+ */
53
+ min(other: this): this;
54
+ /**
55
+ * Gets the maximum of this numeric abstract value and another numeric abstract value.
56
+ */
57
+ max(other: this): this;
58
+ satisfies(value: number, comparator?: NumericalComparator): Ternary;
59
+ }
60
+ export interface BooleanDomain extends ValueDomain<boolean> {
61
+ /**
62
+ * Negates this boolean abstract value.
63
+ */
64
+ negate(): this;
65
+ /**
66
+ * Creates the conjunction between this boolean abstract value and another boolean abstract value.
67
+ */
68
+ and(other: this): this;
69
+ /**
70
+ * Creates the disjunction between this boolean abstract value and another boolean abstract value.
71
+ */
72
+ or(other: this): this;
73
+ }
74
+ /**
75
+ * A set value abstract domain with set operations and a satisfiability check.
76
+ */
77
+ export interface SetDomain<T> extends ValueDomain<ReadonlySet<T>> {
78
+ /**
79
+ * Creates the union between this set abstract value and another set abstract value.
80
+ */
81
+ union(other: this): this;
82
+ /**
83
+ * Creates the intersection between this set abstract value and another set abstract value.
84
+ */
85
+ intersect(other: this): this;
86
+ /**
87
+ * Subtracts another set abstract value from this set abstract value creating the set difference.
88
+ */
89
+ subtract(other: this): this;
90
+ satisfies(value: ReadonlySet<T>, comparator?: SetComparator): Ternary;
91
+ }
92
+ /**
93
+ * Represents the different types of string comparators for satisfiability checks for an abstract domain.
94
+ */
95
+ export declare enum StringComparator {
96
+ Equal = 0,
97
+ StartsWith = 1,
98
+ EndsWith = 2,
99
+ Includes = 3
100
+ }
101
+ /**
102
+ * Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
103
+ */
104
+ export declare enum NumericalComparator {
105
+ Equal = 0,
106
+ Less = 1,
107
+ LessOrEqual = 2,
108
+ Greater = 3,
109
+ GreaterOrEqual = 4
110
+ }
111
+ /**
112
+ * Represents the different types of set comparators for satisfiability checks for an abstract domain.
113
+ */
114
+ export declare enum SetComparator {
115
+ Equal = 0,
116
+ Subset = 1,
117
+ SubsetOrEqual = 2,
118
+ Intersect = 3,
119
+ NoIntersect = 4
120
+ }
@@ -1,6 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetComparator = exports.NumericalComparator = void 0;
3
+ exports.SetComparator = exports.NumericalComparator = exports.StringComparator = void 0;
4
+ /**
5
+ * Represents the different types of string comparators for satisfiability checks for an abstract domain.
6
+ */
7
+ var StringComparator;
8
+ (function (StringComparator) {
9
+ StringComparator[StringComparator["Equal"] = 0] = "Equal";
10
+ StringComparator[StringComparator["StartsWith"] = 1] = "StartsWith";
11
+ StringComparator[StringComparator["EndsWith"] = 2] = "EndsWith";
12
+ StringComparator[StringComparator["Includes"] = 3] = "Includes";
13
+ })(StringComparator || (exports.StringComparator = StringComparator = {}));
4
14
  /**
5
15
  * Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
6
16
  */
@@ -20,5 +30,7 @@ var SetComparator;
20
30
  SetComparator[SetComparator["Equal"] = 0] = "Equal";
21
31
  SetComparator[SetComparator["Subset"] = 1] = "Subset";
22
32
  SetComparator[SetComparator["SubsetOrEqual"] = 2] = "SubsetOrEqual";
33
+ SetComparator[SetComparator["Intersect"] = 3] = "Intersect";
34
+ SetComparator[SetComparator["NoIntersect"] = 4] = "NoIntersect";
23
35
  })(SetComparator || (exports.SetComparator = SetComparator = {}));
24
- //# sourceMappingURL=satisfiable-domain.js.map
36
+ //# sourceMappingURL=value-abstract-domain.js.map
@@ -5,7 +5,7 @@
5
5
  import type { MergeableRecord } from '../util/objects';
6
6
  import type { DataflowInformation } from '../dataflow/info';
7
7
  import type { SliceResult } from '../slicing/static/slicer-types';
8
- import type { ReconstructionResult } from '../reconstruct/reconstruct';
8
+ import type { InlineFull, ReconstructionResult } from '../reconstruct/reconstruct';
9
9
  import type { PerSliceStats, SlicerStats, SlicerStatsDfShape } from './stats/stats';
10
10
  import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
11
11
  import { SlicingCriteria } from '../slicing/criterion/parse';
@@ -73,7 +73,7 @@ export declare class BenchmarkSlicer {
73
73
  * Initialize the slicer on the given request.
74
74
  * Can only be called once for each instance.
75
75
  */
76
- init(request: RParseRequestFromFile | RParseRequestFromText, config: FlowrConfig, autoSelectIf?: AutoSelectPredicate, threshold?: number, inlineSources?: boolean, includeCallees?: boolean): Promise<void>;
76
+ init(request: RParseRequestFromFile | RParseRequestFromText, config: FlowrConfig, autoSelectIf?: AutoSelectPredicate, threshold?: number, inlineSources?: boolean, includeCallees?: boolean, inlineFull?: InlineFull): Promise<void>;
77
77
  private calculateStatsAfterInit;
78
78
  /**
79
79
  * Slice for the given {@link SlicingCriteria}.
@@ -62,7 +62,7 @@ class BenchmarkSlicer {
62
62
  * Initialize the slicer on the given request.
63
63
  * Can only be called once for each instance.
64
64
  */
65
- async init(request, config, autoSelectIf, threshold, inlineSources, includeCallees) {
65
+ async init(request, config, autoSelectIf, threshold, inlineSources, includeCallees, inlineFull) {
66
66
  (0, assert_1.guard)(this.stats === undefined, 'cannot initialize the slicer twice');
67
67
  // we know these are in sync so we just cast to one of them
68
68
  this.parser = await this.commonMeasurements.measure('initialize R session', async () => {
@@ -82,6 +82,7 @@ class BenchmarkSlicer {
82
82
  threshold,
83
83
  inlineSources,
84
84
  includeCallees,
85
+ inlineFull,
85
86
  });
86
87
  this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).files.map(p => p.parsed);
87
88
  this.normalizedAst = await this.measureCommonStep('normalize', 'normalize R AST');
@@ -324,10 +325,10 @@ class BenchmarkSlicer {
324
325
  getInferredRange(value) {
325
326
  if (value.isValue()) {
326
327
  if (value instanceof set_range_domain_1.SetRangeDomain) {
327
- return value.isFinite() ? value.value.range.size : Infinity;
328
+ return value.isFinite() ? value.may.size : Infinity;
328
329
  }
329
330
  else {
330
- return value.value[1] - value.value[0];
331
+ return value.upper - value.lower;
331
332
  }
332
333
  }
333
334
  return 0;
@@ -341,10 +342,10 @@ class BenchmarkSlicer {
341
342
  return 'infinite';
342
343
  }
343
344
  else if (value instanceof set_range_domain_1.SetRangeDomain) {
344
- return Math.floor(value.value.min.size + (value.value.range.size / 2));
345
+ return Math.floor(value.value.must.size + (value.value.may.size / 2));
345
346
  }
346
347
  else {
347
- return Math.floor((value.value[0] + value.value[1]) / 2);
348
+ return Math.floor((value.lower + value.upper) / 2);
348
349
  }
349
350
  }
350
351
  return 'bottom';
@@ -281,6 +281,16 @@ export declare const slicerOptions: [{
281
281
  readonly name: "inline";
282
282
  readonly type: BooleanConstructor;
283
283
  readonly description: "Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.";
284
+ }, {
285
+ readonly name: "inline-full";
286
+ readonly alias: "I";
287
+ readonly type: BooleanConstructor;
288
+ readonly description: "Inline {italic all} files into one, in flowR's loading order (respecting implicit sources), independent of whether they are sourced explicitly.";
289
+ }, {
290
+ readonly name: "inline-banner";
291
+ readonly alias: "B";
292
+ readonly type: BooleanConstructor;
293
+ readonly description: "Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.";
284
294
  }, {
285
295
  readonly name: "include-callees";
286
296
  readonly type: BooleanConstructor;
@@ -289,6 +299,16 @@ export declare const slicerOptions: [{
289
299
  readonly name: "api";
290
300
  readonly type: BooleanConstructor;
291
301
  readonly description: "Instead of human-readable output, dump a lot of json with the results of all intermediate steps.";
302
+ }, {
303
+ readonly name: "config-file";
304
+ readonly type: StringConstructor;
305
+ readonly description: "The name of the configuration file to use";
306
+ readonly multiple: false;
307
+ }, {
308
+ readonly name: "config-json";
309
+ readonly type: StringConstructor;
310
+ readonly description: "The flowR configuration to use, as a JSON string";
311
+ readonly multiple: false;
292
312
  }];
293
313
  export declare const summarizerOptions: [{
294
314
  readonly name: "verbose";
@@ -64,8 +64,12 @@ exports.slicerOptions = [
64
64
  { name: 'output', alias: 'o', type: String, description: 'File to write all the generated quads to (defaults to the commandline)', typeLabel: '{underline file}' },
65
65
  { name: 'no-magic-comments', alias: 'm', type: Boolean, description: 'Disable the effects of magic comments which force lines to be included.' },
66
66
  { name: 'inline', type: Boolean, description: 'Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.' },
67
+ { name: 'inline-full', alias: 'I', type: Boolean, description: 'Inline {italic all} files into one, in flowR\'s loading order (respecting implicit sources), independent of whether they are sourced explicitly.' },
68
+ { name: 'inline-banner', alias: 'B', type: Boolean, description: 'Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.' },
67
69
  { name: 'include-callees', type: Boolean, description: 'If slicing backward, continue past a function-definition boundary, also including the definition\'s binding and call sites.' },
68
70
  { name: 'api', type: Boolean, description: 'Instead of human-readable output, dump a lot of json with the results of all intermediate steps.' },
71
+ { name: 'config-file', type: String, description: 'The name of the configuration file to use', multiple: false },
72
+ { name: 'config-json', type: String, description: 'The flowR configuration to use, as a JSON string', multiple: false },
69
73
  ];
70
74
  exports.summarizerOptions = [
71
75
  { name: 'verbose', alias: 'v', type: Boolean, description: 'Run with verbose logging' },
@@ -87,6 +87,16 @@ declare const _scripts: {
87
87
  readonly name: "inline";
88
88
  readonly type: BooleanConstructor;
89
89
  readonly description: "Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.";
90
+ }, {
91
+ readonly name: "inline-full";
92
+ readonly alias: "I";
93
+ readonly type: BooleanConstructor;
94
+ readonly description: "Inline {italic all} files into one, in flowR's loading order (respecting implicit sources), independent of whether they are sourced explicitly.";
95
+ }, {
96
+ readonly name: "inline-banner";
97
+ readonly alias: "B";
98
+ readonly type: BooleanConstructor;
99
+ readonly description: "Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.";
90
100
  }, {
91
101
  readonly name: "include-callees";
92
102
  readonly type: BooleanConstructor;
@@ -95,6 +105,16 @@ declare const _scripts: {
95
105
  readonly name: "api";
96
106
  readonly type: BooleanConstructor;
97
107
  readonly description: "Instead of human-readable output, dump a lot of json with the results of all intermediate steps.";
108
+ }, {
109
+ readonly name: "config-file";
110
+ readonly type: StringConstructor;
111
+ readonly description: "The name of the configuration file to use";
112
+ readonly multiple: false;
113
+ }, {
114
+ readonly name: "config-json";
115
+ readonly type: StringConstructor;
116
+ readonly description: "The flowR configuration to use, as a JSON string";
117
+ readonly multiple: false;
98
118
  }];
99
119
  usageExample: string;
100
120
  type: string;
@@ -28,6 +28,10 @@ export declare const flowrMainOptionDefinitions: [{
28
28
  readonly name: "no-ansi";
29
29
  readonly type: BooleanConstructor;
30
30
  readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
31
+ }, {
32
+ readonly name: "no-fs";
33
+ readonly type: BooleanConstructor;
34
+ readonly description: "Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.";
31
35
  }, {
32
36
  readonly name: "port";
33
37
  readonly type: NumberConstructor;
@@ -41,6 +41,11 @@ exports.flowrMainOptionDefinitions = [
41
41
  type: Boolean,
42
42
  description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.'
43
43
  },
44
+ {
45
+ name: 'no-fs',
46
+ type: Boolean,
47
+ description: 'Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.'
48
+ },
44
49
  {
45
50
  name: 'port',
46
51
  type: Number,
package/cli/flowr.d.ts CHANGED
@@ -3,6 +3,7 @@ export interface FlowrCliOptions {
3
3
  'config-file': string;
4
4
  'config-json': string;
5
5
  'no-ansi': boolean;
6
+ 'no-fs': boolean;
6
7
  'r-path': string | undefined;
7
8
  'r-session-access': boolean;
8
9
  execute: string | undefined;
@@ -57,6 +58,10 @@ export declare const optionHelp: ({
57
58
  readonly name: "no-ansi";
58
59
  readonly type: BooleanConstructor;
59
60
  readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
61
+ }, {
62
+ readonly name: "no-fs";
63
+ readonly type: BooleanConstructor;
64
+ readonly description: "Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.";
60
65
  }, {
61
66
  readonly name: "port";
62
67
  readonly type: NumberConstructor;
package/cli/flowr.js CHANGED
@@ -93,14 +93,19 @@ function createConfig() {
93
93
  }
94
94
  }
95
95
  if (config == undefined) {
96
- if (options['config-file']) {
97
- // validate it exists
98
- if (!fs_1.default.existsSync(path_1.default.resolve(options['config-file']))) {
99
- log_1.log.error(`Config file '${options['config-file']}' does not exist`);
100
- process.exit(1);
96
+ if (options['no-fs']) {
97
+ config = config_1.FlowrConfig.default();
98
+ }
99
+ else {
100
+ if (options['config-file']) {
101
+ // validate it exists
102
+ if (!fs_1.default.existsSync(path_1.default.resolve(options['config-file']))) {
103
+ log_1.log.error(`Config file '${options['config-file']}' does not exist`);
104
+ process.exit(1);
105
+ }
101
106
  }
107
+ config = config_1.FlowrConfig.fromFile(options['config-file'] ?? flowr_main_options_1.defaultConfigFile);
102
108
  }
103
- config = config_1.FlowrConfig.fromFile(options['config-file'] ?? flowr_main_options_1.defaultConfigFile);
104
109
  }
105
110
  // for all options that we manually supply that have a config equivalent, set them in the config
106
111
  config = config_1.FlowrConfig.amend(config, c => {
@@ -119,6 +124,9 @@ function createConfig() {
119
124
  if (options['default-engine']) {
120
125
  c.defaultEngine = options['default-engine'];
121
126
  }
127
+ if (options['no-fs']) {
128
+ c.solver.sigdb.enabled = false;
129
+ }
122
130
  return c;
123
131
  });
124
132
  return config;
@@ -189,7 +197,7 @@ async function mainRepl() {
189
197
  await (0, print_version_1.printVersionRepl)(defaultEngine);
190
198
  const w = (x) => ansi_1.ansiFormatter.format(x, { color: 7 /* Colors.White */, effect: ansi_1.ColorEffect.Foreground, style: 3 /* FontStyles.Italic */ });
191
199
  console.log(w('use ') + ansi_1.ansiFormatter.format(':help', { color: 7 /* Colors.White */, effect: ansi_1.ColorEffect.Foreground, style: 1 /* FontStyles.Bold */ }) + w(' to get a list of available commands.'));
192
- await (0, core_1.repl)({ analyzer, allowRSessionAccess });
200
+ await (0, core_1.repl)({ analyzer, allowRSessionAccess, ...(options['no-fs'] ? { historyFile: '' } : {}) });
193
201
  }
194
202
  (0, proc_1.exitSafe)(0);
195
203
  }
@@ -1,5 +1,7 @@
1
1
  import type { ReplCodeCommand, ReplCommand } from './repl-main';
2
+ import type { OptionDefinition } from 'command-line-usage';
2
3
  import { scripts } from '../../common/scripts-info';
4
+ import type { FlowrConfig } from '../../../config';
3
5
  export declare const helpCommand: ReplCommand;
4
6
  /**
5
7
  * All commands that should be available in the REPL.
@@ -28,6 +30,12 @@ declare const _commands: {
28
30
  readonly signature: ReplCodeCommand;
29
31
  };
30
32
  export type ReplCommandNames = keyof typeof _commands | keyof typeof scripts;
33
+ /**
34
+ * The args a master script is forked with: `remainingLine` tokenized, plus `--config-json <analyzer.flowrConfig>`
35
+ * so it sees the repl's current (possibly `:query \@config`-edited) config -- unless the script does not support
36
+ * that option, or the user already named a config themselves.
37
+ */
38
+ export declare function masterScriptArgs(remainingLine: string, config: FlowrConfig, scriptOptions: readonly OptionDefinition[]): string[];
31
39
  /**
32
40
  * Retrieve all REPL commands (including those generated from master scripts)
33
41
  */