@eagleoutice/flowr 2.12.3 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +38 -91
  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 +10 -0
  33. package/cli/common/options.js +2 -0
  34. package/cli/common/scripts-info.d.ts +10 -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-query.js +42 -20
  40. package/cli/repl/commands/repl-signature.js +2 -2
  41. package/cli/repl/core.d.ts +14 -5
  42. package/cli/repl/core.js +32 -17
  43. package/cli/repl/parser/slice-query-parser.d.ts +69 -8
  44. package/cli/repl/parser/slice-query-parser.js +82 -13
  45. package/cli/repl/path-input.d.ts +6 -0
  46. package/cli/repl/path-input.js +41 -0
  47. package/cli/repl/print-version.js +3 -5
  48. package/cli/slicer-app.d.ts +2 -0
  49. package/cli/slicer-app.js +2 -1
  50. package/config.d.ts +54 -6
  51. package/config.js +133 -12
  52. package/control-flow/control-flow-graph.d.ts +3 -2
  53. package/control-flow/control-flow-graph.js +34 -14
  54. package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
  55. package/control-flow/semantic-cfg-guided-visitor.js +3 -0
  56. package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
  57. package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
  58. package/data/r-base-packages.generated.d.ts +1 -1
  59. package/data/r-base-packages.generated.js +3 -3
  60. package/data/sigdb/sigdb.remote.json +53 -53
  61. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  62. package/dataflow/environments/built-in-proc-name.js +2 -0
  63. package/dataflow/environments/built-in.d.ts +2 -0
  64. package/dataflow/environments/built-in.js +2 -0
  65. package/dataflow/environments/default-builtin-config.d.ts +3 -5
  66. package/dataflow/environments/default-builtin-config.js +2 -2
  67. package/dataflow/environments/environment.d.ts +9 -0
  68. package/dataflow/environments/environment.js +28 -7
  69. package/dataflow/environments/identifier.d.ts +1 -2
  70. package/dataflow/environments/identifier.js +1 -5
  71. package/dataflow/extractor.js +1 -2
  72. package/dataflow/graph/dataflowgraph-builder.js +42 -3
  73. package/dataflow/graph/df-helper.d.ts +15 -0
  74. package/dataflow/graph/df-helper.js +20 -0
  75. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
  76. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
  77. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
  78. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
  79. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
  80. package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
  81. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
  82. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
  84. package/documentation/data/faq/faqs.js +12 -1
  85. package/documentation/doc-readme.js +1 -1
  86. package/documentation/doc-util/doc-files.d.ts +2 -2
  87. package/documentation/doc-util/doc-files.js +4 -7
  88. package/documentation/doc-util/doc-query.d.ts +12 -9
  89. package/documentation/doc-util/doc-query.js +63 -28
  90. package/documentation/wiki-absint.js +1 -4
  91. package/documentation/wiki-analyzer.js +8 -3
  92. package/documentation/wiki-cfg.js +3 -2
  93. package/documentation/wiki-dataflow-graph.js +14 -4
  94. package/documentation/wiki-interface.js +29 -16
  95. package/documentation/wiki-mk/doc-maker.js +1 -1
  96. package/documentation/wiki-query.js +189 -30
  97. package/documentation/wiki-signature-database.d.ts +1 -1
  98. package/documentation/wiki-signature-database.js +53 -27
  99. package/linter/linter-output.d.ts +24 -0
  100. package/linter/linter-output.js +117 -0
  101. package/linter/linter-rules.d.ts +2 -4
  102. package/linter/rules/dataframe-access-validation.js +4 -4
  103. package/linter/rules/deprecated-functions.d.ts +2 -4
  104. package/linter/rules/deprecated-functions.js +58 -3
  105. package/linter/rules/undefined-symbol.js +18 -10
  106. package/linter/rules/unused-definition.js +24 -0
  107. package/package.json +5 -2
  108. package/project/context/flowr-analyzer-context.d.ts +59 -1
  109. package/project/context/flowr-analyzer-context.js +118 -3
  110. package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
  111. package/project/context/flowr-analyzer-dependencies-context.js +33 -3
  112. package/project/context/flowr-analyzer-files-context.d.ts +32 -0
  113. package/project/context/flowr-analyzer-files-context.js +132 -14
  114. package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
  115. package/project/context/flowr-analyzer-loading-order-context.js +20 -0
  116. package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
  117. package/project/context/flowr-analyzer-meta-context.js +64 -23
  118. package/project/context/flowr-file.d.ts +7 -0
  119. package/project/context/flowr-file.js +7 -0
  120. package/project/context/project-kind.d.ts +22 -0
  121. package/project/context/project-kind.js +27 -0
  122. package/project/dependency-version-space.d.ts +166 -0
  123. package/project/dependency-version-space.js +564 -0
  124. package/project/flowr-analyzer-builder.js +1 -1
  125. package/project/flowr-analyzer.d.ts +4 -0
  126. package/project/flowr-analyzer.js +5 -0
  127. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
  128. package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
  129. package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
  130. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
  131. package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
  132. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
  133. package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
  134. package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
  135. package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
  136. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
  137. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
  138. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
  139. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
  140. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
  141. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
  142. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
  143. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
  144. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
  145. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
  146. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
  147. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
  148. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
  149. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
  150. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
  151. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
  152. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
  153. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
  154. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
  155. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
  156. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
  157. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
  158. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
  159. package/project/plugins/flowr-analyzer-plugin.js +5 -0
  160. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
  161. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  162. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
  163. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
  164. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
  165. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
  166. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
  167. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
  168. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
  169. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
  170. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
  171. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
  172. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
  175. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
  176. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
  177. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
  178. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
  179. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
  180. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
  181. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
  182. package/project/plugins/package-version-plugins/package.d.ts +4 -1
  183. package/project/plugins/package-version-plugins/package.js +8 -5
  184. package/project/plugins/plugin-registry.d.ts +11 -3
  185. package/project/plugins/plugin-registry.js +24 -5
  186. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
  187. package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
  188. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
  189. package/project/sigdb/build.js +12 -2
  190. package/project/sigdb/decode.d.ts +7 -0
  191. package/project/sigdb/decode.js +35 -4
  192. package/project/sigdb/decompress.d.ts +2 -0
  193. package/project/sigdb/decompress.js +5 -0
  194. package/project/sigdb/manifest.d.ts +5 -0
  195. package/project/sigdb/manifest.js +37 -6
  196. package/project/sigdb/reader.d.ts +82 -2
  197. package/project/sigdb/reader.js +226 -14
  198. package/project/sigdb/schema.d.ts +31 -5
  199. package/project/sigdb/schema.js +7 -3
  200. package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
  201. package/project/sigdb/sigdb-version.js +119 -0
  202. package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
  203. package/queries/catalog/absint-query/absint-query-format.js +2 -0
  204. package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
  205. package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
  206. package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
  207. package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
  208. package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
  209. package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
  210. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
  211. package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
  212. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
  213. package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
  214. package/queries/catalog/config-query/config-query-executor.js +15 -6
  215. package/queries/catalog/config-query/config-query-format.d.ts +18 -4
  216. package/queries/catalog/config-query/config-query-format.js +246 -96
  217. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
  218. package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
  219. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
  220. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
  221. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
  222. package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
  223. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
  224. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
  225. package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
  226. package/queries/catalog/dice-query/dice-query-executor.js +6 -9
  227. package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
  228. package/queries/catalog/dice-query/dice-query-format.js +10 -6
  229. package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
  230. package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
  231. package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
  232. package/queries/catalog/files-query/files-query-format.d.ts +2 -0
  233. package/queries/catalog/files-query/files-query-format.js +2 -0
  234. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
  235. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +277 -0
  236. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +119 -0
  237. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +331 -0
  238. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  239. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  240. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
  241. package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
  242. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  243. package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
  244. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  245. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
  246. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  247. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
  248. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
  249. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
  250. package/queries/catalog/linter-query/linter-query-executor.js +11 -2
  251. package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
  252. package/queries/catalog/linter-query/linter-query-format.js +44 -21
  253. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  254. package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
  255. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
  256. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
  257. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  258. package/queries/catalog/origin-query/origin-query-format.js +2 -0
  259. package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
  260. package/queries/catalog/project-query/project-query-executor.js +19 -62
  261. package/queries/catalog/project-query/project-query-format.d.ts +7 -18
  262. package/queries/catalog/project-query/project-query-format.js +3 -18
  263. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  264. package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
  265. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  266. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
  267. package/queries/catalog/search-query/search-query-format.d.ts +1 -0
  268. package/queries/catalog/search-query/search-query-format.js +1 -0
  269. package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
  270. package/queries/catalog/signature-query/signature-query-executor.js +267 -57
  271. package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
  272. package/queries/catalog/signature-query/signature-query-format.js +41 -5
  273. package/queries/catalog/signature-query/signature-query-render.js +48 -6
  274. package/queries/catalog/slice-query-options.d.ts +49 -0
  275. package/queries/catalog/slice-query-options.js +50 -0
  276. package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
  277. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
  278. package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
  279. package/queries/query-print.js +3 -1
  280. package/queries/query.d.ts +63 -3
  281. package/queries/query.js +9 -2
  282. package/r-bridge/data/data.d.ts +16 -0
  283. package/r-bridge/data/data.js +20 -0
  284. package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
  285. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  286. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  287. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
  288. package/reconstruct/reconstruct.d.ts +18 -1
  289. package/reconstruct/reconstruct.js +42 -19
  290. package/slicing/criterion/parse.d.ts +4 -0
  291. package/slicing/criterion/parse.js +4 -0
  292. package/slicing/static/slice-call.js +17 -9
  293. package/slicing/static/static-slicer.d.ts +1 -1
  294. package/slicing/static/static-slicer.js +5 -4
  295. package/util/files.d.ts +19 -1
  296. package/util/files.js +45 -3
  297. package/util/glob.d.ts +19 -0
  298. package/util/glob.js +67 -0
  299. package/util/log.d.ts +12 -0
  300. package/util/log.js +17 -1
  301. package/util/logic.d.ts +6 -0
  302. package/util/logic.js +31 -1
  303. package/util/mermaid/dfg.js +17 -12
  304. package/util/mermaid/mermaid.js +2 -2
  305. package/util/objects.d.ts +5 -0
  306. package/util/objects.js +8 -0
  307. package/util/r-version.d.ts +9 -1
  308. package/util/r-version.js +27 -2
  309. package/util/schema.d.ts +16 -0
  310. package/util/schema.js +89 -4
  311. package/util/text/ansi.d.ts +4 -0
  312. package/util/text/ansi.js +27 -3
  313. package/util/text/strings.d.ts +9 -0
  314. package/util/text/strings.js +29 -0
  315. package/util/version.js +79 -6
  316. package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
  317. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
  318. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
  319. package/project/sigdb/version.js +0 -55
@@ -6,7 +6,7 @@ const set_1 = require("../../util/collections/set");
6
6
  const logic_1 = require("../../util/logic");
7
7
  const abstract_domain_1 = require("./abstract-domain");
8
8
  const lattice_1 = require("./lattice");
9
- const satisfiable_domain_1 = require("./satisfiable-domain");
9
+ const value_abstract_domain_1 = require("./value-abstract-domain");
10
10
  /**
11
11
  * The set upper bound abstract domain as sets capturing possible values of the concrete set bounded by a `limit` for the maximum number of inferred values.
12
12
  * The Bottom element is defined as the{@link Bottom} and the Top element is defined as {@link Top} symbol.
@@ -38,154 +38,110 @@ class SetUpperBoundDomain extends abstract_domain_1.AbstractDomain {
38
38
  create(value) {
39
39
  return new SetUpperBoundDomain(value, this.limit, this.setType);
40
40
  }
41
+ from(...values) {
42
+ if (values.length === 0) {
43
+ return this.bottom();
44
+ }
45
+ const sets = values.map(value => new Set(value));
46
+ return this.create(sets.reduce((result, set) => result.union(set)));
47
+ }
41
48
  static top(limit, setType) {
42
- return new SetUpperBoundDomain(lattice_1.Top, limit, setType);
49
+ return new this(lattice_1.Top, limit, setType);
43
50
  }
44
51
  static bottom(limit, setType) {
45
- return new SetUpperBoundDomain(lattice_1.Bottom, limit, setType);
52
+ return new this(lattice_1.Bottom, limit, setType);
46
53
  }
47
- static abstract(concrete, limit, setType) {
48
- if (concrete === lattice_1.Top) {
49
- return SetUpperBoundDomain.top(limit, setType);
50
- }
51
- else if (concrete.size === 0) {
52
- return SetUpperBoundDomain.bottom(limit, setType);
54
+ static from(values, limit, setType) {
55
+ values = !Array.isArray(values) ? [values] : values.every(value => value instanceof Set || Array.isArray(value)) ? values : [values];
56
+ if (values.length === 0) {
57
+ return this.bottom();
53
58
  }
54
- return new SetUpperBoundDomain(concrete.values().reduce((result, set) => result.union(set)), limit, setType);
59
+ const sets = values.map(value => new Set(value));
60
+ return new this(sets.reduce((result, set) => result.union(set)), limit, setType);
55
61
  }
56
62
  top() {
57
- return SetUpperBoundDomain.top(this.limit, this.setType);
63
+ return this.create(lattice_1.Top);
58
64
  }
59
65
  bottom() {
60
- return SetUpperBoundDomain.bottom(this.limit, this.setType);
66
+ return this.create(lattice_1.Bottom);
61
67
  }
62
- equals(other) {
63
- return this.value === other.value || (this.isValue() && other.isValue() && (0, set_1.setEquals)(this.value, other.value));
68
+ equalsValue(other) {
69
+ return (0, set_1.setEquals)(this.value, other.value);
64
70
  }
65
- leq(other) {
66
- return this.value === lattice_1.Bottom || other.value === lattice_1.Top || (this.isValue() && other.isValue() && this.value.isSubsetOf(other.value));
71
+ leqValue(other) {
72
+ return this.value.isSubsetOf(other.value);
67
73
  }
68
- join(other) {
69
- const otherValue = other instanceof SetUpperBoundDomain ? other.value : Array.isArray(other) ? new this.setType(other) : other;
70
- if (this.value === lattice_1.Top || otherValue === lattice_1.Top) {
71
- return this.top();
72
- }
73
- else if (this.value === lattice_1.Bottom) {
74
- return this.create(otherValue);
75
- }
76
- else if (otherValue === lattice_1.Bottom) {
77
- return this.create(this.value);
78
- }
79
- else {
80
- return this.create(this.value.union(otherValue));
81
- }
74
+ joinValue(other) {
75
+ return this.create(this.value.union(other.value));
82
76
  }
83
- meet(other) {
84
- const otherValue = other instanceof SetUpperBoundDomain ? other.value : Array.isArray(other) ? new this.setType(other) : other;
85
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
86
- return this.bottom();
87
- }
88
- else if (this.value === lattice_1.Top) {
89
- return this.create(otherValue);
90
- }
91
- else if (otherValue === lattice_1.Top) {
92
- return this.create(this.value);
93
- }
94
- else {
95
- return this.create(this.value.intersection(otherValue));
96
- }
77
+ meetValue(other) {
78
+ return this.create(this.value.intersection(other.value));
97
79
  }
98
- /**
99
- * Subtracts another abstract value from the current abstract value by removing all elements of the other abstract value from the current abstract value.
100
- */
101
- subtract(other) {
102
- const otherValue = other instanceof SetUpperBoundDomain ? other.value : Array.isArray(other) ? new this.setType(other) : other;
103
- if (this.value === lattice_1.Top) {
104
- return this.top();
105
- }
106
- else if (this.value === lattice_1.Bottom) {
80
+ union(other) {
81
+ other = other instanceof abstract_domain_1.AbstractDomain ? other : this.create(other);
82
+ if (this.isBottom() || other.isBottom()) {
107
83
  return this.bottom();
108
84
  }
109
- else if (otherValue === lattice_1.Top || otherValue === lattice_1.Bottom) {
110
- return this.create(this.value);
111
- }
112
- else {
113
- return this.create(this.value.difference(otherValue));
114
- }
85
+ return this.join(other);
115
86
  }
116
- widen(other) {
117
- if (this.value === lattice_1.Bottom) {
118
- return this.create(other.value);
119
- }
120
- else if (other.value === lattice_1.Bottom) {
121
- return this.create(this.value);
122
- }
123
- return other.leq(this) ? this.create(this.value) : this.top();
124
- }
125
- narrow(other) {
126
- if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
87
+ intersect(other) {
88
+ other = other instanceof abstract_domain_1.AbstractDomain ? other : this.create(other);
89
+ if (this.isBottom() || other.isBottom()) {
127
90
  return this.bottom();
128
91
  }
129
- return this.isTop() ? this.create(other.value) : this.create(this.value);
92
+ return this.meet(other);
130
93
  }
131
- concretize(limit) {
132
- if (this.value === lattice_1.Bottom) {
133
- return new Set();
94
+ subtract(other) {
95
+ other = other instanceof abstract_domain_1.AbstractDomain ? other : this.create(other);
96
+ if (this.isBottom() || other.isBottom()) {
97
+ return this.bottom();
134
98
  }
135
- else if (this.value === lattice_1.Top || 2 ** (this.value.size) > limit) {
136
- return lattice_1.Top;
99
+ else if (this.isValue() && other.isValue()) {
100
+ return this.create(this.value.difference(other.value));
137
101
  }
138
- const subsets = [new this.setType()];
139
- for (const element of this.value.values()) {
140
- const newSubsets = subsets.map(subset => new this.setType([...subset, element]));
141
- for (const subset of newSubsets) {
142
- subsets.push(subset);
143
- }
102
+ else if (this.isValue()) {
103
+ return this.create(this.value);
144
104
  }
145
- return new Set(subsets);
146
- }
147
- abstract(concrete) {
148
- return SetUpperBoundDomain.abstract(concrete, this.limit, this.setType);
105
+ return this.top();
149
106
  }
150
- satisfies(set, comparator = satisfiable_domain_1.SetComparator.Equal) {
107
+ satisfies(set, comparator = value_abstract_domain_1.SetComparator.Equal) {
151
108
  if (this.isTop()) {
152
109
  return logic_1.Ternary.Maybe;
153
110
  }
154
111
  const values = [...set];
155
112
  switch (comparator) {
156
- case satisfiable_domain_1.SetComparator.Equal:
157
- case satisfiable_domain_1.SetComparator.SubsetOrEqual: {
113
+ case value_abstract_domain_1.SetComparator.Equal:
114
+ case value_abstract_domain_1.SetComparator.SubsetOrEqual: {
158
115
  if (this.isValue() && values.length <= this.value.size && values.every(value => this.value.has(value))) {
159
116
  return logic_1.Ternary.Maybe;
160
117
  }
161
118
  return logic_1.Ternary.Never;
162
119
  }
163
- case satisfiable_domain_1.SetComparator.Subset: {
120
+ case value_abstract_domain_1.SetComparator.Subset: {
164
121
  if (this.isValue() && values.length < this.value.size && values.every(value => this.value.has(value))) {
165
122
  return logic_1.Ternary.Maybe;
166
123
  }
167
124
  return logic_1.Ternary.Never;
168
125
  }
126
+ case value_abstract_domain_1.SetComparator.Intersect: {
127
+ if (this.isTop() || this.isValue() && [...set].some(value => this.value.has(value))) {
128
+ return logic_1.Ternary.Maybe;
129
+ }
130
+ return logic_1.Ternary.Never;
131
+ }
132
+ case value_abstract_domain_1.SetComparator.NoIntersect: {
133
+ return logic_1.TernaryLogic.negate(this.satisfies(set, value_abstract_domain_1.SetComparator.Intersect));
134
+ }
169
135
  default: {
170
136
  (0, assert_1.assertUnreachable)(comparator);
171
137
  }
172
138
  }
173
139
  }
174
- toJSON() {
175
- if (this.value === lattice_1.Top || this.value === lattice_1.Bottom) {
176
- return this.value.description;
177
- }
140
+ jsonify() {
178
141
  return this.value.values().toArray();
179
142
  }
180
- toString() {
181
- if (this.value === lattice_1.Top) {
182
- return lattice_1.TopSymbol;
183
- }
184
- else if (this.value === lattice_1.Bottom) {
185
- return lattice_1.BottomSymbol;
186
- }
187
- const string = this.value.values().map(abstract_domain_1.AbstractDomain.toString).toArray().join(', ');
188
- return `{${string}}`;
143
+ stringify() {
144
+ return `{${this.value.values().map(abstract_domain_1.AbstractDomain.toString).toArray().join(', ')}}`;
189
145
  }
190
146
  isTop() {
191
147
  return this.value === lattice_1.Top;
@@ -1,7 +1,7 @@
1
1
  import { Ternary } from '../../util/logic';
2
2
  import { AbstractDomain } from './abstract-domain';
3
3
  import { Bottom, Top } from './lattice';
4
- import type { SatisfiableDomain } from './satisfiable-domain';
4
+ import type { ValueDomain } from './value-abstract-domain';
5
5
  /** The type of the actual values of the singleton domain as single value */
6
6
  type SingletonValue<T> = T;
7
7
  /** The type of the Top element of the singleton domain as {@link Top} symbol */
@@ -16,28 +16,25 @@ type SingletonLift<T> = SingletonValue<T> | SingletonTop | SingletonBottom;
16
16
  * @template T - Type of the value in the abstract domain
17
17
  * @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
18
18
  */
19
- export declare class SingletonDomain<T, Value extends SingletonLift<T> = SingletonLift<T>> extends AbstractDomain<T, SingletonValue<T>, SingletonTop, SingletonBottom, Value> implements SatisfiableDomain<T> {
19
+ export declare class SingletonDomain<T, Value extends SingletonLift<T> = SingletonLift<T>> extends AbstractDomain<SingletonValue<T>, SingletonTop, SingletonBottom, Value> implements ValueDomain<T> {
20
20
  create(value: SingletonLift<T>): this;
21
+ from(...values: T[]): this;
21
22
  static top<T>(): SingletonDomain<T, SingletonTop>;
22
23
  static bottom<T>(): SingletonDomain<T, SingletonBottom>;
23
- static abstract<T>(concrete: ReadonlySet<T> | typeof Top): SingletonDomain<T>;
24
+ static from<T>(...values: T[]): SingletonDomain<T>;
24
25
  top(): this & SingletonDomain<T, SingletonTop>;
25
26
  bottom(): this & SingletonDomain<T, SingletonBottom>;
26
- equals(other: this): boolean;
27
- leq(other: this): boolean;
28
- join(other: SingletonLift<T>): this;
29
- join(other: this): this;
30
- meet(other: SingletonLift<T>): this;
31
- meet(other: this): this;
32
- widen(other: this): this;
33
- narrow(other: this): this;
34
- concretize(): ReadonlySet<T> | typeof Top;
35
- abstract(concrete: ReadonlySet<T> | typeof Top): this;
27
+ protected equalsValue(this: SingletonDomain<T, SingletonValue<T>>, other: SingletonDomain<T, SingletonValue<T>>): boolean;
28
+ protected leqValue(this: SingletonDomain<T, SingletonValue<T>>, other: SingletonDomain<T, SingletonValue<T>>): boolean;
29
+ protected joinValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this;
30
+ protected meetValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this;
31
+ protected widenValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this;
32
+ protected narrowValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this;
36
33
  satisfies(value: T): Ternary;
37
- toJSON(): unknown;
38
- toString(): string;
39
- isTop(): this is SingletonDomain<T, SingletonTop>;
40
- isBottom(): this is SingletonDomain<T, SingletonBottom>;
41
- isValue(): this is SingletonDomain<T, SingletonValue<T>>;
34
+ protected jsonify(): unknown;
35
+ protected stringify(): string;
36
+ isTop(): this is this & SingletonDomain<T, SingletonTop>;
37
+ isBottom(): this is this & SingletonDomain<T, SingletonBottom>;
38
+ isValue(): this is this & SingletonDomain<T, SingletonValue<T>>;
42
39
  }
43
40
  export {};
@@ -14,83 +14,56 @@ class SingletonDomain extends abstract_domain_1.AbstractDomain {
14
14
  create(value) {
15
15
  return new SingletonDomain(value);
16
16
  }
17
+ from(...values) {
18
+ if (values.length === 0) {
19
+ return this.bottom();
20
+ }
21
+ else if (values.length > 1) {
22
+ return this.top();
23
+ }
24
+ return this.create(values[0]);
25
+ }
17
26
  static top() {
18
- return new SingletonDomain(lattice_1.Top);
27
+ return new this(lattice_1.Top);
19
28
  }
20
29
  static bottom() {
21
- return new SingletonDomain(lattice_1.Bottom);
30
+ return new this(lattice_1.Bottom);
22
31
  }
23
- static abstract(concrete) {
24
- if (concrete === lattice_1.Top || concrete.size > 1) {
25
- return SingletonDomain.top();
32
+ static from(...values) {
33
+ if (values.length === 0) {
34
+ return this.bottom();
26
35
  }
27
- else if (concrete.size === 0) {
28
- return SingletonDomain.bottom();
36
+ else if (values.length > 1) {
37
+ return this.top();
29
38
  }
30
- return new SingletonDomain([...concrete][0]);
39
+ return new this(values[0]);
31
40
  }
32
41
  top() {
33
- return SingletonDomain.top();
42
+ return this.create(lattice_1.Top);
34
43
  }
35
44
  bottom() {
36
- return SingletonDomain.bottom();
45
+ return this.create(lattice_1.Bottom);
37
46
  }
38
- equals(other) {
47
+ equalsValue(other) {
39
48
  return this.value === other.value;
40
49
  }
41
- leq(other) {
42
- return this.value === lattice_1.Bottom || other.value === lattice_1.Top || (this.isValue() && other.isValue() && this.value <= other.value);
50
+ leqValue(other) {
51
+ return this.value <= other.value;
43
52
  }
44
- join(other) {
45
- const otherValue = other instanceof SingletonDomain ? other.value : other;
46
- if (this.value === lattice_1.Bottom) {
47
- return this.create(otherValue);
48
- }
49
- else if (otherValue === lattice_1.Bottom) {
50
- return this.create(this.value);
51
- }
52
- else if (this.value !== otherValue) {
53
- return this.top();
54
- }
55
- else {
56
- return this.create(this.value);
57
- }
53
+ joinValue(other) {
54
+ return this.equals(other) ? this.create(this.value) : this.top();
58
55
  }
59
- meet(other) {
60
- const otherValue = other instanceof SingletonDomain ? other.value : other;
61
- if (this.value === lattice_1.Top) {
62
- return this.create(otherValue);
63
- }
64
- else if (otherValue === lattice_1.Top) {
65
- return this.create(this.value);
66
- }
67
- else if (this.value !== otherValue) {
68
- return this.bottom();
69
- }
70
- else {
71
- return this.create(this.value);
72
- }
73
- }
74
- widen(other) {
75
- return this.join(other); // Using join for widening as the lattice is finite
76
- }
77
- narrow(other) {
78
- return this.meet(other); // Using meet for narrowing as the lattice is finite
56
+ meetValue(other) {
57
+ return this.equals(other) ? this.create(this.value) : this.bottom();
79
58
  }
80
- concretize() {
81
- if (this.value === lattice_1.Top) {
82
- return lattice_1.Top;
83
- }
84
- else if (this.value === lattice_1.Bottom) {
85
- return new Set();
86
- }
87
- return new Set([this.value]);
59
+ widenValue(other) {
60
+ return this.joinValue(other); // Using join for widening as the lattice is finite
88
61
  }
89
- abstract(concrete) {
90
- return SingletonDomain.abstract(concrete);
62
+ narrowValue(other) {
63
+ return this.meetValue(other); // Using meet for narrowing as the lattice is finite
91
64
  }
92
65
  satisfies(value) {
93
- if (this.isValue() && this.value === value) {
66
+ if (this.equals(this.from(value))) {
94
67
  return logic_1.Ternary.Always;
95
68
  }
96
69
  else if (this.isTop()) {
@@ -98,22 +71,10 @@ class SingletonDomain extends abstract_domain_1.AbstractDomain {
98
71
  }
99
72
  return logic_1.Ternary.Never;
100
73
  }
101
- toJSON() {
102
- if (this.value === lattice_1.Top) {
103
- return lattice_1.Top.description;
104
- }
105
- else if (this.value === lattice_1.Bottom) {
106
- return lattice_1.Bottom.description;
107
- }
74
+ jsonify() {
108
75
  return this.value;
109
76
  }
110
- toString() {
111
- if (this.value === lattice_1.Top) {
112
- return lattice_1.TopSymbol;
113
- }
114
- else if (this.value === lattice_1.Bottom) {
115
- return lattice_1.BottomSymbol;
116
- }
77
+ stringify() {
117
78
  return abstract_domain_1.AbstractDomain.toString(this.value);
118
79
  }
119
80
  isTop() {
@@ -1,9 +1,7 @@
1
1
  import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
2
- import { AbstractDomain, type AnyAbstractDomain, type ConcreteDomain } from './abstract-domain';
3
- import { Bottom, Top } from './lattice';
4
- import type { StateDomainLike } from './state-domain-like';
5
- /** The type of the concrete state of the concrete domain of a state abstract domain that maps keys to a concrete value in the concrete domain */
6
- export type ConcreteState<Domain extends AnyAbstractDomain> = ReadonlyMap<NodeId, ConcreteDomain<Domain>>;
2
+ import { AbstractDomain, type AnyAbstractDomain } from './abstract-domain';
3
+ import { Bottom } from './lattice';
4
+ import type { StateDomain } from './state-domain-like';
7
5
  /** The type of the actual values of the state abstract domain as map of keys to domain values */
8
6
  export type StateDomainValue<Domain extends AnyAbstractDomain> = ReadonlyMap<NodeId, Domain>;
9
7
  /** The type of the Top element of the state abstract domain as (empty) map of keys to domain values */
@@ -18,7 +16,7 @@ export type StateDomainLift<Domain extends AnyAbstractDomain> = StateDomainValue
18
16
  * @template Domain - Type of the value abstract domain to map the AST node IDs to
19
17
  * @see {@link NodeId} for the node IDs of the AST nodes
20
18
  */
21
- export declare class StateAbstractDomain<Domain extends AnyAbstractDomain, Value extends StateDomainLift<Domain> = StateDomainLift<Domain>> extends AbstractDomain<ConcreteState<Domain>, StateDomainValue<Domain>, StateDomainTop, StateDomainBottom, Value> implements StateDomainLike<Domain> {
19
+ export declare class StateAbstractDomain<Domain extends AnyAbstractDomain, Value extends StateDomainLift<Domain> = StateDomainLift<Domain>> extends AbstractDomain<StateDomainValue<Domain>, StateDomainTop, StateDomainBottom, Value> implements StateDomain<Domain> {
22
20
  readonly domain: Domain;
23
21
  constructor(value: Value, domain: Domain);
24
22
  create(value: StateDomainLift<Domain>): this;
@@ -30,16 +28,14 @@ export declare class StateAbstractDomain<Domain extends AnyAbstractDomain, Value
30
28
  remove(node: NodeId): void;
31
29
  top(): this & StateAbstractDomain<Domain, StateDomainTop>;
32
30
  bottom(): this & StateAbstractDomain<Domain, StateDomainBottom>;
33
- equals(other: this): boolean;
34
- leq(other: this): boolean;
35
- join(other: this): this;
36
- meet(other: this): this;
37
- widen(other: this): this;
38
- narrow(other: this): this;
39
- concretize(limit: number): ReadonlySet<ConcreteState<Domain>> | typeof Top;
40
- abstract(concrete: ReadonlySet<ConcreteState<Domain>> | typeof Top): this;
41
- toJSON(): unknown;
42
- toString(): string;
31
+ protected equalsValue(this: StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): boolean;
32
+ protected leqValue(this: StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): boolean;
33
+ protected joinValue(this: this & StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): this;
34
+ protected meetValue(this: this & StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): this;
35
+ protected widenValue(this: this & StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): this;
36
+ protected narrowValue(this: this & StateAbstractDomain<Domain, StateDomainValue<Domain>>, other: StateAbstractDomain<Domain, StateDomainValue<Domain>>): this;
37
+ protected jsonify(this: StateAbstractDomain<Domain, StateDomainValue<Domain>>): unknown;
38
+ protected stringify(this: StateAbstractDomain<Domain, StateDomainValue<Domain>>): string;
43
39
  isTop(): this is this & StateAbstractDomain<Domain, StateDomainTop>;
44
40
  isBottom(): this is this & StateAbstractDomain<Domain, StateDomainBottom>;
45
41
  isValue(): this is this & StateAbstractDomain<Domain, StateDomainValue<Domain>>;