@eagleoutice/flowr 2.6.2 → 2.7.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 +36 -34
- package/abstract-interpretation/data-frame/absint-visitor.d.ts +1 -1
- package/abstract-interpretation/data-frame/absint-visitor.js +6 -6
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +4 -7
- package/abstract-interpretation/data-frame/dataframe-domain.js +5 -11
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +3 -2
- package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +3 -2
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +28 -24
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +3 -2
- package/abstract-interpretation/data-frame/semantics.js +54 -41
- package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
- package/abstract-interpretation/data-frame/shape-inference.js +3 -3
- package/abstract-interpretation/domains/abstract-domain.d.ts +1 -0
- package/abstract-interpretation/domains/abstract-domain.js +3 -2
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
- package/abstract-interpretation/domains/interval-domain.d.ts +2 -2
- package/abstract-interpretation/domains/interval-domain.js +3 -6
- package/abstract-interpretation/domains/lattice.d.ts +2 -0
- package/abstract-interpretation/domains/lattice.js +3 -1
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -1
- package/abstract-interpretation/domains/positive-interval-domain.js +1 -1
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +2 -2
- package/abstract-interpretation/domains/satisfiable-domain.js +2 -2
- package/abstract-interpretation/domains/set-range-domain.d.ts +98 -0
- package/abstract-interpretation/domains/set-range-domain.js +400 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.js +2 -2
- package/abstract-interpretation/domains/singleton-domain.js +2 -2
- package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
- package/benchmark/slicer.d.ts +3 -1
- package/benchmark/slicer.js +50 -27
- package/benchmark/stats/print.js +8 -5
- package/benchmark/stats/stats.d.ts +3 -2
- package/benchmark/summarizer/data.d.ts +11 -8
- package/benchmark/summarizer/first-phase/process.js +12 -9
- package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
- package/benchmark/summarizer/second-phase/graph.js +3 -1
- package/benchmark/summarizer/second-phase/process.js +24 -18
- package/cli/export-quads-app.js +1 -1
- package/cli/repl/commands/repl-dataflow.js +2 -1
- package/cli/repl/commands/repl-parse.js +16 -4
- package/cli/repl/commands/repl-query.js +1 -1
- package/cli/repl/core.js +16 -13
- package/cli/repl/server/connection.js +2 -1
- package/cli/script-core/statistics-helper-core.js +2 -1
- package/cli/slicer-app.js +3 -4
- package/cli/wiki.d.ts +4 -0
- package/cli/wiki.js +165 -0
- package/config.d.ts +4 -0
- package/config.js +6 -0
- package/control-flow/cfg-dead-code.js +14 -3
- package/control-flow/cfg-simplification.d.ts +5 -2
- package/control-flow/cfg-simplification.js +3 -0
- package/control-flow/extract-cfg.d.ts +9 -3
- package/control-flow/extract-cfg.js +44 -4
- package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -2
- package/control-flow/simple-visitor.js +2 -2
- package/control-flow/useless-loop.d.ts +3 -3
- package/control-flow/useless-loop.js +16 -5
- package/core/pipeline-executor.d.ts +3 -6
- package/core/pipeline-executor.js +4 -7
- package/core/print/normalize-printer.d.ts +1 -1
- package/core/print/normalize-printer.js +2 -2
- package/core/steps/all/core/00-parse.d.ts +1 -1
- package/core/steps/all/core/00-parse.js +1 -1
- package/core/steps/all/core/10-normalize.d.ts +3 -9
- package/core/steps/all/core/10-normalize.js +1 -16
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -3
- package/core/steps/all/core/11-normalize-tree-sitter.js +2 -3
- package/core/steps/all/core/20-dataflow.d.ts +3 -4
- package/core/steps/all/core/20-dataflow.js +2 -2
- package/core/steps/all/static-slicing/00-slice.d.ts +4 -2
- package/core/steps/all/static-slicing/00-slice.js +3 -2
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +8 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +4 -1
- package/core/steps/pipeline/default-pipelines.d.ts +94 -95
- package/core/steps/pipeline/default-pipelines.js +8 -8
- package/dataflow/cluster.js +2 -2
- package/dataflow/environments/append.d.ts +5 -0
- package/dataflow/environments/append.js +6 -20
- package/dataflow/environments/built-in.d.ts +2 -1
- package/dataflow/environments/clone.d.ts +1 -2
- package/dataflow/environments/clone.js +3 -17
- package/dataflow/environments/define.d.ts +7 -3
- package/dataflow/environments/define.js +9 -56
- package/dataflow/environments/diff.js +3 -3
- package/dataflow/environments/environment.d.ts +48 -28
- package/dataflow/environments/environment.js +187 -62
- package/dataflow/environments/overwrite.d.ts +1 -5
- package/dataflow/environments/overwrite.js +2 -61
- package/dataflow/environments/reference-to-maybe.d.ts +13 -0
- package/dataflow/environments/reference-to-maybe.js +54 -0
- package/dataflow/environments/resolve-by-name.d.ts +6 -1
- package/dataflow/environments/resolve-by-name.js +56 -4
- package/dataflow/environments/scoping.d.ts +8 -4
- package/dataflow/environments/scoping.js +13 -9
- package/dataflow/eval/resolve/alias-tracking.d.ts +10 -4
- package/dataflow/eval/resolve/alias-tracking.js +15 -13
- package/dataflow/eval/resolve/resolve-argument.d.ts +2 -1
- package/dataflow/eval/resolve/resolve-argument.js +10 -10
- package/dataflow/eval/resolve/resolve.d.ts +13 -11
- package/dataflow/eval/resolve/resolve.js +16 -15
- package/dataflow/eval/values/string/string-constants.d.ts +9 -3
- package/dataflow/eval/values/string/string-constants.js +9 -3
- package/dataflow/extractor.d.ts +2 -3
- package/dataflow/extractor.js +25 -28
- package/dataflow/fn/higher-order-function.d.ts +2 -1
- package/dataflow/fn/higher-order-function.js +4 -4
- package/dataflow/graph/dataflowgraph-builder.d.ts +9 -5
- package/dataflow/graph/dataflowgraph-builder.js +21 -11
- package/dataflow/graph/diff-dataflow-graph.js +2 -2
- package/dataflow/graph/graph.d.ts +13 -11
- package/dataflow/graph/graph.js +40 -24
- package/dataflow/graph/invert-dfg.d.ts +3 -2
- package/dataflow/graph/invert-dfg.js +3 -3
- package/dataflow/graph/resolve-graph.d.ts +2 -1
- package/dataflow/graph/resolve-graph.js +2 -2
- package/dataflow/graph/unknown-replacement.d.ts +4 -2
- package/dataflow/graph/unknown-replacement.js +4 -2
- package/dataflow/graph/vertex.d.ts +3 -3
- package/dataflow/graph/vertex.js +3 -3
- package/dataflow/info.d.ts +8 -1
- package/dataflow/info.js +21 -0
- package/dataflow/internal/linker.js +10 -11
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -2
- package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -3
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +7 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +12 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +10 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +10 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +8 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +15 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +78 -75
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -5
- package/dataflow/internal/process/functions/call/common.d.ts +1 -1
- package/dataflow/internal/process/functions/call/common.js +6 -7
- package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -1
- package/dataflow/internal/process/functions/call/default-call-handling.js +3 -1
- package/dataflow/internal/process/functions/call/known-call-handling.js +4 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +1 -1
- package/dataflow/internal/process/functions/process-argument.js +1 -1
- package/dataflow/internal/process/functions/process-parameter.js +4 -4
- package/dataflow/internal/process/process-symbol.js +1 -1
- package/dataflow/internal/process/process-value.d.ts +1 -1
- package/dataflow/internal/process/process-value.js +7 -7
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -1
- package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
- package/dataflow/processor.d.ts +7 -16
- package/documentation/data/dfg/doc-data-dfg-util.d.ts +0 -2
- package/documentation/data/faq/faqs.js +27 -18
- package/documentation/data/faq/recommended-configs.d.ts +36 -0
- package/documentation/data/faq/recommended-configs.js +40 -0
- package/documentation/data/faq/wiki-faq-store.d.ts +1 -0
- package/documentation/data/faq/wiki-faq-store.js +10 -2
- package/documentation/data/server/doc-data-server-messages.js +1 -1
- package/documentation/doc-capabilities.d.ts +9 -0
- package/documentation/{print-capabilities-markdown.js → doc-capabilities.js} +18 -21
- package/documentation/doc-readme.d.ts +9 -0
- package/documentation/{print-readme.js → doc-readme.js} +31 -35
- package/documentation/doc-util/doc-benchmarks.d.ts +6 -4
- package/documentation/doc-util/doc-benchmarks.js +6 -4
- package/documentation/doc-util/doc-cfg.js +5 -8
- package/documentation/doc-util/doc-dfg.d.ts +7 -7
- package/documentation/doc-util/doc-dfg.js +15 -14
- package/documentation/doc-util/doc-escape.d.ts +6 -0
- package/documentation/doc-util/doc-escape.js +11 -0
- package/documentation/doc-util/doc-general.d.ts +22 -2
- package/documentation/doc-util/doc-general.js +22 -2
- package/documentation/doc-util/doc-normalized-ast.d.ts +10 -5
- package/documentation/doc-util/doc-normalized-ast.js +14 -10
- package/documentation/doc-util/doc-query.d.ts +12 -4
- package/documentation/doc-util/doc-query.js +18 -11
- package/documentation/doc-util/doc-search.d.ts +0 -30
- package/documentation/doc-util/doc-search.js +2 -73
- package/documentation/doc-util/doc-server-message.d.ts +5 -5
- package/documentation/doc-util/doc-server-message.js +4 -4
- package/documentation/doc-util/doc-types.d.ts +69 -32
- package/documentation/doc-util/doc-types.js +109 -62
- package/documentation/index.d.ts +9 -9
- package/documentation/index.js +9 -9
- package/documentation/issue-linting-rule.d.ts +9 -0
- package/documentation/{print-linter-issue.js → issue-linting-rule.js} +20 -23
- package/documentation/wiki-analyzer.d.ts +9 -0
- package/documentation/wiki-analyzer.js +425 -0
- package/documentation/wiki-cfg.d.ts +9 -0
- package/documentation/{print-cfg-wiki.js → wiki-cfg.js} +144 -160
- package/documentation/wiki-core.d.ts +14 -0
- package/documentation/{print-core-wiki.js → wiki-core.js} +164 -175
- package/documentation/wiki-dataflow-graph.d.ts +9 -0
- package/documentation/{print-dataflow-graph-wiki.js → wiki-dataflow-graph.js} +146 -177
- package/documentation/wiki-engine.d.ts +9 -0
- package/documentation/{print-engines-wiki.js → wiki-engine.js} +27 -42
- package/documentation/wiki-faq.d.ts +8 -0
- package/documentation/wiki-faq.js +21 -0
- package/documentation/wiki-interface.d.ts +9 -0
- package/documentation/{print-interface-wiki.js → wiki-interface.js} +59 -56
- package/documentation/wiki-linter.d.ts +9 -0
- package/documentation/{print-linter-wiki.js → wiki-linter.js} +52 -48
- package/documentation/wiki-linting-and-testing.d.ts +9 -0
- package/documentation/{print-linting-and-testing-wiki.js → wiki-linting-and-testing.js} +25 -32
- package/documentation/wiki-mk/doc-context.d.ts +186 -0
- package/documentation/wiki-mk/doc-context.js +84 -0
- package/documentation/wiki-mk/doc-maker.d.ts +95 -0
- package/documentation/wiki-mk/doc-maker.js +134 -0
- package/documentation/wiki-normalized-ast.d.ts +9 -0
- package/documentation/{print-normalized-ast-wiki.js → wiki-normalized-ast.js} +64 -47
- package/documentation/wiki-onboarding.d.ts +8 -0
- package/documentation/{print-onboarding-wiki.js → wiki-onboarding.js} +18 -15
- package/documentation/wiki-query.d.ts +9 -0
- package/documentation/{print-query-wiki.js → wiki-query.js} +62 -47
- package/documentation/wiki-search.d.ts +9 -0
- package/documentation/wiki-search.js +61 -0
- package/linter/linter-executor.js +3 -2
- package/linter/linter-format.d.ts +2 -2
- package/linter/linter-rules.d.ts +15 -19
- package/linter/rules/absolute-path.d.ts +1 -2
- package/linter/rules/absolute-path.js +5 -5
- package/linter/rules/dataframe-access-validation.d.ts +2 -2
- package/linter/rules/dataframe-access-validation.js +13 -9
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.d.ts +1 -5
- package/linter/rules/file-path-validity.d.ts +1 -1
- package/linter/rules/file-path-validity.js +4 -4
- package/linter/rules/function-finder-util.d.ts +3 -7
- package/linter/rules/function-finder-util.js +1 -1
- package/linter/rules/naming-convention.d.ts +2 -2
- package/linter/rules/naming-convention.js +1 -1
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/network-functions.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +4 -3
- package/linter/rules/seeded-randomness.js +38 -18
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/useless-loop.d.ts +2 -2
- package/linter/rules/useless-loop.js +2 -2
- package/package.json +5 -17
- package/project/cache/flowr-analyzer-cache.d.ts +7 -10
- package/project/cache/flowr-analyzer-cache.js +17 -38
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +34 -0
- package/project/cache/flowr-analyzer-controlflow-cache.js +79 -0
- package/project/context/flowr-analyzer-context.d.ts +37 -5
- package/project/context/flowr-analyzer-context.js +51 -4
- package/project/context/flowr-analyzer-environment-context.d.ts +47 -0
- package/project/context/flowr-analyzer-environment-context.js +50 -0
- package/project/context/flowr-analyzer-files-context.d.ts +63 -13
- package/project/context/flowr-analyzer-files-context.js +110 -39
- package/project/context/flowr-file.d.ts +32 -10
- package/project/context/flowr-file.js +30 -9
- package/project/flowr-analyzer-builder.d.ts +22 -28
- package/project/flowr-analyzer-builder.js +32 -70
- package/project/flowr-analyzer.d.ts +55 -14
- package/project/flowr-analyzer.js +53 -8
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +7 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +13 -5
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +3 -3
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +11 -5
- package/project/plugins/file-plugins/flowr-description-file.d.ts +3 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.d.ts +20 -0
- package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.js +42 -0
- package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.d.ts +59 -0
- package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.js +132 -0
- package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
- package/project/plugins/file-plugins/notebooks/notebook.js +2 -0
- package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +5 -0
- package/project/plugins/flowr-analyzer-plugin-defaults.js +23 -0
- package/project/plugins/flowr-analyzer-plugin.d.ts +2 -0
- package/project/plugins/flowr-analyzer-plugin.js +2 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/plugin-registry.d.ts +34 -0
- package/project/plugins/plugin-registry.js +62 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +5 -6
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -2
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +25 -18
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-format.js +3 -2
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +5 -5
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +2 -2
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +6 -6
- package/queries/catalog/df-shape-query/df-shape-query-format.js +8 -7
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +2 -1
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- 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 +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +4 -4
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
- package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
- package/queries/catalog/linter-query/linter-query-format.js +13 -2
- package/queries/catalog/location-map-query/location-map-query-executor.js +2 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/project-query/project-query-executor.js +3 -1
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +2 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +3 -3
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +2 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.js +13 -1
- package/queries/query.d.ts +26 -18
- package/queries/query.js +21 -1
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -1
- package/r-bridge/lang-4.x/ast/model/collect.js +4 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +29 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +15 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +5 -7
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +24 -11
- package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/type.js +2 -0
- package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +9 -8
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +11 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +4 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +20 -11
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -3
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +5 -4
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +14 -5
- package/r-bridge/parser.d.ts +15 -5
- package/r-bridge/parser.js +27 -13
- package/r-bridge/retriever.d.ts +9 -15
- package/r-bridge/retriever.js +14 -5
- package/r-bridge/shell.d.ts +1 -1
- package/r-bridge/shell.js +1 -1
- package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
- package/reconstruct/auto-select/magic-comments.js +1 -1
- package/reconstruct/reconstruct.d.ts +17 -9
- package/reconstruct/reconstruct.js +19 -8
- package/search/flowr-search.d.ts +12 -0
- package/search/search-executor/search-enrichers.d.ts +9 -2
- package/search/search-executor/search-enrichers.js +1 -3
- package/search/search-executor/search-generators.d.ts +1 -1
- package/search/search-executor/search-generators.js +9 -4
- package/slicing/criterion/collect-all.d.ts +3 -2
- package/slicing/criterion/collect-all.js +1 -1
- package/slicing/criterion/parse.js +4 -4
- package/slicing/static/slice-call.d.ts +3 -2
- package/slicing/static/slice-call.js +4 -4
- package/slicing/static/static-slicer.d.ts +3 -1
- package/slicing/static/static-slicer.js +6 -7
- package/statistics/features/supported/assignments/assignments.js +1 -1
- package/statistics/features/supported/control-flow/control-flow.js +2 -2
- package/statistics/features/supported/data-access/data-access.js +1 -1
- package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
- package/statistics/features/supported/expression-list/statistics-expression-list.js +1 -1
- package/statistics/features/supported/loops/loops.js +1 -1
- package/statistics/features/supported/used-functions/used-functions.js +2 -2
- package/statistics/features/supported/variables/variables.js +3 -2
- package/statistics/statistics.js +3 -2
- package/util/assert.d.ts +4 -0
- package/util/assert.js +4 -0
- package/util/containers.js +1 -1
- package/util/files.d.ts +1 -1
- package/util/files.js +1 -1
- package/util/mermaid/ast.d.ts +4 -3
- package/util/mermaid/ast.js +36 -8
- package/util/mermaid/cfg.js +1 -1
- package/util/mermaid/dfg.d.ts +1 -0
- package/util/mermaid/dfg.js +3 -3
- package/util/simple-df/dfg-view.d.ts +2 -1
- package/util/simple-df/dfg-view.js +2 -2
- package/util/version.js +1 -1
- package/dataflow/environments/remove.d.ts +0 -12
- package/dataflow/environments/remove.js +0 -52
- package/documentation/print-analyzer-wiki.d.ts +0 -1
- package/documentation/print-analyzer-wiki.js +0 -141
- package/documentation/print-capabilities-markdown.d.ts +0 -1
- package/documentation/print-cfg-wiki.d.ts +0 -1
- package/documentation/print-core-wiki.d.ts +0 -5
- package/documentation/print-dataflow-graph-wiki.d.ts +0 -1
- package/documentation/print-engines-wiki.d.ts +0 -1
- package/documentation/print-faq-wiki.d.ts +0 -1
- package/documentation/print-faq-wiki.js +0 -18
- package/documentation/print-interface-wiki.d.ts +0 -1
- package/documentation/print-linter-issue.d.ts +0 -1
- package/documentation/print-linter-wiki.d.ts +0 -1
- package/documentation/print-linting-and-testing-wiki.d.ts +0 -1
- package/documentation/print-normalized-ast-wiki.d.ts +0 -1
- package/documentation/print-onboarding-wiki.d.ts +0 -1
- package/documentation/print-query-wiki.d.ts +0 -1
- package/documentation/print-readme.d.ts +0 -1
- package/documentation/print-search-wiki.d.ts +0 -1
- package/documentation/print-search-wiki.js +0 -74
- package/util/formats/adapter-format.d.ts +0 -6
- package/util/formats/adapter-format.js +0 -3
- package/util/formats/adapter.d.ts +0 -27
- package/util/formats/adapter.js +0 -58
- package/util/formats/adapters/r-adapter.d.ts +0 -4
- package/util/formats/adapters/r-adapter.js +0 -7
- package/util/formats/adapters/rmd-adapter.d.ts +0 -35
- package/util/formats/adapters/rmd-adapter.js +0 -100
|
@@ -10,7 +10,7 @@ export interface SatisfiableDomain<T> {
|
|
|
10
10
|
satisfies(value: T): Ternary;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Represents the different types of numerical comparators for
|
|
13
|
+
* Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
|
|
14
14
|
*/
|
|
15
15
|
export declare enum NumericalComparator {
|
|
16
16
|
Equal = 0,
|
|
@@ -20,7 +20,7 @@ export declare enum NumericalComparator {
|
|
|
20
20
|
GreaterOrEqual = 4
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Represents the different types of set comparators for
|
|
23
|
+
* Represents the different types of set comparators for satisfiability checks for an abstract domain.
|
|
24
24
|
*/
|
|
25
25
|
export declare enum SetComparator {
|
|
26
26
|
Equal = 0,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SetComparator = exports.NumericalComparator = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Represents the different types of numerical comparators for
|
|
5
|
+
* Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
|
|
6
6
|
*/
|
|
7
7
|
var NumericalComparator;
|
|
8
8
|
(function (NumericalComparator) {
|
|
@@ -13,7 +13,7 @@ var NumericalComparator;
|
|
|
13
13
|
NumericalComparator[NumericalComparator["GreaterOrEqual"] = 4] = "GreaterOrEqual";
|
|
14
14
|
})(NumericalComparator || (exports.NumericalComparator = NumericalComparator = {}));
|
|
15
15
|
/**
|
|
16
|
-
* Represents the different types of set comparators for
|
|
16
|
+
* Represents the different types of set comparators for satisfiability checks for an abstract domain.
|
|
17
17
|
*/
|
|
18
18
|
var SetComparator;
|
|
19
19
|
(function (SetComparator) {
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Ternary } from '../../util/logic';
|
|
2
|
+
import { AbstractDomain } from './abstract-domain';
|
|
3
|
+
import { Bottom, Top } from './lattice';
|
|
4
|
+
import type { SatisfiableDomain } from './satisfiable-domain';
|
|
5
|
+
import { SetComparator } from './satisfiable-domain';
|
|
6
|
+
/** The Top element of the set range domain with an empty set as minimum set and {@link Top} as range set */
|
|
7
|
+
export declare const SetRangeTop: {
|
|
8
|
+
readonly min: Set<never>;
|
|
9
|
+
readonly range: typeof Top;
|
|
10
|
+
};
|
|
11
|
+
/** The type of the actual values of the set range domain as tuple with a minimum set and range set of additional possible values (i.e. `[{"id","name"}, ∅]`, or `[{"id"}, {"score"}]`) */
|
|
12
|
+
type SetRangeValue<T> = {
|
|
13
|
+
readonly min: ReadonlySet<T>;
|
|
14
|
+
readonly range: ReadonlySet<T> | typeof Top;
|
|
15
|
+
};
|
|
16
|
+
/** The type of the Top element of the set range domain as tuple with the empty set as minimum set and {@link Top} as range set (i.e. `[∅, Top]`) */
|
|
17
|
+
type SetRangeTop = typeof SetRangeTop;
|
|
18
|
+
/** The type of the Bottom element of the set range domain as {@link Bottom} */
|
|
19
|
+
type SetRangeBottom = typeof Bottom;
|
|
20
|
+
/** The type of the abstract values of the set range domain that are Top, Bottom, or actual values */
|
|
21
|
+
type SetRangeLift<T> = SetRangeValue<T> | SetRangeTop | SetRangeBottom;
|
|
22
|
+
/** The type of the actual values of the set range domain as array tuple with a minimum array and range array for better readability (e.g. `[["id","name"], []]`, or `[["id"], ["score"]]`) */
|
|
23
|
+
export type ArrayRangeValue<T> = {
|
|
24
|
+
readonly min: T[];
|
|
25
|
+
readonly range: T[] | typeof Top;
|
|
26
|
+
};
|
|
27
|
+
/** The type for the maximum number of elements in the minimum set and maximum set of the set range domain before over-approximation */
|
|
28
|
+
export type SetRangeLimit = {
|
|
29
|
+
readonly min: number;
|
|
30
|
+
readonly range: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The set range abstract domain as range of possible value sets with a minimum set of values and a range of possible additional values
|
|
34
|
+
* (similar to an interval like structure with a lower bound and a difference to the upper bound).
|
|
35
|
+
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the range `[∅, Top]` where the minimum set is the empty set and the range is {@link Top}.
|
|
36
|
+
* @template T - Type of the values in the sets in the abstract domain
|
|
37
|
+
* @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
|
|
38
|
+
*/
|
|
39
|
+
export declare class SetRangeDomain<T, Value extends SetRangeLift<T> = SetRangeLift<T>> extends AbstractDomain<ReadonlySet<T>, SetRangeValue<T>, SetRangeTop, SetRangeBottom, Value> implements SatisfiableDomain<ReadonlySet<T>> {
|
|
40
|
+
readonly limit: SetRangeLimit;
|
|
41
|
+
private readonly setType;
|
|
42
|
+
/**
|
|
43
|
+
* @param limit - A limit for the maximum number of elements to store in the minimum set and maximum set before over-approximation
|
|
44
|
+
* @param newSet - An optional set constructor for the domain elements if the type `T` is not storable in a HashSet
|
|
45
|
+
*/
|
|
46
|
+
constructor(value: Value | ArrayRangeValue<T>, limit?: SetRangeLimit | number, setType?: typeof Set<T>);
|
|
47
|
+
create(value: SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
48
|
+
/**
|
|
49
|
+
* The minimum set (lower bound) of the set range representing all values that must exist (subset of {@link upper}).
|
|
50
|
+
*/
|
|
51
|
+
lower(): SetRangeValue<T>['min'] | typeof Bottom;
|
|
52
|
+
/**
|
|
53
|
+
* The maximum set (upper bound) of the set range representing all values that can possibly exist (union of {@link lower} and range).
|
|
54
|
+
*/
|
|
55
|
+
upper(): SetRangeValue<T>['range'] | typeof Bottom;
|
|
56
|
+
static top<T>(limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T, SetRangeTop>;
|
|
57
|
+
static bottom<T>(limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T, SetRangeBottom>;
|
|
58
|
+
static abstract<T>(concrete: ReadonlySet<ReadonlySet<T>> | typeof Top, limit?: SetRangeLimit | number, setType?: typeof Set<T>): SetRangeDomain<T>;
|
|
59
|
+
top(): this & SetRangeDomain<T, SetRangeTop>;
|
|
60
|
+
bottom(): this & SetRangeDomain<T, SetRangeBottom>;
|
|
61
|
+
equals(other: this): boolean;
|
|
62
|
+
leq(other: this): boolean;
|
|
63
|
+
join(other: this): this;
|
|
64
|
+
join(other: SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
65
|
+
meet(other: this): this;
|
|
66
|
+
meet(other: SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
67
|
+
/**
|
|
68
|
+
* Creates the union of this abstract value and another abstract value by creating the union of the minimum and maximum set, respectively.
|
|
69
|
+
*/
|
|
70
|
+
union(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
71
|
+
/**
|
|
72
|
+
* Creates the intersection of this abstract value and another abstract value by creating the intersection of the minimum and maximum set, respectively.
|
|
73
|
+
*/
|
|
74
|
+
intersect(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
75
|
+
/**
|
|
76
|
+
* Subtracts another abstract value from the current abstract value by removing all elements of the other abstract value from the current abstract value.
|
|
77
|
+
*/
|
|
78
|
+
subtract(other: this | SetRangeLift<T> | ArrayRangeValue<T>): this;
|
|
79
|
+
widen(other: this): this;
|
|
80
|
+
narrow(other: this): this;
|
|
81
|
+
concretize(limit: number): ReadonlySet<ReadonlySet<T>> | typeof Top;
|
|
82
|
+
abstract(concrete: ReadonlySet<ReadonlySet<T>> | typeof Top): this;
|
|
83
|
+
satisfies(set: ReadonlySet<T> | T[], comparator?: SetComparator): Ternary;
|
|
84
|
+
/**
|
|
85
|
+
* Extends the minimum set of the current abstract value down to the empty set.
|
|
86
|
+
*/
|
|
87
|
+
widenDown(): this;
|
|
88
|
+
/**
|
|
89
|
+
* Extends the maximum set of the current abstract value up to {@link Top}.
|
|
90
|
+
*/
|
|
91
|
+
widenUp(): this;
|
|
92
|
+
toJson(): unknown;
|
|
93
|
+
toString(): string;
|
|
94
|
+
isTop(): this is SetRangeDomain<T, SetRangeTop>;
|
|
95
|
+
isBottom(): this is SetRangeDomain<T, SetRangeBottom>;
|
|
96
|
+
isValue(): this is SetRangeDomain<T, SetRangeValue<T>>;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetRangeDomain = exports.SetRangeTop = void 0;
|
|
4
|
+
const assert_1 = require("../../util/assert");
|
|
5
|
+
const set_1 = require("../../util/collections/set");
|
|
6
|
+
const logic_1 = require("../../util/logic");
|
|
7
|
+
const abstract_domain_1 = require("./abstract-domain");
|
|
8
|
+
const lattice_1 = require("./lattice");
|
|
9
|
+
const satisfiable_domain_1 = require("./satisfiable-domain");
|
|
10
|
+
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
11
|
+
/** The Top element of the set range domain with an empty set as minimum set and {@link Top} as range set */
|
|
12
|
+
exports.SetRangeTop = { min: new Set(), range: lattice_1.Top };
|
|
13
|
+
const DefaultLimit = { min: abstract_domain_1.DEFAULT_INFERENCE_LIMIT, range: abstract_domain_1.DEFAULT_INFERENCE_LIMIT };
|
|
14
|
+
/**
|
|
15
|
+
* The set range abstract domain as range of possible value sets with a minimum set of values and a range of possible additional values
|
|
16
|
+
* (similar to an interval like structure with a lower bound and a difference to the upper bound).
|
|
17
|
+
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the range `[∅, Top]` where the minimum set is the empty set and the range is {@link Top}.
|
|
18
|
+
* @template T - Type of the values in the sets in the abstract domain
|
|
19
|
+
* @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
|
|
20
|
+
*/
|
|
21
|
+
class SetRangeDomain extends abstract_domain_1.AbstractDomain {
|
|
22
|
+
limit;
|
|
23
|
+
setType;
|
|
24
|
+
/**
|
|
25
|
+
* @param limit - A limit for the maximum number of elements to store in the minimum set and maximum set before over-approximation
|
|
26
|
+
* @param newSet - An optional set constructor for the domain elements if the type `T` is not storable in a HashSet
|
|
27
|
+
*/
|
|
28
|
+
constructor(value, limit = DefaultLimit, setType = Set) {
|
|
29
|
+
limit = typeof limit === 'number' ? { min: limit, range: limit } : limit;
|
|
30
|
+
if (value !== lattice_1.Bottom) {
|
|
31
|
+
const minSet = new setType(value.min);
|
|
32
|
+
const rangeSet = value.range === lattice_1.Top ? lattice_1.Top : new setType(value.range);
|
|
33
|
+
const minExceeds = minSet.size > limit.min;
|
|
34
|
+
const rangeExceeds = rangeSet === lattice_1.Top || rangeSet.size > limit.range || minSet.size + rangeSet.size > limit.min + limit.range;
|
|
35
|
+
const min = minExceeds ? new setType(minSet.values().take(limit.min)) : minSet;
|
|
36
|
+
const range = rangeExceeds ? lattice_1.Top : minSet.union(rangeSet).difference(min);
|
|
37
|
+
super({ min, range });
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
super(value);
|
|
41
|
+
}
|
|
42
|
+
this.limit = limit;
|
|
43
|
+
this.setType = setType;
|
|
44
|
+
}
|
|
45
|
+
create(value) {
|
|
46
|
+
return new SetRangeDomain(value, this.limit, this.setType);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The minimum set (lower bound) of the set range representing all values that must exist (subset of {@link upper}).
|
|
50
|
+
*/
|
|
51
|
+
lower() {
|
|
52
|
+
if (this.value === lattice_1.Bottom) {
|
|
53
|
+
return lattice_1.Bottom;
|
|
54
|
+
}
|
|
55
|
+
return this.value.min;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The maximum set (upper bound) of the set range representing all values that can possibly exist (union of {@link lower} and range).
|
|
59
|
+
*/
|
|
60
|
+
upper() {
|
|
61
|
+
if (this.value === lattice_1.Bottom) {
|
|
62
|
+
return lattice_1.Bottom;
|
|
63
|
+
}
|
|
64
|
+
return this.value.range === lattice_1.Top ? lattice_1.Top : this.value.min.union(this.value.range);
|
|
65
|
+
}
|
|
66
|
+
static top(limit, setType) {
|
|
67
|
+
return new SetRangeDomain(exports.SetRangeTop, limit, setType);
|
|
68
|
+
}
|
|
69
|
+
static bottom(limit, setType) {
|
|
70
|
+
return new SetRangeDomain(lattice_1.Bottom, limit, setType);
|
|
71
|
+
}
|
|
72
|
+
static abstract(concrete, limit, setType) {
|
|
73
|
+
if (concrete === lattice_1.Top) {
|
|
74
|
+
return SetRangeDomain.top(limit, setType);
|
|
75
|
+
}
|
|
76
|
+
else if (concrete.size === 0) {
|
|
77
|
+
return SetRangeDomain.bottom(limit, setType);
|
|
78
|
+
}
|
|
79
|
+
const lower = concrete.values().reduce((result, set) => result.intersection(set));
|
|
80
|
+
const upper = concrete.values().reduce((result, set) => result.union(set));
|
|
81
|
+
return new SetRangeDomain({ min: lower, range: upper.difference(lower) }, limit, setType);
|
|
82
|
+
}
|
|
83
|
+
top() {
|
|
84
|
+
return SetRangeDomain.top(this.limit, this.setType);
|
|
85
|
+
}
|
|
86
|
+
bottom() {
|
|
87
|
+
return SetRangeDomain.bottom(this.limit, this.setType);
|
|
88
|
+
}
|
|
89
|
+
equals(other) {
|
|
90
|
+
if (this.value === other.value) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
else if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom || !(0, set_1.setEquals)(this.value.min, other.value.min)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
else if (this.value.range === other.value.range) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
return this.value.range !== lattice_1.Top && other.value.range !== lattice_1.Top && (0, set_1.setEquals)(this.value.range, other.value.range);
|
|
100
|
+
}
|
|
101
|
+
leq(other) {
|
|
102
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
103
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
104
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
else if (otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom || !otherLower.isSubsetOf(thisLower)) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
else if (otherUpper === lattice_1.Top) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return thisUpper !== lattice_1.Top && thisUpper.isSubsetOf(otherUpper);
|
|
114
|
+
}
|
|
115
|
+
join(other) {
|
|
116
|
+
other = other instanceof SetRangeDomain ? other : this.create(other);
|
|
117
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
118
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
119
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom) {
|
|
120
|
+
return this.create(other.value);
|
|
121
|
+
}
|
|
122
|
+
else if (otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
123
|
+
return this.create(this.value);
|
|
124
|
+
}
|
|
125
|
+
const joinLower = thisLower.intersection(otherLower);
|
|
126
|
+
let joinUpper;
|
|
127
|
+
if (thisUpper === lattice_1.Top || otherUpper === lattice_1.Top) {
|
|
128
|
+
joinUpper = lattice_1.Top;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
joinUpper = thisUpper.union(otherUpper);
|
|
132
|
+
}
|
|
133
|
+
return this.create({ min: joinLower, range: joinUpper === lattice_1.Top ? lattice_1.Top : joinUpper.difference(joinLower) });
|
|
134
|
+
}
|
|
135
|
+
meet(other) {
|
|
136
|
+
other = other instanceof SetRangeDomain ? other : this.create(other);
|
|
137
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
138
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
139
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom || otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
140
|
+
return this.bottom();
|
|
141
|
+
}
|
|
142
|
+
const meetLower = thisLower.union(otherLower);
|
|
143
|
+
let meetUpper;
|
|
144
|
+
if (thisUpper === lattice_1.Top) {
|
|
145
|
+
meetUpper = otherUpper;
|
|
146
|
+
}
|
|
147
|
+
else if (otherUpper === lattice_1.Top) {
|
|
148
|
+
meetUpper = thisUpper;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
meetUpper = thisUpper.intersection(otherUpper);
|
|
152
|
+
}
|
|
153
|
+
if (meetUpper !== lattice_1.Top && !meetLower.isSubsetOf(meetUpper)) {
|
|
154
|
+
return this.bottom();
|
|
155
|
+
}
|
|
156
|
+
return this.create({ min: meetLower, range: meetUpper === lattice_1.Top ? lattice_1.Top : meetUpper.difference(meetLower) });
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Creates the union of this abstract value and another abstract value by creating the union of the minimum and maximum set, respectively.
|
|
160
|
+
*/
|
|
161
|
+
union(other) {
|
|
162
|
+
other = other instanceof SetRangeDomain ? other : this.create(other);
|
|
163
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
164
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
165
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom) {
|
|
166
|
+
return this.create(other.value);
|
|
167
|
+
}
|
|
168
|
+
else if (otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
169
|
+
return this.create(this.value);
|
|
170
|
+
}
|
|
171
|
+
const unionLower = thisLower.union(otherLower);
|
|
172
|
+
let unionUpper;
|
|
173
|
+
if (thisUpper === lattice_1.Top || otherUpper === lattice_1.Top) {
|
|
174
|
+
unionUpper = lattice_1.Top;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
unionUpper = thisUpper.union(otherUpper);
|
|
178
|
+
}
|
|
179
|
+
return this.create({ min: unionLower, range: unionUpper === lattice_1.Top ? lattice_1.Top : unionUpper.difference(unionLower) });
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Creates the intersection of this abstract value and another abstract value by creating the intersection of the minimum and maximum set, respectively.
|
|
183
|
+
*/
|
|
184
|
+
intersect(other) {
|
|
185
|
+
other = other instanceof SetRangeDomain ? other : this.create(other);
|
|
186
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
187
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
188
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom || otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
189
|
+
return this.bottom();
|
|
190
|
+
}
|
|
191
|
+
const intersectLower = thisLower.intersection(otherLower);
|
|
192
|
+
let intersectUpper;
|
|
193
|
+
if (thisUpper === lattice_1.Top) {
|
|
194
|
+
intersectUpper = otherUpper;
|
|
195
|
+
}
|
|
196
|
+
else if (otherUpper === lattice_1.Top) {
|
|
197
|
+
intersectUpper = thisUpper;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
intersectUpper = thisUpper.intersection(otherUpper);
|
|
201
|
+
}
|
|
202
|
+
return this.create({ min: intersectLower, range: intersectUpper === lattice_1.Top ? lattice_1.Top : intersectUpper.difference(intersectLower) });
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Subtracts another abstract value from the current abstract value by removing all elements of the other abstract value from the current abstract value.
|
|
206
|
+
*/
|
|
207
|
+
subtract(other) {
|
|
208
|
+
other = other instanceof SetRangeDomain ? other : this.create(other);
|
|
209
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
210
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
211
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom) {
|
|
212
|
+
return this.bottom();
|
|
213
|
+
}
|
|
214
|
+
else if (otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
215
|
+
return this.create(this.value);
|
|
216
|
+
}
|
|
217
|
+
let subLower;
|
|
218
|
+
if (otherUpper === lattice_1.Top) {
|
|
219
|
+
subLower = new Set();
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
subLower = thisLower.difference(otherUpper);
|
|
223
|
+
}
|
|
224
|
+
let subUpper;
|
|
225
|
+
if (thisUpper === lattice_1.Top) {
|
|
226
|
+
subUpper = lattice_1.Top;
|
|
227
|
+
}
|
|
228
|
+
else if (otherUpper === lattice_1.Top) {
|
|
229
|
+
subUpper = thisUpper.difference(otherLower);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
subUpper = thisUpper.difference(otherUpper);
|
|
233
|
+
}
|
|
234
|
+
return this.create({ min: subLower, range: subUpper === lattice_1.Top ? lattice_1.Top : subUpper.difference(subLower) });
|
|
235
|
+
}
|
|
236
|
+
widen(other) {
|
|
237
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
238
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
239
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom) {
|
|
240
|
+
return this.create(other.value);
|
|
241
|
+
}
|
|
242
|
+
else if (otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
243
|
+
return this.create(this.value);
|
|
244
|
+
}
|
|
245
|
+
let widenLower;
|
|
246
|
+
if (!thisLower.isSubsetOf(otherLower)) {
|
|
247
|
+
widenLower = new Set();
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
widenLower = thisLower;
|
|
251
|
+
}
|
|
252
|
+
let widenUpper;
|
|
253
|
+
if (thisUpper === lattice_1.Top || otherUpper === lattice_1.Top || !otherUpper.isSubsetOf(thisUpper)) {
|
|
254
|
+
widenUpper = lattice_1.Top;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
widenUpper = thisUpper;
|
|
258
|
+
}
|
|
259
|
+
return this.create({ min: widenLower, range: widenUpper === lattice_1.Top ? lattice_1.Top : widenUpper.difference(widenLower) });
|
|
260
|
+
}
|
|
261
|
+
narrow(other) {
|
|
262
|
+
const thisLower = this.lower(), thisUpper = this.upper();
|
|
263
|
+
const otherLower = other.lower(), otherUpper = other.upper();
|
|
264
|
+
if (thisLower === lattice_1.Bottom || thisUpper === lattice_1.Bottom || otherLower === lattice_1.Bottom || otherUpper === lattice_1.Bottom) {
|
|
265
|
+
return this.bottom();
|
|
266
|
+
}
|
|
267
|
+
let meetUpper;
|
|
268
|
+
if (thisUpper === lattice_1.Top) {
|
|
269
|
+
meetUpper = otherUpper;
|
|
270
|
+
}
|
|
271
|
+
else if (otherUpper === lattice_1.Top) {
|
|
272
|
+
meetUpper = thisUpper;
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
meetUpper = thisUpper.intersection(otherUpper);
|
|
276
|
+
}
|
|
277
|
+
if (meetUpper !== lattice_1.Top && !thisLower.union(otherLower).isSubsetOf(meetUpper)) {
|
|
278
|
+
return this.bottom();
|
|
279
|
+
}
|
|
280
|
+
let narrowLower;
|
|
281
|
+
if (thisLower.size === 0) {
|
|
282
|
+
narrowLower = otherLower;
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
narrowLower = thisLower;
|
|
286
|
+
}
|
|
287
|
+
let narrowUpper;
|
|
288
|
+
if (thisUpper === lattice_1.Top) {
|
|
289
|
+
narrowUpper = otherUpper;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
narrowUpper = thisUpper;
|
|
293
|
+
}
|
|
294
|
+
return this.create({ min: narrowLower, range: narrowUpper === lattice_1.Top ? lattice_1.Top : narrowUpper.difference(narrowLower) });
|
|
295
|
+
}
|
|
296
|
+
concretize(limit) {
|
|
297
|
+
if (this.value === lattice_1.Bottom) {
|
|
298
|
+
return new Set();
|
|
299
|
+
}
|
|
300
|
+
else if (this.value.range === lattice_1.Top || 2 ** (this.value.range.size) > limit) {
|
|
301
|
+
return lattice_1.Top;
|
|
302
|
+
}
|
|
303
|
+
const subsets = [new this.setType()];
|
|
304
|
+
for (const element of this.value.range) {
|
|
305
|
+
const newSubsets = subsets.map(subset => new this.setType([...subset, element]));
|
|
306
|
+
for (const subset of newSubsets) {
|
|
307
|
+
subsets.push(subset);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return new Set(subsets.map(subset => this.value === lattice_1.Bottom ? subset : this.value.min.union(subset)));
|
|
311
|
+
}
|
|
312
|
+
abstract(concrete) {
|
|
313
|
+
return SetRangeDomain.abstract(concrete, this.limit);
|
|
314
|
+
}
|
|
315
|
+
satisfies(set, comparator = satisfiable_domain_1.SetComparator.Equal) {
|
|
316
|
+
const value = new this.setType(set);
|
|
317
|
+
const lower = this.lower(), upper = this.upper();
|
|
318
|
+
if (lower === lattice_1.Bottom || upper === lattice_1.Bottom) {
|
|
319
|
+
return logic_1.Ternary.Never;
|
|
320
|
+
}
|
|
321
|
+
switch (comparator) {
|
|
322
|
+
case satisfiable_domain_1.SetComparator.Equal: {
|
|
323
|
+
if (lower.isSubsetOf(value) && (upper === lattice_1.Top || value.isSubsetOf(upper))) {
|
|
324
|
+
return upper !== lattice_1.Top && lower.size === upper.size ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
325
|
+
}
|
|
326
|
+
return logic_1.Ternary.Never;
|
|
327
|
+
}
|
|
328
|
+
case satisfiable_domain_1.SetComparator.SubsetOrEqual: {
|
|
329
|
+
if (upper === lattice_1.Top || value.isSubsetOf(upper)) {
|
|
330
|
+
return value.isSubsetOf(lower) ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
331
|
+
}
|
|
332
|
+
return logic_1.Ternary.Never;
|
|
333
|
+
}
|
|
334
|
+
case satisfiable_domain_1.SetComparator.Subset: {
|
|
335
|
+
if (upper === lattice_1.Top || (value.isSubsetOf(upper) && !(0, set_1.setEquals)(value, upper))) {
|
|
336
|
+
return value.isSubsetOf(lower) && !(0, set_1.setEquals)(value, lower) ? logic_1.Ternary.Always : logic_1.Ternary.Maybe;
|
|
337
|
+
}
|
|
338
|
+
return logic_1.Ternary.Never;
|
|
339
|
+
}
|
|
340
|
+
default: {
|
|
341
|
+
(0, assert_1.assertUnreachable)(comparator);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Extends the minimum set of the current abstract value down to the empty set.
|
|
347
|
+
*/
|
|
348
|
+
widenDown() {
|
|
349
|
+
const upper = this.upper();
|
|
350
|
+
if (upper === lattice_1.Bottom) {
|
|
351
|
+
return this.bottom();
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
return this.create({ min: new this.setType(), range: upper });
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Extends the maximum set of the current abstract value up to {@link Top}.
|
|
359
|
+
*/
|
|
360
|
+
widenUp() {
|
|
361
|
+
const lower = this.lower();
|
|
362
|
+
if (lower === lattice_1.Bottom) {
|
|
363
|
+
return this.bottom();
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
return this.create({ min: lower, range: lattice_1.Top });
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
toJson() {
|
|
370
|
+
if (this.value === lattice_1.Bottom) {
|
|
371
|
+
return this.value.description;
|
|
372
|
+
}
|
|
373
|
+
const min = this.value.min.values().toArray();
|
|
374
|
+
const range = this.value.range === lattice_1.Top ? this.value.range.description : this.value.range.values().toArray();
|
|
375
|
+
return { min, range };
|
|
376
|
+
}
|
|
377
|
+
toString() {
|
|
378
|
+
if (this.value === lattice_1.Bottom) {
|
|
379
|
+
return lattice_1.BottomSymbol;
|
|
380
|
+
}
|
|
381
|
+
else if (this.value.range === lattice_1.Top) {
|
|
382
|
+
const minString = this.value.min.values().map(abstract_domain_1.domainElementToString).toArray().join(', ');
|
|
383
|
+
return `[{${minString}}, ${lattice_1.TopSymbol}]`;
|
|
384
|
+
}
|
|
385
|
+
const minString = this.value.min.values().map(abstract_domain_1.domainElementToString).toArray().join(', ');
|
|
386
|
+
const rangeString = this.value.range.values().map(abstract_domain_1.domainElementToString).toArray().join(', ');
|
|
387
|
+
return `[{${minString}}, {${rangeString}}]`;
|
|
388
|
+
}
|
|
389
|
+
isTop() {
|
|
390
|
+
return this.value !== lattice_1.Bottom && this.value.min.size === 0 && this.value.range === lattice_1.Top;
|
|
391
|
+
}
|
|
392
|
+
isBottom() {
|
|
393
|
+
return this.value === lattice_1.Bottom;
|
|
394
|
+
}
|
|
395
|
+
isValue() {
|
|
396
|
+
return this.value !== lattice_1.Bottom;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
exports.SetRangeDomain = SetRangeDomain;
|
|
400
|
+
//# sourceMappingURL=set-range-domain.js.map
|
|
@@ -175,10 +175,10 @@ class SetUpperBoundDomain extends abstract_domain_1.AbstractDomain {
|
|
|
175
175
|
}
|
|
176
176
|
toString() {
|
|
177
177
|
if (this.value === lattice_1.Top) {
|
|
178
|
-
return
|
|
178
|
+
return lattice_1.TopSymbol;
|
|
179
179
|
}
|
|
180
180
|
else if (this.value === lattice_1.Bottom) {
|
|
181
|
-
return
|
|
181
|
+
return lattice_1.BottomSymbol;
|
|
182
182
|
}
|
|
183
183
|
const string = this.value.values().map(abstract_domain_1.domainElementToString).toArray().join(', ');
|
|
184
184
|
return `{${string}}`;
|
|
@@ -109,10 +109,10 @@ class SingletonDomain extends abstract_domain_1.AbstractDomain {
|
|
|
109
109
|
}
|
|
110
110
|
toString() {
|
|
111
111
|
if (this.value === lattice_1.Top) {
|
|
112
|
-
return
|
|
112
|
+
return lattice_1.TopSymbol;
|
|
113
113
|
}
|
|
114
114
|
else if (this.value === lattice_1.Bottom) {
|
|
115
|
-
return
|
|
115
|
+
return lattice_1.BottomSymbol;
|
|
116
116
|
}
|
|
117
117
|
return (0, abstract_domain_1.domainElementToString)(this.value);
|
|
118
118
|
}
|
|
@@ -25,7 +25,7 @@ type FoldOfType<T extends RType, Returns = void, Info = NoInfo> = (node: Extract
|
|
|
25
25
|
type: T;
|
|
26
26
|
}>) => Returns;
|
|
27
27
|
/** explicitly excludes types that are not visitable */
|
|
28
|
-
export type FoldableRType = Exclude<RType, RType.Delimiter>;
|
|
28
|
+
export type FoldableRType = Exclude<RType, RType.Delimiter | RType.Project>;
|
|
29
29
|
/**
|
|
30
30
|
* Describes the fold functions for each node type.
|
|
31
31
|
*/
|
package/benchmark/slicer.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare class BenchmarkSlicer {
|
|
|
58
58
|
private readonly deltas;
|
|
59
59
|
private readonly parserName;
|
|
60
60
|
private config;
|
|
61
|
+
private context;
|
|
61
62
|
private stats;
|
|
62
63
|
private loadedXml;
|
|
63
64
|
private dataflow;
|
|
@@ -105,7 +106,8 @@ export declare class BenchmarkSlicer {
|
|
|
105
106
|
* @returns The statistics of the data frame shape inference
|
|
106
107
|
*/
|
|
107
108
|
inferDataFrameShapes(): SlicerStatsDfShape;
|
|
108
|
-
private
|
|
109
|
+
private getInferredRange;
|
|
110
|
+
private getInferredNumber;
|
|
109
111
|
/** Bridging the gap between the new internal and the old names for the benchmarking */
|
|
110
112
|
private measureCommonStep;
|
|
111
113
|
private measureSimpleStep;
|