@eagleoutice/flowr 2.6.1 → 2.6.2
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 +131 -30
- package/abstract-interpretation/data-frame/absint-info.d.ts +1 -1
- package/abstract-interpretation/data-frame/absint-visitor.d.ts +2 -3
- package/abstract-interpretation/data-frame/absint-visitor.js +15 -10
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +18 -12
- package/abstract-interpretation/data-frame/dataframe-domain.js +25 -13
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -1
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -10
- package/abstract-interpretation/data-frame/mappers/arguments.js +0 -7
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +0 -1
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +4 -5
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +3 -4
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -1
- package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
- package/abstract-interpretation/data-frame/semantics.d.ts +3 -4
- package/abstract-interpretation/data-frame/semantics.js +171 -162
- package/abstract-interpretation/data-frame/shape-inference.d.ts +1 -4
- package/abstract-interpretation/data-frame/shape-inference.js +7 -9
- package/abstract-interpretation/domains/abstract-domain.d.ts +59 -18
- package/abstract-interpretation/domains/abstract-domain.js +74 -1
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +37 -24
- package/abstract-interpretation/domains/bounded-set-domain.js +70 -47
- package/abstract-interpretation/domains/interval-domain.d.ts +33 -25
- package/abstract-interpretation/domains/interval-domain.js +109 -50
- package/abstract-interpretation/domains/lattice.d.ts +19 -11
- package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +34 -0
- package/abstract-interpretation/domains/mapped-abstract-domain.js +189 -0
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +16 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +20 -11
- package/abstract-interpretation/domains/product-domain.d.ts +18 -23
- package/abstract-interpretation/domains/product-domain.js +11 -19
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +29 -0
- package/abstract-interpretation/domains/satisfiable-domain.js +24 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +54 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.js +197 -0
- package/abstract-interpretation/domains/singleton-domain.d.ts +24 -19
- package/abstract-interpretation/domains/singleton-domain.js +52 -37
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +8 -24
- package/abstract-interpretation/domains/state-abstract-domain.js +2 -167
- package/abstract-interpretation/normalized-ast-fold.d.ts +1 -7
- package/abstract-interpretation/normalized-ast-fold.js +0 -5
- package/benchmark/slicer.d.ts +3 -7
- package/benchmark/slicer.js +14 -19
- package/benchmark/stats/print.d.ts +6 -0
- package/benchmark/stats/print.js +6 -0
- package/benchmark/stats/size-of.d.ts +0 -1
- package/benchmark/stats/size-of.js +0 -1
- package/benchmark/stats/stats.d.ts +2 -2
- package/benchmark/stopwatch.d.ts +11 -13
- package/benchmark/stopwatch.js +11 -13
- package/benchmark/summarizer/first-phase/input.d.ts +6 -0
- package/benchmark/summarizer/first-phase/input.js +6 -0
- package/benchmark/summarizer/first-phase/process.d.ts +13 -1
- package/benchmark/summarizer/first-phase/process.js +12 -0
- package/benchmark/summarizer/second-phase/graph.d.ts +3 -0
- package/benchmark/summarizer/second-phase/graph.js +3 -0
- package/benchmark/summarizer/second-phase/process.d.ts +12 -0
- package/benchmark/summarizer/second-phase/process.js +12 -0
- package/benchmark/summarizer/summarizer.d.ts +1 -2
- package/cli/benchmark-app.js +0 -2
- package/cli/common/features.d.ts +7 -1
- package/cli/common/features.js +6 -0
- package/cli/common/script.d.ts +3 -1
- package/cli/common/script.js +3 -1
- package/cli/common/scripts-info.d.ts +3 -1
- package/cli/common/scripts-info.js +3 -0
- package/cli/flowr-main-options.d.ts +3 -0
- package/cli/flowr-main-options.js +3 -0
- package/cli/repl/commands/repl-commands.d.ts +13 -0
- package/cli/repl/commands/repl-commands.js +13 -2
- package/cli/repl/commands/repl-execute.d.ts +4 -0
- package/cli/repl/commands/repl-execute.js +6 -2
- package/cli/repl/commands/repl-main.d.ts +15 -9
- package/cli/repl/commands/repl-parse.js +2 -2
- package/cli/repl/commands/repl-query.js +16 -5
- package/cli/repl/core.d.ts +24 -6
- package/cli/repl/core.js +28 -19
- package/cli/repl/execute.d.ts +0 -2
- package/cli/repl/execute.js +0 -2
- package/cli/repl/parser/slice-query-parser.d.ts +14 -0
- package/cli/repl/parser/slice-query-parser.js +34 -0
- package/cli/repl/print-version.d.ts +6 -0
- package/cli/repl/print-version.js +6 -0
- package/cli/repl/server/compact.d.ts +8 -0
- package/cli/repl/server/compact.js +8 -0
- package/cli/repl/server/connection.d.ts +4 -3
- package/cli/repl/server/connection.js +3 -31
- package/cli/repl/server/messages/all-messages.d.ts +1 -3
- package/cli/repl/server/messages/all-messages.js +0 -1
- package/cli/repl/server/messages/message-analysis.d.ts +0 -2
- package/cli/repl/server/messages/message-query.d.ts +1 -1
- package/cli/repl/server/messages/message-repl.d.ts +0 -1
- package/cli/repl/server/send.d.ts +6 -0
- package/cli/repl/server/send.js +6 -0
- package/cli/repl/server/server.d.ts +1 -1
- package/cli/repl/server/validate.d.ts +10 -1
- package/cli/repl/server/validate.js +9 -0
- package/cli/run-script.d.ts +1 -2
- package/cli/run-script.js +0 -1
- package/cli/script-core/statistics-core.d.ts +3 -0
- package/cli/script-core/statistics-core.js +3 -0
- package/cli/script-core/statistics-helper-core.d.ts +4 -1
- package/cli/script-core/statistics-helper-core.js +3 -0
- package/cli/script-core/summarizer-core.d.ts +3 -0
- package/cli/script-core/summarizer-core.js +3 -0
- package/cli/summarizer-app.d.ts +2 -3
- package/cli/summarizer-app.js +2 -3
- package/config.d.ts +17 -3
- package/config.js +15 -0
- package/control-flow/basic-cfg-guided-visitor.d.ts +1 -2
- package/control-flow/basic-cfg-guided-visitor.js +0 -1
- package/control-flow/cfg-to-basic-blocks.d.ts +1 -1
- package/control-flow/control-flow-graph.d.ts +20 -12
- package/control-flow/control-flow-graph.js +16 -4
- package/control-flow/dfg-cfg-guided-visitor.d.ts +2 -3
- package/control-flow/diff-cfg.d.ts +3 -5
- package/control-flow/diff-cfg.js +0 -1
- package/control-flow/extract-cfg.d.ts +3 -6
- package/control-flow/extract-cfg.js +0 -3
- package/control-flow/happens-before.d.ts +1 -1
- package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -31
- package/control-flow/semantic-cfg-guided-visitor.js +0 -28
- package/control-flow/simple-visitor.d.ts +1 -3
- package/control-flow/simple-visitor.js +0 -2
- package/control-flow/syntax-cfg-guided-visitor.d.ts +1 -2
- package/control-flow/useless-loop.d.ts +0 -3
- package/control-flow/useless-loop.js +2 -5
- package/core/pipeline-executor.d.ts +8 -16
- package/core/pipeline-executor.js +9 -18
- package/core/print/dataflow-printer.d.ts +19 -0
- package/core/print/dataflow-printer.js +19 -0
- package/core/print/normalize-printer.d.ts +21 -1
- package/core/print/normalize-printer.js +20 -0
- package/core/print/parse-printer.d.ts +6 -1
- package/core/print/parse-printer.js +5 -0
- package/core/print/print.d.ts +0 -1
- package/core/print/print.js +0 -1
- package/core/print/slice-diff-ansi.d.ts +3 -0
- package/core/print/slice-diff-ansi.js +3 -0
- package/core/steps/all/core/00-parse.d.ts +1 -1
- package/core/steps/all/core/01-parse-tree-sitter.d.ts +1 -11
- package/core/steps/all/core/10-normalize.d.ts +3 -0
- package/core/steps/all/core/10-normalize.js +3 -0
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +4 -3
- package/core/steps/pipeline/create-pipeline.d.ts +1 -1
- package/core/steps/pipeline/default-pipelines.d.ts +47 -47
- package/core/steps/pipeline/default-pipelines.js +0 -4
- package/core/steps/pipeline/pipeline.d.ts +1 -8
- package/core/steps/pipeline/pipeline.js +1 -3
- package/core/steps/pipeline-step.d.ts +0 -1
- package/core/steps/pipeline-step.js +0 -1
- package/dataflow/cluster.d.ts +3 -0
- package/dataflow/cluster.js +3 -0
- package/dataflow/environments/append.d.ts +1 -1
- package/dataflow/environments/built-in-config.d.ts +1 -5
- package/dataflow/environments/built-in-config.js +0 -1
- package/dataflow/environments/built-in.d.ts +10 -5
- package/dataflow/environments/built-in.js +6 -1
- package/dataflow/environments/clone.d.ts +1 -1
- package/dataflow/environments/default-builtin-config.d.ts +3 -0
- package/dataflow/environments/default-builtin-config.js +4 -1
- package/dataflow/environments/diff.d.ts +11 -2
- package/dataflow/environments/diff.js +9 -0
- package/dataflow/environments/environment.d.ts +3 -3
- package/dataflow/environments/environment.js +8 -6
- package/dataflow/environments/identifier.d.ts +0 -4
- package/dataflow/environments/identifier.js +0 -1
- package/dataflow/environments/overwrite.d.ts +4 -1
- package/dataflow/environments/overwrite.js +3 -0
- package/dataflow/environments/resolve-by-name.d.ts +4 -4
- package/dataflow/environments/resolve-by-name.js +3 -2
- package/dataflow/environments/scoping.d.ts +4 -1
- package/dataflow/environments/scoping.js +3 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +4 -10
- package/dataflow/eval/resolve/alias-tracking.js +11 -14
- package/dataflow/eval/resolve/resolve-argument.d.ts +1 -1
- package/dataflow/eval/resolve/resolve.d.ts +1 -7
- package/dataflow/eval/resolve/resolve.js +0 -5
- package/dataflow/eval/values/general.d.ts +1 -3
- package/dataflow/eval/values/general.js +0 -1
- package/dataflow/eval/values/intervals/interval-constants.d.ts +7 -1
- package/dataflow/eval/values/intervals/interval-constants.js +6 -0
- package/dataflow/eval/values/logical/logical-constants.d.ts +4 -1
- package/dataflow/eval/values/logical/logical-constants.js +3 -0
- package/dataflow/eval/values/r-value.d.ts +12 -0
- package/dataflow/eval/values/r-value.js +12 -0
- package/dataflow/eval/values/scalar/scalar-consatnts.d.ts +7 -1
- package/dataflow/eval/values/scalar/scalar-consatnts.js +6 -0
- package/dataflow/eval/values/sets/set-constants.d.ts +7 -2
- package/dataflow/eval/values/sets/set-constants.js +6 -0
- package/dataflow/eval/values/string/string-constants.d.ts +10 -1
- package/dataflow/eval/values/string/string-constants.js +9 -0
- package/dataflow/eval/values/vectors/vector-constants.d.ts +1 -1
- package/dataflow/extractor.d.ts +1 -1
- package/dataflow/graph/dataflowgraph-builder.d.ts +20 -38
- package/dataflow/graph/dataflowgraph-builder.js +6 -23
- package/dataflow/graph/diff-dataflow-graph.d.ts +16 -6
- package/dataflow/graph/diff-dataflow-graph.js +12 -1
- package/dataflow/graph/edge.d.ts +9 -0
- package/dataflow/graph/edge.js +9 -0
- package/dataflow/graph/graph.d.ts +6 -19
- package/dataflow/graph/graph.js +4 -15
- package/dataflow/graph/invert-dfg.d.ts +3 -0
- package/dataflow/graph/invert-dfg.js +3 -0
- package/dataflow/graph/quads.d.ts +1 -1
- package/dataflow/graph/unknown-replacement.d.ts +6 -0
- package/dataflow/graph/unknown-replacement.js +6 -0
- package/dataflow/graph/unknown-side-effect.d.ts +8 -0
- package/dataflow/graph/unknown-side-effect.js +8 -0
- package/dataflow/graph/vertex.d.ts +9 -9
- package/dataflow/graph/vertex.js +9 -1
- package/dataflow/info.d.ts +9 -10
- package/dataflow/info.js +6 -1
- package/dataflow/internal/linker.d.ts +25 -9
- package/dataflow/internal/linker.js +23 -7
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +6 -0
- package/dataflow/internal/process/functions/call/argument/make-argument.js +6 -0
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +6 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +10 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +6 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +6 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +23 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +20 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +3 -0
- package/dataflow/internal/process/functions/call/common.d.ts +11 -5
- package/dataflow/internal/process/functions/call/common.js +6 -0
- package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -0
- package/dataflow/internal/process/functions/call/default-call-handling.js +3 -0
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -5
- package/dataflow/internal/process/functions/call/known-call-handling.js +7 -0
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +7 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +6 -0
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +4 -1
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +3 -0
- package/dataflow/internal/process/functions/process-argument.d.ts +8 -2
- package/dataflow/internal/process/functions/process-argument.js +6 -0
- package/dataflow/internal/process/functions/process-parameter.d.ts +5 -2
- package/dataflow/internal/process/functions/process-parameter.js +3 -0
- package/dataflow/internal/process/process-symbol.d.ts +3 -0
- package/dataflow/internal/process/process-symbol.js +3 -0
- package/dataflow/internal/process/process-uninteresting-leaf.d.ts +3 -0
- package/dataflow/internal/process/process-uninteresting-leaf.js +3 -0
- package/dataflow/internal/process/process-value.d.ts +3 -0
- package/dataflow/internal/process/process-value.js +3 -0
- package/dataflow/origin/dfg-get-origin.d.ts +0 -2
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +5 -7
- package/dataflow/origin/dfg-get-symbol-refs.js +6 -8
- package/dataflow/processor.d.ts +0 -1
- package/dataflow/processor.js +0 -1
- package/documentation/data/dfg/doc-data-dfg-util.d.ts +6 -0
- package/documentation/data/dfg/doc-data-dfg-util.js +6 -0
- package/documentation/data/faq/faqs.d.ts +5 -0
- package/documentation/data/faq/faqs.js +78 -0
- package/documentation/data/faq/wiki-faq-store.d.ts +18 -0
- package/documentation/data/faq/wiki-faq-store.js +75 -0
- package/documentation/data/server/doc-data-server-messages.d.ts +3 -0
- package/documentation/data/server/doc-data-server-messages.js +4 -63
- package/documentation/doc-util/doc-auto-gen.d.ts +6 -0
- package/documentation/doc-util/doc-auto-gen.js +6 -0
- package/documentation/doc-util/doc-benchmarks.d.ts +12 -0
- package/documentation/doc-util/doc-benchmarks.js +12 -0
- package/documentation/doc-util/doc-cfg.d.ts +7 -1
- package/documentation/doc-util/doc-cfg.js +9 -0
- package/documentation/doc-util/doc-cli-option.d.ts +9 -0
- package/documentation/doc-util/doc-cli-option.js +9 -0
- package/documentation/doc-util/doc-code.d.ts +24 -0
- package/documentation/doc-util/doc-code.js +24 -0
- package/documentation/doc-util/doc-dfg.d.ts +7 -1
- package/documentation/doc-util/doc-dfg.js +9 -0
- package/documentation/doc-util/doc-env.d.ts +3 -0
- package/documentation/doc-util/doc-env.js +3 -0
- package/documentation/doc-util/doc-escape.d.ts +0 -1
- package/documentation/doc-util/doc-escape.js +0 -1
- package/documentation/doc-util/doc-files.d.ts +11 -0
- package/documentation/doc-util/doc-files.js +15 -4
- package/documentation/doc-util/doc-general.d.ts +6 -0
- package/documentation/doc-util/doc-general.js +6 -0
- package/documentation/doc-util/doc-normalized-ast.d.ts +7 -1
- package/documentation/doc-util/doc-normalized-ast.js +6 -0
- package/documentation/doc-util/doc-query.d.ts +15 -0
- package/documentation/doc-util/doc-query.js +17 -2
- package/documentation/doc-util/doc-repl.d.ts +6 -0
- package/documentation/doc-util/doc-repl.js +6 -0
- package/documentation/doc-util/doc-search.d.ts +15 -0
- package/documentation/doc-util/doc-search.js +17 -2
- package/documentation/doc-util/doc-server-message.d.ts +13 -1
- package/documentation/doc-util/doc-server-message.js +13 -1
- package/documentation/doc-util/doc-structure.d.ts +9 -0
- package/documentation/doc-util/doc-structure.js +10 -1
- package/documentation/doc-util/doc-types.d.ts +42 -0
- package/documentation/doc-util/doc-types.js +42 -0
- package/documentation/print-analyzer-wiki.js +4 -0
- package/documentation/print-core-wiki.d.ts +3 -0
- package/documentation/print-core-wiki.js +5 -2
- package/documentation/print-dataflow-graph-wiki.js +5 -5
- package/documentation/print-faq-wiki.js +3 -75
- package/documentation/print-interface-wiki.js +1 -1
- package/documentation/print-onboarding-wiki.js +1 -1
- package/documentation/print-query-wiki.js +4 -34
- package/documentation/print-readme.js +105 -0
- package/engines.d.ts +1 -1
- package/linter/linter-executor.d.ts +6 -3
- package/linter/linter-executor.js +3 -0
- package/linter/linter-format.d.ts +8 -0
- package/linter/linter-format.js +8 -0
- package/linter/rules/absolute-path.d.ts +3 -4
- package/linter/rules/dataframe-access-validation.d.ts +3 -4
- package/linter/rules/dataframe-access-validation.js +9 -11
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.d.ts +1 -1
- package/linter/rules/file-path-validity.d.ts +1 -2
- package/linter/rules/function-finder-util.d.ts +1 -2
- package/linter/rules/naming-convention.d.ts +13 -2
- package/linter/rules/naming-convention.js +13 -1
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/seeded-randomness.d.ts +1 -2
- package/linter/rules/unused-definition.d.ts +2 -3
- package/linter/rules/useless-loop.d.ts +1 -2
- package/package.json +2 -2
- package/project/cache/flowr-analyzer-cache.d.ts +2 -9
- package/project/cache/flowr-analyzer-cache.js +0 -6
- package/project/context/flowr-analyzer-context.d.ts +3 -6
- package/project/context/flowr-analyzer-dependencies-context.d.ts +0 -1
- package/project/context/flowr-analyzer-files-context.d.ts +2 -4
- package/project/context/flowr-file.d.ts +0 -1
- package/project/flowr-analyzer-builder.d.ts +1 -3
- package/project/flowr-analyzer-builder.js +5 -6
- package/project/flowr-analyzer.d.ts +34 -25
- package/project/flowr-analyzer.js +10 -11
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-description-file.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-description-file.js +0 -1
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +1 -1
- package/queries/base-query-format.d.ts +2 -2
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +3 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +3 -0
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +3 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +11 -2
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +9 -0
- package/queries/catalog/cluster-query/cluster-query-executor.d.ts +3 -0
- package/queries/catalog/cluster-query/cluster-query-executor.js +3 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/config-query/config-query-executor.d.ts +3 -0
- package/queries/catalog/config-query/config-query-executor.js +3 -0
- package/queries/catalog/config-query/config-query-format.d.ts +5 -2
- package/queries/catalog/config-query/config-query-format.js +13 -16
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +3 -0
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +3 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +3 -3
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +3 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +3 -0
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +3 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +4 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +7 -4
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +4 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +4 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +8 -4
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +10 -3
- package/queries/catalog/df-shape-query/df-shape-query-format.js +24 -5
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +3 -0
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +3 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-executor.d.ts +3 -0
- package/queries/catalog/id-map-query/id-map-query-executor.js +3 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +3 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
- package/queries/catalog/linter-query/linter-query-executor.d.ts +4 -0
- package/queries/catalog/linter-query/linter-query-executor.js +4 -0
- package/queries/catalog/linter-query/linter-query-format.d.ts +12 -3
- package/queries/catalog/linter-query/linter-query-format.js +67 -0
- package/queries/catalog/location-map-query/location-map-query-executor.d.ts +4 -0
- package/queries/catalog/location-map-query/location-map-query-executor.js +5 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +12 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +3 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +3 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.d.ts +7 -1
- package/queries/catalog/origin-query/origin-query-executor.js +6 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +7 -1
- package/queries/catalog/origin-query/origin-query-format.js +17 -1
- package/queries/catalog/project-query/project-query-executor.d.ts +3 -0
- package/queries/catalog/project-query/project-query-executor.js +3 -0
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +6 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +6 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +7 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +19 -1
- package/queries/catalog/search-query/search-query-executor.d.ts +3 -0
- package/queries/catalog/search-query/search-query-executor.js +3 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +9 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +9 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +7 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.js +17 -0
- package/queries/query-print.d.ts +20 -4
- package/queries/query-print.js +18 -2
- package/queries/query.d.ts +85 -55
- package/queries/query.js +35 -23
- package/queries/virtual-query/virtual-queries.d.ts +1 -2
- package/r-bridge/data/get.d.ts +6 -0
- package/r-bridge/data/get.js +6 -0
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/collect.js +0 -1
- package/r-bridge/lang-4.x/ast/model/model.d.ts +8 -11
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +3 -0
- package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +6 -7
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +6 -6
- package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/visitor.js +0 -1
- package/r-bridge/lang-4.x/ast/model/type.d.ts +4 -5
- package/r-bridge/lang-4.x/ast/model/type.js +4 -5
- package/r-bridge/lang-4.x/ast/model/versions.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/versions.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +4 -5
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-line-directive.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-line-directive.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +9 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +9 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +14 -5
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +13 -6
- package/r-bridge/lang-4.x/convert-values.d.ts +12 -1
- package/r-bridge/lang-4.x/convert-values.js +12 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +7 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +17 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +13 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +48 -19
- package/r-bridge/parser.d.ts +28 -7
- package/r-bridge/retriever.d.ts +16 -1
- package/r-bridge/retriever.js +15 -0
- package/r-bridge/shell-executor.d.ts +3 -3
- package/r-bridge/shell-executor.js +6 -1
- package/r-bridge/shell.d.ts +24 -23
- package/r-bridge/shell.js +37 -31
- package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
- package/reconstruct/auto-select/magic-comments.d.ts +1 -2
- package/reconstruct/auto-select/magic-comments.js +1 -2
- package/reconstruct/reconstruct.d.ts +1 -3
- package/reconstruct/reconstruct.js +0 -2
- package/search/flowr-search-builder.d.ts +12 -5
- package/search/flowr-search-builder.js +7 -2
- package/search/flowr-search-executor.d.ts +3 -3
- package/search/flowr-search-filters.d.ts +14 -1
- package/search/flowr-search-filters.js +13 -0
- package/search/flowr-search-printer.d.ts +6 -0
- package/search/flowr-search-printer.js +6 -0
- package/search/flowr-search-traverse.d.ts +1 -1
- package/search/flowr-search.d.ts +3 -3
- package/search/search-executor/search-enrichers.d.ts +9 -6
- package/search/search-executor/search-enrichers.js +3 -0
- package/search/search-executor/search-generators.d.ts +19 -10
- package/search/search-executor/search-generators.js +49 -2
- package/search/search-executor/search-mappers.d.ts +8 -5
- package/search/search-executor/search-mappers.js +3 -0
- package/search/search-executor/search-transformer.d.ts +19 -16
- package/search/search-executor/search-transformer.js +3 -0
- package/slicing/criterion/collect-all.d.ts +10 -10
- package/slicing/criterion/parse.d.ts +4 -2
- package/slicing/criterion/parse.js +4 -2
- package/slicing/static/fingerprint.d.ts +9 -1
- package/slicing/static/fingerprint.js +8 -0
- package/slicing/static/slice-call.d.ts +2 -2
- package/slicing/static/static-slicer.d.ts +8 -4
- package/slicing/static/static-slicer.js +5 -1
- package/slicing/static/visiting-queue.d.ts +1 -1
- package/statistics/features/common-syntax-probability.d.ts +10 -1
- package/statistics/features/common-syntax-probability.js +9 -0
- package/statistics/features/feature.d.ts +0 -4
- package/statistics/features/feature.js +0 -1
- package/statistics/features/post-processing.d.ts +6 -0
- package/statistics/features/post-processing.js +6 -0
- package/statistics/features/supported/assignments/post-process.d.ts +3 -0
- package/statistics/features/supported/assignments/post-process.js +3 -0
- package/statistics/features/supported/comments/post-process.d.ts +3 -0
- package/statistics/features/supported/comments/post-process.js +3 -0
- package/statistics/features/supported/control-flow/post-process.d.ts +3 -0
- package/statistics/features/supported/control-flow/post-process.js +3 -0
- package/statistics/features/supported/data-access/data-access.d.ts +1 -1
- package/statistics/features/supported/data-access/post-process.d.ts +3 -0
- package/statistics/features/supported/data-access/post-process.js +3 -0
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +1 -1
- package/statistics/features/supported/expression-list/post-process.d.ts +3 -0
- package/statistics/features/supported/expression-list/post-process.js +3 -0
- package/statistics/features/supported/loops/post-process.d.ts +3 -0
- package/statistics/features/supported/loops/post-process.js +3 -0
- package/statistics/features/supported/used-functions/used-functions.d.ts +1 -1
- package/statistics/features/supported/used-packages/post-process.d.ts +3 -0
- package/statistics/features/supported/used-packages/post-process.js +3 -0
- package/statistics/features/supported/values/post-process.d.ts +3 -0
- package/statistics/features/supported/values/post-process.js +3 -0
- package/statistics/features/supported/variables/post-process.d.ts +7 -1
- package/statistics/features/supported/variables/post-process.js +6 -0
- package/statistics/meta-statistics.d.ts +8 -9
- package/statistics/output/file-provider.d.ts +5 -6
- package/statistics/output/file-provider.js +5 -6
- package/statistics/output/print-stats.d.ts +13 -1
- package/statistics/output/print-stats.js +12 -0
- package/statistics/output/statistics-file.d.ts +1 -2
- package/statistics/output/statistics-file.js +0 -1
- package/statistics/statistics.d.ts +3 -4
- package/statistics/statistics.js +1 -2
- package/statistics/summarizer/auto-detect.d.ts +3 -0
- package/statistics/summarizer/auto-detect.js +3 -0
- package/statistics/summarizer/post-process/clusterer.d.ts +3 -4
- package/statistics/summarizer/post-process/clusterer.js +0 -2
- package/statistics/summarizer/post-process/file-based-count.d.ts +0 -1
- package/statistics/summarizer/post-process/file-based-count.js +0 -1
- package/statistics/summarizer/post-process/histogram.d.ts +0 -2
- package/statistics/summarizer/post-process/histogram.js +0 -2
- package/statistics/summarizer/post-process/post-process-output.d.ts +2 -4
- package/statistics/summarizer/post-process/post-process-output.js +0 -3
- package/statistics/summarizer/second-phase/process.d.ts +5 -3
- package/statistics/summarizer/second-phase/process.js +3 -1
- package/statistics/summarizer/summarizer.d.ts +1 -2
- package/util/assert.d.ts +52 -2
- package/util/assert.js +52 -2
- package/util/collections/arrays.d.ts +10 -5
- package/util/collections/arrays.js +10 -5
- package/util/collections/defaultmap.d.ts +11 -11
- package/util/collections/defaultmap.js +11 -11
- package/util/containers.d.ts +2 -7
- package/util/containers.js +0 -5
- package/util/diff-graph.d.ts +0 -1
- package/util/diff-graph.js +0 -1
- package/util/diff.d.ts +3 -1
- package/util/diff.js +3 -1
- package/util/files.d.ts +11 -11
- package/util/files.js +10 -10
- package/util/formats/adapter.d.ts +9 -0
- package/util/formats/adapter.js +9 -0
- package/util/formats/adapters/rmd-adapter.d.ts +10 -1
- package/util/formats/adapters/rmd-adapter.js +10 -1
- package/util/html-hover-over.d.ts +5 -0
- package/util/html-hover-over.js +5 -0
- package/util/json.d.ts +13 -0
- package/util/json.js +13 -0
- package/util/log.d.ts +2 -2
- package/util/log.js +2 -2
- package/util/mermaid/ast.d.ts +3 -0
- package/util/mermaid/ast.js +3 -0
- package/util/mermaid/cfg.d.ts +1 -1
- package/util/mermaid/dfg.d.ts +12 -4
- package/util/mermaid/dfg.js +9 -1
- package/util/mermaid/mermaid.d.ts +6 -1
- package/util/mermaid/mermaid.js +6 -1
- package/util/numbers.d.ts +7 -0
- package/util/numbers.js +7 -0
- package/util/objects.d.ts +0 -2
- package/util/os.d.ts +3 -0
- package/util/os.js +3 -0
- package/util/parallel.d.ts +4 -4
- package/util/parallel.js +4 -4
- package/util/prefix.d.ts +0 -1
- package/util/prefix.js +0 -1
- package/util/quads.d.ts +14 -17
- package/util/quads.js +3 -5
- package/util/r-value.d.ts +10 -1
- package/util/r-value.js +21 -0
- package/util/random.d.ts +3 -0
- package/util/random.js +3 -0
- package/util/range.d.ts +9 -3
- package/util/range.js +15 -2
- package/util/schema.d.ts +14 -1
- package/util/schema.js +15 -2
- package/util/simple-df/dfg-view.d.ts +4 -1
- package/util/simple-df/dfg-view.js +4 -1
- package/util/summarizer.d.ts +9 -1
- package/util/summarizer.js +9 -0
- package/util/text/ansi.d.ts +3 -0
- package/util/text/ansi.js +3 -0
- package/util/text/args.d.ts +2 -4
- package/util/text/args.js +7 -5
- package/util/text/text.d.ts +4 -0
- package/util/text/text.js +4 -0
- package/util/text/time.d.ts +0 -1
- package/util/text/time.js +0 -1
- package/util/version.d.ts +12 -3
- package/util/version.js +12 -3
- package/abstract-interpretation/data-frame/domain.d.ts +0 -107
- package/abstract-interpretation/data-frame/domain.js +0 -315
- package/abstract-interpretation/domains/set-bounded-set-domain.d.ts +0 -43
- package/abstract-interpretation/domains/set-bounded-set-domain.js +0 -164
- package/cli/repl/commands/repl-lineage.d.ts +0 -15
- package/cli/repl/commands/repl-lineage.js +0 -66
- package/cli/repl/server/messages/message-lineage.d.ts +0 -17
- package/cli/repl/server/messages/message-lineage.js +0 -25
- package/queries/catalog/lineage-query/lineage-query-executor.d.ts +0 -3
- package/queries/catalog/lineage-query/lineage-query-executor.js +0 -22
- package/queries/catalog/lineage-query/lineage-query-format.d.ts +0 -22
- package/queries/catalog/lineage-query/lineage-query-format.js +0 -31
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntervalDomain = void 0;
|
|
3
|
+
exports.IntervalDomain = exports.IntervalTop = void 0;
|
|
4
|
+
const assert_1 = require("../../util/assert");
|
|
5
|
+
const logic_1 = require("../../util/logic");
|
|
4
6
|
const abstract_domain_1 = require("./abstract-domain");
|
|
5
7
|
const lattice_1 = require("./lattice");
|
|
8
|
+
const satisfiable_domain_1 = require("./satisfiable-domain");
|
|
9
|
+
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
10
|
+
/** The Top element of the interval domain as interval [-∞, +∞] */
|
|
11
|
+
exports.IntervalTop = [-Infinity, +Infinity];
|
|
6
12
|
/**
|
|
7
13
|
* The interval abstract domain as intervals with possibly infinite bounds representing possible numeric values.
|
|
8
14
|
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the interval [-∞, +∞].
|
|
9
15
|
* @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
|
|
10
16
|
*/
|
|
11
|
-
class IntervalDomain {
|
|
12
|
-
_value;
|
|
17
|
+
class IntervalDomain extends abstract_domain_1.AbstractDomain {
|
|
13
18
|
constructor(value) {
|
|
14
19
|
if (Array.isArray(value)) {
|
|
15
20
|
if (value.some(isNaN) || value[0] > value[1] || value[0] === +Infinity || value[1] === -Infinity) {
|
|
16
|
-
|
|
21
|
+
super(lattice_1.Bottom);
|
|
17
22
|
}
|
|
18
23
|
else {
|
|
19
|
-
|
|
24
|
+
super([value[0], value[1]]);
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
else {
|
|
23
|
-
|
|
28
|
+
super(value);
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
return
|
|
31
|
+
create(value) {
|
|
32
|
+
return new IntervalDomain(value);
|
|
28
33
|
}
|
|
29
34
|
static top() {
|
|
30
|
-
return new IntervalDomain(
|
|
35
|
+
return new IntervalDomain(exports.IntervalTop);
|
|
31
36
|
}
|
|
32
37
|
static bottom() {
|
|
33
38
|
return new IntervalDomain(lattice_1.Bottom);
|
|
@@ -53,45 +58,39 @@ class IntervalDomain {
|
|
|
53
58
|
leq(other) {
|
|
54
59
|
return this.value === lattice_1.Bottom || (other.isValue() && other.value[0] <= this.value[0] && this.value[1] <= other.value[1]);
|
|
55
60
|
}
|
|
56
|
-
join(
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
result._value = [Math.min(result.value[0], other.value[0]), Math.max(result.value[1], other.value[1])];
|
|
67
|
-
}
|
|
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])]);
|
|
68
71
|
}
|
|
69
|
-
return result;
|
|
70
72
|
}
|
|
71
|
-
meet(
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
result._value = [Math.max(this.value[0], other.value[0]), Math.min(this.value[1], other.value[1])];
|
|
82
|
-
}
|
|
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 if (Math.max(this.value[0], otherValue[0]) > Math.min(this.value[1], otherValue[1])) {
|
|
79
|
+
return this.bottom();
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return this.create([Math.max(this.value[0], otherValue[0]), Math.min(this.value[1], otherValue[1])]);
|
|
83
83
|
}
|
|
84
|
-
return result;
|
|
85
84
|
}
|
|
86
85
|
widen(other) {
|
|
87
86
|
if (this.value === lattice_1.Bottom) {
|
|
88
|
-
return
|
|
87
|
+
return this.create(other.value);
|
|
89
88
|
}
|
|
90
89
|
else if (other.value === lattice_1.Bottom) {
|
|
91
|
-
return
|
|
90
|
+
return this.create(this.value);
|
|
92
91
|
}
|
|
93
92
|
else {
|
|
94
|
-
return
|
|
93
|
+
return this.create([
|
|
95
94
|
this.value[0] <= other.value[0] ? this.value[0] : -Infinity,
|
|
96
95
|
this.value[1] >= other.value[1] ? this.value[1] : +Infinity
|
|
97
96
|
]);
|
|
@@ -101,12 +100,15 @@ class IntervalDomain {
|
|
|
101
100
|
if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
|
|
102
101
|
return this.bottom();
|
|
103
102
|
}
|
|
104
|
-
|
|
103
|
+
else if (Math.max(this.value[0], other.value[0]) > Math.min(this.value[1], other.value[1])) {
|
|
104
|
+
return this.bottom();
|
|
105
|
+
}
|
|
106
|
+
return this.create([
|
|
105
107
|
this.value[0] === -Infinity ? other.value[0] : this.value[0],
|
|
106
108
|
this.value[1] === +Infinity ? other.value[1] : this.value[1]
|
|
107
109
|
]);
|
|
108
110
|
}
|
|
109
|
-
concretize(limit
|
|
111
|
+
concretize(limit) {
|
|
110
112
|
if (this.value === lattice_1.Bottom) {
|
|
111
113
|
return new Set();
|
|
112
114
|
}
|
|
@@ -122,48 +124,99 @@ class IntervalDomain {
|
|
|
122
124
|
abstract(concrete) {
|
|
123
125
|
return IntervalDomain.abstract(concrete);
|
|
124
126
|
}
|
|
127
|
+
satisfies(value, comparator = satisfiable_domain_1.NumericalComparator.Equal) {
|
|
128
|
+
switch (comparator) {
|
|
129
|
+
case satisfiable_domain_1.NumericalComparator.Equal: {
|
|
130
|
+
if (this.isValue() && this.value[0] <= value && value <= this.value[1]) {
|
|
131
|
+
return this.value[0] === this.value[1] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
return logic_1.Ternary.Never;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
case satisfiable_domain_1.NumericalComparator.Less: {
|
|
138
|
+
if (this.isValue() && value < this.value[1]) {
|
|
139
|
+
return value < this.value[0] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
return logic_1.Ternary.Never;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
case satisfiable_domain_1.NumericalComparator.LessOrEqual: {
|
|
146
|
+
if (this.isValue() && value <= this.value[1]) {
|
|
147
|
+
return value <= this.value[0] ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
return logic_1.Ternary.Never;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
case satisfiable_domain_1.NumericalComparator.Greater: {
|
|
154
|
+
if (this.isValue() && this.value[0] <= value) {
|
|
155
|
+
return this.value[1] <= value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
return logic_1.Ternary.Never;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
case satisfiable_domain_1.NumericalComparator.GreaterOrEqual: {
|
|
162
|
+
if (this.isValue() && this.value[0] < value) {
|
|
163
|
+
return this.value[1] < value ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
return logic_1.Ternary.Never;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
default: {
|
|
170
|
+
(0, assert_1.assertUnreachable)(comparator);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
125
174
|
/**
|
|
126
175
|
* Adds another abstract value to the current abstract value by adding the two lower and upper bounds, respectively.
|
|
127
176
|
*/
|
|
128
177
|
add(other) {
|
|
129
|
-
|
|
178
|
+
const otherValue = other instanceof IntervalDomain ? other.value : other;
|
|
179
|
+
if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
|
|
130
180
|
return this.bottom();
|
|
131
181
|
}
|
|
132
182
|
else {
|
|
133
|
-
return
|
|
183
|
+
return this.create([this.value[0] + otherValue[0], this.value[1] + otherValue[1]]);
|
|
134
184
|
}
|
|
135
185
|
}
|
|
136
186
|
/**
|
|
137
187
|
* Subtracts another abstract value from the current abstract value by subtracting the two lower and upper bounds from each other, respectively.
|
|
138
188
|
*/
|
|
139
189
|
subtract(other) {
|
|
140
|
-
|
|
190
|
+
const otherValue = other instanceof IntervalDomain ? other.value : other;
|
|
191
|
+
if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
|
|
141
192
|
return this.bottom();
|
|
142
193
|
}
|
|
143
194
|
else {
|
|
144
|
-
return
|
|
195
|
+
return this.create([this.value[0] - otherValue[0], this.value[1] - otherValue[1]]);
|
|
145
196
|
}
|
|
146
197
|
}
|
|
147
198
|
/**
|
|
148
199
|
* Creates the minimum between the current abstract value and another abstract value by creating the minimum of the two lower and upper bounds, respectively.
|
|
149
200
|
*/
|
|
150
201
|
min(other) {
|
|
151
|
-
|
|
202
|
+
const otherValue = other instanceof IntervalDomain ? other.value : other;
|
|
203
|
+
if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
|
|
152
204
|
return this.bottom();
|
|
153
205
|
}
|
|
154
206
|
else {
|
|
155
|
-
return
|
|
207
|
+
return this.create([Math.min(this.value[0], otherValue[0]), Math.min(this.value[1], otherValue[1])]);
|
|
156
208
|
}
|
|
157
209
|
}
|
|
158
210
|
/**
|
|
159
211
|
* Creates the maximum between the current abstract value and another abstract value by creating the maximum of the two lower and upper bounds, respectively.
|
|
160
212
|
*/
|
|
161
213
|
max(other) {
|
|
162
|
-
|
|
214
|
+
const otherValue = other instanceof IntervalDomain ? other.value : other;
|
|
215
|
+
if (this.value === lattice_1.Bottom || otherValue === lattice_1.Bottom) {
|
|
163
216
|
return this.bottom();
|
|
164
217
|
}
|
|
165
218
|
else {
|
|
166
|
-
return
|
|
219
|
+
return this.create([Math.max(this.value[0], otherValue[0]), Math.max(this.value[1], otherValue[1])]);
|
|
167
220
|
}
|
|
168
221
|
}
|
|
169
222
|
/**
|
|
@@ -174,7 +227,7 @@ class IntervalDomain {
|
|
|
174
227
|
return this.bottom();
|
|
175
228
|
}
|
|
176
229
|
else {
|
|
177
|
-
return
|
|
230
|
+
return this.create([-Infinity, this.value[1]]);
|
|
178
231
|
}
|
|
179
232
|
}
|
|
180
233
|
/**
|
|
@@ -185,8 +238,14 @@ class IntervalDomain {
|
|
|
185
238
|
return this.bottom();
|
|
186
239
|
}
|
|
187
240
|
else {
|
|
188
|
-
return
|
|
241
|
+
return this.create([this.value[0], +Infinity]);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
toJson() {
|
|
245
|
+
if (this.value === lattice_1.Bottom) {
|
|
246
|
+
return this.value.description;
|
|
189
247
|
}
|
|
248
|
+
return this.value;
|
|
190
249
|
}
|
|
191
250
|
toString() {
|
|
192
251
|
if (this.value === lattice_1.Bottom) {
|
|
@@ -9,39 +9,47 @@ export declare const Bottom: unique symbol;
|
|
|
9
9
|
/**
|
|
10
10
|
* A complete lattice with a partially ordered set, join operator (LUB), meet operator (GLB), top element, and bottom element (e.g. for abstract domains).
|
|
11
11
|
* @template Value - Type of a lattice element representing a value (may exclude `Top` and `Bot`)
|
|
12
|
-
* @template Top - Type of the Top element (greatest element) of the complete lattice
|
|
13
|
-
* @template Bot - Type of the Bottom element (least element) of the complete lattice
|
|
12
|
+
* @template Top - Type of the Top element (greatest element) of the complete lattice
|
|
13
|
+
* @template Bot - Type of the Bottom element (least element) of the complete lattice
|
|
14
14
|
* @template Lift - Type of the lattice elements (defaults to `Value` or `Top` or `Bot`)
|
|
15
15
|
*/
|
|
16
|
-
export interface Lattice<Value, Top
|
|
16
|
+
export interface Lattice<Value, Top, Bot, Lift extends Value | Top | Bot = Value | Top | Bot> {
|
|
17
17
|
/**
|
|
18
18
|
* The current abstract value of the lattice.
|
|
19
19
|
*/
|
|
20
20
|
get value(): Lift;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an abstract value of the lattice for a given value.
|
|
23
|
+
*/
|
|
24
|
+
create(value: Value | Top | Bot): this;
|
|
21
25
|
/**
|
|
22
26
|
* Gets the Top element (greatest element) of the complete lattice (should additionally be provided as static function).
|
|
23
27
|
*/
|
|
24
|
-
top(): Lattice<Value, Top, Bot, Top>;
|
|
28
|
+
top(): this & Lattice<Value, Top, Bot, Top>;
|
|
25
29
|
/**
|
|
26
30
|
* Gets the Bottom element (least element) of the complete lattice (should additionally be provided as static function).
|
|
27
31
|
*/
|
|
28
|
-
bottom(): Lattice<Value, Top, Bot, Bot>;
|
|
32
|
+
bottom(): this & Lattice<Value, Top, Bot, Bot>;
|
|
29
33
|
/**
|
|
30
34
|
* Checks whether the current abstract value equals to another abstract value.
|
|
31
35
|
*/
|
|
32
|
-
equals(other:
|
|
36
|
+
equals(other: this): boolean;
|
|
33
37
|
/**
|
|
34
38
|
* Checks whether the current abstract value is less than or equal to another abstract value with respect to the partial order of the lattice.
|
|
35
39
|
*/
|
|
36
|
-
leq(other:
|
|
40
|
+
leq(other: this): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Joins the current abstract value with another abstract value by creating the least upper bound (LUB) in the lattice.
|
|
43
|
+
*/
|
|
44
|
+
join(other: this): this;
|
|
37
45
|
/**
|
|
38
|
-
*
|
|
46
|
+
* Meets the current abstract value with another abstract value by creating the greatest lower bound (GLB) in the lattice.
|
|
39
47
|
*/
|
|
40
|
-
|
|
48
|
+
meet(other: this): this;
|
|
41
49
|
/**
|
|
42
|
-
*
|
|
50
|
+
* Converts the lattice into a JSON serializable value.
|
|
43
51
|
*/
|
|
44
|
-
|
|
52
|
+
toJson(): unknown;
|
|
45
53
|
/**
|
|
46
54
|
* Converts the lattice into a human-readable string.
|
|
47
55
|
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AbstractDomain, type AnyAbstractDomain, type ConcreteDomain } from './abstract-domain';
|
|
2
|
+
import { Top } from './lattice';
|
|
3
|
+
/** The type of the concrete mapping of the concrete domain of a mapped abstract domain mapping keys to a concrete value in the concrete domain */
|
|
4
|
+
type ConcreteMap<Key, Domain extends AnyAbstractDomain> = ReadonlyMap<Key, ConcreteDomain<Domain>>;
|
|
5
|
+
/**
|
|
6
|
+
* A mapped abstract domain as mapping of keys to abstract values of an abstract domain.
|
|
7
|
+
* The Bottom element is defined as empty mapping and the Top element is defined as mapping every existing key to Top.
|
|
8
|
+
* @template Key - Type of the keys of the mapping to abstract values
|
|
9
|
+
* @template Domain - Type of the abstract domain to map the keys to
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class MappedAbstractDomain<Key, Domain extends AnyAbstractDomain> extends AbstractDomain<ConcreteMap<Key, Domain>, ReadonlyMap<Key, Domain>, ReadonlyMap<Key, Domain>, ReadonlyMap<Key, Domain>> {
|
|
12
|
+
constructor(value: ReadonlyMap<Key, Domain>);
|
|
13
|
+
abstract create(value: ReadonlyMap<Key, Domain>): this;
|
|
14
|
+
get(key: Key): Domain | undefined;
|
|
15
|
+
has(key: Key): boolean;
|
|
16
|
+
set(key: Key, value: Domain): void;
|
|
17
|
+
protected remove(key: Key): void;
|
|
18
|
+
bottom(): this;
|
|
19
|
+
top(): this;
|
|
20
|
+
equals(other: this): boolean;
|
|
21
|
+
leq(other: this): boolean;
|
|
22
|
+
join(other: this): this;
|
|
23
|
+
meet(other: this): this;
|
|
24
|
+
widen(other: this): this;
|
|
25
|
+
narrow(other: this): this;
|
|
26
|
+
concretize(limit: number): ReadonlySet<ConcreteMap<Key, Domain>> | typeof Top;
|
|
27
|
+
abstract(concrete: ReadonlySet<ConcreteMap<Key, Domain>> | typeof Top): this;
|
|
28
|
+
toJson(): unknown;
|
|
29
|
+
toString(): string;
|
|
30
|
+
isTop(): this is this;
|
|
31
|
+
isBottom(): this is this;
|
|
32
|
+
isValue(): this is this;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MappedAbstractDomain = void 0;
|
|
4
|
+
const abstract_domain_1 = require("./abstract-domain");
|
|
5
|
+
const lattice_1 = require("./lattice");
|
|
6
|
+
/**
|
|
7
|
+
* A mapped abstract domain as mapping of keys to abstract values of an abstract domain.
|
|
8
|
+
* The Bottom element is defined as empty mapping and the Top element is defined as mapping every existing key to Top.
|
|
9
|
+
* @template Key - Type of the keys of the mapping to abstract values
|
|
10
|
+
* @template Domain - Type of the abstract domain to map the keys to
|
|
11
|
+
*/
|
|
12
|
+
class MappedAbstractDomain extends abstract_domain_1.AbstractDomain {
|
|
13
|
+
constructor(value) {
|
|
14
|
+
super(new Map(value));
|
|
15
|
+
}
|
|
16
|
+
get(key) {
|
|
17
|
+
return this._value.get(key);
|
|
18
|
+
}
|
|
19
|
+
has(key) {
|
|
20
|
+
return this._value.has(key);
|
|
21
|
+
}
|
|
22
|
+
set(key, value) {
|
|
23
|
+
this._value.set(key, value);
|
|
24
|
+
}
|
|
25
|
+
remove(key) {
|
|
26
|
+
this._value.delete(key);
|
|
27
|
+
}
|
|
28
|
+
bottom() {
|
|
29
|
+
return this.create(new Map());
|
|
30
|
+
}
|
|
31
|
+
top() {
|
|
32
|
+
const result = this.create(this.value);
|
|
33
|
+
for (const [key, value] of result.value) {
|
|
34
|
+
result.set(key, value.top());
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
equals(other) {
|
|
39
|
+
if (this.value === other.value) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
else if (this.value.size !== other.value.size) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
for (const [key, value] of this.value) {
|
|
46
|
+
const otherValue = other.get(key);
|
|
47
|
+
if (otherValue === undefined || !value.equals(otherValue)) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
leq(other) {
|
|
54
|
+
if (this.value === other.value) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
else if (this.value.size > other.value.size) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
for (const [key, value] of this.value) {
|
|
61
|
+
const otherValue = other.get(key);
|
|
62
|
+
if (otherValue === undefined || !value.leq(otherValue)) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
join(other) {
|
|
69
|
+
const result = this.create(this.value);
|
|
70
|
+
for (const [key, value] of other.value) {
|
|
71
|
+
const currValue = result.get(key);
|
|
72
|
+
if (currValue === undefined) {
|
|
73
|
+
result.set(key, value);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
result.set(key, currValue.join(value));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
meet(other) {
|
|
82
|
+
const result = this.create(this.value);
|
|
83
|
+
for (const [key] of result.value) {
|
|
84
|
+
if (!other.has(key)) {
|
|
85
|
+
result.remove(key);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
for (const [key, value] of other.value) {
|
|
89
|
+
const currValue = result.get(key);
|
|
90
|
+
if (currValue !== undefined) {
|
|
91
|
+
result.set(key, currValue.meet(value));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
widen(other) {
|
|
97
|
+
const result = this.create(this.value);
|
|
98
|
+
for (const [key, value] of other.value) {
|
|
99
|
+
const currValue = result.get(key);
|
|
100
|
+
if (currValue === undefined) {
|
|
101
|
+
result.set(key, value);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
result.set(key, currValue.widen(value));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
narrow(other) {
|
|
110
|
+
const result = this.create(this.value);
|
|
111
|
+
for (const [key] of this.value) {
|
|
112
|
+
if (!other.has(key)) {
|
|
113
|
+
result.remove(key);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const [key, value] of other.value) {
|
|
117
|
+
const currValue = result.get(key);
|
|
118
|
+
if (currValue !== undefined) {
|
|
119
|
+
result.set(key, currValue.narrow(value));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
concretize(limit) {
|
|
125
|
+
if (this.value.values().some(value => value.isBottom())) {
|
|
126
|
+
return new Set();
|
|
127
|
+
}
|
|
128
|
+
let states = new Set([new Map()]);
|
|
129
|
+
for (const [key, value] of this.value) {
|
|
130
|
+
const concreteValues = value.concretize(limit);
|
|
131
|
+
if (concreteValues === lattice_1.Top) {
|
|
132
|
+
return lattice_1.Top;
|
|
133
|
+
}
|
|
134
|
+
const newStates = new Set();
|
|
135
|
+
for (const state of states) {
|
|
136
|
+
for (const concrete of concreteValues) {
|
|
137
|
+
if (newStates.size > limit) {
|
|
138
|
+
return lattice_1.Top;
|
|
139
|
+
}
|
|
140
|
+
const map = new Map(state);
|
|
141
|
+
map.set(key, concrete);
|
|
142
|
+
newStates.add(map);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
states = newStates;
|
|
146
|
+
}
|
|
147
|
+
return states;
|
|
148
|
+
}
|
|
149
|
+
abstract(concrete) {
|
|
150
|
+
const entry = [...this.value.values()][0];
|
|
151
|
+
if (concrete === lattice_1.Top || entry === undefined) {
|
|
152
|
+
return this.create(new Map());
|
|
153
|
+
}
|
|
154
|
+
const mappings = new Map();
|
|
155
|
+
for (const state of concrete) {
|
|
156
|
+
for (const [key, value] of state) {
|
|
157
|
+
const mapping = mappings.get(key);
|
|
158
|
+
if (mapping === undefined) {
|
|
159
|
+
mappings.set(key, new Set([value]));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
mapping.add(value);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const result = new Map();
|
|
167
|
+
for (const [key, values] of mappings) {
|
|
168
|
+
result.set(key, entry.abstract(values));
|
|
169
|
+
}
|
|
170
|
+
return this.create(result);
|
|
171
|
+
}
|
|
172
|
+
toJson() {
|
|
173
|
+
return Object.fromEntries(this.value.entries().map(([key, value]) => [key, value.toJson()]));
|
|
174
|
+
}
|
|
175
|
+
toString() {
|
|
176
|
+
return '(' + this.value.entries().toArray().map(([key, value]) => `${(0, abstract_domain_1.domainElementToString)(key)} -> ${value.toString()}`).join(', ') + ')';
|
|
177
|
+
}
|
|
178
|
+
isTop() {
|
|
179
|
+
return this.value.size > 0 && this.value.values().every(value => value.isTop());
|
|
180
|
+
}
|
|
181
|
+
isBottom() {
|
|
182
|
+
return this.value.size === 0;
|
|
183
|
+
}
|
|
184
|
+
isValue() {
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.MappedAbstractDomain = MappedAbstractDomain;
|
|
189
|
+
//# sourceMappingURL=mapped-abstract-domain.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { IntervalDomain } from './interval-domain';
|
|
2
2
|
import { Bottom, Top } from './lattice';
|
|
3
|
+
/** The Top element of the positive interval domain as interval [0, +∞] */
|
|
4
|
+
export declare const PosIntervalTop: PosIntervalValue;
|
|
3
5
|
/** The type of the actual values of the positive interval domain as tuple of the lower and upper bound */
|
|
4
|
-
|
|
5
|
-
/** The type of the Top element of the positive interval domain as interval [0, +∞]
|
|
6
|
-
|
|
6
|
+
type PosIntervalValue = readonly [lower: number, upper: number];
|
|
7
|
+
/** The type of the Top element of the positive interval domain as interval [0, +∞] */
|
|
8
|
+
type PosIntervalTop = typeof PosIntervalTop;
|
|
7
9
|
/** The type of the Bottom element of the positive interval domain as {@link Bottom} symbol */
|
|
8
|
-
|
|
10
|
+
type PosIntervalBottom = typeof Bottom;
|
|
9
11
|
/** The type of the abstract values of the positive interval domain that are Top, Bottom, or actual values */
|
|
10
|
-
|
|
12
|
+
type PosIntervalLift = PosIntervalValue | PosIntervalBottom;
|
|
11
13
|
/**
|
|
12
14
|
* The positive interval abstract domain as positive intervals with possibly zero lower bounds and infinite upper bounds representing possible numeric values.
|
|
13
15
|
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the interval [0, +∞].
|
|
@@ -15,18 +17,20 @@ export type PosIntervalLift = PosIntervalValue | PosIntervalTop | PosIntervalBot
|
|
|
15
17
|
*/
|
|
16
18
|
export declare class PosIntervalDomain<Value extends PosIntervalLift = PosIntervalLift> extends IntervalDomain<Value> {
|
|
17
19
|
constructor(value: Value);
|
|
20
|
+
create(value: PosIntervalLift): this;
|
|
18
21
|
static top(): PosIntervalDomain<PosIntervalTop>;
|
|
19
22
|
static bottom(): PosIntervalDomain<PosIntervalBottom>;
|
|
20
23
|
static abstract(concrete: ReadonlySet<number> | typeof Top): PosIntervalDomain;
|
|
21
|
-
top(): PosIntervalDomain<PosIntervalTop>;
|
|
22
|
-
bottom(): PosIntervalDomain<PosIntervalBottom>;
|
|
23
|
-
widen(other:
|
|
24
|
-
narrow(other:
|
|
25
|
-
abstract(concrete: ReadonlySet<number> | typeof Top):
|
|
26
|
-
subtract(other:
|
|
24
|
+
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;
|
|
29
|
+
subtract(other: this | PosIntervalLift): this;
|
|
27
30
|
/**
|
|
28
31
|
* Extends the lower bound of the current abstract value down to 0.
|
|
29
32
|
*/
|
|
30
|
-
extendDown():
|
|
33
|
+
extendDown(): this;
|
|
31
34
|
isTop(): this is PosIntervalDomain<PosIntervalTop>;
|
|
32
35
|
}
|
|
36
|
+
export {};
|