@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
@@ -5,8 +5,7 @@ const assert_1 = require("../../util/assert");
5
5
  const logic_1 = require("../../util/logic");
6
6
  const abstract_domain_1 = require("./abstract-domain");
7
7
  const lattice_1 = require("./lattice");
8
- const satisfiable_domain_1 = require("./satisfiable-domain");
9
- /* eslint-disable @typescript-eslint/unified-signatures */
8
+ const value_abstract_domain_1 = require("./value-abstract-domain");
10
9
  /** The Top element of the interval domain as interval [-∞, +∞] */
11
10
  exports.IntervalTop = [-Infinity, +Infinity];
12
11
  /**
@@ -17,7 +16,7 @@ exports.IntervalTop = [-Infinity, +Infinity];
17
16
  class IntervalDomain extends abstract_domain_1.AbstractDomain {
18
17
  constructor(value) {
19
18
  if (Array.isArray(value)) {
20
- if (value.some(isNaN) || value[0] > value[1] || value[0] === +Infinity || value[1] === -Infinity) {
19
+ if (value.some(Number.isNaN) || value[0] > value[1] || value[0] === +Infinity || value[1] === -Infinity) {
21
20
  super(lattice_1.Bottom);
22
21
  }
23
22
  else {
@@ -31,133 +30,100 @@ class IntervalDomain extends abstract_domain_1.AbstractDomain {
31
30
  create(value) {
32
31
  return new IntervalDomain(value);
33
32
  }
33
+ get lower() {
34
+ return (this.isValue() ? this.value[0] : lattice_1.Bottom);
35
+ }
36
+ get upper() {
37
+ return (this.isValue() ? this.value[1] : lattice_1.Bottom);
38
+ }
39
+ from(...values) {
40
+ if (values.length === 0) {
41
+ return this.bottom();
42
+ }
43
+ return this.create([Math.min(...values), Math.max(...values)]);
44
+ }
34
45
  static top() {
35
- return new IntervalDomain(exports.IntervalTop);
46
+ return new this(exports.IntervalTop);
36
47
  }
37
48
  static bottom() {
38
- return new IntervalDomain(lattice_1.Bottom);
49
+ return new this(lattice_1.Bottom);
39
50
  }
40
- static abstract(concrete) {
41
- if (concrete === lattice_1.Top) {
42
- return IntervalDomain.top();
43
- }
44
- else if (concrete.size === 0 || concrete.values().some(isNaN)) {
45
- return IntervalDomain.bottom();
51
+ static from(...values) {
52
+ if (values.length === 0) {
53
+ return this.bottom();
46
54
  }
47
- return new IntervalDomain([Math.min(...concrete), Math.max(...concrete)]);
55
+ return new this([Math.min(...values), Math.max(...values)]);
48
56
  }
49
57
  top() {
50
- return IntervalDomain.top();
58
+ return this.create(exports.IntervalTop);
51
59
  }
52
60
  bottom() {
53
- return IntervalDomain.bottom();
61
+ return this.create(lattice_1.Bottom);
54
62
  }
55
- equals(other) {
56
- return this.value === other.value || (this.isValue() && other.isValue() && this.value[0] === other.value[0] && this.value[1] === other.value[1]);
63
+ equalsValue(other) {
64
+ return this.lower === other.lower && this.upper === other.upper;
57
65
  }
58
- leq(other) {
59
- return this.value === lattice_1.Bottom || (other.isValue() && other.value[0] <= this.value[0] && this.value[1] <= other.value[1]);
66
+ leqValue(other) {
67
+ return other.lower <= this.lower && this.upper <= other.upper;
60
68
  }
61
- join(other) {
62
- const otherValue = other instanceof IntervalDomain ? other.value : other;
63
- if (this.value === lattice_1.Bottom) {
64
- return this.create(otherValue);
65
- }
66
- else if (otherValue === lattice_1.Bottom) {
67
- return this.create(this.value);
68
- }
69
- else {
70
- return this.create([Math.min(this.value[0], otherValue[0]), Math.max(this.value[1], otherValue[1])]);
71
- }
69
+ joinValue(other) {
70
+ return this.create([Math.min(this.lower, other.lower), Math.max(this.upper, other.upper)]);
72
71
  }
73
- meet(other) {
74
- const otherValue = other instanceof IntervalDomain ? other.value : other;
75
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
76
- return this.bottom();
77
- }
78
- else {
79
- return this.create([Math.max(this.value[0], otherValue[0]), Math.min(this.value[1], otherValue[1])]);
80
- }
72
+ meetValue(other) {
73
+ return this.create([Math.max(this.lower, other.lower), Math.min(this.upper, other.upper)]);
81
74
  }
82
- widen(other) {
83
- if (this.value === lattice_1.Bottom) {
84
- return this.create(other.value);
85
- }
86
- else if (other.value === lattice_1.Bottom) {
87
- return this.create(this.value);
88
- }
89
- else {
90
- return this.create([
91
- this.value[0] <= other.value[0] ? this.value[0] : -Infinity,
92
- this.value[1] >= other.value[1] ? this.value[1] : +Infinity
93
- ]);
94
- }
75
+ widenValue(other) {
76
+ return this.create([
77
+ this.lower <= other.lower ? this.lower : -Infinity,
78
+ this.upper >= other.upper ? this.upper : +Infinity
79
+ ]);
95
80
  }
96
- narrow(other) {
97
- if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
98
- return this.bottom();
99
- }
100
- else if (Math.max(this.value[0], other.value[0]) > Math.min(this.value[1], other.value[1])) {
81
+ narrowValue(other) {
82
+ if (Math.max(this.lower, other.lower) > Math.min(this.upper, other.upper)) {
101
83
  return this.bottom();
102
84
  }
103
85
  return this.create([
104
- this.value[0] === -Infinity ? other.value[0] : this.value[0],
105
- this.value[1] === +Infinity ? other.value[1] : this.value[1]
86
+ this.lower === -Infinity ? other.lower : this.lower,
87
+ this.upper === +Infinity ? other.upper : this.upper
106
88
  ]);
107
89
  }
108
- concretize(limit) {
109
- if (this.value === lattice_1.Bottom) {
110
- return new Set();
111
- }
112
- else if (!isFinite(this.value[0]) || !isFinite(this.value[1]) || this.value[1] - this.value[0] + 1 > limit) {
113
- return lattice_1.Top;
114
- }
115
- const set = new Set();
116
- for (let x = this.value[0]; x <= this.value[1]; x++) {
117
- set.add(x);
118
- }
119
- return set;
120
- }
121
- abstract(concrete) {
122
- return IntervalDomain.abstract(concrete);
123
- }
124
- satisfies(value, comparator = satisfiable_domain_1.NumericalComparator.Equal) {
90
+ satisfies(value, comparator = value_abstract_domain_1.NumericalComparator.Equal) {
125
91
  switch (comparator) {
126
- case satisfiable_domain_1.NumericalComparator.Equal: {
127
- if (this.isValue() && this.value[0] <= value && value <= this.value[1]) {
128
- return this.value[0] === this.value[1] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
92
+ case value_abstract_domain_1.NumericalComparator.Equal: {
93
+ if (this.isValue() && this.lower <= value && value <= this.upper) {
94
+ return this.lower === this.upper ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
129
95
  }
130
96
  else {
131
97
  return logic_1.Ternary.Never;
132
98
  }
133
99
  }
134
- case satisfiable_domain_1.NumericalComparator.Less: {
135
- if (this.isValue() && value < this.value[1]) {
136
- return value < this.value[0] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
100
+ case value_abstract_domain_1.NumericalComparator.Less: {
101
+ if (this.isValue() && value < this.upper) {
102
+ return value < this.lower ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
137
103
  }
138
104
  else {
139
105
  return logic_1.Ternary.Never;
140
106
  }
141
107
  }
142
- case satisfiable_domain_1.NumericalComparator.LessOrEqual: {
143
- if (this.isValue() && value <= this.value[1]) {
144
- return value <= this.value[0] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
108
+ case value_abstract_domain_1.NumericalComparator.LessOrEqual: {
109
+ if (this.isValue() && value <= this.upper) {
110
+ return value <= this.lower ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
145
111
  }
146
112
  else {
147
113
  return logic_1.Ternary.Never;
148
114
  }
149
115
  }
150
- case satisfiable_domain_1.NumericalComparator.Greater: {
151
- if (this.isValue() && this.value[0] <= value) {
152
- return this.value[1] <= value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
116
+ case value_abstract_domain_1.NumericalComparator.Greater: {
117
+ if (this.isValue() && this.lower <= value) {
118
+ return this.upper <= value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
153
119
  }
154
120
  else {
155
121
  return logic_1.Ternary.Never;
156
122
  }
157
123
  }
158
- case satisfiable_domain_1.NumericalComparator.GreaterOrEqual: {
159
- if (this.isValue() && this.value[0] < value) {
160
- return this.value[1] < value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
124
+ case value_abstract_domain_1.NumericalComparator.GreaterOrEqual: {
125
+ if (this.isValue() && this.lower < value) {
126
+ return this.upper < value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
161
127
  }
162
128
  else {
163
129
  return logic_1.Ternary.Never;
@@ -168,90 +134,89 @@ class IntervalDomain extends abstract_domain_1.AbstractDomain {
168
134
  }
169
135
  }
170
136
  }
171
- /**
172
- * Adds another abstract value to the current abstract value by adding the two lower and upper bounds, respectively.
173
- */
174
- add(other) {
175
- const otherValue = other instanceof IntervalDomain ? other.value : other;
176
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
177
- return this.bottom();
137
+ negate() {
138
+ if (this.isValue()) {
139
+ return this.create([-this.value[1], -this.value[0]]);
178
140
  }
179
- else {
180
- return this.create([this.value[0] + otherValue[0], this.value[1] + otherValue[1]]);
141
+ return this.bottom();
142
+ }
143
+ add(other) {
144
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
145
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
146
+ return this.create([this.lower + otherValue[0], this.upper + otherValue[1]]);
181
147
  }
148
+ return this.bottom();
182
149
  }
183
- /**
184
- * Subtracts another abstract value from the current abstract value by subtracting the two lower and upper bounds from each other, respectively.
185
- */
186
150
  subtract(other) {
187
- const otherValue = other instanceof IntervalDomain ? other.value : other;
188
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
189
- return this.bottom();
190
- }
191
- else {
192
- return this.create([this.value[0] - otherValue[0], this.value[1] - otherValue[1]]);
151
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
152
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
153
+ return this.create([this.lower - otherValue[0], this.upper - otherValue[1]]);
154
+ }
155
+ return this.bottom();
156
+ }
157
+ multiply(other) {
158
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
159
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
160
+ const products = [
161
+ this.value[0] * otherValue[0],
162
+ this.value[0] * otherValue[1],
163
+ this.value[1] * otherValue[0],
164
+ this.value[1] * otherValue[1]
165
+ ];
166
+ return this.create([Math.min(...products), Math.max(...products)]);
167
+ }
168
+ return this.bottom();
169
+ }
170
+ divide(other) {
171
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
172
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
173
+ if (otherValue[0] <= 0 && 0 <= otherValue[1]) {
174
+ return this.top();
175
+ }
176
+ return this.multiply(this.create([1 / otherValue[1], 1 / otherValue[0]]));
193
177
  }
178
+ return this.bottom();
194
179
  }
195
- /**
196
- * Creates the minimum between the current abstract value and another abstract value by creating the minimum of the two lower and upper bounds, respectively.
197
- */
198
180
  min(other) {
199
- const otherValue = other instanceof IntervalDomain ? other.value : other;
200
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
201
- return this.bottom();
202
- }
203
- else {
204
- return this.create([Math.min(this.value[0], otherValue[0]), Math.min(this.value[1], otherValue[1])]);
181
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
182
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
183
+ return this.create([Math.min(this.lower, otherValue[0]), Math.min(this.upper, otherValue[1])]);
205
184
  }
185
+ return this.bottom();
206
186
  }
207
- /**
208
- * Creates the maximum between the current abstract value and another abstract value by creating the maximum of the two lower and upper bounds, respectively.
209
- */
210
187
  max(other) {
211
- const otherValue = other instanceof IntervalDomain ? other.value : other;
212
- if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
213
- return this.bottom();
214
- }
215
- else {
216
- return this.create([Math.max(this.value[0], otherValue[0]), Math.max(this.value[1], otherValue[1])]);
188
+ const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
189
+ if (this.isValue() && otherValue !== lattice_1.Bottom) {
190
+ return this.create([Math.max(this.lower, otherValue[0]), Math.max(this.upper, otherValue[1])]);
217
191
  }
192
+ return this.bottom();
218
193
  }
219
194
  /**
220
195
  * Extends the lower bound of the current abstract value down to -∞.
221
196
  */
222
197
  widenDown() {
223
- if (this.value === lattice_1.Bottom) {
224
- return this.bottom();
225
- }
226
- else {
227
- return this.create([-Infinity, this.value[1]]);
198
+ if (this.isValue()) {
199
+ return this.create([-Infinity, this.upper]);
228
200
  }
201
+ return this.bottom();
229
202
  }
230
203
  /**
231
204
  * Extends the upper bound of the current abstract value up to +∞.
232
205
  */
233
206
  widenUp() {
234
- if (this.value === lattice_1.Bottom) {
235
- return this.bottom();
236
- }
237
- else {
238
- return this.create([this.value[0], +Infinity]);
207
+ if (this.isValue()) {
208
+ return this.create([this.lower, +Infinity]);
239
209
  }
210
+ return this.bottom();
240
211
  }
241
- toJSON() {
242
- if (this.value === lattice_1.Bottom) {
243
- return this.value.description;
244
- }
212
+ jsonify() {
245
213
  return this.value;
246
214
  }
247
- toString() {
248
- if (this.value === lattice_1.Bottom) {
249
- return lattice_1.BottomSymbol;
250
- }
251
- return `[${isFinite(this.value[0]) ? this.value[0] : '-∞'}, ${isFinite(this.value[1]) ? this.value[1] : '+∞'}]`;
215
+ stringify() {
216
+ return `[${Number.isFinite(this.lower) ? this.lower : '-∞'}, ${Number.isFinite(this.upper) ? this.upper : '+∞'}]`;
252
217
  }
253
218
  isTop() {
254
- return this.value !== lattice_1.Bottom && this.value[0] === -Infinity && this.value[1] === +Infinity;
219
+ return this.value !== lattice_1.Bottom && this.lower === -Infinity && this.upper === +Infinity;
255
220
  }
256
221
  isBottom() {
257
222
  return this.value === lattice_1.Bottom;
@@ -260,7 +225,7 @@ class IntervalDomain extends abstract_domain_1.AbstractDomain {
260
225
  return this.value !== lattice_1.Bottom;
261
226
  }
262
227
  isFinite() {
263
- return this.isValue() && Number.isFinite(this.value[0]) && Number.isFinite(this.value[1]);
228
+ return this.isValue() && Number.isFinite(this.lower) && Number.isFinite(this.upper);
264
229
  }
265
230
  }
266
231
  exports.IntervalDomain = IntervalDomain;
@@ -13,7 +13,7 @@ export declare const BottomSymbol = "\u22A5";
13
13
  * @template Value - Type of a lattice element representing a value (may exclude `Top` and `Bot`)
14
14
  * @template Top - Type of the Top element (greatest element) of the complete lattice
15
15
  * @template Bot - Type of the Bottom element (least element) of the complete lattice
16
- * @template Lift - Type of the lattice elements (defaults to `Value` or `Top` or `Bot`)
16
+ * @template Lift - Type of the current element in the lattice (defaults to `Value | Top | Bot`)
17
17
  */
18
18
  export interface Lattice<Value, Top, Bot, Lift extends Value | Top | Bot = Value | Top | Bot> {
19
19
  /**
@@ -43,11 +43,11 @@ export interface Lattice<Value, Top, Bot, Lift extends Value | Top | Bot = Value
43
43
  /**
44
44
  * Joins the current abstract value with another abstract value by creating the least upper bound (LUB) in the lattice.
45
45
  */
46
- join(other: this): this;
46
+ join(other: this | Value | Top | Bot): this;
47
47
  /**
48
48
  * Meets the current abstract value with another abstract value by creating the greatest lower bound (GLB) in the lattice.
49
49
  */
50
- meet(other: this): this;
50
+ meet(other: this | Value | Top | Bot): this;
51
51
  /**
52
52
  * Converts the lattice into a JSON serializable value.
53
53
  */
@@ -20,16 +20,16 @@ class MultiValueStateDomain extends state_abstract_domain_1.StateAbstractDomain
20
20
  if (this.value === lattice_1.Bottom) {
21
21
  return this.domain.value[property]?.bottom();
22
22
  }
23
- return this.value.get(node)?.value[property];
23
+ return this.get(node)?.value[property];
24
24
  }
25
25
  hasValue(node, property) {
26
- return this.value !== lattice_1.Bottom && this.value.get(node)?.value[property] !== undefined;
26
+ return this.value !== lattice_1.Bottom && this.get(node)?.value[property] !== undefined;
27
27
  }
28
28
  setValue(node, property, value) {
29
29
  if (this.value !== lattice_1.Bottom) {
30
30
  const oldValue = this.get(node);
31
31
  const newValue = { ...oldValue?.value ?? {}, [property]: value };
32
- this._value.set(node, new MultiValueDomain(newValue, this.domain.domain, this.domain.reductions));
32
+ this.set(node, new MultiValueDomain(newValue, this.domain.domain, this.domain.reductions));
33
33
  }
34
34
  }
35
35
  }
@@ -1,12 +1,7 @@
1
1
  import { type AnyAbstractDomain, AbstractDomain } from './abstract-domain';
2
- import { Top } from './lattice';
3
2
  /** The type of an abstract product of a product domain mapping named properties of the product to abstract domains */
4
3
  export type AbstractProduct<Domain extends AnyAbstractDomain = AnyAbstractDomain> = {
5
- [key in string]?: Domain;
6
- };
7
- /** The type of the concrete product of an abstract product mapping each property to a concrete value in the respective concrete domain */
8
- export type ConcreteProductOf<Product extends AbstractProduct> = {
9
- [Key in keyof Product]: Product[Key] extends AbstractDomain<infer Concrete, unknown, unknown, unknown> ? Concrete : never;
4
+ readonly [key in string]?: Domain;
10
5
  };
11
6
  /** A reduction function of a reduced product domain refining the abstract value based on the values of its sub abstract domains. */
12
7
  export type ProductReduction<Product extends AbstractProduct> = (value: Product) => Product;
@@ -16,23 +11,21 @@ export type ProductReduction<Product extends AbstractProduct> = (value: Product)
16
11
  * The Bottom element is defined as mapping every sub abstract domain to Bottom and the Top element is defined as having no sub abstract domain value.
17
12
  * @template Product - Type of the abstract product of the product domain mapping (optional) property names to abstract domains
18
13
  */
19
- export declare abstract class PartialProductDomain<Product extends AbstractProduct> extends AbstractDomain<ConcreteProductOf<Product>, Product, Product, Product> {
14
+ export declare abstract class PartialProductDomain<Product extends AbstractProduct> extends AbstractDomain<Product, Product, Product> {
20
15
  readonly domain: Required<Product>;
21
16
  readonly reductions: readonly ProductReduction<Product>[];
22
- constructor(value: Product, domain: Required<Product>, reductions?: readonly ProductReduction<Product>[]);
23
- abstract create(value: Product): this;
17
+ constructor(value: Product, domain: Required<Product>, reductions?: readonly ProductReduction<Product>[], reduce?: boolean);
18
+ abstract create(value: Product, reduce?: boolean): this;
24
19
  bottom(): this;
25
20
  top(): this;
26
- equals(other: this): boolean;
27
- leq(other: this): boolean;
28
- join(other: this): this;
29
- meet(other: this): this;
30
- widen(other: this): this;
31
- narrow(other: this): this;
32
- concretize(limit: number): ReadonlySet<ConcreteProductOf<Product>> | typeof Top;
33
- abstract(concrete: ReadonlySet<ConcreteProductOf<Product>> | typeof Top): this;
34
- toJSON(): unknown;
35
- toString(): string;
21
+ protected equalsValue(other: this): boolean;
22
+ protected leqValue(other: this): boolean;
23
+ protected joinValue(other: this): this;
24
+ protected meetValue(other: this): this;
25
+ protected widenValue(other: this): this;
26
+ protected narrowValue(other: this): this;
27
+ protected jsonify(): unknown;
28
+ protected stringify(): string;
36
29
  isTop(): boolean;
37
30
  isTop(): this is this;
38
31
  isBottom(): boolean;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PartialProductDomain = void 0;
4
- const abstract_domain_1 = require("./abstract-domain");
5
- const lattice_1 = require("./lattice");
4
+ const assert_1 = require("../../util/assert");
6
5
  const record_1 = require("../../util/record");
6
+ const abstract_domain_1 = require("./abstract-domain");
7
7
  /**
8
8
  * A partial product abstract domain as named Cartesian product of (optional) sub abstract domains.
9
9
  * The sub abstract domains are represented by a (partial) record mapping property names to abstract domains.
@@ -13,29 +13,30 @@ const record_1 = require("../../util/record");
13
13
  class PartialProductDomain extends abstract_domain_1.AbstractDomain {
14
14
  domain;
15
15
  reductions;
16
- constructor(value, domain, reductions = []) {
16
+ constructor(value, domain, reductions = [], reduce = true) {
17
17
  super(record_1.Record.mapProperties(value, entry => entry?.create(entry.value)));
18
- // must be assigned before reduce is called, as the (overridable) reduce may depend on the reductions
19
18
  this.reductions = reductions;
20
- this._value = this.reduce(this.value);
21
19
  this.domain = domain;
20
+ if (reduce) {
21
+ this._value = this.reduce(this.value);
22
+ }
22
23
  }
23
24
  bottom() {
24
- const result = this.create(this.domain);
25
- for (const key in result.value) {
26
- result.value[key] = this.domain[key]?.bottom();
25
+ const result = {};
26
+ for (const key in this.domain) {
27
+ result[key] = this.domain[key]?.bottom();
27
28
  }
28
- return result;
29
+ return this.create(result);
29
30
  }
30
31
  top() {
31
32
  return this.create({});
32
33
  }
33
- equals(other) {
34
+ equalsValue(other) {
34
35
  if (this.value === other.value) {
35
36
  return true;
36
37
  }
37
38
  for (const key in this.value) {
38
- if (this.value[key] == other.value[key]) {
39
+ if (this.value[key] === other.value[key]) {
39
40
  continue;
40
41
  }
41
42
  else if (this.value[key] === undefined || other.value[key] === undefined || !this.value[key].equals(other.value[key])) {
@@ -44,7 +45,7 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
44
45
  }
45
46
  return true;
46
47
  }
47
- leq(other) {
48
+ leqValue(other) {
48
49
  if (this.value === other.value) {
49
50
  return true;
50
51
  }
@@ -58,7 +59,7 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
58
59
  }
59
60
  return true;
60
61
  }
61
- join(other) {
62
+ joinValue(other) {
62
63
  const result = {};
63
64
  for (const key in this.domain) {
64
65
  if (this.value[key] !== undefined && other.value[key] !== undefined) {
@@ -67,7 +68,7 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
67
68
  }
68
69
  return this.create(result);
69
70
  }
70
- meet(other) {
71
+ meetValue(other) {
71
72
  const result = {};
72
73
  for (const key in this.domain) {
73
74
  if (this.value[key] === undefined) {
@@ -82,7 +83,7 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
82
83
  }
83
84
  return this.create(result);
84
85
  }
85
- widen(other) {
86
+ widenValue(other) {
86
87
  const result = {};
87
88
  for (const key in this.domain) {
88
89
  if (this.value[key] !== undefined && other.value[key] !== undefined) {
@@ -91,7 +92,7 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
91
92
  }
92
93
  return this.create(result);
93
94
  }
94
- narrow(other) {
95
+ narrowValue(other) {
95
96
  const result = {};
96
97
  for (const key in this.domain) {
97
98
  if (this.value[key] === undefined) {
@@ -106,51 +107,17 @@ class PartialProductDomain extends abstract_domain_1.AbstractDomain {
106
107
  }
107
108
  return this.create(result);
108
109
  }
109
- concretize(limit) {
110
- let result = new Set([{}]);
111
- for (const key in this.value) {
112
- if (this.value[key] === undefined) {
113
- continue;
114
- }
115
- const concrete = this.value[key].concretize(limit);
116
- if (concrete === lattice_1.Top) {
117
- return lattice_1.Top;
118
- }
119
- const newResult = new Set();
120
- for (const value of concrete) {
121
- for (const entry of result) {
122
- if (newResult.size >= limit) {
123
- return lattice_1.Top;
124
- }
125
- newResult.add({ ...entry, [key]: value });
126
- }
127
- }
128
- result = newResult;
129
- }
130
- return result;
131
- }
132
- abstract(concrete) {
133
- if (concrete === lattice_1.Top) {
134
- return this.top();
135
- }
136
- const result = {};
137
- for (const key in this.domain) {
138
- const concreteValues = new Set(concrete.values().map(value => value[key]));
139
- result[key] = this.domain[key]?.abstract(concreteValues);
140
- }
141
- return this.create(result);
142
- }
143
- toJSON() {
110
+ jsonify() {
144
111
  return record_1.Record.mapProperties(this.value, entry => entry?.toJSON());
145
112
  }
146
- toString() {
113
+ stringify() {
147
114
  return '(' + record_1.Record.entries(this.value).map(([key, value]) => `${key}: ${value.toString()}`).join(', ') + ')';
148
115
  }
149
116
  isTop() {
150
- return record_1.Record.values(this.value).length === 0;
117
+ return record_1.Record.values(this.value).filter(assert_1.isNotUndefined).length === 0;
151
118
  }
152
119
  isBottom() {
153
- return record_1.Record.values(this.value).every(value => value.isBottom());
120
+ return record_1.Record.values(this.value).some(value => value.isBottom());
154
121
  }
155
122
  isValue() {
156
123
  return true;
@@ -1,15 +1,15 @@
1
1
  import { IntervalDomain } from './interval-domain';
2
- import { Bottom, Top } from './lattice';
2
+ import { Bottom } from './lattice';
3
3
  /** The Top element of the positive interval domain as interval [0, +∞] */
4
4
  export declare const PosIntervalTop: PosIntervalValue;
5
5
  /** The type of the actual values of the positive interval domain as tuple of the lower and upper bound */
6
- type PosIntervalValue = readonly [lower: number, upper: number];
6
+ export type PosIntervalValue = readonly [lower: number, upper: number];
7
7
  /** The type of the Top element of the positive interval domain as interval [0, +∞] */
8
- type PosIntervalTop = typeof PosIntervalTop;
8
+ export type PosIntervalTop = typeof PosIntervalTop;
9
9
  /** The type of the Bottom element of the positive interval domain as {@link Bottom} symbol */
10
- type PosIntervalBottom = typeof Bottom;
10
+ export type PosIntervalBottom = typeof Bottom;
11
11
  /** The type of the abstract values of the positive interval domain that are Top, Bottom, or actual values */
12
- type PosIntervalLift = PosIntervalValue | PosIntervalBottom;
12
+ export type PosIntervalLift = PosIntervalValue | PosIntervalBottom;
13
13
  /**
14
14
  * The positive interval abstract domain as positive intervals with possibly zero lower bounds and infinite upper bounds representing possible numeric values.
15
15
  * The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the interval [0, +∞].
@@ -20,17 +20,13 @@ export declare class PosIntervalDomain<Value extends PosIntervalLift = PosInterv
20
20
  create(value: PosIntervalLift): this;
21
21
  static top(): PosIntervalDomain<PosIntervalTop>;
22
22
  static bottom(): PosIntervalDomain<PosIntervalBottom>;
23
- static abstract(concrete: ReadonlySet<number> | typeof Top): PosIntervalDomain;
24
23
  top(): this & PosIntervalDomain<PosIntervalTop>;
25
- bottom(): this & PosIntervalDomain<PosIntervalBottom>;
26
- widen(other: this): this;
27
- narrow(other: this): this;
28
- abstract(concrete: ReadonlySet<number> | typeof Top): this;
24
+ protected widenValue(this: this & PosIntervalDomain<PosIntervalValue>, other: PosIntervalDomain<PosIntervalValue>): this;
25
+ protected narrowValue(this: this & PosIntervalDomain<PosIntervalValue>, other: PosIntervalDomain<PosIntervalValue>): this;
29
26
  subtract(other: this | PosIntervalLift): this;
30
27
  /**
31
28
  * Extends the lower bound of the current abstract value down to 0.
32
29
  */
33
30
  widenDown(): this;
34
- isTop(): this is PosIntervalDomain<PosIntervalTop>;
31
+ isTop(): this is this & PosIntervalDomain<PosIntervalTop>;
35
32
  }
36
- export {};