@eagleoutice/flowr 2.12.2 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -91
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
- package/abstract-interpretation/data-frame/semantics.js +12 -16
- package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
- package/abstract-interpretation/domains/abstract-domain.js +146 -6
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
- package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
- package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
- package/abstract-interpretation/domains/interval-domain.js +111 -146
- package/abstract-interpretation/domains/lattice.d.ts +3 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
- package/abstract-interpretation/domains/partial-product-domain.js +21 -54
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +4 -4
- package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
- package/abstract-interpretation/domains/set-range-domain.js +141 -200
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
- package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
- package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
- package/abstract-interpretation/domains/singleton-domain.js +33 -72
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
- package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
- package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
- package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
- package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
- package/benchmark/slicer.d.ts +2 -2
- package/benchmark/slicer.js +6 -5
- package/cli/common/options.d.ts +10 -0
- package/cli/common/options.js +2 -0
- package/cli/common/scripts-info.d.ts +10 -0
- package/cli/flowr-main-options.d.ts +4 -0
- package/cli/flowr-main-options.js +5 -0
- package/cli/flowr.d.ts +5 -0
- package/cli/flowr.js +15 -7
- package/cli/repl/commands/repl-query.js +42 -20
- package/cli/repl/commands/repl-signature.js +2 -2
- package/cli/repl/core.d.ts +14 -5
- package/cli/repl/core.js +32 -17
- package/cli/repl/parser/slice-query-parser.d.ts +69 -8
- package/cli/repl/parser/slice-query-parser.js +82 -13
- package/cli/repl/path-input.d.ts +6 -0
- package/cli/repl/path-input.js +41 -0
- package/cli/repl/print-version.js +3 -5
- package/cli/slicer-app.d.ts +2 -0
- package/cli/slicer-app.js +2 -1
- package/config.d.ts +54 -6
- package/config.js +133 -12
- package/control-flow/control-flow-graph.d.ts +3 -2
- package/control-flow/control-flow-graph.js +34 -14
- package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
- package/control-flow/semantic-cfg-guided-visitor.js +3 -0
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
- package/data/r-base-packages.generated.d.ts +1 -1
- package/data/r-base-packages.generated.js +3 -3
- package/data/sigdb/sigdb.remote.json +53 -53
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in.d.ts +2 -0
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +3 -5
- package/dataflow/environments/default-builtin-config.js +2 -2
- package/dataflow/environments/environment.d.ts +9 -0
- package/dataflow/environments/environment.js +28 -7
- package/dataflow/environments/identifier.d.ts +1 -2
- package/dataflow/environments/identifier.js +1 -5
- package/dataflow/extractor.js +1 -2
- package/dataflow/graph/dataflowgraph-builder.js +42 -3
- package/dataflow/graph/df-helper.d.ts +15 -0
- package/dataflow/graph/df-helper.js +20 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
- package/documentation/data/faq/faqs.js +12 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +2 -2
- package/documentation/doc-util/doc-files.js +4 -7
- package/documentation/doc-util/doc-query.d.ts +12 -9
- package/documentation/doc-util/doc-query.js +63 -28
- package/documentation/wiki-absint.js +1 -4
- package/documentation/wiki-analyzer.js +8 -3
- package/documentation/wiki-cfg.js +3 -2
- package/documentation/wiki-dataflow-graph.js +14 -4
- package/documentation/wiki-interface.js +29 -16
- package/documentation/wiki-mk/doc-maker.js +1 -1
- package/documentation/wiki-query.js +189 -30
- package/documentation/wiki-signature-database.d.ts +1 -1
- package/documentation/wiki-signature-database.js +53 -27
- package/linter/linter-output.d.ts +24 -0
- package/linter/linter-output.js +117 -0
- package/linter/linter-rules.d.ts +2 -4
- package/linter/rules/dataframe-access-validation.js +4 -4
- package/linter/rules/deprecated-functions.d.ts +2 -4
- package/linter/rules/deprecated-functions.js +58 -3
- package/linter/rules/undefined-symbol.js +18 -10
- package/linter/rules/unused-definition.js +24 -0
- package/package.json +5 -2
- package/project/context/flowr-analyzer-context.d.ts +59 -1
- package/project/context/flowr-analyzer-context.js +118 -3
- package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
- package/project/context/flowr-analyzer-dependencies-context.js +33 -3
- package/project/context/flowr-analyzer-files-context.d.ts +32 -0
- package/project/context/flowr-analyzer-files-context.js +132 -14
- package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
- package/project/context/flowr-analyzer-loading-order-context.js +20 -0
- package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
- package/project/context/flowr-analyzer-meta-context.js +64 -23
- package/project/context/flowr-file.d.ts +7 -0
- package/project/context/flowr-file.js +7 -0
- package/project/context/project-kind.d.ts +22 -0
- package/project/context/project-kind.js +27 -0
- package/project/dependency-version-space.d.ts +166 -0
- package/project/dependency-version-space.js +564 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/flowr-analyzer.d.ts +4 -0
- package/project/flowr-analyzer.js +5 -0
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
- package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
- package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
- package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
- package/project/plugins/flowr-analyzer-plugin.js +5 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
- package/project/plugins/package-version-plugins/package.d.ts +4 -1
- package/project/plugins/package-version-plugins/package.js +8 -5
- package/project/plugins/plugin-registry.d.ts +11 -3
- package/project/plugins/plugin-registry.js +24 -5
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
- package/project/sigdb/build.js +12 -2
- package/project/sigdb/decode.d.ts +7 -0
- package/project/sigdb/decode.js +35 -4
- package/project/sigdb/decompress.d.ts +2 -0
- package/project/sigdb/decompress.js +5 -0
- package/project/sigdb/manifest.d.ts +5 -0
- package/project/sigdb/manifest.js +37 -6
- package/project/sigdb/reader.d.ts +82 -2
- package/project/sigdb/reader.js +226 -14
- package/project/sigdb/schema.d.ts +31 -5
- package/project/sigdb/schema.js +7 -3
- package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
- package/project/sigdb/sigdb-version.js +119 -0
- package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
- package/queries/catalog/absint-query/absint-query-format.js +2 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
- package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
- package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
- package/queries/catalog/config-query/config-query-executor.js +15 -6
- package/queries/catalog/config-query/config-query-format.d.ts +18 -4
- package/queries/catalog/config-query/config-query-format.js +246 -96
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
- package/queries/catalog/dice-query/dice-query-executor.js +6 -9
- package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
- package/queries/catalog/dice-query/dice-query-format.js +10 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
- package/queries/catalog/files-query/files-query-format.d.ts +2 -0
- package/queries/catalog/files-query/files-query-format.js +2 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +277 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +119 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +331 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
- package/queries/catalog/linter-query/linter-query-executor.js +11 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
- package/queries/catalog/linter-query/linter-query-format.js +44 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
- package/queries/catalog/origin-query/origin-query-format.js +2 -0
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
- package/queries/catalog/project-query/project-query-executor.js +19 -62
- package/queries/catalog/project-query/project-query-format.d.ts +7 -18
- package/queries/catalog/project-query/project-query-format.js +3 -18
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -0
- package/queries/catalog/search-query/search-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
- package/queries/catalog/signature-query/signature-query-executor.js +267 -57
- package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
- package/queries/catalog/signature-query/signature-query-format.js +41 -5
- package/queries/catalog/signature-query/signature-query-render.js +48 -6
- package/queries/catalog/slice-query-options.d.ts +49 -0
- package/queries/catalog/slice-query-options.js +50 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
- package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
- package/queries/query-print.js +3 -1
- package/queries/query.d.ts +63 -3
- package/queries/query.js +9 -2
- package/r-bridge/data/data.d.ts +16 -0
- package/r-bridge/data/data.js +20 -0
- package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
- package/reconstruct/reconstruct.d.ts +18 -1
- package/reconstruct/reconstruct.js +42 -19
- package/slicing/criterion/parse.d.ts +4 -0
- package/slicing/criterion/parse.js +4 -0
- package/slicing/static/slice-call.js +17 -9
- package/slicing/static/static-slicer.d.ts +1 -1
- package/slicing/static/static-slicer.js +5 -4
- package/util/files.d.ts +19 -1
- package/util/files.js +45 -3
- package/util/glob.d.ts +19 -0
- package/util/glob.js +67 -0
- package/util/log.d.ts +12 -0
- package/util/log.js +17 -1
- package/util/logic.d.ts +6 -0
- package/util/logic.js +31 -1
- package/util/mermaid/dfg.js +17 -12
- package/util/mermaid/mermaid.js +2 -2
- package/util/objects.d.ts +5 -0
- package/util/objects.js +8 -0
- package/util/r-version.d.ts +9 -1
- package/util/r-version.js +27 -2
- package/util/schema.d.ts +16 -0
- package/util/schema.js +89 -4
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +27 -3
- package/util/text/strings.d.ts +9 -0
- package/util/text/strings.js +29 -0
- package/util/version.js +79 -6
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
- package/project/sigdb/version.js +0 -55
|
@@ -51,171 +51,81 @@ class StateAbstractDomain extends abstract_domain_1.AbstractDomain {
|
|
|
51
51
|
bottom() {
|
|
52
52
|
return this.create(lattice_1.Bottom);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
if (this.value
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
else if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom || this.value.size !== other.value.size) {
|
|
54
|
+
equalsValue(other) {
|
|
55
|
+
if (this.value.size !== other.value.size) {
|
|
59
56
|
return false;
|
|
60
57
|
}
|
|
61
|
-
for (const [key,
|
|
58
|
+
for (const [key, currValue] of this.value.entries()) {
|
|
62
59
|
const otherValue = other.get(key);
|
|
63
|
-
if (otherValue === undefined || !
|
|
60
|
+
if (otherValue === undefined || !currValue.equals(otherValue)) {
|
|
64
61
|
return false;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
return true;
|
|
68
65
|
}
|
|
69
|
-
|
|
70
|
-
if (this.value
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
else if (other.value === lattice_1.Bottom || this.value.size > other.value.size) {
|
|
66
|
+
leqValue(other) {
|
|
67
|
+
if (this.value.size > other.value.size) {
|
|
74
68
|
return false;
|
|
75
69
|
}
|
|
76
|
-
for (const [key,
|
|
70
|
+
for (const [key, currValue] of this.value.entries()) {
|
|
77
71
|
const otherValue = other.get(key);
|
|
78
|
-
if (otherValue === undefined || !
|
|
72
|
+
if (otherValue === undefined || !currValue.leq(otherValue)) {
|
|
79
73
|
return false;
|
|
80
74
|
}
|
|
81
75
|
}
|
|
82
76
|
return true;
|
|
83
77
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
else if (other.value === lattice_1.Bottom) {
|
|
89
|
-
return this.create(this.value);
|
|
90
|
-
}
|
|
91
|
-
const result = this.create(this.value);
|
|
92
|
-
for (const [key, value] of other.value.entries()) {
|
|
78
|
+
joinValue(other) {
|
|
79
|
+
const result = new Map(this.value);
|
|
80
|
+
for (const [key, otherValue] of other.value.entries()) {
|
|
93
81
|
const currValue = result.get(key);
|
|
94
82
|
if (currValue === undefined) {
|
|
95
|
-
result.set(key,
|
|
83
|
+
result.set(key, otherValue);
|
|
96
84
|
}
|
|
97
85
|
else {
|
|
98
|
-
result.set(key, currValue.join(
|
|
86
|
+
result.set(key, currValue.join(otherValue));
|
|
99
87
|
}
|
|
100
88
|
}
|
|
101
|
-
return result;
|
|
89
|
+
return this.create(result);
|
|
102
90
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (!other.has(key)) {
|
|
110
|
-
result.remove(key);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
for (const [key, value] of other.value.entries()) {
|
|
114
|
-
const currValue = result.get(key);
|
|
115
|
-
if (currValue !== undefined) {
|
|
116
|
-
result.set(key, currValue.meet(value));
|
|
91
|
+
meetValue(other) {
|
|
92
|
+
const result = new Map();
|
|
93
|
+
for (const [key, currValue] of this.value.entries()) {
|
|
94
|
+
const otherValue = other.value.get(key);
|
|
95
|
+
if (otherValue !== undefined) {
|
|
96
|
+
result.set(key, currValue.meet(otherValue));
|
|
117
97
|
}
|
|
118
98
|
}
|
|
119
|
-
return result;
|
|
99
|
+
return this.create(result);
|
|
120
100
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
else if (other.value === lattice_1.Bottom) {
|
|
126
|
-
return this.create(this.value);
|
|
127
|
-
}
|
|
128
|
-
const result = this.create(this.value);
|
|
129
|
-
for (const [key, value] of other.value.entries()) {
|
|
101
|
+
widenValue(other) {
|
|
102
|
+
const result = new Map(this.value);
|
|
103
|
+
for (const [key, otherValue] of other.value.entries()) {
|
|
130
104
|
const currValue = result.get(key);
|
|
131
105
|
if (currValue === undefined) {
|
|
132
|
-
result.set(key,
|
|
106
|
+
result.set(key, otherValue);
|
|
133
107
|
}
|
|
134
108
|
else {
|
|
135
|
-
result.set(key, currValue.widen(
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
narrow(other) {
|
|
141
|
-
if (this.value === lattice_1.Bottom || other.value === lattice_1.Bottom) {
|
|
142
|
-
return this.bottom();
|
|
143
|
-
}
|
|
144
|
-
const result = this.create(this.value);
|
|
145
|
-
for (const key of result.value.keys()) {
|
|
146
|
-
if (!other.has(key)) {
|
|
147
|
-
result.remove(key);
|
|
109
|
+
result.set(key, currValue.widen(otherValue));
|
|
148
110
|
}
|
|
149
111
|
}
|
|
150
|
-
|
|
151
|
-
const currValue = result.get(key);
|
|
152
|
-
if (currValue !== undefined) {
|
|
153
|
-
result.set(key, currValue.narrow(value));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return result;
|
|
157
|
-
}
|
|
158
|
-
concretize(limit) {
|
|
159
|
-
if (this.value === lattice_1.Bottom) {
|
|
160
|
-
return new Set();
|
|
161
|
-
}
|
|
162
|
-
let mappings = new Set([new Map()]);
|
|
163
|
-
for (const [key, value] of this.value.entries()) {
|
|
164
|
-
const concreteValues = value.concretize(limit);
|
|
165
|
-
if (concreteValues === lattice_1.Top) {
|
|
166
|
-
return lattice_1.Top;
|
|
167
|
-
}
|
|
168
|
-
const newMappings = new Set();
|
|
169
|
-
for (const state of mappings) {
|
|
170
|
-
for (const concrete of concreteValues) {
|
|
171
|
-
if (newMappings.size > limit) {
|
|
172
|
-
return lattice_1.Top;
|
|
173
|
-
}
|
|
174
|
-
const map = new Map(state);
|
|
175
|
-
map.set(key, concrete);
|
|
176
|
-
newMappings.add(map);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
mappings = newMappings;
|
|
180
|
-
}
|
|
181
|
-
return mappings;
|
|
112
|
+
return this.create(result);
|
|
182
113
|
}
|
|
183
|
-
|
|
184
|
-
if (concrete === lattice_1.Top) {
|
|
185
|
-
return this.top();
|
|
186
|
-
}
|
|
187
|
-
else if (concrete.size === 0) {
|
|
188
|
-
return this.bottom();
|
|
189
|
-
}
|
|
190
|
-
const mapping = new Map();
|
|
191
|
-
for (const concreteMapping of concrete) {
|
|
192
|
-
for (const [key, value] of concreteMapping) {
|
|
193
|
-
const set = mapping.get(key);
|
|
194
|
-
if (set === undefined) {
|
|
195
|
-
mapping.set(key, new Set([value]));
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
set.add(value);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
114
|
+
narrowValue(other) {
|
|
202
115
|
const result = new Map();
|
|
203
|
-
for (const [key,
|
|
204
|
-
|
|
116
|
+
for (const [key, currValue] of this.value.entries()) {
|
|
117
|
+
const otherValue = other.value.get(key);
|
|
118
|
+
if (otherValue !== undefined) {
|
|
119
|
+
result.set(key, currValue.narrow(otherValue));
|
|
120
|
+
}
|
|
205
121
|
}
|
|
206
122
|
return this.create(result);
|
|
207
123
|
}
|
|
208
|
-
|
|
209
|
-
if (this.value === lattice_1.Bottom) {
|
|
210
|
-
return this.value.description;
|
|
211
|
-
}
|
|
124
|
+
jsonify() {
|
|
212
125
|
return Object.fromEntries(this.value.entries().map(([key, value]) => [key, value.toJSON()]));
|
|
213
126
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return lattice_1.BottomSymbol;
|
|
217
|
-
}
|
|
218
|
-
return '(' + this.value.entries().toArray().map(([key, value]) => `${abstract_domain_1.AbstractDomain.toString(key)} -> ${value.toString()}`).join(', ') + ')';
|
|
127
|
+
stringify() {
|
|
128
|
+
return '(' + this.value.entries().toArray().map(([key, value]) => `${key} -> ${value.toString()}`).join(', ') + ')';
|
|
219
129
|
}
|
|
220
130
|
isTop() {
|
|
221
131
|
return this.value !== lattice_1.Bottom && this.value.size === 0;
|
|
@@ -3,7 +3,7 @@ import { type AnyAbstractDomain } from './abstract-domain';
|
|
|
3
3
|
/**
|
|
4
4
|
* An interface for state-like domains that store abstract values for AST nodes.
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface StateDomain<Domain extends AnyAbstractDomain> {
|
|
7
7
|
/**
|
|
8
8
|
* The underlying value domain of the state domain.
|
|
9
9
|
*/
|
|
@@ -28,7 +28,7 @@ export interface StateDomainLike<Domain extends AnyAbstractDomain> {
|
|
|
28
28
|
/**
|
|
29
29
|
* A type representing any state abstract domain that stores abstract values for AST nodes.
|
|
30
30
|
*/
|
|
31
|
-
export type AnyStateDomain<Domain extends AnyAbstractDomain = AnyAbstractDomain> = AnyAbstractDomain &
|
|
31
|
+
export type AnyStateDomain<Domain extends AnyAbstractDomain = AnyAbstractDomain> = AnyAbstractDomain & StateDomain<Domain>;
|
|
32
32
|
/**
|
|
33
33
|
* The type of the value abstract domain of a state abstract domain.
|
|
34
34
|
* @template StateDomain - The state abstract domain to get the value abstract domain type for
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Ternary } from '../../util/logic';
|
|
2
|
+
/**
|
|
3
|
+
* A value abstract domain with abstraction function and a satisfiability check for concrete values.
|
|
4
|
+
*/
|
|
5
|
+
export interface ValueDomain<T> {
|
|
6
|
+
/**
|
|
7
|
+
* Abstracts a list of concrete values into an abstract value of the value abstract domain.
|
|
8
|
+
*/
|
|
9
|
+
from(...values: T[]): this;
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether the current abstract value satisfies a concrete value (i.e. includes a concrete value).
|
|
12
|
+
* @see {@link Ternary} for the returned satisfiability result
|
|
13
|
+
*/
|
|
14
|
+
satisfies(value: T): Ternary;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A string value abstract domain with string operations and a satisfiability check.
|
|
18
|
+
*/
|
|
19
|
+
export interface StringDomain extends ValueDomain<string> {
|
|
20
|
+
/**
|
|
21
|
+
* Concatenates this string abstract value with another string abstract value.
|
|
22
|
+
*/
|
|
23
|
+
concat(other: this): this;
|
|
24
|
+
satisfies(value: string, comparator?: StringComparator): Ternary;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A numeric value abstract domain with numeric operations and a satisfiability check.
|
|
28
|
+
*/
|
|
29
|
+
export interface NumericDomain extends ValueDomain<number> {
|
|
30
|
+
/**
|
|
31
|
+
* Negates this numeric abstract value.
|
|
32
|
+
*/
|
|
33
|
+
negate(): this;
|
|
34
|
+
/**
|
|
35
|
+
* Adds an numeric abstract value to this numeric abstract value.
|
|
36
|
+
*/
|
|
37
|
+
add(other: this): this;
|
|
38
|
+
/**
|
|
39
|
+
* Subtracts an numeric abstract value from this numeric abstract value.
|
|
40
|
+
*/
|
|
41
|
+
subtract(other: this): this;
|
|
42
|
+
/**
|
|
43
|
+
* Multiplies this numeric abstract value with another numeric abstract value.
|
|
44
|
+
*/
|
|
45
|
+
multiply(other: this): this;
|
|
46
|
+
/**
|
|
47
|
+
* Divides this numeric abstract value by another numeric abstract value.
|
|
48
|
+
*/
|
|
49
|
+
divide(other: this): this;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the minimum of this numeric abstract value and another numeric abstract value.
|
|
52
|
+
*/
|
|
53
|
+
min(other: this): this;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the maximum of this numeric abstract value and another numeric abstract value.
|
|
56
|
+
*/
|
|
57
|
+
max(other: this): this;
|
|
58
|
+
satisfies(value: number, comparator?: NumericalComparator): Ternary;
|
|
59
|
+
}
|
|
60
|
+
export interface BooleanDomain extends ValueDomain<boolean> {
|
|
61
|
+
/**
|
|
62
|
+
* Negates this boolean abstract value.
|
|
63
|
+
*/
|
|
64
|
+
negate(): this;
|
|
65
|
+
/**
|
|
66
|
+
* Creates the conjunction between this boolean abstract value and another boolean abstract value.
|
|
67
|
+
*/
|
|
68
|
+
and(other: this): this;
|
|
69
|
+
/**
|
|
70
|
+
* Creates the disjunction between this boolean abstract value and another boolean abstract value.
|
|
71
|
+
*/
|
|
72
|
+
or(other: this): this;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A set value abstract domain with set operations and a satisfiability check.
|
|
76
|
+
*/
|
|
77
|
+
export interface SetDomain<T> extends ValueDomain<ReadonlySet<T>> {
|
|
78
|
+
/**
|
|
79
|
+
* Creates the union between this set abstract value and another set abstract value.
|
|
80
|
+
*/
|
|
81
|
+
union(other: this): this;
|
|
82
|
+
/**
|
|
83
|
+
* Creates the intersection between this set abstract value and another set abstract value.
|
|
84
|
+
*/
|
|
85
|
+
intersect(other: this): this;
|
|
86
|
+
/**
|
|
87
|
+
* Subtracts another set abstract value from this set abstract value creating the set difference.
|
|
88
|
+
*/
|
|
89
|
+
subtract(other: this): this;
|
|
90
|
+
satisfies(value: ReadonlySet<T>, comparator?: SetComparator): Ternary;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Represents the different types of string comparators for satisfiability checks for an abstract domain.
|
|
94
|
+
*/
|
|
95
|
+
export declare enum StringComparator {
|
|
96
|
+
Equal = 0,
|
|
97
|
+
StartsWith = 1,
|
|
98
|
+
EndsWith = 2,
|
|
99
|
+
Includes = 3
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
|
|
103
|
+
*/
|
|
104
|
+
export declare enum NumericalComparator {
|
|
105
|
+
Equal = 0,
|
|
106
|
+
Less = 1,
|
|
107
|
+
LessOrEqual = 2,
|
|
108
|
+
Greater = 3,
|
|
109
|
+
GreaterOrEqual = 4
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Represents the different types of set comparators for satisfiability checks for an abstract domain.
|
|
113
|
+
*/
|
|
114
|
+
export declare enum SetComparator {
|
|
115
|
+
Equal = 0,
|
|
116
|
+
Subset = 1,
|
|
117
|
+
SubsetOrEqual = 2,
|
|
118
|
+
Intersect = 3,
|
|
119
|
+
NoIntersect = 4
|
|
120
|
+
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetComparator = exports.NumericalComparator = void 0;
|
|
3
|
+
exports.SetComparator = exports.NumericalComparator = exports.StringComparator = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents the different types of string comparators for satisfiability checks for an abstract domain.
|
|
6
|
+
*/
|
|
7
|
+
var StringComparator;
|
|
8
|
+
(function (StringComparator) {
|
|
9
|
+
StringComparator[StringComparator["Equal"] = 0] = "Equal";
|
|
10
|
+
StringComparator[StringComparator["StartsWith"] = 1] = "StartsWith";
|
|
11
|
+
StringComparator[StringComparator["EndsWith"] = 2] = "EndsWith";
|
|
12
|
+
StringComparator[StringComparator["Includes"] = 3] = "Includes";
|
|
13
|
+
})(StringComparator || (exports.StringComparator = StringComparator = {}));
|
|
4
14
|
/**
|
|
5
15
|
* Represents the different types of numerical comparators for satisfiability checks for an abstract domain.
|
|
6
16
|
*/
|
|
@@ -20,5 +30,7 @@ var SetComparator;
|
|
|
20
30
|
SetComparator[SetComparator["Equal"] = 0] = "Equal";
|
|
21
31
|
SetComparator[SetComparator["Subset"] = 1] = "Subset";
|
|
22
32
|
SetComparator[SetComparator["SubsetOrEqual"] = 2] = "SubsetOrEqual";
|
|
33
|
+
SetComparator[SetComparator["Intersect"] = 3] = "Intersect";
|
|
34
|
+
SetComparator[SetComparator["NoIntersect"] = 4] = "NoIntersect";
|
|
23
35
|
})(SetComparator || (exports.SetComparator = SetComparator = {}));
|
|
24
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=value-abstract-domain.js.map
|
package/benchmark/slicer.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { MergeableRecord } from '../util/objects';
|
|
6
6
|
import type { DataflowInformation } from '../dataflow/info';
|
|
7
7
|
import type { SliceResult } from '../slicing/static/slicer-types';
|
|
8
|
-
import type { ReconstructionResult } from '../reconstruct/reconstruct';
|
|
8
|
+
import type { InlineFull, ReconstructionResult } from '../reconstruct/reconstruct';
|
|
9
9
|
import type { PerSliceStats, SlicerStats, SlicerStatsDfShape } from './stats/stats';
|
|
10
10
|
import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
11
11
|
import { SlicingCriteria } from '../slicing/criterion/parse';
|
|
@@ -73,7 +73,7 @@ export declare class BenchmarkSlicer {
|
|
|
73
73
|
* Initialize the slicer on the given request.
|
|
74
74
|
* Can only be called once for each instance.
|
|
75
75
|
*/
|
|
76
|
-
init(request: RParseRequestFromFile | RParseRequestFromText, config: FlowrConfig, autoSelectIf?: AutoSelectPredicate, threshold?: number, inlineSources?: boolean, includeCallees?: boolean): Promise<void>;
|
|
76
|
+
init(request: RParseRequestFromFile | RParseRequestFromText, config: FlowrConfig, autoSelectIf?: AutoSelectPredicate, threshold?: number, inlineSources?: boolean, includeCallees?: boolean, inlineFull?: InlineFull): Promise<void>;
|
|
77
77
|
private calculateStatsAfterInit;
|
|
78
78
|
/**
|
|
79
79
|
* Slice for the given {@link SlicingCriteria}.
|
package/benchmark/slicer.js
CHANGED
|
@@ -62,7 +62,7 @@ class BenchmarkSlicer {
|
|
|
62
62
|
* Initialize the slicer on the given request.
|
|
63
63
|
* Can only be called once for each instance.
|
|
64
64
|
*/
|
|
65
|
-
async init(request, config, autoSelectIf, threshold, inlineSources, includeCallees) {
|
|
65
|
+
async init(request, config, autoSelectIf, threshold, inlineSources, includeCallees, inlineFull) {
|
|
66
66
|
(0, assert_1.guard)(this.stats === undefined, 'cannot initialize the slicer twice');
|
|
67
67
|
// we know these are in sync so we just cast to one of them
|
|
68
68
|
this.parser = await this.commonMeasurements.measure('initialize R session', async () => {
|
|
@@ -82,6 +82,7 @@ class BenchmarkSlicer {
|
|
|
82
82
|
threshold,
|
|
83
83
|
inlineSources,
|
|
84
84
|
includeCallees,
|
|
85
|
+
inlineFull,
|
|
85
86
|
});
|
|
86
87
|
this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).files.map(p => p.parsed);
|
|
87
88
|
this.normalizedAst = await this.measureCommonStep('normalize', 'normalize R AST');
|
|
@@ -324,10 +325,10 @@ class BenchmarkSlicer {
|
|
|
324
325
|
getInferredRange(value) {
|
|
325
326
|
if (value.isValue()) {
|
|
326
327
|
if (value instanceof set_range_domain_1.SetRangeDomain) {
|
|
327
|
-
return value.isFinite() ? value.
|
|
328
|
+
return value.isFinite() ? value.may.size : Infinity;
|
|
328
329
|
}
|
|
329
330
|
else {
|
|
330
|
-
return value.
|
|
331
|
+
return value.upper - value.lower;
|
|
331
332
|
}
|
|
332
333
|
}
|
|
333
334
|
return 0;
|
|
@@ -341,10 +342,10 @@ class BenchmarkSlicer {
|
|
|
341
342
|
return 'infinite';
|
|
342
343
|
}
|
|
343
344
|
else if (value instanceof set_range_domain_1.SetRangeDomain) {
|
|
344
|
-
return Math.floor(value.value.
|
|
345
|
+
return Math.floor(value.value.must.size + (value.value.may.size / 2));
|
|
345
346
|
}
|
|
346
347
|
else {
|
|
347
|
-
return Math.floor((value.
|
|
348
|
+
return Math.floor((value.lower + value.upper) / 2);
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
351
|
return 'bottom';
|
package/cli/common/options.d.ts
CHANGED
|
@@ -281,6 +281,16 @@ export declare const slicerOptions: [{
|
|
|
281
281
|
readonly name: "inline";
|
|
282
282
|
readonly type: BooleanConstructor;
|
|
283
283
|
readonly description: "Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.";
|
|
284
|
+
}, {
|
|
285
|
+
readonly name: "inline-full";
|
|
286
|
+
readonly alias: "I";
|
|
287
|
+
readonly type: BooleanConstructor;
|
|
288
|
+
readonly description: "Inline {italic all} files into one, in flowR's loading order (respecting implicit sources), independent of whether they are sourced explicitly.";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "inline-banner";
|
|
291
|
+
readonly alias: "B";
|
|
292
|
+
readonly type: BooleanConstructor;
|
|
293
|
+
readonly description: "Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.";
|
|
284
294
|
}, {
|
|
285
295
|
readonly name: "include-callees";
|
|
286
296
|
readonly type: BooleanConstructor;
|
package/cli/common/options.js
CHANGED
|
@@ -64,6 +64,8 @@ exports.slicerOptions = [
|
|
|
64
64
|
{ name: 'output', alias: 'o', type: String, description: 'File to write all the generated quads to (defaults to the commandline)', typeLabel: '{underline file}' },
|
|
65
65
|
{ name: 'no-magic-comments', alias: 'm', type: Boolean, description: 'Disable the effects of magic comments which force lines to be included.' },
|
|
66
66
|
{ name: 'inline', type: Boolean, description: 'Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.' },
|
|
67
|
+
{ name: 'inline-full', alias: 'I', type: Boolean, description: 'Inline {italic all} files into one, in flowR\'s loading order (respecting implicit sources), independent of whether they are sourced explicitly.' },
|
|
68
|
+
{ name: 'inline-banner', alias: 'B', type: Boolean, description: 'Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.' },
|
|
67
69
|
{ name: 'include-callees', type: Boolean, description: 'If slicing backward, continue past a function-definition boundary, also including the definition\'s binding and call sites.' },
|
|
68
70
|
{ name: 'api', type: Boolean, description: 'Instead of human-readable output, dump a lot of json with the results of all intermediate steps.' },
|
|
69
71
|
];
|
|
@@ -87,6 +87,16 @@ declare const _scripts: {
|
|
|
87
87
|
readonly name: "inline";
|
|
88
88
|
readonly type: BooleanConstructor;
|
|
89
89
|
readonly description: "Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text.";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "inline-full";
|
|
92
|
+
readonly alias: "I";
|
|
93
|
+
readonly type: BooleanConstructor;
|
|
94
|
+
readonly description: "Inline {italic all} files into one, in flowR's loading order (respecting implicit sources), independent of whether they are sourced explicitly.";
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "inline-banner";
|
|
97
|
+
readonly alias: "B";
|
|
98
|
+
readonly type: BooleanConstructor;
|
|
99
|
+
readonly description: "Together with {bold --inline-full}: precede every inlined file with a banner comment naming it.";
|
|
90
100
|
}, {
|
|
91
101
|
readonly name: "include-callees";
|
|
92
102
|
readonly type: BooleanConstructor;
|
|
@@ -28,6 +28,10 @@ export declare const flowrMainOptionDefinitions: [{
|
|
|
28
28
|
readonly name: "no-ansi";
|
|
29
29
|
readonly type: BooleanConstructor;
|
|
30
30
|
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "no-fs";
|
|
33
|
+
readonly type: BooleanConstructor;
|
|
34
|
+
readonly description: "Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.";
|
|
31
35
|
}, {
|
|
32
36
|
readonly name: "port";
|
|
33
37
|
readonly type: NumberConstructor;
|
|
@@ -41,6 +41,11 @@ exports.flowrMainOptionDefinitions = [
|
|
|
41
41
|
type: Boolean,
|
|
42
42
|
description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.'
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
name: 'no-fs',
|
|
46
|
+
type: Boolean,
|
|
47
|
+
description: 'Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.'
|
|
48
|
+
},
|
|
44
49
|
{
|
|
45
50
|
name: 'port',
|
|
46
51
|
type: Number,
|
package/cli/flowr.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface FlowrCliOptions {
|
|
|
3
3
|
'config-file': string;
|
|
4
4
|
'config-json': string;
|
|
5
5
|
'no-ansi': boolean;
|
|
6
|
+
'no-fs': boolean;
|
|
6
7
|
'r-path': string | undefined;
|
|
7
8
|
'r-session-access': boolean;
|
|
8
9
|
execute: string | undefined;
|
|
@@ -57,6 +58,10 @@ export declare const optionHelp: ({
|
|
|
57
58
|
readonly name: "no-ansi";
|
|
58
59
|
readonly type: BooleanConstructor;
|
|
59
60
|
readonly description: "Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "no-fs";
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly description: "Read nothing from the file system: ignore any flowR config file, do not load or save the repl history, and disable the on-disk signature database.";
|
|
60
65
|
}, {
|
|
61
66
|
readonly name: "port";
|
|
62
67
|
readonly type: NumberConstructor;
|
package/cli/flowr.js
CHANGED
|
@@ -93,14 +93,19 @@ function createConfig() {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
if (config == undefined) {
|
|
96
|
-
if (options['
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
if (options['no-fs']) {
|
|
97
|
+
config = config_1.FlowrConfig.default();
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
if (options['config-file']) {
|
|
101
|
+
// validate it exists
|
|
102
|
+
if (!fs_1.default.existsSync(path_1.default.resolve(options['config-file']))) {
|
|
103
|
+
log_1.log.error(`Config file '${options['config-file']}' does not exist`);
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
101
106
|
}
|
|
107
|
+
config = config_1.FlowrConfig.fromFile(options['config-file'] ?? flowr_main_options_1.defaultConfigFile);
|
|
102
108
|
}
|
|
103
|
-
config = config_1.FlowrConfig.fromFile(options['config-file'] ?? flowr_main_options_1.defaultConfigFile);
|
|
104
109
|
}
|
|
105
110
|
// for all options that we manually supply that have a config equivalent, set them in the config
|
|
106
111
|
config = config_1.FlowrConfig.amend(config, c => {
|
|
@@ -119,6 +124,9 @@ function createConfig() {
|
|
|
119
124
|
if (options['default-engine']) {
|
|
120
125
|
c.defaultEngine = options['default-engine'];
|
|
121
126
|
}
|
|
127
|
+
if (options['no-fs']) {
|
|
128
|
+
c.solver.sigdb.enabled = false;
|
|
129
|
+
}
|
|
122
130
|
return c;
|
|
123
131
|
});
|
|
124
132
|
return config;
|
|
@@ -189,7 +197,7 @@ async function mainRepl() {
|
|
|
189
197
|
await (0, print_version_1.printVersionRepl)(defaultEngine);
|
|
190
198
|
const w = (x) => ansi_1.ansiFormatter.format(x, { color: 7 /* Colors.White */, effect: ansi_1.ColorEffect.Foreground, style: 3 /* FontStyles.Italic */ });
|
|
191
199
|
console.log(w('use ') + ansi_1.ansiFormatter.format(':help', { color: 7 /* Colors.White */, effect: ansi_1.ColorEffect.Foreground, style: 1 /* FontStyles.Bold */ }) + w(' to get a list of available commands.'));
|
|
192
|
-
await (0, core_1.repl)({ analyzer, allowRSessionAccess });
|
|
200
|
+
await (0, core_1.repl)({ analyzer, allowRSessionAccess, ...(options['no-fs'] ? { historyFile: '' } : {}) });
|
|
193
201
|
}
|
|
194
202
|
(0, proc_1.exitSafe)(0);
|
|
195
203
|
}
|