@eagleoutice/flowr 2.12.2 → 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.
- package/README.md +38 -91
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
- package/abstract-interpretation/data-frame/semantics.js +12 -16
- package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
- package/abstract-interpretation/domains/abstract-domain.js +146 -6
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
- package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
- package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
- package/abstract-interpretation/domains/interval-domain.js +111 -146
- package/abstract-interpretation/domains/lattice.d.ts +3 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
- package/abstract-interpretation/domains/partial-product-domain.js +21 -54
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +4 -4
- package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
- package/abstract-interpretation/domains/set-range-domain.js +141 -200
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
- package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
- package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
- package/abstract-interpretation/domains/singleton-domain.js +33 -72
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
- package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
- package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
- package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
- package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
- package/benchmark/slicer.d.ts +2 -2
- package/benchmark/slicer.js +6 -5
- package/cli/common/options.d.ts +10 -0
- package/cli/common/options.js +2 -0
- package/cli/common/scripts-info.d.ts +10 -0
- package/cli/flowr-main-options.d.ts +4 -0
- package/cli/flowr-main-options.js +5 -0
- package/cli/flowr.d.ts +5 -0
- package/cli/flowr.js +15 -7
- package/cli/repl/commands/repl-query.js +42 -20
- package/cli/repl/commands/repl-signature.js +2 -2
- package/cli/repl/core.d.ts +14 -5
- package/cli/repl/core.js +32 -17
- package/cli/repl/parser/slice-query-parser.d.ts +69 -8
- package/cli/repl/parser/slice-query-parser.js +82 -13
- package/cli/repl/path-input.d.ts +6 -0
- package/cli/repl/path-input.js +41 -0
- package/cli/repl/print-version.js +3 -5
- package/cli/slicer-app.d.ts +2 -0
- package/cli/slicer-app.js +2 -1
- package/config.d.ts +54 -6
- package/config.js +133 -12
- package/control-flow/control-flow-graph.d.ts +3 -2
- package/control-flow/control-flow-graph.js +34 -14
- package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
- package/control-flow/semantic-cfg-guided-visitor.js +3 -0
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
- package/data/r-base-packages.generated.d.ts +1 -1
- package/data/r-base-packages.generated.js +3 -3
- package/data/sigdb/sigdb.remote.json +53 -53
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in.d.ts +2 -0
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +3 -5
- package/dataflow/environments/default-builtin-config.js +2 -2
- package/dataflow/environments/environment.d.ts +9 -0
- package/dataflow/environments/environment.js +28 -7
- package/dataflow/environments/identifier.d.ts +1 -2
- package/dataflow/environments/identifier.js +1 -5
- package/dataflow/extractor.js +1 -2
- package/dataflow/graph/dataflowgraph-builder.js +42 -3
- package/dataflow/graph/df-helper.d.ts +15 -0
- package/dataflow/graph/df-helper.js +20 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
- package/documentation/data/faq/faqs.js +12 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +2 -2
- package/documentation/doc-util/doc-files.js +4 -7
- package/documentation/doc-util/doc-query.d.ts +12 -9
- package/documentation/doc-util/doc-query.js +63 -28
- package/documentation/wiki-absint.js +1 -4
- package/documentation/wiki-analyzer.js +8 -3
- package/documentation/wiki-cfg.js +3 -2
- package/documentation/wiki-dataflow-graph.js +14 -4
- package/documentation/wiki-interface.js +29 -16
- package/documentation/wiki-mk/doc-maker.js +1 -1
- package/documentation/wiki-query.js +189 -30
- package/documentation/wiki-signature-database.d.ts +1 -1
- package/documentation/wiki-signature-database.js +53 -27
- package/linter/linter-output.d.ts +24 -0
- package/linter/linter-output.js +117 -0
- package/linter/linter-rules.d.ts +2 -4
- package/linter/rules/dataframe-access-validation.js +4 -4
- package/linter/rules/deprecated-functions.d.ts +2 -4
- package/linter/rules/deprecated-functions.js +58 -3
- package/linter/rules/undefined-symbol.js +18 -10
- package/linter/rules/unused-definition.js +24 -0
- package/package.json +5 -2
- package/project/context/flowr-analyzer-context.d.ts +59 -1
- package/project/context/flowr-analyzer-context.js +118 -3
- package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
- package/project/context/flowr-analyzer-dependencies-context.js +33 -3
- package/project/context/flowr-analyzer-files-context.d.ts +32 -0
- package/project/context/flowr-analyzer-files-context.js +132 -14
- package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
- package/project/context/flowr-analyzer-loading-order-context.js +20 -0
- package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
- package/project/context/flowr-analyzer-meta-context.js +64 -23
- package/project/context/flowr-file.d.ts +7 -0
- package/project/context/flowr-file.js +7 -0
- package/project/context/project-kind.d.ts +22 -0
- package/project/context/project-kind.js +27 -0
- package/project/dependency-version-space.d.ts +166 -0
- package/project/dependency-version-space.js +564 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/flowr-analyzer.d.ts +4 -0
- package/project/flowr-analyzer.js +5 -0
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
- package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
- package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
- package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
- package/project/plugins/flowr-analyzer-plugin.js +5 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
- package/project/plugins/package-version-plugins/package.d.ts +4 -1
- package/project/plugins/package-version-plugins/package.js +8 -5
- package/project/plugins/plugin-registry.d.ts +11 -3
- package/project/plugins/plugin-registry.js +24 -5
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
- package/project/sigdb/build.js +12 -2
- package/project/sigdb/decode.d.ts +7 -0
- package/project/sigdb/decode.js +35 -4
- package/project/sigdb/decompress.d.ts +2 -0
- package/project/sigdb/decompress.js +5 -0
- package/project/sigdb/manifest.d.ts +5 -0
- package/project/sigdb/manifest.js +37 -6
- package/project/sigdb/reader.d.ts +82 -2
- package/project/sigdb/reader.js +226 -14
- package/project/sigdb/schema.d.ts +31 -5
- package/project/sigdb/schema.js +7 -3
- package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
- package/project/sigdb/sigdb-version.js +119 -0
- package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
- package/queries/catalog/absint-query/absint-query-format.js +2 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
- package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
- package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
- package/queries/catalog/config-query/config-query-executor.js +15 -6
- package/queries/catalog/config-query/config-query-format.d.ts +18 -4
- package/queries/catalog/config-query/config-query-format.js +246 -96
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
- package/queries/catalog/dice-query/dice-query-executor.js +6 -9
- package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
- package/queries/catalog/dice-query/dice-query-format.js +10 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
- package/queries/catalog/files-query/files-query-format.d.ts +2 -0
- package/queries/catalog/files-query/files-query-format.js +2 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +277 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +119 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +331 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
- package/queries/catalog/linter-query/linter-query-executor.js +11 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
- package/queries/catalog/linter-query/linter-query-format.js +44 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
- package/queries/catalog/origin-query/origin-query-format.js +2 -0
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
- package/queries/catalog/project-query/project-query-executor.js +19 -62
- package/queries/catalog/project-query/project-query-format.d.ts +7 -18
- package/queries/catalog/project-query/project-query-format.js +3 -18
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -0
- package/queries/catalog/search-query/search-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
- package/queries/catalog/signature-query/signature-query-executor.js +267 -57
- package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
- package/queries/catalog/signature-query/signature-query-format.js +41 -5
- package/queries/catalog/signature-query/signature-query-render.js +48 -6
- package/queries/catalog/slice-query-options.d.ts +49 -0
- package/queries/catalog/slice-query-options.js +50 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
- package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
- package/queries/query-print.js +3 -1
- package/queries/query.d.ts +63 -3
- package/queries/query.js +9 -2
- package/r-bridge/data/data.d.ts +16 -0
- package/r-bridge/data/data.js +20 -0
- package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
- package/reconstruct/reconstruct.d.ts +18 -1
- package/reconstruct/reconstruct.js +42 -19
- package/slicing/criterion/parse.d.ts +4 -0
- package/slicing/criterion/parse.js +4 -0
- package/slicing/static/slice-call.js +17 -9
- package/slicing/static/static-slicer.d.ts +1 -1
- package/slicing/static/static-slicer.js +5 -4
- package/util/files.d.ts +19 -1
- package/util/files.js +45 -3
- package/util/glob.d.ts +19 -0
- package/util/glob.js +67 -0
- package/util/log.d.ts +12 -0
- package/util/log.js +17 -1
- package/util/logic.d.ts +6 -0
- package/util/logic.js +31 -1
- package/util/mermaid/dfg.js +17 -12
- package/util/mermaid/mermaid.js +2 -2
- package/util/objects.d.ts +5 -0
- package/util/objects.js +8 -0
- package/util/r-version.d.ts +9 -1
- package/util/r-version.js +27 -2
- package/util/schema.d.ts +16 -0
- package/util/schema.js +89 -4
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +27 -3
- package/util/text/strings.d.ts +9 -0
- package/util/text/strings.js +29 -0
- package/util/version.js +79 -6
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
- package/project/sigdb/version.js +0 -55
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PosIntervalDomain = exports.PosIntervalTop = void 0;
|
|
4
|
+
const abstract_domain_1 = require("./abstract-domain");
|
|
4
5
|
const interval_domain_1 = require("./interval-domain");
|
|
5
6
|
const lattice_1 = require("./lattice");
|
|
6
7
|
/** The Top element of the positive interval domain as interval [0, +∞] */
|
|
@@ -23,77 +24,47 @@ class PosIntervalDomain extends interval_domain_1.IntervalDomain {
|
|
|
23
24
|
return new PosIntervalDomain(value);
|
|
24
25
|
}
|
|
25
26
|
static top() {
|
|
26
|
-
return new
|
|
27
|
+
return new this(exports.PosIntervalTop);
|
|
27
28
|
}
|
|
28
29
|
static bottom() {
|
|
29
|
-
return new
|
|
30
|
-
}
|
|
31
|
-
static abstract(concrete) {
|
|
32
|
-
if (concrete === lattice_1.Top) {
|
|
33
|
-
return PosIntervalDomain.top();
|
|
34
|
-
}
|
|
35
|
-
else if (concrete.size === 0 || concrete.values().some(value => isNaN(value) || value < 0)) {
|
|
36
|
-
return PosIntervalDomain.bottom();
|
|
37
|
-
}
|
|
38
|
-
return new PosIntervalDomain([Math.min(...concrete), Math.max(...concrete)]);
|
|
30
|
+
return new this(lattice_1.Bottom);
|
|
39
31
|
}
|
|
40
32
|
top() {
|
|
41
|
-
return
|
|
33
|
+
return this.create(exports.PosIntervalTop);
|
|
42
34
|
}
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return this.create(other.value);
|
|
49
|
-
}
|
|
50
|
-
else if (other.value === lattice_1.Bottom) {
|
|
51
|
-
return this.create(this.value);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return this.create([
|
|
55
|
-
this.value[0] <= other.value[0] ? this.value[0] : 0,
|
|
56
|
-
this.value[1] >= other.value[1] ? this.value[1] : +Infinity
|
|
57
|
-
]);
|
|
58
|
-
}
|
|
35
|
+
widenValue(other) {
|
|
36
|
+
return this.create([
|
|
37
|
+
this.lower <= other.lower ? this.lower : 0,
|
|
38
|
+
this.upper >= other.upper ? this.upper : +Infinity
|
|
39
|
+
]);
|
|
59
40
|
}
|
|
60
|
-
|
|
61
|
-
if (this.
|
|
62
|
-
return this.bottom();
|
|
63
|
-
}
|
|
64
|
-
else if (Math.max(this.value[0], other.value[0]) > Math.min(this.value[1], other.value[1])) {
|
|
41
|
+
narrowValue(other) {
|
|
42
|
+
if (Math.max(this.lower, other.lower) > Math.min(this.upper, other.upper)) {
|
|
65
43
|
return this.bottom();
|
|
66
44
|
}
|
|
67
45
|
return this.create([
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
46
|
+
this.lower === 0 ? other.lower : this.lower,
|
|
47
|
+
this.upper === +Infinity ? other.upper : this.upper
|
|
70
48
|
]);
|
|
71
49
|
}
|
|
72
|
-
abstract(concrete) {
|
|
73
|
-
return PosIntervalDomain.abstract(concrete);
|
|
74
|
-
}
|
|
75
50
|
subtract(other) {
|
|
76
|
-
const otherValue = other instanceof
|
|
77
|
-
if (this.
|
|
78
|
-
return this.
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
return this.create([Math.max(this.value[0] - otherValue[0], 0), Math.max(this.value[1] - otherValue[1], 0)]);
|
|
51
|
+
const otherValue = other instanceof abstract_domain_1.AbstractDomain ? other.value : other;
|
|
52
|
+
if (this.isValue() && otherValue !== lattice_1.Bottom) {
|
|
53
|
+
return this.create([Math.max(this.lower - otherValue[0], 0), Math.max(this.upper - otherValue[1], 0)]);
|
|
82
54
|
}
|
|
55
|
+
return this.bottom();
|
|
83
56
|
}
|
|
84
57
|
/**
|
|
85
58
|
* Extends the lower bound of the current abstract value down to 0.
|
|
86
59
|
*/
|
|
87
60
|
widenDown() {
|
|
88
|
-
if (this.
|
|
89
|
-
return this.
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return this.create([0, this.value[1]]);
|
|
61
|
+
if (this.isValue()) {
|
|
62
|
+
return this.create([0, this.upper]);
|
|
93
63
|
}
|
|
64
|
+
return this.bottom();
|
|
94
65
|
}
|
|
95
66
|
isTop() {
|
|
96
|
-
return this.value !== lattice_1.Bottom && this.
|
|
67
|
+
return this.value !== lattice_1.Bottom && this.lower === 0 && this.upper === +Infinity;
|
|
97
68
|
}
|
|
98
69
|
}
|
|
99
70
|
exports.PosIntervalDomain = PosIntervalDomain;
|
|
@@ -7,7 +7,7 @@ import { type AbstractProduct, PartialProductDomain } from './partial-product-do
|
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class ProductDomain<Product extends Required<AbstractProduct>> extends PartialProductDomain<Product> {
|
|
9
9
|
constructor(value: Product);
|
|
10
|
-
abstract create(value: Product): this;
|
|
10
|
+
abstract create(value: Product, reduce?: boolean): this;
|
|
11
11
|
top(): this;
|
|
12
12
|
isTop(): boolean;
|
|
13
13
|
isTop(): this is this;
|
|
@@ -14,11 +14,11 @@ class ProductDomain extends partial_product_domain_1.PartialProductDomain {
|
|
|
14
14
|
super(value, value);
|
|
15
15
|
}
|
|
16
16
|
top() {
|
|
17
|
-
const result =
|
|
18
|
-
for (const key in
|
|
19
|
-
result
|
|
17
|
+
const result = {};
|
|
18
|
+
for (const key in this.domain) {
|
|
19
|
+
result[key] = this.domain[key]?.top();
|
|
20
20
|
}
|
|
21
|
-
return result;
|
|
21
|
+
return this.create(result);
|
|
22
22
|
}
|
|
23
23
|
isTop() {
|
|
24
24
|
return record_1.Record.values(this.value).every(value => value.isTop());
|
|
@@ -1,104 +1,108 @@
|
|
|
1
1
|
import { Ternary } from '../../util/logic';
|
|
2
2
|
import { AbstractDomain } from './abstract-domain';
|
|
3
3
|
import { Bottom, Top } from './lattice';
|
|
4
|
-
import type
|
|
5
|
-
|
|
6
|
-
/** The Top element of the set range domain with an empty set as minimum set and {@link Top} as range set */
|
|
4
|
+
import { SetComparator, type SetDomain } from './value-abstract-domain';
|
|
5
|
+
/** The Top element of the set range domain with an empty set as must set and {@link Top} as may set */
|
|
7
6
|
export declare const SetRangeTop: {
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
7
|
+
readonly must: Set<never>;
|
|
8
|
+
readonly may: typeof Top;
|
|
10
9
|
};
|
|
11
|
-
/** The type of the actual values of the set range domain as tuple with a
|
|
12
|
-
type SetRangeValue<T> = {
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
10
|
+
/** The type of the actual values of the set range domain as tuple with a set of values that must be present and a set of values that may be present (i.e. `[{"id","name"}, ∅]`, or `[{"id"}, {"score"}]`) */
|
|
11
|
+
export type SetRangeValue<T> = {
|
|
12
|
+
readonly must: ReadonlySet<T>;
|
|
13
|
+
readonly may: ReadonlySet<T> | typeof Top;
|
|
15
14
|
};
|
|
16
|
-
/** The type of the Top element of the set range domain as tuple with the empty set as
|
|
15
|
+
/** The type of the Top element of the set range domain as tuple with the empty set as must set and {@link Top} as may set (i.e. `[∅, Top]`) */
|
|
17
16
|
type SetRangeTop = typeof SetRangeTop;
|
|
18
17
|
/** The type of the Bottom element of the set range domain as {@link Bottom} */
|
|
19
18
|
type SetRangeBottom = typeof Bottom;
|
|
20
19
|
/** The type of the abstract values of the set range domain that are Top, Bottom, or actual values */
|
|
21
20
|
type SetRangeLift<T> = SetRangeValue<T> | SetRangeTop | SetRangeBottom;
|
|
22
|
-
/** The type of the actual values of the set range domain with a finite
|
|
21
|
+
/** The type of the actual values of the set range domain with a finite may set (the may set cannot be Top) */
|
|
23
22
|
type SetRangeFinite<T> = {
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
23
|
+
readonly must: ReadonlySet<T>;
|
|
24
|
+
readonly may: ReadonlySet<T>;
|
|
26
25
|
};
|
|
27
|
-
|
|
26
|
+
type SetRangeMustSet<T, Value extends SetRangeLift<T>> = Value extends SetRangeValue<T> ? ReadonlySet<T> : ReadonlySet<T> | typeof Bottom;
|
|
27
|
+
type SetRangeMaySet<T, Value extends SetRangeLift<T>> = Value extends SetRangeFinite<T> ? ReadonlySet<T> : Value extends SetRangeValue<T> ? ReadonlySet<T> | typeof Top : ReadonlySet<T> | typeof Top | typeof Bottom;
|
|
28
|
+
/** The type of the actual values of the set range domain as array tuple with a must array and may array for better readability (e.g. `[["id","name"], []]`, or `[["id"], ["score"]]`) */
|
|
28
29
|
export type ArrayRangeValue<T> = {
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
30
|
+
readonly must: T[];
|
|
31
|
+
readonly may: T[] | typeof Top;
|
|
31
32
|
};
|
|
32
|
-
/** The type for the maximum number of elements in the
|
|
33
|
+
/** The type for the maximum number of elements in the must set and may set of the set range domain before over-approximation */
|
|
33
34
|
export type SetRangeLimit = {
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
35
|
+
readonly must: number;
|
|
36
|
+
readonly may: number;
|
|
36
37
|
};
|
|
37
38
|
/**
|
|
38
|
-
* The set range abstract domain as range of possible value sets with a
|
|
39
|
+
* The set range abstract domain as range of possible value sets with a set of values that must be present and a set of values that may be present
|
|
39
40
|
* (similar to an interval-like structure with a lower bound and a difference to the upper bound).
|
|
40
|
-
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the range `[∅, Top]` where the
|
|
41
|
+
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the range `[∅, Top]` where the must set is the empty set and the may set is {@link Top}.
|
|
41
42
|
* @template T - Type of the values in the sets in the abstract domain
|
|
42
43
|
* @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
|
|
43
44
|
*/
|
|
44
|
-
export declare class SetRangeDomain<T, Value extends SetRangeLift<T> = SetRangeLift<T>> extends AbstractDomain<
|
|
45
|
+
export declare class SetRangeDomain<T, Value extends SetRangeLift<T> = SetRangeLift<T>> extends AbstractDomain<SetRangeValue<T>, SetRangeTop, SetRangeBottom, Value> implements SetDomain<T> {
|
|
45
46
|
readonly limit: SetRangeLimit;
|
|
46
|
-
|
|
47
|
+
protected readonly setType: typeof Set<T>;
|
|
47
48
|
/**
|
|
48
|
-
* @param limit - A limit for the maximum number of elements to store in the
|
|
49
|
+
* @param limit - A limit for the maximum number of elements to store in the must set and may set before over-approximation
|
|
49
50
|
* @param newSet - An optional set constructor for the domain elements if the type `T` is not storable in a HashSet
|
|
50
51
|
*/
|
|
51
52
|
constructor(value: Value | ArrayRangeValue<T>, limit?: SetRangeLimit | number, setType?: typeof Set<T>);
|
|
52
53
|
create(value: SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
53
54
|
/**
|
|
54
|
-
* The
|
|
55
|
+
* The set of values that must be present in the set.
|
|
55
56
|
*/
|
|
56
|
-
|
|
57
|
+
get must(): SetRangeMustSet<T, Value>;
|
|
57
58
|
/**
|
|
58
|
-
* The
|
|
59
|
+
* The set of values that may be present in the set (can be {@link Top}).
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
get may(): SetRangeMaySet<T, Value>;
|
|
62
|
+
/**
|
|
63
|
+
* The lower bound of the set range representing all values that must be present (equals the must set).
|
|
64
|
+
*/
|
|
65
|
+
lower(this: SetRangeDomain<T, SetRangeValue<T>>): ReadonlySet<T>;
|
|
66
|
+
lower(this: SetRangeDomain<T, SetRangeLift<T>>): ReadonlySet<T> | typeof Bottom;
|
|
67
|
+
/**
|
|
68
|
+
* The upper bound of the set range representing all values that can possibly be present (union of must set and may set).
|
|
69
|
+
*/
|
|
70
|
+
upper(this: SetRangeDomain<T, SetRangeFinite<T>>): ReadonlySet<T>;
|
|
71
|
+
upper(this: SetRangeDomain<T, SetRangeValue<T>>): ReadonlySet<T> | typeof Top;
|
|
72
|
+
upper(this: SetRangeDomain<T, SetRangeLift<T>>): ReadonlySet<T> | typeof Top | typeof Bottom;
|
|
73
|
+
from(...values: ReadonlySet<T>[] | T[][]): this;
|
|
61
74
|
static top<T>(limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T, SetRangeTop>;
|
|
62
75
|
static bottom<T>(limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T, SetRangeBottom>;
|
|
63
|
-
static
|
|
76
|
+
static from<T>(values: Set<T> | T[] | Set<T>[] | T[][], limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T>;
|
|
64
77
|
top(): this & SetRangeDomain<T, SetRangeTop>;
|
|
65
78
|
bottom(): this & SetRangeDomain<T, SetRangeBottom>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
meet(other: SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
71
|
-
meet(other: this): this;
|
|
72
|
-
/**
|
|
73
|
-
* Creates the union of this abstract value and another abstract value by creating the union of the minimum and maximum set, respectively.
|
|
74
|
-
*/
|
|
79
|
+
protected equalsValue(this: SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): boolean;
|
|
80
|
+
protected leqValue(this: SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): boolean;
|
|
81
|
+
protected joinValue(this: this & SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): this;
|
|
82
|
+
protected meetValue(this: this & SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): this;
|
|
75
83
|
union(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
76
|
-
/**
|
|
77
|
-
* Creates the intersection of this abstract value and another abstract value by creating the intersection of the minimum and maximum set, respectively.
|
|
78
|
-
*/
|
|
79
84
|
intersect(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
80
|
-
/**
|
|
81
|
-
* Subtracts another abstract value from the current abstract value by removing all elements of the other abstract value from the current abstract value.
|
|
82
|
-
*/
|
|
83
85
|
subtract(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
concretize(limit: number): ReadonlySet<ReadonlySet<T>> | typeof Top;
|
|
87
|
-
abstract(concrete: ReadonlySet<ReadonlySet<T>> | typeof Top): this;
|
|
86
|
+
protected widenValue(this: this & SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): this;
|
|
87
|
+
protected narrowValue(this: this & SetRangeDomain<T, SetRangeValue<T>>, other: SetRangeDomain<T, SetRangeValue<T>>): this;
|
|
88
88
|
satisfies(set: ReadonlySet<T> | T[], comparator?: SetComparator): Ternary;
|
|
89
89
|
/**
|
|
90
|
-
* Extends the
|
|
90
|
+
* Extends the must set of the current abstract value down to the empty set.
|
|
91
91
|
*/
|
|
92
92
|
widenDown(): this;
|
|
93
93
|
/**
|
|
94
|
-
* Extends the
|
|
94
|
+
* Extends the may set of the current abstract value up to {@link Top}.
|
|
95
95
|
*/
|
|
96
96
|
widenUp(): this;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
isTop(): this is SetRangeDomain<T, SetRangeTop>;
|
|
100
|
-
isBottom(): this is SetRangeDomain<T, SetRangeBottom>;
|
|
101
|
-
isValue(): this is SetRangeDomain<T, SetRangeValue<T>>;
|
|
102
|
-
isFinite(): this is SetRangeDomain<T, SetRangeFinite<T>>;
|
|
97
|
+
protected jsonify(this: SetRangeDomain<T, SetRangeValue<T>>): unknown;
|
|
98
|
+
protected stringify(this: SetRangeDomain<T, SetRangeValue<T>>): string;
|
|
99
|
+
isTop(): this is this & SetRangeDomain<T, SetRangeTop>;
|
|
100
|
+
isBottom(): this is this & SetRangeDomain<T, SetRangeBottom>;
|
|
101
|
+
isValue(): this is this & SetRangeDomain<T, SetRangeValue<T>>;
|
|
102
|
+
isFinite(): this is this & SetRangeDomain<T, SetRangeFinite<T>>;
|
|
103
|
+
isInfinite(): this is this & SetRangeDomain<T, {
|
|
104
|
+
readonly must: ReadonlySet<T>;
|
|
105
|
+
readonly may: typeof Top;
|
|
106
|
+
}>;
|
|
103
107
|
}
|
|
104
108
|
export {};
|