@eagleoutice/flowr 2.12.3 → 2.13.1
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 +42 -95
- 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 +20 -0
- package/cli/common/options.js +4 -0
- package/cli/common/scripts-info.d.ts +20 -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-commands.d.ts +8 -0
- package/cli/repl/commands/repl-commands.js +16 -3
- package/cli/repl/commands/repl-query.js +50 -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 +4 -0
- package/cli/slicer-app.js +4 -2
- package/config.d.ts +56 -6
- package/config.js +134 -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 +30 -16
- package/documentation/wiki-mk/doc-maker.js +1 -1
- package/documentation/wiki-query.js +190 -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 +61 -1
- package/project/context/flowr-analyzer-context.js +124 -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 +40 -0
- package/project/context/flowr-analyzer-files-context.js +171 -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 +168 -0
- package/project/dependency-version-space.js +570 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/flowr-analyzer.d.ts +7 -0
- package/project/flowr-analyzer.js +9 -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 +17 -5
- package/queries/catalog/config-query/config-query-format.d.ts +19 -3
- package/queries/catalog/config-query/config-query-format.js +258 -98
- 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 +293 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +121 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +345 -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 +62 -2
- 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 +18 -0
- package/util/schema.js +102 -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
package/queries/query.d.ts
CHANGED
|
@@ -37,11 +37,12 @@ import type { InputSourcesQuery } from './catalog/input-sources-query/input-sour
|
|
|
37
37
|
import type { ProvenanceQuery } from './catalog/provenance-query/provenance-query-format';
|
|
38
38
|
import type { LintingResultCertainty } from '../linter/linter-format';
|
|
39
39
|
import { type DiceQuery } from './catalog/dice-query/dice-query-format';
|
|
40
|
+
import { type GuessDepVersionsQuery } from './catalog/guess-dep-versions-query/guess-dep-versions-query-format';
|
|
40
41
|
import { type AbsintQuery } from './catalog/absint-query/absint-query-format';
|
|
41
42
|
/**
|
|
42
43
|
* These are all queries that can be executed from within flowR
|
|
43
44
|
*/
|
|
44
|
-
export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery;
|
|
45
|
+
export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery | GuessDepVersionsQuery;
|
|
45
46
|
export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
|
|
46
47
|
type: QueryType;
|
|
47
48
|
};
|
|
@@ -61,6 +62,10 @@ export interface SupportedQuery<QueryType extends BaseQueryFormat['type'] = Base
|
|
|
61
62
|
completer?: (splitLine: readonly string[], startingNewArg: boolean, config: FlowrConfig) => CommandCompletions;
|
|
62
63
|
/** optional query construction from an, e.g., repl line */
|
|
63
64
|
fromLine?: (output: ReplOutput, splitLine: readonly string[], config: FlowrConfig) => ParsedQueryLine<QueryType>;
|
|
65
|
+
/** optional one-line usage of the repl `@`-shorthand `fromLine` accepts, shown by `:query ?<type>` */
|
|
66
|
+
syntax?: string;
|
|
67
|
+
/** the human-readable name, e.g. `Call-Context Query`; also names its wiki page, see {@link queryWikiPage} */
|
|
68
|
+
title: string;
|
|
64
69
|
/**
|
|
65
70
|
* Generates an ASCII summary of the query result to be printed in, e.g., the REPL.
|
|
66
71
|
* @returns whether a summary was produced (`true` if so, `false` if not, in this case a default/generic summary will be created)
|
|
@@ -76,193 +81,235 @@ export interface SupportedQuery<QueryType extends BaseQueryFormat['type'] = Base
|
|
|
76
81
|
}
|
|
77
82
|
export declare const SupportedQueries: {
|
|
78
83
|
readonly 'call-context': {
|
|
84
|
+
readonly title: "Call-Context Query";
|
|
79
85
|
readonly executor: typeof import("./catalog/call-context-query/call-context-query-executor").executeCallContextQueries;
|
|
80
86
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
81
87
|
readonly schema: Joi.ObjectSchema<any>;
|
|
82
88
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
83
89
|
};
|
|
84
90
|
readonly config: {
|
|
91
|
+
readonly title: "Config Query";
|
|
92
|
+
readonly syntax: "@config [<path> | <glob>] | @config +<path>=<value> | @config +reset";
|
|
85
93
|
readonly executor: typeof import("./catalog/config-query/config-query-executor").executeConfigQuery;
|
|
86
94
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
|
|
87
|
-
readonly completer: (partialLine: readonly string[],
|
|
95
|
+
readonly completer: (partialLine: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
88
96
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"config">;
|
|
89
97
|
readonly schema: Joi.ObjectSchema<any>;
|
|
90
98
|
readonly flattenInvolvedNodes: () => never[];
|
|
91
99
|
};
|
|
92
100
|
readonly 'control-flow': {
|
|
101
|
+
readonly title: "Control-Flow Query";
|
|
93
102
|
readonly executor: typeof import("./catalog/control-flow-query/control-flow-query-executor").executeControlFlowQuery;
|
|
94
103
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
95
104
|
readonly schema: Joi.ObjectSchema<any>;
|
|
96
105
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
97
106
|
};
|
|
98
107
|
readonly 'call-graph': {
|
|
108
|
+
readonly title: "Call-Graph Query";
|
|
99
109
|
readonly executor: typeof import("./catalog/call-graph-query/call-graph-query-executor").executeCallGraphQuery;
|
|
100
110
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
101
111
|
readonly schema: Joi.ObjectSchema<any>;
|
|
102
112
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
103
113
|
};
|
|
104
114
|
readonly dataflow: {
|
|
115
|
+
readonly title: "Dataflow Query";
|
|
105
116
|
readonly executor: typeof import("./catalog/dataflow-query/dataflow-query-executor").executeDataflowQuery;
|
|
106
117
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
107
118
|
readonly schema: Joi.ObjectSchema<any>;
|
|
108
119
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
109
120
|
};
|
|
110
121
|
readonly 'does-call': {
|
|
122
|
+
readonly title: "Does-Call Query";
|
|
111
123
|
readonly executor: typeof import("./catalog/does-call-query/does-call-query-executor").executeDoesCallQuery;
|
|
112
124
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
113
125
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"does-call">;
|
|
126
|
+
readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
|
|
114
127
|
readonly schema: Joi.ObjectSchema<any>;
|
|
115
128
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
116
129
|
};
|
|
117
130
|
readonly 'dataflow-lens': {
|
|
131
|
+
readonly title: "Dataflow Lens Query";
|
|
118
132
|
readonly executor: typeof import("./catalog/dataflow-lens-query/dataflow-lens-query-executor").executeDataflowLensQuery;
|
|
119
133
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
120
134
|
readonly schema: Joi.ObjectSchema<any>;
|
|
121
135
|
readonly flattenInvolvedNodes: () => never[];
|
|
122
136
|
};
|
|
123
137
|
readonly absint: {
|
|
138
|
+
readonly title: "Abstract Interpretation Query";
|
|
124
139
|
readonly executor: typeof import("./catalog/absint-query/absint-query-executor").executeAbsintQuery;
|
|
125
140
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
126
141
|
readonly jsonFormatter: (queryResults: BaseQueryResult) => object;
|
|
127
142
|
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
128
143
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"absint">;
|
|
144
|
+
readonly syntax: "@absint <inference-type> [(<criteria>)] <code | file://path>";
|
|
129
145
|
readonly schema: Joi.ObjectSchema<any>;
|
|
130
146
|
readonly flattenInvolvedNodes: () => never[];
|
|
131
147
|
};
|
|
132
148
|
readonly files: {
|
|
149
|
+
readonly title: "Files Query";
|
|
133
150
|
readonly executor: typeof import("./catalog/files-query/files-query-executor").executeFileQuery;
|
|
134
151
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
135
152
|
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
136
153
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"files">;
|
|
154
|
+
readonly syntax: "@files [role:<r1>,<r2>,...] <code | file://path>";
|
|
137
155
|
readonly schema: Joi.ObjectSchema<any>;
|
|
138
156
|
readonly flattenInvolvedNodes: (_: BaseQueryResult) => NodeId[];
|
|
139
157
|
};
|
|
140
158
|
readonly 'id-map': {
|
|
159
|
+
readonly title: "Id-Map Query";
|
|
141
160
|
readonly executor: typeof import("./catalog/id-map-query/id-map-query-executor").executeIdMapQuery;
|
|
142
161
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
143
162
|
readonly schema: Joi.ObjectSchema<any>;
|
|
144
163
|
readonly flattenInvolvedNodes: () => never[];
|
|
145
164
|
};
|
|
146
165
|
readonly 'normalized-ast': {
|
|
166
|
+
readonly title: "Normalized AST Query";
|
|
147
167
|
readonly executor: typeof import("./catalog/normalized-ast-query/normalized-ast-query-executor").executeNormalizedAstQuery;
|
|
148
168
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
149
169
|
readonly schema: Joi.ObjectSchema<any>;
|
|
150
170
|
readonly flattenInvolvedNodes: () => never[];
|
|
151
171
|
};
|
|
152
172
|
readonly 'dataflow-cluster': {
|
|
173
|
+
readonly title: "Dataflow Cluster Query";
|
|
153
174
|
readonly executor: typeof import("./catalog/cluster-query/cluster-query-executor").executeDataflowClusterQuery;
|
|
154
175
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
155
176
|
readonly schema: Joi.ObjectSchema<any>;
|
|
156
177
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
157
178
|
};
|
|
158
179
|
readonly 'static-slice': {
|
|
180
|
+
readonly title: "Static Slice Query";
|
|
159
181
|
readonly executor: typeof import("./catalog/static-slice-query/static-slice-query-executor").executeStaticSliceQuery;
|
|
160
182
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
161
183
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"static-slice">;
|
|
162
184
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
185
|
+
readonly syntax: "@static-slice (<crit>;...)[fiIcB] <code | file://path>";
|
|
163
186
|
readonly schema: Joi.ObjectSchema<any>;
|
|
164
187
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
165
188
|
};
|
|
166
189
|
readonly provenance: {
|
|
190
|
+
readonly title: "Provenance Query";
|
|
167
191
|
readonly executor: typeof import("./catalog/provenance-query/provenance-query-executor").executeProvenanceQuery;
|
|
168
192
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
169
193
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"provenance">;
|
|
170
194
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
195
|
+
readonly syntax: "@provenance (<criterion>)[f] <code | file://path>";
|
|
171
196
|
readonly schema: Joi.ObjectSchema<any>;
|
|
172
197
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
173
198
|
};
|
|
174
199
|
readonly 'input-sources': {
|
|
200
|
+
readonly title: "Input Sources Query";
|
|
175
201
|
readonly executor: typeof import("./catalog/input-sources-query/input-sources-query-executor").executeInputSourcesQuery;
|
|
176
202
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
177
203
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"input-sources">;
|
|
178
204
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
205
|
+
readonly syntax: "@input-sources (<criterion>) <code | file://path>";
|
|
179
206
|
readonly schema: Joi.ObjectSchema<any>;
|
|
180
207
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
181
208
|
};
|
|
182
209
|
readonly dependencies: {
|
|
210
|
+
readonly title: "Dependencies Query";
|
|
183
211
|
readonly executor: typeof import("./catalog/dependencies-query/dependencies-query-executor").executeDependenciesQuery;
|
|
184
212
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
|
|
185
213
|
readonly schema: Joi.ObjectSchema<any>;
|
|
186
214
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, query: readonly Query[]) => NodeId[];
|
|
187
215
|
};
|
|
188
216
|
readonly 'location-map': {
|
|
217
|
+
readonly title: "Location Map Query";
|
|
189
218
|
readonly executor: typeof import("./catalog/location-map-query/location-map-query-executor").executeLocationMapQuery;
|
|
190
219
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
|
|
191
220
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"location-map">;
|
|
192
221
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
222
|
+
readonly syntax: "@location-map [(<crit>;...)] <code | file://path>";
|
|
193
223
|
readonly schema: Joi.ObjectSchema<any>;
|
|
194
224
|
readonly flattenInvolvedNodes: () => never[];
|
|
195
225
|
};
|
|
196
226
|
readonly search: {
|
|
227
|
+
readonly title: "Search Query";
|
|
197
228
|
readonly executor: typeof import("./catalog/search-query/search-query-executor").executeSearch;
|
|
198
229
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
199
230
|
readonly schema: Joi.ObjectSchema<any>;
|
|
200
231
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
201
232
|
};
|
|
202
233
|
readonly 'happens-before': {
|
|
234
|
+
readonly title: "Happens-Before Query";
|
|
203
235
|
readonly executor: typeof import("./catalog/happens-before-query/happens-before-query-executor").executeHappensBefore;
|
|
204
236
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
205
237
|
readonly schema: Joi.ObjectSchema<any>;
|
|
206
238
|
readonly flattenInvolvedNodes: () => never[];
|
|
207
239
|
};
|
|
208
240
|
readonly 'inspect-exception': {
|
|
241
|
+
readonly title: "Inspect Exceptions of Functions Query";
|
|
209
242
|
readonly executor: typeof import("./catalog/inspect-exceptions-query/inspect-exception-query-executor").executeExceptionQuery;
|
|
210
243
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
211
244
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-exception">;
|
|
212
245
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
246
|
+
readonly syntax: "@inspect-exception [(<crit>;...)] <code | file://path>";
|
|
213
247
|
readonly schema: Joi.ObjectSchema<any>;
|
|
214
248
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
215
249
|
};
|
|
216
250
|
readonly 'inspect-higher-order': {
|
|
251
|
+
readonly title: "Inspect Higher-Order Functions Query";
|
|
217
252
|
readonly executor: typeof import("./catalog/inspect-higher-order-query/inspect-higher-order-query-executor").executeHigherOrderQuery;
|
|
218
253
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
219
254
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-higher-order">;
|
|
220
255
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
256
|
+
readonly syntax: "@inspect-higher-order [(<crit>;...)] <code | file://path>";
|
|
221
257
|
readonly schema: Joi.ObjectSchema<any>;
|
|
222
258
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
223
259
|
};
|
|
224
260
|
readonly 'inspect-recursion': {
|
|
261
|
+
readonly title: "Inspect Recursive Functions Query";
|
|
225
262
|
readonly executor: typeof import("./catalog/inspect-recursion-query/inspect-recursion-query-executor").executeRecursionQuery;
|
|
226
263
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
227
264
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-recursion">;
|
|
265
|
+
readonly syntax: "@inspect-recursion [(<crit>;...)] <code | file://path>";
|
|
228
266
|
readonly schema: Joi.ObjectSchema<any>;
|
|
229
267
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
230
268
|
};
|
|
231
269
|
readonly 'resolve-value': {
|
|
270
|
+
readonly title: "Resolve Value Query";
|
|
232
271
|
readonly executor: typeof import("./catalog/resolve-value-query/resolve-value-query-executor").executeResolveValueQuery;
|
|
233
272
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
234
273
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"resolve-value">;
|
|
235
274
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
275
|
+
readonly syntax: "@resolve-value (<crit>;...) <code | file://path>";
|
|
236
276
|
readonly schema: Joi.ObjectSchema<any>;
|
|
237
277
|
readonly flattenInvolvedNodes: () => never[];
|
|
238
278
|
};
|
|
239
279
|
readonly project: {
|
|
280
|
+
readonly title: "Project Query";
|
|
240
281
|
readonly executor: typeof import("./catalog/project-query/project-query-executor").executeProjectQuery;
|
|
241
282
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
242
283
|
readonly schema: Joi.ObjectSchema<any>;
|
|
243
284
|
readonly flattenInvolvedNodes: () => never[];
|
|
244
285
|
};
|
|
245
286
|
readonly signature: {
|
|
287
|
+
readonly title: "Signature Query";
|
|
246
288
|
readonly executor: typeof import("./catalog/signature-query/signature-query-executor").executeSignatureQuery;
|
|
247
289
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly Query[]) => true;
|
|
248
290
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"signature">;
|
|
249
291
|
readonly completer: typeof import("./catalog/signature-query/signature-query-executor").signatureQueryCompleter;
|
|
292
|
+
readonly syntax: "@signature [<pkg>[@<version>]] [<pkg>::<fn> | <fn>] [--param <name>[,...]] [--required <n>] [--cg] [--help]";
|
|
250
293
|
readonly schema: Joi.ObjectSchema<any>;
|
|
251
294
|
readonly flattenInvolvedNodes: () => NodeId[];
|
|
252
295
|
};
|
|
253
296
|
readonly origin: {
|
|
297
|
+
readonly title: "Origin Query";
|
|
254
298
|
readonly executor: typeof import("./catalog/origin-query/origin-query-executor").executeResolveValueQuery;
|
|
255
299
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
256
300
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"origin">;
|
|
257
301
|
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
302
|
+
readonly syntax: "@origin (<criterion>) <code | file://path>";
|
|
258
303
|
readonly schema: Joi.ObjectSchema<any>;
|
|
259
304
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
260
305
|
};
|
|
261
306
|
readonly linter: {
|
|
307
|
+
readonly title: "Linter Query";
|
|
262
308
|
readonly executor: typeof import("./catalog/linter-query/linter-query-executor").executeLinterQuery;
|
|
263
309
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
264
310
|
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
265
311
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"linter">;
|
|
312
|
+
readonly syntax: "@linter [rules:<r1>,<r2>,...] [format:<fmt>] <code | file://path>";
|
|
266
313
|
readonly schema: Joi.ObjectSchema<any>;
|
|
267
314
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly Query[], certainty: LintingResultCertainty | undefined) => ((string & {
|
|
268
315
|
__brand?: "node-id";
|
|
@@ -271,15 +318,28 @@ export declare const SupportedQueries: {
|
|
|
271
318
|
}))[];
|
|
272
319
|
};
|
|
273
320
|
readonly dice: {
|
|
321
|
+
readonly title: "Dice Query";
|
|
274
322
|
readonly executor: typeof import("./catalog/dice-query/dice-query-executor").executeDiceQuery;
|
|
275
323
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
276
324
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"dice">;
|
|
277
325
|
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
326
|
+
readonly syntax: "@dice (<crit>;...->crit;...)[iIcB] <code | file://path>";
|
|
278
327
|
readonly schema: Joi.ObjectSchema<any>;
|
|
279
328
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
280
329
|
};
|
|
330
|
+
readonly 'guess-dep-versions': {
|
|
331
|
+
readonly title: "Guess Dependency Versions Query";
|
|
332
|
+
readonly executor: typeof import("./catalog/guess-dep-versions-query/guess-dep-versions-query-executor").executeGuessDepVersionsQuery;
|
|
333
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly Query[]) => true;
|
|
334
|
+
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"guess-dep-versions">;
|
|
335
|
+
readonly syntax: "@guess-dep-versions [<pkg> ...] [(clean | <=YYYY.MM.DD)] [--date YYYY.MM.DD] [--max <n>] [--iterations <n>] [--disabled <letters>] [--explode [--oldest] [--limit <n>] [--prefer <pkg>=<ver>]] <code | file://path>";
|
|
336
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
337
|
+
readonly flattenInvolvedNodes: () => NodeId[];
|
|
338
|
+
};
|
|
281
339
|
};
|
|
282
340
|
export type SupportedQueryTypes = keyof typeof SupportedQueries;
|
|
341
|
+
/** The wiki page documenting a query, derived from its {@link SupportedQuery.title}. */
|
|
342
|
+
export declare function queryWikiPage(title: string): string;
|
|
283
343
|
export type QueryResult<Type extends Query['type']> = Promise<ReturnType<typeof SupportedQueries[Type]['executor']>>;
|
|
284
344
|
/**
|
|
285
345
|
* Executes a set of queries that are all of the same type.
|
package/queries/query.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CompoundQuerySchema = exports.SupportedQueries = void 0;
|
|
7
|
+
exports.queryWikiPage = queryWikiPage;
|
|
7
8
|
exports.executeQueriesOfSameType = executeQueriesOfSameType;
|
|
8
9
|
exports.executeQueries = executeQueries;
|
|
9
10
|
exports.SupportedQueriesSchema = SupportedQueriesSchema;
|
|
@@ -43,6 +44,7 @@ const inspect_exception_query_format_1 = require("./catalog/inspect-exceptions-q
|
|
|
43
44
|
const input_sources_query_format_1 = require("./catalog/input-sources-query/input-sources-query-format");
|
|
44
45
|
const provenance_query_format_1 = require("./catalog/provenance-query/provenance-query-format");
|
|
45
46
|
const dice_query_format_1 = require("./catalog/dice-query/dice-query-format");
|
|
47
|
+
const guess_dep_versions_query_format_1 = require("./catalog/guess-dep-versions-query/guess-dep-versions-query-format");
|
|
46
48
|
const absint_query_format_1 = require("./catalog/absint-query/absint-query-format");
|
|
47
49
|
exports.SupportedQueries = {
|
|
48
50
|
'call-context': call_context_query_format_1.CallContextQueryDefinition,
|
|
@@ -72,8 +74,13 @@ exports.SupportedQueries = {
|
|
|
72
74
|
'signature': signature_query_format_1.SignatureQueryDefinition,
|
|
73
75
|
'origin': origin_query_format_1.OriginQueryDefinition,
|
|
74
76
|
'linter': linter_query_format_1.LinterQueryDefinition,
|
|
75
|
-
'dice': dice_query_format_1.DiceQueryDefinition
|
|
77
|
+
'dice': dice_query_format_1.DiceQueryDefinition,
|
|
78
|
+
'guess-dep-versions': guess_dep_versions_query_format_1.GuessDepVersionsQueryDefinition
|
|
76
79
|
};
|
|
80
|
+
/** The wiki page documenting a query, derived from its {@link SupportedQuery.title}. */
|
|
81
|
+
function queryWikiPage(title) {
|
|
82
|
+
return '[Query] ' + title.replace(/\s*Query$/, '');
|
|
83
|
+
}
|
|
77
84
|
/**
|
|
78
85
|
* Executes a set of queries that are all of the same type.
|
|
79
86
|
* Only use this function if you are sure all queries are of the same type.
|
|
@@ -127,7 +134,7 @@ async function executeQueries(data, queries) {
|
|
|
127
134
|
}
|
|
128
135
|
catch (e) {
|
|
129
136
|
const message = e instanceof Error ? e.message : String(e);
|
|
130
|
-
log_1.log.error(`query of type '${type}' failed: ${message}
|
|
137
|
+
log_1.log.error(`query of type '${type}' failed: ${message}`);
|
|
131
138
|
results.push([type, { '.meta': { timing: 0 }, error: message }]);
|
|
132
139
|
}
|
|
133
140
|
}
|
package/r-bridge/data/data.d.ts
CHANGED
|
@@ -646,6 +646,22 @@ export declare const flowrCapabilities: {
|
|
|
646
646
|
}];
|
|
647
647
|
readonly supported: "partially";
|
|
648
648
|
readonly description: "_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
|
|
649
|
+
}, {
|
|
650
|
+
readonly name: "Class-Based Dependency Attribution";
|
|
651
|
+
readonly id: "oop-class-dependency-attribution";
|
|
652
|
+
readonly supported: "partially";
|
|
653
|
+
readonly description: "_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database's class-ownership map)._";
|
|
654
|
+
readonly capabilities: readonly [{
|
|
655
|
+
readonly name: "S3 class ownership";
|
|
656
|
+
readonly id: "class-owner-s3";
|
|
657
|
+
readonly supported: "partially";
|
|
658
|
+
readonly description: "_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project's NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method(\"as.irts\",\"zoo\")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, \"zoo\")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor's export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._";
|
|
659
|
+
}, {
|
|
660
|
+
readonly name: "S4 class ownership";
|
|
661
|
+
readonly id: "class-owner-s4";
|
|
662
|
+
readonly supported: "partially";
|
|
663
|
+
readonly description: "_A project's `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._";
|
|
664
|
+
}];
|
|
649
665
|
}];
|
|
650
666
|
}];
|
|
651
667
|
}, {
|
package/r-bridge/data/data.js
CHANGED
|
@@ -805,6 +805,26 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true })}
|
|
|
805
805
|
],
|
|
806
806
|
supported: 'partially',
|
|
807
807
|
description: '_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes "as units."'
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: 'Class-Based Dependency Attribution',
|
|
811
|
+
id: 'oop-class-dependency-attribution',
|
|
812
|
+
supported: 'partially',
|
|
813
|
+
description: '_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database\'s class-ownership map)._',
|
|
814
|
+
capabilities: [
|
|
815
|
+
{
|
|
816
|
+
name: 'S3 class ownership',
|
|
817
|
+
id: 'class-owner-s3',
|
|
818
|
+
supported: 'partially',
|
|
819
|
+
description: '_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project\'s NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method("as.irts","zoo")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, "zoo")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor\'s export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._'
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
name: 'S4 class ownership',
|
|
823
|
+
id: 'class-owner-s4',
|
|
824
|
+
supported: 'partially',
|
|
825
|
+
description: '_A project\'s `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._'
|
|
826
|
+
}
|
|
827
|
+
]
|
|
808
828
|
}
|
|
809
829
|
]
|
|
810
830
|
}
|
|
@@ -46,6 +46,7 @@ export interface Source {
|
|
|
46
46
|
fullRange?: SourceRange;
|
|
47
47
|
/**
|
|
48
48
|
* Similar to {@link Source.fullRange} this contains the complete R lexeme of the given element.
|
|
49
|
+
* This is the lexeme of the element itself, never that of an enclosing one: the field of `a$b` reports `b`.
|
|
49
50
|
*/
|
|
50
51
|
fullLexeme?: string;
|
|
51
52
|
/**
|
|
@@ -38,7 +38,8 @@ function deterministicPrefixIdGenerator(prefix, id = 0) {
|
|
|
38
38
|
*/
|
|
39
39
|
function sourcedDeterministicCountingIdGenerator(path, location, start = 0) {
|
|
40
40
|
let id = start;
|
|
41
|
-
|
|
41
|
+
const [sl, sc] = location;
|
|
42
|
+
return () => `${path}:${sl}:${sc}-${id++}`;
|
|
42
43
|
}
|
|
43
44
|
function loc2Id([sl, sc, el, ec]) {
|
|
44
45
|
return `${sl}:${sc}-${el}:${ec}`;
|
|
@@ -20,7 +20,8 @@ function normalizeAbstractArgument(x, data, operator) {
|
|
|
20
20
|
return gotAccess;
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
const
|
|
23
|
+
const { content, location } = (0, normalize_meta_1.retrieveMetaStructure)(x[0].content);
|
|
24
|
+
const node = (0, normalize_single_node_1.normalizeSingleNode)({ ...data, currentRange: location, currentLexeme: content }, x[0]);
|
|
24
25
|
(0, assert_1.guard)(node.type !== type_1.RType.ExpressionList, () => `expected expression list to be parsed as argument, yet received ${JSON.stringify(node)} for ${JSON.stringify(x)}`);
|
|
25
26
|
return {
|
|
26
27
|
type: type_1.RType.Argument,
|
|
@@ -160,6 +160,8 @@ function convertTreeNode(node) {
|
|
|
160
160
|
const [commentsBoth, [op]] = splitComments(children.slice(1, -1));
|
|
161
161
|
const comments = commentsBoth.map(c => c[1]);
|
|
162
162
|
const opSource = makeSourceRange(op);
|
|
163
|
+
/* every `.text` re-slices the source, so read it once */
|
|
164
|
+
const opText = op.text;
|
|
163
165
|
const lhsAsArg = {
|
|
164
166
|
type: type_1.RType.Argument,
|
|
165
167
|
location: lhs.location,
|
|
@@ -178,8 +180,8 @@ function convertTreeNode(node) {
|
|
|
178
180
|
functionName: {
|
|
179
181
|
type: type_1.RType.Symbol,
|
|
180
182
|
location: opSource,
|
|
181
|
-
lexeme:
|
|
182
|
-
content:
|
|
183
|
+
lexeme: opText,
|
|
184
|
+
content: opText,
|
|
183
185
|
info: {
|
|
184
186
|
tsId: op.id
|
|
185
187
|
}
|
|
@@ -202,13 +204,13 @@ function convertTreeNode(node) {
|
|
|
202
204
|
}
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
|
-
else if (
|
|
207
|
+
else if (opText === '|>') {
|
|
206
208
|
return {
|
|
207
209
|
type: type_1.RType.Pipe,
|
|
208
210
|
location: opSource,
|
|
209
211
|
lhs: lhsAsArg,
|
|
210
212
|
rhs,
|
|
211
|
-
lexeme:
|
|
213
|
+
lexeme: opText,
|
|
212
214
|
...defaultInfo(),
|
|
213
215
|
info: {
|
|
214
216
|
fullRange: range,
|
|
@@ -223,8 +225,8 @@ function convertTreeNode(node) {
|
|
|
223
225
|
type: type_1.RType.BinaryOp,
|
|
224
226
|
location: opSource,
|
|
225
227
|
lhs, rhs,
|
|
226
|
-
operator:
|
|
227
|
-
lexeme:
|
|
228
|
+
operator: opText,
|
|
229
|
+
lexeme: opText,
|
|
228
230
|
info: {
|
|
229
231
|
fullRange: range,
|
|
230
232
|
adToks: comments,
|
|
@@ -508,10 +510,7 @@ function convertTreeNode(node) {
|
|
|
508
510
|
access: [{
|
|
509
511
|
type: type_1.RType.Argument,
|
|
510
512
|
name: undefined,
|
|
511
|
-
value:
|
|
512
|
-
...convertTreeNode(rhs),
|
|
513
|
-
...defaultInfo()
|
|
514
|
-
},
|
|
513
|
+
value: convertTreeNode(rhs),
|
|
515
514
|
location: rhsRange,
|
|
516
515
|
lexeme: rhs?.text,
|
|
517
516
|
info: {
|
|
@@ -534,28 +533,29 @@ function convertTreeNode(node) {
|
|
|
534
533
|
if (children.length === 3) {
|
|
535
534
|
defaultValue = convertTreeNode(children[2]);
|
|
536
535
|
}
|
|
536
|
+
const nameText = name.text;
|
|
537
537
|
return {
|
|
538
538
|
type: type_1.RType.Parameter,
|
|
539
539
|
name: {
|
|
540
540
|
type: type_1.RType.Symbol,
|
|
541
541
|
location: nameRange,
|
|
542
|
-
content:
|
|
543
|
-
lexeme:
|
|
542
|
+
content: nameText,
|
|
543
|
+
lexeme: nameText,
|
|
544
544
|
info: {
|
|
545
545
|
fullRange: range,
|
|
546
546
|
adToks: [],
|
|
547
|
-
fullLexeme:
|
|
547
|
+
fullLexeme: nameText,
|
|
548
548
|
tsId: name.id
|
|
549
549
|
}
|
|
550
550
|
},
|
|
551
|
-
special:
|
|
551
|
+
special: nameText === '...',
|
|
552
552
|
defaultValue,
|
|
553
553
|
location: nameRange,
|
|
554
|
-
lexeme:
|
|
554
|
+
lexeme: nameText,
|
|
555
555
|
info: {
|
|
556
556
|
fullRange: range,
|
|
557
557
|
adToks: [],
|
|
558
|
-
fullLexeme:
|
|
558
|
+
fullLexeme: nameText,
|
|
559
559
|
tsId: name.id
|
|
560
560
|
}
|
|
561
561
|
};
|
|
@@ -707,6 +707,9 @@ function findFirstNonCommentSibling(snode, knownNexts) {
|
|
|
707
707
|
return cur;
|
|
708
708
|
}
|
|
709
709
|
function linkCommentsToNextNodes(nodes, comments) {
|
|
710
|
+
if (comments.length === 0) {
|
|
711
|
+
return comments;
|
|
712
|
+
}
|
|
710
713
|
const remain = [];
|
|
711
714
|
const cacheMap = new Map();
|
|
712
715
|
const nodeById = new Map(nodes.map(n => [n[0].id, n]));
|
|
@@ -7,6 +7,12 @@ import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/de
|
|
|
7
7
|
import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
8
8
|
import { type AutoSelectPredicate } from './auto-select/auto-select-defaults';
|
|
9
9
|
import type { InlineWarning } from './inline/source-inline-map';
|
|
10
|
+
/**
|
|
11
|
+
* Whether to inline every file into a single self-contained text: `true` inlines them, `'banner'` additionally
|
|
12
|
+
* precedes each with a banner comment naming it.
|
|
13
|
+
* @see {@link Selection#inlineFull}
|
|
14
|
+
*/
|
|
15
|
+
export type InlineFull = boolean | 'banner';
|
|
10
16
|
interface Selection {
|
|
11
17
|
/**
|
|
12
18
|
* The set of node ids to be reconstructed.
|
|
@@ -23,9 +29,18 @@ interface Selection {
|
|
|
23
29
|
* @see {@link SourceInlineMap.build}
|
|
24
30
|
*/
|
|
25
31
|
inlineSources?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If set, every file is reconstructed into a single self-contained text, in the loading order flowR
|
|
34
|
+
* determined (which respects implicit sources), independent of whether it is sourced explicitly. Files that
|
|
35
|
+
* _are_ sourced explicitly are spliced into their `source()` call instead of being repeated at the top level.
|
|
36
|
+
* Pass `'banner'` to precede every inlined file with a banner comment naming it.
|
|
37
|
+
* Requires {@link Selection#sourceMap} to be provided. Overrides {@link Selection#inlineSources} and
|
|
38
|
+
* {@link Selection#reconstructFiles}.
|
|
39
|
+
*/
|
|
40
|
+
inlineFull?: InlineFull;
|
|
26
41
|
/**
|
|
27
42
|
* Maps a `source()` call node id to the index of the sourced file in `ast.ast.files`.
|
|
28
|
-
* Only used together with {@link Selection#inlineSources}. Build it via {@link SourceInlineMap.build}.
|
|
43
|
+
* Only used together with {@link Selection#inlineSources} or {@link Selection#inlineFull}. Build it via {@link SourceInlineMap.build}.
|
|
29
44
|
*/
|
|
30
45
|
sourceMap?: ReadonlyMap<NodeId, number>;
|
|
31
46
|
}
|
|
@@ -40,6 +55,8 @@ export interface ReconstructionResult {
|
|
|
40
55
|
}
|
|
41
56
|
export declare function reconstructToCode(ast: NormalizedAst, selection: Selection & ({
|
|
42
57
|
inlineSources: true;
|
|
58
|
+
} | {
|
|
59
|
+
inlineFull: true;
|
|
43
60
|
} | {
|
|
44
61
|
reconstructFiles?: [number] | undefined;
|
|
45
62
|
}), autoSelectIf?: AutoSelectPredicate): ReconstructionResult & {
|