@eagleoutice/flowr 2.12.3 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -12,8 +12,9 @@ const cfg_kind_1 = require("../../../project/cfg-kind");
|
|
|
12
12
|
const extract_cfg_1 = require("../../../control-flow/extract-cfg");
|
|
13
13
|
const identify_link_to_relation_1 = require("./identify-link-to-relation");
|
|
14
14
|
const identifier_1 = require("../../../dataflow/environments/identifier");
|
|
15
|
-
const
|
|
15
|
+
const df_helper_1 = require("../../../dataflow/graph/df-helper");
|
|
16
16
|
const queue_1 = require("../../../util/collections/queue");
|
|
17
|
+
const r_base_packages_1 = require("../../../util/r-base-packages");
|
|
17
18
|
/* if the node is effected by nse, we have an ingoing nse edge */
|
|
18
19
|
function isQuoted(node, graph) {
|
|
19
20
|
const vertex = graph.ingoingEdges(node);
|
|
@@ -189,6 +190,28 @@ function doesFilepathMatch(file, filter) {
|
|
|
189
190
|
}
|
|
190
191
|
return filter.filter(file);
|
|
191
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Whether a bare (unqualified) callee named `name` could originate from `target`, resolved through the
|
|
195
|
+
* signature database: base R's export owner, then any package the loaded sources record as exporting `name`.
|
|
196
|
+
* Only meaningful once the version plugins are initialized (see {@link primeSigDbForNamespaceFilter}).
|
|
197
|
+
*/
|
|
198
|
+
function bareCallOwnedBy(name, target, deps) {
|
|
199
|
+
return (0, r_base_packages_1.baseRExportOwner)(name) === target || deps.packagesExporting(name).includes(target);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Whether a bare-callee sigdb fallback is worth attempting for `queries`: some query filters by
|
|
203
|
+
* {@link CallContextQuery#callTargetNamespace} and a signature source is actually loaded. When so, this also
|
|
204
|
+
* forces the version plugins to initialize (the same {@link ReadOnlyFlowrAnalyzerDependenciesContext#getDependencies}
|
|
205
|
+
* priming the `undefined-symbol` linter relies on) -- otherwise `packagesExporting` answers empty until
|
|
206
|
+
* something else happens to trigger it.
|
|
207
|
+
*/
|
|
208
|
+
function primeSigDbForNamespaceFilter(queries, deps) {
|
|
209
|
+
if (!queries.some(q => q.callTargetNamespace !== undefined) || deps.signatureSources().length === 0) {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
deps.getDependencies();
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
192
215
|
function isParameterDefaultValue(nodeId, ast) {
|
|
193
216
|
let node = ast.idMap.get(nodeId);
|
|
194
217
|
while (node !== undefined) {
|
|
@@ -212,12 +235,14 @@ function isParameterDefaultValue(nodeId, ast) {
|
|
|
212
235
|
async function executeCallContextQueries({ analyzer }, queries) {
|
|
213
236
|
const dataflow = await analyzer.dataflow();
|
|
214
237
|
const ast = await analyzer.normalize();
|
|
238
|
+
const deps = analyzer.inspectContext().deps;
|
|
215
239
|
/* omit performance page load */
|
|
216
240
|
const now = Date.now();
|
|
217
241
|
/* the node id and call targets if present */
|
|
218
242
|
const initialIdCollector = new two_layer_collector_1.TwoLayerCollector();
|
|
219
243
|
/* promote all strings to regex patterns */
|
|
220
244
|
const { promotedQueries, requiresCfg } = promoteQueryCallNames(queries);
|
|
245
|
+
const sigDbReady = primeSigDbForNamespaceFilter(promotedQueries, deps);
|
|
221
246
|
let cfg = undefined;
|
|
222
247
|
if (requiresCfg) {
|
|
223
248
|
cfg = await analyzer.controlflow(undefined, cfg_kind_1.CfgKind.Quick);
|
|
@@ -287,8 +312,10 @@ async function executeCallContextQueries({ analyzer }, queries) {
|
|
|
287
312
|
}
|
|
288
313
|
}
|
|
289
314
|
if (query.callTargetNamespace !== undefined) {
|
|
290
|
-
const pkg = identifier_1.Identifier.getNamespace(
|
|
291
|
-
|
|
315
|
+
const pkg = identifier_1.Identifier.getNamespace(df_helper_1.Dataflow.qualify(nodeId, dataflow.graph) ?? info.name);
|
|
316
|
+
// a bare callee (no syntactic/resolved namespace) is not yet a mismatch -- consult the sigdb for who exports it
|
|
317
|
+
const owned = pkg === undefined ? sigDbReady && bareCallOwnedBy(n, query.callTargetNamespace, deps) : pkg === query.callTargetNamespace;
|
|
318
|
+
if (!owned) {
|
|
292
319
|
continue;
|
|
293
320
|
}
|
|
294
321
|
}
|
|
@@ -122,6 +122,7 @@ export interface CallContextQueryResult extends BaseQueryResult {
|
|
|
122
122
|
}
|
|
123
123
|
export type CallContextQuery<CallName extends CallNameTypes = CallNameTypes, AttachLinkInfo = NoInfo> = DefaultCallContextQueryFormat<CallName> | SubCallContextQueryFormat<CallName, AttachLinkInfo>;
|
|
124
124
|
export declare const CallContextQueryDefinition: {
|
|
125
|
+
readonly title: "Call-Context Query";
|
|
125
126
|
readonly executor: typeof executeCallContextQueries;
|
|
126
127
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
127
128
|
readonly schema: Joi.ObjectSchema<any>;
|
|
@@ -26,6 +26,7 @@ const CallContextQueryLinkTo = joi_1.default.alternatives([
|
|
|
26
26
|
}).description('Allows to link nested calls to their parent calls. This way, you can link an `assert_equal` call to the parent `test_that` call etc.')
|
|
27
27
|
]);
|
|
28
28
|
exports.CallContextQueryDefinition = {
|
|
29
|
+
title: 'Call-Context Query',
|
|
29
30
|
executor: call_context_query_executor_1.executeCallContextQueries,
|
|
30
31
|
asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
|
|
31
32
|
const out = queryResults;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeCallGraphQuery = executeCallGraphQuery;
|
|
4
4
|
const log_1 = require("../../../util/log");
|
|
5
|
+
const expand_library_internals_1 = require("./expand-library-internals");
|
|
5
6
|
/**
|
|
6
7
|
* Executes the given call graph queries.
|
|
7
8
|
*/
|
|
@@ -11,11 +12,12 @@ async function executeCallGraphQuery({ analyzer }, queries) {
|
|
|
11
12
|
}
|
|
12
13
|
const startTime = Date.now();
|
|
13
14
|
const graph = await analyzer.callGraph();
|
|
15
|
+
const expand = queries.some(q => q.expandLibraryInternals);
|
|
14
16
|
return {
|
|
15
17
|
'.meta': {
|
|
16
18
|
timing: Date.now() - startTime
|
|
17
19
|
},
|
|
18
|
-
graph
|
|
20
|
+
graph: expand ? (0, expand_library_internals_1.expandCallGraphLibraryInternals)(graph, analyzer.inspectContext().deps) : graph
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=call-graph-query-executor.js.map
|
|
@@ -8,12 +8,18 @@ import { CallGraph } from '../../../dataflow/graph/call-graph';
|
|
|
8
8
|
*/
|
|
9
9
|
export interface CallGraphQuery extends BaseQueryFormat {
|
|
10
10
|
readonly type: 'call-graph';
|
|
11
|
+
/**
|
|
12
|
+
* If set, expand library/built-in leaf calls into their internal callees using the signature database's
|
|
13
|
+
* `transitiveCallees` (a no-op if no signature database is loaded). Default false.
|
|
14
|
+
*/
|
|
15
|
+
readonly expandLibraryInternals?: boolean;
|
|
11
16
|
}
|
|
12
17
|
export interface CallGraphQueryResult extends BaseQueryResult {
|
|
13
18
|
/** Please be aware that this is the graph in its JSON representation, use {@link DataflowGraph#fromJson} if the result is serialized */
|
|
14
19
|
readonly graph: CallGraph;
|
|
15
20
|
}
|
|
16
21
|
export declare const CallGraphQueryDefinition: {
|
|
22
|
+
readonly title: "Call-Graph Query";
|
|
17
23
|
readonly executor: typeof executeCallGraphQuery;
|
|
18
24
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
19
25
|
readonly schema: Joi.ObjectSchema<any>;
|
|
@@ -10,6 +10,7 @@ const time_1 = require("../../../util/text/time");
|
|
|
10
10
|
const joi_1 = __importDefault(require("joi"));
|
|
11
11
|
const call_graph_1 = require("../../../dataflow/graph/call-graph");
|
|
12
12
|
exports.CallGraphQueryDefinition = {
|
|
13
|
+
title: 'Call-Graph Query',
|
|
13
14
|
executor: call_graph_query_executor_1.executeCallGraphQuery,
|
|
14
15
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
15
16
|
const out = queryResults;
|
|
@@ -19,6 +20,7 @@ exports.CallGraphQueryDefinition = {
|
|
|
19
20
|
},
|
|
20
21
|
schema: joi_1.default.object({
|
|
21
22
|
type: joi_1.default.string().valid('call-graph').required().description('The type of the query.'),
|
|
23
|
+
expandLibraryInternals: joi_1.default.boolean().optional().description('Expand library/built-in leaf calls into their internal callees via the signature database (default false).'),
|
|
22
24
|
}).description('A query to compute the Call Graph of the analyzed project.'),
|
|
23
25
|
flattenInvolvedNodes: queryResults => {
|
|
24
26
|
const flattened = [];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
2
|
+
import type { CallGraph } from '../../../dataflow/graph/call-graph';
|
|
3
|
+
import type { ReadOnlyFlowrAnalyzerDependenciesContext } from '../../../project/context/flowr-analyzer-dependencies-context';
|
|
4
|
+
/** the internal callees of a library/built-in leaf call, and the package they belong to */
|
|
5
|
+
export interface LibraryLeafExpansion {
|
|
6
|
+
readonly pkg: string;
|
|
7
|
+
readonly callees: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The transitive internal callees of a library/built-in leaf call `id` (a `built-in:pkg:fn` node id), resolved
|
|
11
|
+
* from the project's loaded signature-database sources.
|
|
12
|
+
*/
|
|
13
|
+
export declare function transitiveLibraryCallees(id: NodeId, deps: ReadOnlyFlowrAnalyzerDependenciesContext): LibraryLeafExpansion | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Expands every library/built-in leaf call reachable in `graph` into its internal callees (see
|
|
16
|
+
* {@link transitiveLibraryCallees}), adding one synthetic `pkg:calleeName` edge per expanded callee straight off
|
|
17
|
+
* the leaf. Returns a fresh copy of `graph`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function expandCallGraphLibraryInternals(graph: CallGraph, deps: ReadOnlyFlowrAnalyzerDependenciesContext): CallGraph;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transitiveLibraryCallees = transitiveLibraryCallees;
|
|
4
|
+
exports.expandCallGraphLibraryInternals = expandCallGraphLibraryInternals;
|
|
5
|
+
const node_id_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
6
|
+
const graph_1 = require("../../../dataflow/graph/graph");
|
|
7
|
+
const edge_1 = require("../../../dataflow/graph/edge");
|
|
8
|
+
/**
|
|
9
|
+
* The transitive internal callees of a library/built-in leaf call `id` (a `built-in:pkg:fn` node id), resolved
|
|
10
|
+
* from the project's loaded signature-database sources.
|
|
11
|
+
*/
|
|
12
|
+
function transitiveLibraryCallees(id, deps) {
|
|
13
|
+
const pkgFn = node_id_1.NodeId.toPkgFn(id);
|
|
14
|
+
if (pkgFn === undefined) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const [pkg, fn] = pkgFn;
|
|
18
|
+
const version = deps.getDependency(pkg)?.resolvedVersion;
|
|
19
|
+
for (const src of deps.signatureSources()) {
|
|
20
|
+
if (!src.has(pkg)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const callees = (version !== undefined ? src.transitiveCallees(pkg, fn, version) : undefined) ?? src.transitiveCallees(pkg, fn);
|
|
24
|
+
if (callees !== undefined) {
|
|
25
|
+
return { pkg, callees };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Expands every library/built-in leaf call reachable in `graph` into its internal callees (see
|
|
32
|
+
* {@link transitiveLibraryCallees}), adding one synthetic `pkg:calleeName` edge per expanded callee straight off
|
|
33
|
+
* the leaf. Returns a fresh copy of `graph`.
|
|
34
|
+
*/
|
|
35
|
+
function expandCallGraphLibraryInternals(graph, deps) {
|
|
36
|
+
const augmented = new graph_1.DataflowGraph(graph.idMap);
|
|
37
|
+
augmented.mergeVertices(graph);
|
|
38
|
+
const cache = new Map();
|
|
39
|
+
for (const [from, tos] of graph.edges()) {
|
|
40
|
+
for (const [to, edge] of tos.entries()) {
|
|
41
|
+
augmented.addEdge(from, to, edge.types);
|
|
42
|
+
if (!node_id_1.NodeId.isBuiltIn(to)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (!cache.has(to)) {
|
|
46
|
+
cache.set(to, transitiveLibraryCallees(to, deps));
|
|
47
|
+
}
|
|
48
|
+
const expansion = cache.get(to);
|
|
49
|
+
if (expansion === undefined) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
for (const callee of expansion.callees) {
|
|
53
|
+
augmented.addEdge(to, node_id_1.NodeId.fromPkgFn(expansion.pkg, callee), edge_1.EdgeType.Calls);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return augmented;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=expand-library-internals.js.map
|
|
@@ -14,6 +14,7 @@ export interface DataflowClusterQueryResult extends BaseQueryResult {
|
|
|
14
14
|
readonly clusters: DataflowGraphClusters;
|
|
15
15
|
}
|
|
16
16
|
export declare const ClusterQueryDefinition: {
|
|
17
|
+
readonly title: "Dataflow Cluster Query";
|
|
17
18
|
readonly executor: typeof executeDataflowClusterQuery;
|
|
18
19
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
19
20
|
readonly schema: Joi.ObjectSchema<any>;
|
|
@@ -10,6 +10,7 @@ const cluster_query_executor_1 = require("./cluster-query-executor");
|
|
|
10
10
|
const query_print_1 = require("../../query-print");
|
|
11
11
|
const df_helper_1 = require("../../../dataflow/graph/df-helper");
|
|
12
12
|
exports.ClusterQueryDefinition = {
|
|
13
|
+
title: 'Dataflow Cluster Query',
|
|
13
14
|
executor: cluster_query_executor_1.executeDataflowClusterQuery,
|
|
14
15
|
asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
|
|
15
16
|
const out = queryResults;
|
|
@@ -2,25 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeConfigQuery = executeConfigQuery;
|
|
4
4
|
const log_1 = require("../../../util/log");
|
|
5
|
+
const config_query_format_1 = require("./config-query-format");
|
|
5
6
|
const assert_1 = require("../../../util/assert");
|
|
6
|
-
const objects_1 = require("../../../util/objects");
|
|
7
7
|
/**
|
|
8
8
|
* Executes the given configuration queries using the provided analyzer.
|
|
9
9
|
*/
|
|
10
10
|
function executeConfigQuery({ analyzer }, queries) {
|
|
11
|
-
if (queries.length !== 1) {
|
|
12
|
-
log_1.log.warn('Config query usually expects only up to one query, but got', queries.length);
|
|
13
|
-
}
|
|
14
11
|
const updates = queries.map(q => q.update).filter(assert_1.isNotUndefined);
|
|
12
|
+
if (updates.length > 1) {
|
|
13
|
+
log_1.log.warn('Config query usually expects only up to one update, but got', updates.length);
|
|
14
|
+
}
|
|
15
|
+
// validate here too (not only in the repl parser), so a programmatic / JSON-API update cannot merge an unknown
|
|
16
|
+
// key or a wrong-typed value; the update then lands via `updateConfig`, which invalidates the analysis cache
|
|
15
17
|
for (const update of updates) {
|
|
16
|
-
(0,
|
|
18
|
+
const err = (0, config_query_format_1.validateConfigUpdate)(update);
|
|
19
|
+
if (err !== undefined) {
|
|
20
|
+
log_1.log.warn(`ignoring invalid config update: ${err}`);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
analyzer.updateConfig(update);
|
|
17
24
|
}
|
|
25
|
+
const specialization = analyzer.inspectContext().configSpecialization();
|
|
18
26
|
return Promise.resolve({
|
|
19
27
|
'.meta': {
|
|
20
28
|
/* there is no sense in measuring a get */
|
|
21
29
|
timing: 0
|
|
22
30
|
},
|
|
23
|
-
config: analyzer.flowrConfig
|
|
31
|
+
config: analyzer.flowrConfig,
|
|
32
|
+
...(specialization ? { specialization } : {})
|
|
24
33
|
});
|
|
25
34
|
}
|
|
26
35
|
//# sourceMappingURL=config-query-executor.js.map
|
|
@@ -6,19 +6,33 @@ import { FlowrConfig } from '../../../config';
|
|
|
6
6
|
import type { DeepPartial } from 'ts-essentials';
|
|
7
7
|
import type { ParsedQueryLine, Query } from '../../query';
|
|
8
8
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
9
|
-
import type
|
|
9
|
+
import { type CommandCompletions } from '../../../cli/repl/core';
|
|
10
|
+
import type { ProjectKind } from '../../../project/context/project-kind';
|
|
10
11
|
export interface ConfigQuery extends BaseQueryFormat {
|
|
11
12
|
readonly type: 'config';
|
|
12
13
|
readonly update?: DeepPartial<FlowrConfig>;
|
|
13
|
-
/** a `.`-separated path to inspect (read) a single config value instead of dumping the whole config (repl:
|
|
14
|
+
/** a `.`-separated path to inspect (read) a single config value instead of dumping the whole config (repl: `path`, which also accepts a `*`/`**` glob) */
|
|
14
15
|
readonly inspect?: readonly string[];
|
|
15
16
|
}
|
|
16
17
|
export interface ConfigQueryResult extends BaseQueryResult {
|
|
17
18
|
readonly config: FlowrConfig;
|
|
19
|
+
/** the project-kind specialization applied to {@link config}, if any (surfaced in the repl summary) */
|
|
20
|
+
readonly specialization?: {
|
|
21
|
+
readonly kind: ProjectKind;
|
|
22
|
+
readonly overwrite: DeepPartial<FlowrConfig>;
|
|
23
|
+
};
|
|
18
24
|
}
|
|
19
|
-
declare function configReplCompleter(partialLine: readonly string[],
|
|
20
|
-
|
|
25
|
+
declare function configReplCompleter(partialLine: readonly string[], startingNewArg: boolean, config: FlowrConfig): CommandCompletions;
|
|
26
|
+
/**
|
|
27
|
+
* The first schema violation (an unknown key or a wrong-typed value) in a config update, or `undefined` if it is
|
|
28
|
+
* valid. Shared by the repl line parser and the {@link executeConfigQuery|executor}, so a programmatic or JSON-API
|
|
29
|
+
* update is validated exactly like a `:config +key=value` line and never merges junk or a mistyped value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function validateConfigUpdate(update: DeepPartial<FlowrConfig>, formatter?: OutputFormatter): string | undefined;
|
|
32
|
+
declare function configQueryLineParser(output: ReplOutput, line: readonly string[], config: FlowrConfig): ParsedQueryLine<'config'>;
|
|
21
33
|
export declare const ConfigQueryDefinition: {
|
|
34
|
+
readonly title: "Config Query";
|
|
35
|
+
readonly syntax: "@config [<path> | <glob>] | @config +<path>=<value>";
|
|
22
36
|
readonly executor: typeof executeConfigQuery;
|
|
23
37
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
|
|
24
38
|
readonly completer: typeof configReplCompleter;
|