@eagleoutice/flowr 2.14.4 → 2.15.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 +77 -64
- package/abstract-interpretation/absint-inference.d.ts +347 -0
- package/abstract-interpretation/{absint-visitor.js → absint-inference.js} +327 -97
- package/abstract-interpretation/abstract-semantics.d.ts +246 -0
- package/abstract-interpretation/abstract-semantics.js +3 -0
- package/abstract-interpretation/data-frame/{mappers/arguments.d.ts → arguments.d.ts} +18 -16
- package/abstract-interpretation/data-frame/{mappers/arguments.js → arguments.js} +20 -21
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +52 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1665 -0
- package/abstract-interpretation/data-frame/resolve-args.js +4 -4
- package/abstract-interpretation/data-frame/semantics.d.ts +15 -21
- package/abstract-interpretation/data-frame/semantics.js +27 -29
- package/abstract-interpretation/data-frame/shape-inference.d.ts +28 -24
- package/abstract-interpretation/data-frame/shape-inference.js +14 -79
- package/abstract-interpretation/domains/interval-domain.d.ts +5 -1
- package/abstract-interpretation/domains/interval-domain.js +25 -33
- package/abstract-interpretation/domains/multi-value-state-domain.d.ts +6 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +24 -4
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -6
- package/abstract-interpretation/domains/partial-product-domain.js +26 -43
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -6
- package/abstract-interpretation/domains/positive-interval-domain.js +3 -29
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +6 -0
- package/abstract-interpretation/domains/set-range-domain.js +29 -62
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +9 -2
- package/abstract-interpretation/domains/state-abstract-domain.js +26 -37
- package/abstract-interpretation/domains/{state-domain-like.d.ts → state-domain.d.ts} +10 -6
- package/abstract-interpretation/domains/{state-domain-like.js → state-domain.js} +1 -1
- package/abstract-interpretation/value-semantics.d.ts +113 -0
- package/abstract-interpretation/value-semantics.js +115 -0
- package/benchmark/slicer.js +12 -6
- package/benchmark/stats/feature-counts.d.ts +2 -1
- package/benchmark/stats/feature-counts.js +25 -1
- package/benchmark/stats/stats.d.ts +4 -0
- package/benchmark/summarizer/second-phase/graph.js +7 -0
- package/cli/repl/commands/repl-parse.js +11 -22
- package/cli/repl/parser/slice-query-parser.d.ts +2 -0
- package/cli/repl/parser/slice-query-parser.js +1 -0
- package/config.d.ts +30 -205
- package/config.js +37 -3
- package/control-flow/cfg-properties.d.ts +5 -0
- package/control-flow/cfg-properties.js +25 -7
- package/control-flow/control-flow-graph.d.ts +11 -37
- package/control-flow/control-flow-graph.js +33 -77
- package/control-flow/semantic-cfg-guided-visitor.d.ts +63 -320
- package/control-flow/semantic-cfg-guided-visitor.js +65 -320
- package/dataflow/environments/built-in-config.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +4 -0
- package/dataflow/environments/built-in-props.d.ts +192 -82
- package/dataflow/environments/built-in-props.js +336 -106
- package/dataflow/environments/built-in.d.ts +21 -9
- package/dataflow/environments/built-in.js +43 -12
- package/dataflow/environments/default-builtin-config.d.ts +3219 -313
- package/dataflow/environments/default-builtin-config.js +803 -1012
- package/dataflow/environments/environment.d.ts +26 -49
- package/dataflow/environments/environment.js +34 -47
- package/dataflow/environments/group-generics.d.ts +11 -2
- package/dataflow/environments/group-generics.js +22 -3
- package/dataflow/environments/identifier.d.ts +106 -6
- package/dataflow/environments/identifier.js +19 -1
- package/dataflow/environments/query-fn-props.d.ts +16 -8
- package/dataflow/environments/query-fn-props.js +45 -21
- package/dataflow/environments/resolve-by-name.js +9 -2
- package/dataflow/environments/scoping.d.ts +5 -0
- package/dataflow/environments/scoping.js +11 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
- package/dataflow/eval/resolve/alias-tracking.js +24 -6
- package/dataflow/eval/resolve/resolve-numbers.d.ts +182 -7
- package/dataflow/eval/resolve/resolve-numbers.js +44 -9
- package/dataflow/eval/resolve/resolve-strings.d.ts +79 -2
- package/dataflow/eval/resolve/resolve-strings.js +16 -7
- package/dataflow/eval/resolve/resolve.d.ts +5 -22
- package/dataflow/eval/resolve/resolve.js +34 -34
- package/dataflow/eval/values/general.d.ts +9 -1
- package/dataflow/eval/values/general.js +22 -3
- package/dataflow/eval/values/sets/set-constants.d.ts +5 -0
- package/dataflow/eval/values/sets/set-constants.js +9 -1
- package/dataflow/eval/values/string/string-constants.d.ts +16 -15
- package/dataflow/eval/values/string/string-constants.js +59 -27
- package/dataflow/extractor.d.ts +2 -1
- package/dataflow/extractor.js +16 -4
- package/dataflow/fn/argument-roles.d.ts +35 -0
- package/dataflow/fn/argument-roles.js +252 -0
- package/dataflow/fn/class-declaration.d.ts +148 -0
- package/dataflow/fn/class-declaration.js +317 -0
- package/dataflow/fn/condition-handlers.d.ts +5 -0
- package/dataflow/fn/condition-handlers.js +13 -0
- package/dataflow/fn/exceptions-of-function.d.ts +21 -7
- package/dataflow/fn/exceptions-of-function.js +74 -43
- package/dataflow/fn/frame-reflection.d.ts +46 -0
- package/dataflow/fn/frame-reflection.js +169 -0
- package/dataflow/fn/function-props.d.ts +32 -0
- package/dataflow/fn/function-props.js +160 -0
- package/dataflow/fn/higher-order-function.d.ts +23 -5
- package/dataflow/fn/higher-order-function.js +64 -18
- package/dataflow/fn/strict-function.d.ts +24 -2
- package/dataflow/fn/strict-function.js +49 -19
- package/dataflow/graph/call-graph.js +10 -2
- package/dataflow/graph/df-helper.d.ts +1 -12
- package/dataflow/graph/df-helper.js +2 -19
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +2 -2
- package/dataflow/graph/graph.d.ts +39 -188
- package/dataflow/graph/graph.js +46 -163
- package/dataflow/graph/match-args.d.ts +34 -2
- package/dataflow/graph/match-args.js +45 -12
- package/dataflow/graph/vertex.d.ts +8 -0
- package/dataflow/info.d.ts +7 -5
- package/dataflow/info.js +1 -5
- package/dataflow/internal/control-flow.js +20 -17
- package/dataflow/internal/linker.d.ts +8 -37
- package/dataflow/internal/linker.js +22 -55
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +8 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +43 -50
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.d.ts +23 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.js +24 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +0 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +73 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +131 -92
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +17 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +187 -99
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +0 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +31 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +101 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +23 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +22 -1
- package/dataflow/internal/process/functions/call/common.d.ts +4 -6
- package/dataflow/internal/process/functions/call/common.js +2 -2
- package/dataflow/internal/process/functions/call/deferred.d.ts +1 -1
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +5 -3
- package/dataflow/internal/process/functions/call/known-call-handling.js +6 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +19 -13
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -2
- package/dataflow/internal/process/functions/call/quoted.js +144 -28
- package/dataflow/origin/dfg-get-origin.js +23 -10
- package/dataflow/processor.d.ts +2 -1
- package/dataflow/processor.js +6 -0
- package/documentation/data/interface/doc-writing-code.js +2 -0
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/wiki-absint.d.ts +11 -14
- package/documentation/wiki-absint.js +73 -59
- package/documentation/wiki-core.js +64 -24
- package/documentation/wiki-linter.js +1 -0
- package/documentation/wiki-query.js +82 -264
- package/documentation/wiki-signature-database.js +17 -5
- package/gas.d.ts +91 -47
- package/gas.js +97 -13
- package/index.d.ts +31 -0
- package/index.js +52 -0
- package/linter/linter-rules.d.ts +87 -23
- package/linter/linter-rules.js +3 -1
- package/linter/rules/absolute-path.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +10 -8
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.js +14 -5
- package/linter/rules/file-path-validity.d.ts +1 -1
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +13 -2
- package/linter/rules/network-functions.d.ts +10 -5
- package/linter/rules/network-functions.js +48 -36
- package/linter/rules/no-leaked-credentials.d.ts +1 -1
- package/linter/rules/problematic-inputs.d.ts +1 -1
- package/linter/rules/problematic-inputs.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +3 -2
- package/linter/rules/seeded-randomness.js +7 -3
- package/linter/rules/software-has-license.d.ts +1 -1
- package/linter/rules/software-has-tests.d.ts +1 -1
- package/linter/rules/stop-with-call-arg.d.ts +1 -1
- package/linter/rules/syntactically-valid.d.ts +1 -1
- package/linter/rules/unclosed-connection.d.ts +3 -3
- package/linter/rules/unclosed-connection.js +3 -4
- package/linter/rules/undefined-symbol.d.ts +1 -1
- package/linter/rules/unescaped-arguments.d.ts +161 -0
- package/linter/rules/unescaped-arguments.js +293 -0
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/unused-definition.js +49 -4
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/useless-loop.d.ts +1 -1
- package/package.json +3 -198
- package/project/context/flowr-analyzer-environment-context.d.ts +12 -1
- package/project/context/flowr-analyzer-environment-context.js +33 -1
- package/project/context/flowr-analyzer-files-context.d.ts +24 -1
- package/project/context/flowr-analyzer-files-context.js +42 -21
- package/project/context/flowr-analyzer-functions-context.d.ts +8 -0
- package/project/context/flowr-analyzer-functions-context.js +2 -0
- package/project/context/flowr-analyzer-gas-context.d.ts +9 -1
- package/project/context/flowr-analyzer-gas-context.js +21 -0
- package/project/context/flowr-file.d.ts +16 -1
- package/project/context/flowr-file.js +26 -2
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +19 -20
- package/project/plugins/file-plugins/files/flowr-description-file.js +55 -41
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +9 -4
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +11 -3
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +6 -9
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +5 -21
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +11 -12
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +48 -61
- package/project/plugins/file-plugins/files/flowr-news-file.d.ts +3 -12
- package/project/plugins/file-plugins/files/flowr-news-file.js +2 -19
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +145 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +676 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +122 -422
- package/project/plugins/file-plugins/files/flowr-rda-file.js +517 -1005
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +8 -2
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +10 -1
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +7 -2
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +9 -1
- package/project/plugins/file-plugins/files/flowr-sysdata-file.d.ts +17 -0
- package/project/plugins/file-plugins/files/flowr-sysdata-file.js +40 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +3 -1
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.d.ts +58 -0
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.js +95 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.d.ts +23 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +33 -72
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +17 -15
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +20 -37
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +29 -53
- package/project/plugins/package-version-plugins/package.js +2 -1
- package/project/plugins/plugin-registry.d.ts +3 -1
- package/project/plugins/plugin-registry.js +11 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +20 -4
- package/project/sigdb/build.d.ts +9 -15
- package/project/sigdb/build.js +101 -42
- package/project/sigdb/decode.d.ts +10 -4
- package/project/sigdb/decode.js +60 -21
- package/project/sigdb/memory-source.d.ts +4 -0
- package/project/sigdb/memory-source.js +8 -0
- package/project/sigdb/reader.d.ts +57 -100
- package/project/sigdb/reader.js +157 -108
- package/project/sigdb/schema.d.ts +90 -26
- package/project/sigdb/schema.js +12 -6
- package/queries/base-query-format.d.ts +7 -0
- package/queries/base-query-format.js +29 -0
- package/queries/catalog/absint-query/absint-query-executor.js +8 -6
- package/queries/catalog/absint-query/absint-query-format.d.ts +20 -9
- package/queries/catalog/absint-query/absint-query-format.js +32 -19
- package/queries/catalog/call-context-query/call-context-query-executor.js +3 -3
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -1
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +33 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +2 -2
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +14 -4
- package/queries/catalog/dependencies-query/function-info/read-functions.js +7 -121
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +4 -46
- package/queries/catalog/dependencies-query/function-info/write-functions.js +3 -76
- package/queries/catalog/dependencies-query/implicit-echo.js +2 -2
- package/queries/catalog/dependencies-query/link-devices.d.ts +2 -2
- package/queries/catalog/dependencies-query/link-devices.js +6 -7
- package/queries/catalog/dice-query/dice-query-executor.js +1 -1
- package/queries/catalog/dice-query/dice-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-executor.js +4 -0
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -1
- package/queries/catalog/files-query/files-query-format.d.ts +1 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +1 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -17
- package/queries/catalog/input-sources-query/input-sources-query-format.js +11 -27
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +3 -8
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -11
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +4 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +60 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +35 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +63 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -6
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +3 -8
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -11
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +3 -8
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -12
- package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +3 -8
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -14
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -10
- package/queries/catalog/signature-query/signature-query-executor.js +87 -93
- package/queries/catalog/signature-query/signature-query-format.d.ts +20 -5
- package/queries/catalog/signature-query/signature-query-format.js +16 -4
- package/queries/catalog/signature-query/signature-query-render.js +18 -4
- package/queries/catalog/slice-query-options.d.ts +14 -0
- package/queries/catalog/slice-query-options.js +15 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +2 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.js +7 -5
- package/queries/query-function-filter.d.ts +8 -3
- package/queries/query-function-filter.js +16 -6
- package/queries/query.d.ts +38 -38
- package/queries/query.js +30 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +5 -0
- package/r-bridge/lang-4.x/ast/model/model.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +17 -9
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +35 -27
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -22
- package/reconstruct/reconstruct.d.ts +9 -20
- package/reconstruct/reconstruct.js +66 -28
- package/search/flowr-search-filters.d.ts +7 -6
- package/search/flowr-search-filters.js +6 -4
- package/search/search-executor/search-enrichers.d.ts +10 -10
- package/search/search-executor/search-enrichers.js +32 -3
- package/search/search-executor/search-transformer.js +15 -23
- package/slicing/criterion/parse.js +2 -12
- package/slicing/static/slice-call.js +1 -8
- package/slicing/static/static-slicer.js +1 -1
- package/util/collections/bimap.js +14 -6
- package/util/objects.js +16 -17
- package/util/r-value.d.ts +5 -4
- package/util/record.d.ts +38 -3
- package/util/record.js +48 -1
- package/util/simple-df/dfg-ascii.js +1 -1
- package/util/text/strings.d.ts +5 -0
- package/util/text/strings.js +10 -0
- package/util/version.js +2 -2
- package/abstract-interpretation/absint-visitor.d.ts +0 -223
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -19
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -151
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +0 -287
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +0 -1096
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -15
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -207
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +0 -6
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +0 -25
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +0 -31
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +0 -56
|
@@ -123,7 +123,7 @@ export declare function getAllCategories(queries: readonly DependenciesQuery[]):
|
|
|
123
123
|
export declare const DependenciesQueryDefinition: {
|
|
124
124
|
readonly title: "Dependencies Query";
|
|
125
125
|
readonly executor: typeof executeDependenciesQuery;
|
|
126
|
-
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("
|
|
126
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[], queries: readonly import("../../query").Query[]) => true;
|
|
127
127
|
readonly schema: Joi.ObjectSchema<any>;
|
|
128
128
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, query: readonly import("../../query").Query[]) => NodeId[];
|
|
129
129
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionInfo } from './function-info';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PropSelector } from '../../../../dataflow/environments/built-in-props';
|
|
3
3
|
/**
|
|
4
4
|
* The built-ins that carry all of `props` and name the resource they act on, as entries of a dependency
|
|
5
5
|
* category. This is what the {@link DefaultBuiltinConfig} already states, so only the functions it does not
|
|
@@ -7,4 +7,4 @@ import type { CallProps } from '../../../../dataflow/environments/built-in-props
|
|
|
7
7
|
* a default, ...) have to be written down in the category itself. Names in `except` stay with whoever
|
|
8
8
|
* wrote them down.
|
|
9
9
|
*/
|
|
10
|
-
export declare function functionInfosFromProps(props:
|
|
10
|
+
export declare function functionInfosFromProps(props: PropSelector, except: readonly FunctionInfo[]): FunctionInfo[];
|
|
@@ -10,6 +10,13 @@ function linkTargets(f) {
|
|
|
10
10
|
return (f.linkTo ?? []).flatMap(l => typeof l.callName === 'string' ? [l.callName]
|
|
11
11
|
: Array.isArray(l.callName) ? l.callName.map(n => identifier_1.Identifier.getName(n)) : []);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* How an entry is looked up among the ones already written down: under the package that declares it where it
|
|
15
|
+
* names one, so `readr::write_csv` and `rpolars::write_csv` stay two entries rather than one shadowing the other.
|
|
16
|
+
*/
|
|
17
|
+
function writtenAs(f) {
|
|
18
|
+
return f.package === undefined ? f.name : `${f.package}::${f.name}`;
|
|
19
|
+
}
|
|
13
20
|
/**
|
|
14
21
|
* The built-ins that carry all of `props` and name the resource they act on, as entries of a dependency
|
|
15
22
|
* category. This is what the {@link DefaultBuiltinConfig} already states, so only the functions it does not
|
|
@@ -18,11 +25,13 @@ function linkTargets(f) {
|
|
|
18
25
|
* wrote them down.
|
|
19
26
|
*/
|
|
20
27
|
function functionInfosFromProps(props, except) {
|
|
21
|
-
const taken = new Set(except.
|
|
28
|
+
const taken = new Set(except.map(writtenAs));
|
|
29
|
+
/* a bare name speaks for every package: an entry written down without one, and whatever a link points at */
|
|
30
|
+
const takenEverywhere = new Set(except.flatMap(f => [...f.package === undefined ? [f.name] : [], ...linkTargets(f)]));
|
|
22
31
|
const found = [];
|
|
23
32
|
for (const d of default_builtin_config_1.DefaultBuiltinConfig) {
|
|
24
33
|
const info = d.type !== 'constant' ? d.config : undefined;
|
|
25
|
-
if (info?.
|
|
34
|
+
if (info?.sig === undefined || !built_in_props_1.CallProps.hasAny(info) || !built_in_props_1.CallProps.hasAll(info, props)) {
|
|
26
35
|
continue;
|
|
27
36
|
}
|
|
28
37
|
const argIdx = info.sig.findIndex(([, p]) => (p & built_in_props_1.ArgProp.Resource) !== 0);
|
|
@@ -31,8 +40,9 @@ function functionInfosFromProps(props, except) {
|
|
|
31
40
|
}
|
|
32
41
|
for (const id of (0, query_fn_props_1.builtInNames)(d)) {
|
|
33
42
|
const name = identifier_1.Identifier.getName(id);
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
const pkg = identifier_1.Identifier.getNamespace(id);
|
|
44
|
+
if (!takenEverywhere.has(name) && !taken.has(pkg === undefined ? name : `${pkg}::${name}`)) {
|
|
45
|
+
found.push({ package: pkg, name, argIdx, argName: info.sig[argIdx][0], resolveValue: true });
|
|
36
46
|
}
|
|
37
47
|
}
|
|
38
48
|
}
|
|
@@ -4,6 +4,7 @@ exports.ReadFunctions = void 0;
|
|
|
4
4
|
const built_in_props_1 = require("../../../../dataflow/environments/built-in-props");
|
|
5
5
|
const derived_functions_1 = require("./derived-functions");
|
|
6
6
|
const other_path_functions_1 = require("./other-path-functions");
|
|
7
|
+
const source_functions_1 = require("./source-functions");
|
|
7
8
|
const ReadFunctionsWithMore = [
|
|
8
9
|
{ package: 'base', name: 'parse', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
9
10
|
{ package: 'utils', name: 'read.table', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
|
|
@@ -11,8 +12,6 @@ const ReadFunctionsWithMore = [
|
|
|
11
12
|
{ package: 'utils', name: 'read.csv2', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
|
|
12
13
|
{ package: 'utils', name: 'read.delim', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
|
|
13
14
|
{ package: 'utils', name: 'read.delim2', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
|
|
14
|
-
{ package: 'base', name: 'read.dcf', argIdx: 0, argName: 'file', resolveValue: true },
|
|
15
|
-
{ package: 'utils', name: 'read.fwf', argIdx: 0, argName: 'file', resolveValue: true },
|
|
16
15
|
{ package: 'base', name: 'file', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
17
16
|
{ package: 'base', name: 'url', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
18
17
|
{ package: 'base', name: 'gzfile', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
@@ -22,82 +21,15 @@ const ReadFunctionsWithMore = [
|
|
|
22
21
|
{ package: 'base', name: 'fifo', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
23
22
|
{ package: 'base', name: 'unz', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-write', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
24
23
|
{ package: 'base', name: 'matrix', argIdx: 0, argName: 'data', resolveValue: true },
|
|
25
|
-
/* `data(mtcars)` names the dataset as a symbol (or as a string with `character.only`), just like `library` */
|
|
26
24
|
{ package: 'utils', name: 'data', argIdx: 0, resolveValue: 'library', ignoreIf: 'arg-missing' },
|
|
27
|
-
{ package: 'base', name: 'readRenviron', argIdx: 0, argName: 'path', resolveValue: true },
|
|
28
|
-
{ package: 'readr', name: 'read_csv', argIdx: 0, argName: 'file', resolveValue: true },
|
|
29
|
-
{ package: 'readr', name: 'read_csv2', argIdx: 0, argName: 'file', resolveValue: true },
|
|
30
|
-
{ package: 'readr', name: 'read_lines', argIdx: 0, argName: 'file', resolveValue: true },
|
|
31
|
-
{ package: 'readr', name: 'read_delim', argIdx: 0, argName: 'file', resolveValue: true },
|
|
32
|
-
{ package: 'readr', name: 'read_fwf', argIdx: 0, argName: 'file', resolveValue: true },
|
|
33
|
-
{ package: 'readr', name: 'read_tsv', argIdx: 0, argName: 'file', resolveValue: true },
|
|
34
|
-
{ package: 'readr', name: 'read_table', argIdx: 0, argName: 'file', resolveValue: true },
|
|
35
|
-
{ package: 'readr', name: 'read_log', argIdx: 0, argName: 'file', resolveValue: true },
|
|
36
|
-
{ package: 'readr', name: 'read_lines_raw', argIdx: 0, argName: 'file', resolveValue: true },
|
|
37
|
-
{ package: 'readr', name: 'read_lines_chunked', argIdx: 0, argName: 'file', resolveValue: true },
|
|
38
|
-
{ package: 'readr', name: 'read_rds', argIdx: 0, argName: 'file', resolveValue: true },
|
|
39
25
|
{ package: 'readr', name: 'clipboard' },
|
|
40
|
-
{ package: 'xlsx', name: 'read.xlsx', argIdx: 0, argName: 'file', resolveValue: true },
|
|
41
|
-
{ package: 'xlsx', name: 'read.xlsx2', argIdx: 0, argName: 'file', resolveValue: true },
|
|
42
|
-
{ package: 'data.table', name: 'fread', argIdx: 0, argName: 'file', resolveValue: true },
|
|
43
|
-
{ package: 'haven', name: 'read_sas', argIdx: 0, argName: 'file', resolveValue: true },
|
|
44
|
-
{ package: 'haven', name: 'read_sav', argIdx: 0, argName: 'file', resolveValue: true },
|
|
45
|
-
{ package: 'haven', name: 'read_por', argIdx: 0, argName: 'file', resolveValue: true },
|
|
46
|
-
{ package: 'haven', name: 'read_dta', argIdx: 0, argName: 'file', resolveValue: true },
|
|
47
|
-
{ package: 'haven', name: 'read_xpt', argIdx: 0, argName: 'file', resolveValue: true },
|
|
48
|
-
{ package: 'feather', name: 'read_feather', argIdx: 0, argName: 'file', resolveValue: true },
|
|
49
|
-
{ package: 'foreign', name: 'read.arff', argIdx: 0, argName: 'file', resolveValue: true },
|
|
50
|
-
{ package: 'foreign', name: 'read.dbf', argIdx: 0, argName: 'file', resolveValue: true },
|
|
51
|
-
{ package: 'foreign', name: 'read.dta', argIdx: 0, argName: 'file', resolveValue: true },
|
|
52
|
-
{ package: 'foreign', name: 'read.epiinfo', argIdx: 0, argName: 'file', resolveValue: true },
|
|
53
|
-
{ package: 'foreign', name: 'read.mtp', argIdx: 0, argName: 'file', resolveValue: true },
|
|
54
|
-
{ package: 'foreign', name: 'read.octave', argIdx: 0, argName: 'file', resolveValue: true },
|
|
55
|
-
{ package: 'foreign', name: 'read.spss', argIdx: 0, argName: 'file', resolveValue: true },
|
|
56
|
-
{ package: 'foreign', name: 'read.ssd', argIdx: 0, argName: 'file', resolveValue: true },
|
|
57
|
-
{ package: 'foreign', name: 'read.systat', argIdx: 0, argName: 'file', resolveValue: true },
|
|
58
|
-
{ package: 'foreign', name: 'read.xport', argIdx: 0, argName: 'file', resolveValue: true },
|
|
59
|
-
{ package: 'car', name: 'Import', argIdx: 0, argName: 'file', resolveValue: true },
|
|
60
|
-
{ package: 'magick', name: 'image_read', argIdx: 0, argName: 'path', resolveValue: true },
|
|
61
|
-
{ package: 'magick', name: 'image_read_svg', argIdx: 0, argName: 'path', resolveValue: true },
|
|
62
|
-
{ package: 'magick', name: 'image_read_pdf', argIdx: 0, argName: 'path', resolveValue: true },
|
|
63
|
-
{ package: 'magick', name: 'image_read_video', argIdx: 0, argName: 'path', resolveValue: true },
|
|
64
|
-
{ package: 'LIM', name: 'Read', argIdx: 0, argName: 'file', resolveValue: true },
|
|
65
|
-
{ package: 'sourcetools', name: 'read', argIdx: 0, argName: 'path', resolveValue: true },
|
|
66
|
-
{ package: 'sourcetools', name: 'read_lines', argIdx: 0, argName: 'path', resolveValue: true },
|
|
67
|
-
{ package: 'sourcetools', name: 'read_bytes', argIdx: 0, argName: 'path', resolveValue: true },
|
|
68
|
-
{ package: 'sourcetools', name: 'read_lines_bytes', argIdx: 0, argName: 'path', resolveValue: true },
|
|
69
26
|
{ package: 'sourcetools', name: 'tokenize', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
70
|
-
{ package: 'sourcetools', name: 'tokenize_file', argIdx: 0, argName: 'path', resolveValue: true },
|
|
71
|
-
{ package: 'expss', name: 'read_spss', argIdx: 0, argName: 'file', resolveValue: true },
|
|
72
|
-
{ package: 'SimPhe', name: 'read.geno', argIdx: 0, argName: 'fname', resolveValue: true },
|
|
73
27
|
{ package: 'ape', name: 'read.tree', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
74
|
-
{ package: 'geomorph', name: 'readland.tps', argIdx: 0, argName: 'file', resolveValue: true },
|
|
75
|
-
{ package: 'readxl', name: 'read_excel', argIdx: 0, argName: 'path', resolveValue: true },
|
|
76
|
-
{ package: 'readxl', name: 'read_xls', argIdx: 0, argName: 'path', resolveValue: true },
|
|
77
|
-
{ package: 'readxl', name: 'read_xlsx', argIdx: 0, argName: 'path', resolveValue: true },
|
|
78
|
-
{ package: 'sf', name: 'read_sf', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
79
|
-
{ package: 'sf', name: 'st_read', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
80
|
-
{ package: 'rgdal', name: 'readOGR', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
81
|
-
{ package: 'rgdal', name: 'ogrInfo', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
82
|
-
{ package: 'rgdal', name: 'ogrFIDs', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
83
|
-
{ package: 'rgdal', name: 'OGRSpatialRef', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
84
|
-
{ package: 'rgdal', name: 'ogrListLayers', argIdx: 0, argName: 'dsn', resolveValue: true },
|
|
85
|
-
{ package: 'rgdal', name: 'readGDAL', argIdx: 0, argName: 'fname', resolveValue: true },
|
|
86
|
-
{ package: 'readstata13', name: 'read.dta13', argIdx: 0, argName: 'file', resolveValue: true },
|
|
87
|
-
{ package: 'arrow', name: 'read_parquet', argIdx: 0, argName: 'file', resolveValue: true },
|
|
88
|
-
{ package: 'maptools', name: 'readShapePoly', argIdx: 0, argName: 'fn', resolveValue: true },
|
|
89
|
-
{ package: 'XLConnect', name: 'readWorksheetFromFile', argIdx: 0, argName: 'file', resolveValue: true },
|
|
90
|
-
{ package: 'XLConnect', name: 'readNamedRegionFromFile', argIdx: 0, argName: 'file', resolveValue: true },
|
|
91
|
-
{ package: 'XLConnect', name: 'loadWorkbook', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
92
|
-
{ package: 'DiagrammeR', name: 'import_graph', argIdx: 0, argName: 'graph_file', resolveValue: true },
|
|
93
|
-
{ package: 'DiagrammeR', name: 'open_graph', argIdx: 0, argName: 'file', resolveValue: true },
|
|
94
28
|
{ package: 'highcharter', name: 'download_map_data', argIdx: 0, argName: 'url', resolveValue: true, defaultValue: 'custom/world.js' },
|
|
95
29
|
{ name: 'read_html', argIdx: 0, argName: 'x', resolveValue: true },
|
|
96
30
|
{ package: 'rvest', name: 'read_html_live', argIdx: 0, argName: 'url', resolveValue: true },
|
|
97
|
-
{ package: 'stats', name: 'read.ftable', argIdx: 0, argName: 'file', resolveValue: true },
|
|
98
31
|
{ package: 'DBI', name: 'dbReadTable', argIdx: 1, argName: 'name', resolveValue: true },
|
|
99
32
|
{ package: 'DBI', name: 'dbReadTableArrow', argIdx: 1, argName: 'name', resolveValue: true },
|
|
100
|
-
{ package: 'jsonlite', name: 'read_json', argIdx: 0, argName: 'path', resolveValue: true },
|
|
101
33
|
{ package: 'rpolars', name: 'pl_read_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
102
34
|
{ package: 'rpolars', name: 'pl_read_csv', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
103
35
|
{ package: 'rpolars', name: 'pl_read_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
@@ -106,63 +38,17 @@ const ReadFunctionsWithMore = [
|
|
|
106
38
|
{ package: 'rpolars', name: 'pl_scan_ipc', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
107
39
|
{ package: 'rpolars', name: 'pl_scan_ndjson', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
108
40
|
{ package: 'rpolars', name: 'pl_scan_parquet', argIdx: 0, argName: 'source', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
109
|
-
{ package: 'rio', name: 'import', argIdx: 0, argName: 'file', resolveValue: true },
|
|
110
|
-
{ package: 'rio', name: 'import_list', argIdx: 0, argName: 'file', resolveValue: true },
|
|
111
|
-
{ package: 'openxlsx', name: 'read.xlsx', argIdx: 0, argName: 'xlsxFile', resolveValue: true },
|
|
112
|
-
{ package: 'openxlsx', name: 'loadWorkbook', argIdx: 0, argName: 'file', resolveValue: true },
|
|
113
|
-
{ package: 'readODS', name: 'read_ods', argIdx: 0, argName: 'path', resolveValue: true },
|
|
114
|
-
{ package: 'vroom', name: 'vroom', argIdx: 0, argName: 'file', resolveValue: true },
|
|
115
41
|
{ package: 'compiler', name: 'loadcmp', argIdx: 0, argName: 'file', resolveValue: true },
|
|
116
42
|
{ package: 'compiler', name: 'cmpfile', argIdx: 0, argName: 'infile', resolveValue: true },
|
|
117
|
-
/* image / raster */
|
|
118
|
-
{ package: 'jpeg', name: 'readJPEG', argIdx: 0, argName: 'source', resolveValue: true },
|
|
119
|
-
{ package: 'png', name: 'readPNG', argIdx: 0, argName: 'source', resolveValue: true },
|
|
120
|
-
{ package: 'tiff', name: 'readTIFF', argIdx: 0, argName: 'source', resolveValue: true },
|
|
121
|
-
{ package: 'imager', name: 'load.image', argIdx: 0, argName: 'file', resolveValue: true },
|
|
122
|
-
{ package: 'imager', name: 'load.video', argIdx: 0, argName: 'file', resolveValue: true },
|
|
123
|
-
{ package: 'imager', name: 'load.dir', argIdx: 0, argName: 'path', resolveValue: true },
|
|
124
|
-
{ package: 'OpenImageR', name: 'readImage', argIdx: 0, argName: 'path', resolveValue: true },
|
|
125
|
-
{ package: 'EBImage', name: 'readImage', argIdx: 0, argName: 'files', resolveValue: true },
|
|
126
|
-
/* audio / video */
|
|
127
|
-
{ package: 'av', name: 'av_video_images', argIdx: 0, argName: 'video', resolveValue: true },
|
|
128
|
-
{ package: 'av', name: 'read_audio_bin', argIdx: 0, argName: 'audio', resolveValue: true },
|
|
129
|
-
{ package: 'av', name: 'read_audio_fft', argIdx: 0, argName: 'audio', resolveValue: true },
|
|
130
|
-
{ package: 'tuneR', name: 'readWave', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
131
|
-
{ package: 'tuneR', name: 'readMP3', argIdx: 0, argName: 'file', resolveValue: true },
|
|
132
|
-
{ package: 'tuneR', name: 'readMidi', argIdx: 0, argName: 'file', resolveValue: true },
|
|
133
|
-
{ package: 'seewave', name: 'read.audacity', argIdx: 0, argName: 'file', resolveValue: true },
|
|
134
|
-
{ package: 'audio', name: 'load.wave', argIdx: 0, argName: 'where', resolveValue: true },
|
|
135
|
-
/* geospatial (no `raster::stack`: only the name is matched on and `utils::stack` shares it) */
|
|
136
|
-
{ package: 'terra', name: 'rast', argIdx: 0, argName: 'x', resolveValue: true },
|
|
137
|
-
{ package: 'terra', name: 'vect', argIdx: 0, argName: 'x', resolveValue: true },
|
|
138
|
-
{ package: 'raster', name: 'raster', argIdx: 0, argName: 'x', resolveValue: true },
|
|
139
|
-
{ package: 'raster', name: 'brick', argIdx: 0, argName: 'x', resolveValue: true },
|
|
140
|
-
{ package: 'raster', name: 'shapefile', argIdx: 0, argName: 'x', resolveValue: true },
|
|
141
|
-
{ package: 'stars', name: 'read_stars', argIdx: 0, argName: '.x', resolveValue: true },
|
|
142
|
-
{ package: 'stars', name: 'read_ncdf', argIdx: 0, argName: '.x', resolveValue: true },
|
|
143
|
-
{ package: 'maptools', name: 'readShapeLines', argIdx: 0, argName: 'fn', resolveValue: true },
|
|
144
|
-
{ package: 'maptools', name: 'readShapePoints', argIdx: 0, argName: 'fn', resolveValue: true },
|
|
145
|
-
{ package: 'maptools', name: 'readShapeSpatial', argIdx: 0, argName: 'fn', resolveValue: true },
|
|
146
|
-
/* array / binary science formats */
|
|
147
|
-
{ package: 'ncdf4', name: 'nc_open', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
148
|
-
{ package: 'RNetCDF', name: 'open.nc', argIdx: 0, argName: 'con', resolveValue: true },
|
|
149
|
-
{ package: 'R.matlab', name: 'readMat', argIdx: 0, argName: 'con', resolveValue: true },
|
|
150
|
-
{ package: 'rhdf5', name: 'h5read', argIdx: 0, argName: 'file', resolveValue: true },
|
|
151
|
-
{ package: 'rhdf5', name: 'h5ls', argIdx: 0, argName: 'file', resolveValue: true },
|
|
152
|
-
{ package: 'fst', name: 'read_fst', argIdx: 0, argName: 'path', resolveValue: true },
|
|
153
|
-
{ package: 'qs', name: 'qread', argIdx: 0, argName: 'file', resolveValue: true },
|
|
154
43
|
{ package: 'yaml', name: 'read_yaml', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-set', additionalArgs: { argSet: { argName: 'text' } } },
|
|
155
|
-
/* phylogeny / sequence */
|
|
156
|
-
{ package: 'ape', name: 'read.nexus', argIdx: 0, argName: 'file', resolveValue: true },
|
|
157
|
-
{ package: 'ape', name: 'read.nexus.data', argIdx: 0, argName: 'file', resolveValue: true },
|
|
158
|
-
{ package: 'ape', name: 'read.dna', argIdx: 0, argName: 'file', resolveValue: true },
|
|
159
|
-
{ package: 'ape', name: 'read.FASTA', argIdx: 0, argName: 'file', resolveValue: true },
|
|
160
|
-
{ package: 'seqinr', name: 'read.fasta', argIdx: 0, argName: 'file', resolveValue: true },
|
|
161
|
-
/* shinyjs - loads an external JavaScript file */
|
|
162
44
|
{ package: 'shinyjs', name: 'extendShinyjs', argIdx: 0, argName: 'script', resolveValue: true, ignoreIf: 'arg-missing' }
|
|
163
45
|
];
|
|
46
|
+
/* the built-in configuration leads: it is where flowR states what a call does, and the entries below are the
|
|
47
|
+
exceptions that need more than a resource argument. For a call naming no package the first entry able to
|
|
48
|
+
apply answers, so a name several packages export is read the way the configuration states it.
|
|
49
|
+
`source` reads a file too, but it is the `sourced` category that reports it, so it stays out of this one */
|
|
164
50
|
exports.ReadFunctions = [
|
|
165
|
-
...ReadFunctionsWithMore,
|
|
166
|
-
...
|
|
51
|
+
...(0, derived_functions_1.functionInfosFromProps)([built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], [...ReadFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions, ...source_functions_1.SourceFunctions]),
|
|
52
|
+
...ReadFunctionsWithMore
|
|
167
53
|
];
|
|
168
54
|
//# sourceMappingURL=read-functions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FunctionInfo } from './function-info';
|
|
2
2
|
import { BuiltInIndex } from '../../../../dataflow/environments/query-fn-props';
|
|
3
3
|
/**
|
|
4
|
-
* The statistical tests, read back from the {@link
|
|
4
|
+
* The statistical tests, read back from the {@link SemanticCallTag.Statistics} built-ins so the dependency query and
|
|
5
5
|
* the built-in configuration cannot disagree about them. Every one of them names the package it belongs to,
|
|
6
6
|
* which is what keeps `stats::t.test` a test and drops a `t.test` of somebody else's package.
|
|
7
7
|
* Label a built-in `Statistics` and it shows up here.
|
|
@@ -5,13 +5,13 @@ const identifier_1 = require("../../../../dataflow/environments/identifier");
|
|
|
5
5
|
const built_in_props_1 = require("../../../../dataflow/environments/built-in-props");
|
|
6
6
|
const query_fn_props_1 = require("../../../../dataflow/environments/query-fn-props");
|
|
7
7
|
/**
|
|
8
|
-
* The statistical tests, read back from the {@link
|
|
8
|
+
* The statistical tests, read back from the {@link SemanticCallTag.Statistics} built-ins so the dependency query and
|
|
9
9
|
* the built-in configuration cannot disagree about them. Every one of them names the package it belongs to,
|
|
10
10
|
* which is what keeps `stats::t.test` a test and drops a `t.test` of somebody else's package.
|
|
11
11
|
* Label a built-in `Statistics` and it shows up here.
|
|
12
12
|
*/
|
|
13
13
|
function statisticsFunctions(index = query_fn_props_1.BuiltInIndex.default()) {
|
|
14
|
-
return index.with(built_in_props_1.
|
|
14
|
+
return index.with(built_in_props_1.SemanticCallTag.Statistics).map(call => ({
|
|
15
15
|
name: identifier_1.Identifier.getName(call),
|
|
16
16
|
package: identifier_1.Identifier.getNamespace(call)
|
|
17
17
|
}));
|
|
@@ -5,54 +5,12 @@ const default_builtin_config_1 = require("../../../../dataflow/environments/defa
|
|
|
5
5
|
const LinkToPlotCreation = [
|
|
6
6
|
{ type: 'link-to-last-call', callName: default_builtin_config_1.PlotCreate }
|
|
7
7
|
];
|
|
8
|
-
/**
|
|
9
|
-
* The package that actually exports a plotting call that flowR groups with ggplot2's: a namespaced call is only
|
|
10
|
-
* counted when it names the package the function belongs to, so `ggthemes::theme_wsj()` would otherwise be dropped.
|
|
11
|
-
* A name several packages define (`theme_map` in both cowplot and ggthemes) is left out and matches either way.
|
|
12
|
-
*/
|
|
13
|
-
const PlotFunctionsByPackage = {
|
|
14
|
-
factoextra: ['fviz_cluster', 'fviz_dend', 'fviz_mca', 'fviz_mca_biplot', 'fviz_mca_ind', 'fviz_mca_var', 'fviz_pca',
|
|
15
|
-
'fviz_pca_biplot', 'fviz_pca_ind', 'fviz_pca_var', 'fviz_screeplot'],
|
|
16
|
-
ggExtra: ['ggMarginal', 'removeGrid', 'removeGridX', 'removeGridY', 'rotateTextX'],
|
|
17
|
-
survminer: ['ggsurvplot', 'ggsurvplot_add_all', 'theme_survminer'],
|
|
18
|
-
cowplot: ['ggdraw'],
|
|
19
|
-
forecast: ['ggseasonplot'],
|
|
20
|
-
ggcorrplot: ['ggcorrplot'],
|
|
21
|
-
ggdendro: ['ggdendrogram'],
|
|
22
|
-
plotly: ['ggplotly'],
|
|
23
|
-
gridExtra: ['grid.arrange'],
|
|
24
|
-
ggmap: ['qmap'],
|
|
25
|
-
ggpubr: ['gradient_color'],
|
|
26
|
-
ggalt: ['geom_dumbbell', 'geom_encircle'],
|
|
27
|
-
ggthemes: [
|
|
28
|
-
'scale_color_calc', 'scale_color_canva', 'scale_color_colorblind', 'scale_color_continuous_tableau',
|
|
29
|
-
'scale_color_economist', 'scale_color_excel', 'scale_color_excel_new', 'scale_color_few',
|
|
30
|
-
'scale_color_fivethirtyeight', 'scale_color_gdocs', 'scale_color_gradient2_tableau',
|
|
31
|
-
'scale_color_gradient_tableau', 'scale_color_hc', 'scale_color_pander', 'scale_color_ptol',
|
|
32
|
-
'scale_color_solarized', 'scale_color_stata', 'scale_color_tableau', 'scale_color_wsj', 'scale_colour_calc',
|
|
33
|
-
'scale_colour_canva', 'scale_colour_colorblind', 'scale_colour_economist', 'scale_colour_excel',
|
|
34
|
-
'scale_colour_excel_new', 'scale_colour_few', 'scale_colour_fivethirtyeight', 'scale_colour_gdocs',
|
|
35
|
-
'scale_colour_gradient2_tableau', 'scale_colour_gradient_tableau', 'scale_colour_hc', 'scale_colour_pander',
|
|
36
|
-
'scale_colour_ptol', 'scale_colour_solarized', 'scale_colour_stata', 'scale_colour_tableau', 'scale_colour_wsj',
|
|
37
|
-
'scale_fill_calc', 'scale_fill_canva', 'scale_fill_colorblind', 'scale_fill_continuous_tableau',
|
|
38
|
-
'scale_fill_economist', 'scale_fill_excel', 'scale_fill_excel_new', 'scale_fill_few',
|
|
39
|
-
'scale_fill_fivethirtyeight', 'scale_fill_gdocs', 'scale_fill_gradient2_tableau', 'scale_fill_gradient_tableau',
|
|
40
|
-
'scale_fill_hc', 'scale_fill_pander', 'scale_fill_ptol', 'scale_fill_solarized', 'scale_fill_stata',
|
|
41
|
-
'scale_fill_tableau', 'scale_fill_wsj', 'scale_linetype_stata', 'scale_shape_calc', 'scale_shape_circlefill',
|
|
42
|
-
'scale_shape_cleveland', 'scale_shape_few', 'scale_shape_stata', 'scale_shape_tableau', 'scale_shape_tremmel',
|
|
43
|
-
'theme_base', 'theme_calc', 'theme_clean', 'theme_economist', 'theme_economist_white', 'theme_excel',
|
|
44
|
-
'theme_excel_new', 'theme_few', 'theme_fivethirtyeight', 'theme_foundation', 'theme_gdocs', 'theme_hc',
|
|
45
|
-
'theme_igray', 'theme_pander', 'theme_par', 'theme_solarized', 'theme_solarized_2', 'theme_solid',
|
|
46
|
-
'theme_stata', 'theme_tufte', 'theme_wsj'
|
|
47
|
-
]
|
|
48
|
-
};
|
|
49
|
-
/** {@link PlotFunctionsByPackage} inverted: the owning package of a name, `ggplot2` unless another package claims it */
|
|
50
|
-
const PlotFunctionOwner = new Map(Object.entries(PlotFunctionsByPackage).flatMap(([pkg, names]) => names.map(name => [name, pkg])));
|
|
51
|
-
/** Names that several packages define, so pinning any of them would drop the calls to the others. */
|
|
52
|
-
const AmbiguousPlotFunctions = new Set(['theme_map', 'wrap_by']);
|
|
53
8
|
/** the {@link FunctionInfo} for a ggplot-style call, qualified with the package that really exports it */
|
|
54
9
|
function ggStyle(name, linkTo) {
|
|
55
|
-
|
|
10
|
+
/* the configuration is what knows who exports these; more than one owner means pinning it would drop the
|
|
11
|
+
calls to the others (`theme_map` is cowplot's as well as ggthemes'), and none means it is ggplot2's own */
|
|
12
|
+
const owners = (0, default_builtin_config_1.plotFunctionOwners)(name);
|
|
13
|
+
const owner = owners.length === 1 ? owners[0] : owners.length === 0 ? 'ggplot2' : undefined;
|
|
56
14
|
return { ...(owner ? { package: owner } : {}), name, ...(linkTo ? { linkTo } : {}) };
|
|
57
15
|
}
|
|
58
16
|
exports.VisualizeFunctions =
|
|
@@ -11,7 +11,6 @@ const OutputRedirects = [
|
|
|
11
11
|
];
|
|
12
12
|
const WriteFunctionsWithMore = [
|
|
13
13
|
{ package: 'base', name: 'save.image', argIdx: 0, argName: 'file', resolveValue: true, defaultValue: '.RData' },
|
|
14
|
-
{ package: 'base', name: 'dump', argIdx: 1, argName: 'file', resolveValue: true },
|
|
15
14
|
{ package: 'utils', name: 'write.csv', argIdx: 1, argName: 'file', resolveValue: true },
|
|
16
15
|
{
|
|
17
16
|
package: 'base',
|
|
@@ -37,26 +36,6 @@ const WriteFunctionsWithMore = [
|
|
|
37
36
|
{ package: 'cli', name: 'cli_abort', linkTo: OutputRedirects, resolveValue: false },
|
|
38
37
|
{ package: 'base', name: 'file', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-read', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
39
38
|
{ package: 'base', name: 'url', argIdx: 0, argName: 'description', resolveValue: true, ignoreIf: 'mode-only-read', additionalArgs: { mode: { argIdx: 1, argName: 'open', resolveValue: true } } },
|
|
40
|
-
{ package: 'readr', name: 'write_csv', argIdx: 1, argName: 'file', resolveValue: true },
|
|
41
|
-
{ package: 'readr', name: 'write_csv2', argIdx: 1, argName: 'file', resolveValue: true },
|
|
42
|
-
{ package: 'readr', name: 'write_delim', argIdx: 1, argName: 'file', resolveValue: true },
|
|
43
|
-
{ package: 'readr', name: 'write_excel_csv', argIdx: 1, argName: 'file', resolveValue: true },
|
|
44
|
-
{ package: 'readr', name: 'write_excel_csv2', argIdx: 1, argName: 'file', resolveValue: true },
|
|
45
|
-
{ package: 'readr', name: 'write_file', argIdx: 1, argName: 'file', resolveValue: true },
|
|
46
|
-
{ package: 'readr', name: 'write_tsv', argIdx: 1, argName: 'file', resolveValue: true },
|
|
47
|
-
{ package: 'readr', name: 'write_lines', argIdx: 1, argName: 'file', resolveValue: true },
|
|
48
|
-
{ package: 'readr', name: 'write_rds', argIdx: 1, argName: 'file', resolveValue: true },
|
|
49
|
-
{ package: 'haven', name: 'write_sas', argIdx: 1, argName: 'file', resolveValue: true },
|
|
50
|
-
{ package: 'haven', name: 'write_sav', argIdx: 1, argName: 'file', resolveValue: true },
|
|
51
|
-
{ package: 'haven', name: 'write_dta', argIdx: 1, argName: 'file', resolveValue: true },
|
|
52
|
-
{ package: 'haven', name: 'write_xpt', argIdx: 1, argName: 'file', resolveValue: true },
|
|
53
|
-
{ package: 'feather', name: 'write_feather', argIdx: 1, argName: 'file', resolveValue: true },
|
|
54
|
-
{ package: 'foreign', name: 'write.arff', argIdx: 1, argName: 'file', resolveValue: true },
|
|
55
|
-
{ package: 'foreign', name: 'write.dbf', argIdx: 1, argName: 'file', resolveValue: true },
|
|
56
|
-
{ package: 'foreign', name: 'write.dta', argIdx: 1, argName: 'file', resolveValue: true },
|
|
57
|
-
{ package: 'foreign', name: 'write.foreign', argIdx: 1, argName: 'file', resolveValue: true },
|
|
58
|
-
{ package: 'xlsx', name: 'write.xlsx', argIdx: 1, argName: 'file', resolveValue: true },
|
|
59
|
-
{ package: 'xlsx', name: 'write.xlsx2', argIdx: 1, argName: 'file', resolveValue: true },
|
|
60
39
|
{ package: 'grDevices', name: 'jpeg', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
61
40
|
{ package: 'grDevices', name: 'png', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
62
41
|
{ package: 'grDevices', name: 'windows', argIdx: 0, argName: 'file', resolveValue: true },
|
|
@@ -71,33 +50,15 @@ const WriteFunctionsWithMore = [
|
|
|
71
50
|
{ package: 'ragg', name: 'agg_tiff', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
72
51
|
{ package: 'ragg', name: 'agg_ppm', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
73
52
|
{ package: 'ragg', name: 'agg_webp', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
74
|
-
{ package: 'car', name: 'Export', argIdx: 0, argName: 'file', resolveValue: true },
|
|
75
53
|
{ package: 'LIM', name: 'PrintMat', linkTo: OutputRedirects, resolveValue: true },
|
|
76
54
|
// write_spss/write_stata moved sjmisc -> sjlabelled, so do not pin a namespace (match either); write_sas also lives in haven
|
|
77
55
|
{ name: 'write_spss', argIdx: 1, argName: 'path', resolveValue: true },
|
|
78
56
|
{ name: 'write_stata', argIdx: 1, argName: 'path', resolveValue: true },
|
|
79
|
-
{ package: 'ape', name: 'write.tree', argIdx: 1, argName: 'file', resolveValue: true },
|
|
80
|
-
{ package: 'ape', name: 'write.nexus', argIdx: 1, argName: 'file', resolveValue: true },
|
|
81
|
-
{ package: 'ape', name: 'write.phyloXML', argIdx: 1, argName: 'file', resolveValue: true },
|
|
82
|
-
{ package: 'Claddis', name: 'write_nexus_matrix', argIdx: 1, argName: 'file_name', resolveValue: true },
|
|
83
|
-
{ package: 'Claddis', name: 'write_tnt_matrix', argIdx: 1, argName: 'file_name', resolveValue: true },
|
|
84
|
-
{ package: 'rgdal', name: 'writeOGR', argIdx: 1, argName: 'dsn', resolveValue: true },
|
|
85
|
-
{ package: 'rgdal', name: 'writeGDAL', argIdx: 1, argName: 'fname', resolveValue: true },
|
|
86
|
-
{ package: 'arrow', name: 'write_parquet', argIdx: 1, argName: 'sink', resolveValue: true },
|
|
87
|
-
{ package: 'sf', name: 'st_write', argIdx: 1, argName: 'dsn', resolveValue: true },
|
|
88
57
|
{ package: 'sf', name: 'write_sf', argIdx: 1, argName: 'dsn', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
89
|
-
{ package: 'maptools', name: 'writePolyShape', argIdx: 1, argName: 'fn', resolveValue: true },
|
|
90
|
-
{ package: 'XLConnect', name: 'writeNamedRegionToFile', argIdx: 0, argName: 'file', resolveValue: true },
|
|
91
|
-
{ package: 'XLConnect', name: 'writeWorksheetToFile', argIdx: 0, argName: 'file', resolveValue: true },
|
|
92
|
-
{ package: 'visNetwork', name: 'visSave', argIdx: 1, argName: 'file', resolveValue: true },
|
|
93
|
-
{ package: 'DiagrammeR', name: 'save_graph', argIdx: 1, argName: 'file', resolveValue: true },
|
|
94
58
|
{ package: 'DiagrammeR', name: 'export_graph', argName: 'file_name', resolveValue: true },
|
|
95
|
-
{ package: 'ggplot2', name: 'ggsave', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
96
|
-
{ package: 'cowplot', name: 'ggsave2', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
97
59
|
{ package: 'tinyplot', name: 'tinyplot', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
98
60
|
{ package: 'tinyplot', name: 'plt', argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
99
61
|
{ package: 'highcharter', name: 'hc_exporting', argName: 'filename', resolveValue: true },
|
|
100
|
-
{ package: 'jsonlite', name: 'write_json', argIdx: 1, argName: 'path', resolveValue: true },
|
|
101
62
|
{ package: 'rpolars', name: 'sink_ipc', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
102
63
|
{ package: 'rpolars', name: 'sink_csv', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
103
64
|
{ package: 'rpolars', name: 'sink_ndjson', argIdx: 0, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
@@ -107,54 +68,20 @@ const WriteFunctionsWithMore = [
|
|
|
107
68
|
{ package: 'rpolars', name: 'write_csv', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
108
69
|
{ package: 'rpolars', name: 'write_ndjson', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
109
70
|
{ package: 'rpolars', name: 'write_parquet', argIdx: 0, argName: 'file', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
110
|
-
{ package: 'data.table', name: 'fwrite', argIdx: 1, argName: 'file', resolveValue: true },
|
|
111
|
-
{ package: 'writexl', name: 'write_xlsx', argIdx: 1, argName: 'path', resolveValue: true },
|
|
112
|
-
{ package: 'openxlsx', name: 'write.xlsx', argIdx: 1, argName: 'file', resolveValue: true },
|
|
113
|
-
{ package: 'vroom', name: 'vroom_write', argIdx: 1, argName: 'file', resolveValue: true },
|
|
114
|
-
{ package: 'vroom', name: 'vroom_write_lines', argIdx: 1, argName: 'file', resolveValue: true },
|
|
115
|
-
{ package: 'rio', name: 'export', argIdx: 1, argName: 'file', resolveValue: true },
|
|
116
|
-
{ package: 'rio', name: 'export_list', argIdx: 1, argName: 'file', resolveValue: true },
|
|
117
71
|
{ package: 'magick', name: 'image_write', argIdx: 1, argName: 'path', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
118
72
|
{ package: 'compiler', name: 'cmpfile', argIdx: 1, argName: 'outfile', resolveValue: true },
|
|
119
73
|
/* image / raster */
|
|
120
74
|
{ package: 'jpeg', name: 'writeJPEG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
121
75
|
{ package: 'png', name: 'writePNG', argIdx: 1, argName: 'target', resolveValue: true, ignoreIf: 'arg-missing' },
|
|
122
|
-
{ package: 'tiff', name: 'writeTIFF', argIdx: 1, argName: 'where', resolveValue: true },
|
|
123
|
-
{ package: 'imager', name: 'make.video', argIdx: 1, argName: 'file', resolveValue: true },
|
|
124
|
-
{ package: 'OpenImageR', name: 'writeImage', argIdx: 1, argName: 'file_name', resolveValue: true },
|
|
125
|
-
{ package: 'EBImage', name: 'writeImage', argIdx: 1, argName: 'files', resolveValue: true },
|
|
126
|
-
{ package: 'gifski', name: 'gifski', argIdx: 1, argName: 'gif_file', resolveValue: true },
|
|
127
|
-
{ package: 'gifski', name: 'save_gif', argIdx: 1, argName: 'gif_file', resolveValue: true },
|
|
128
|
-
{ package: 'svglite', name: 'svglite', argIdx: 0, argName: 'file', resolveValue: true },
|
|
129
76
|
/* audio / video */
|
|
130
|
-
{ package: 'av', name: 'av_encode_video', argIdx: 1, argName: 'output', resolveValue: true },
|
|
131
|
-
{ package: 'av', name: 'av_audio_convert', argIdx: 1, argName: 'output', resolveValue: true },
|
|
132
|
-
{ package: 'av', name: 'av_capture_graphics', argIdx: 1, argName: 'output', resolveValue: true },
|
|
133
|
-
{ package: 'tuneR', name: 'writeWave', argIdx: 1, argName: 'filename', resolveValue: true },
|
|
134
77
|
{ package: 'seewave', name: 'savewav', argName: 'filename', resolveValue: true, defaultValue: '<wave-name>' },
|
|
135
|
-
{ package: 'audio', name: 'save.wave', argIdx: 1, argName: 'where', resolveValue: true },
|
|
136
78
|
/* geospatial */
|
|
137
|
-
{ package: 'terra', name: 'writeRaster', argIdx: 1, argName: 'filename', resolveValue: true },
|
|
138
|
-
{ package: 'terra', name: 'writeVector', argIdx: 1, argName: 'filename', resolveValue: true },
|
|
139
|
-
{ package: 'terra', name: 'writeCDF', argIdx: 1, argName: 'filename', resolveValue: true },
|
|
140
|
-
{ package: 'raster', name: 'writeRaster', argIdx: 1, argName: 'filename', resolveValue: true },
|
|
141
|
-
{ package: 'stars', name: 'write_stars', argIdx: 1, argName: 'dsn', resolveValue: true },
|
|
142
79
|
/* array / binary science formats */
|
|
143
|
-
{ package: 'ncdf4', name: 'nc_create', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
144
|
-
{ package: 'RNetCDF', name: 'create.nc', argIdx: 0, argName: 'filename', resolveValue: true },
|
|
145
|
-
{ package: 'R.matlab', name: 'writeMat', argIdx: 0, argName: 'con', resolveValue: true },
|
|
146
|
-
{ package: 'rhdf5', name: 'h5write', argIdx: 1, argName: 'file', resolveValue: true },
|
|
147
|
-
{ package: 'rhdf5', name: 'h5createFile', argIdx: 0, argName: 'file', resolveValue: true },
|
|
148
|
-
{ package: 'fst', name: 'write_fst', argIdx: 1, argName: 'path', resolveValue: true },
|
|
149
|
-
{ package: 'qs', name: 'qsave', argIdx: 1, argName: 'file', resolveValue: true },
|
|
150
|
-
{ package: 'yaml', name: 'write_yaml', argIdx: 1, argName: 'file', resolveValue: true },
|
|
151
80
|
/* phylogeny / sequence */
|
|
152
|
-
{ package: 'ape', name: 'write.dna', argIdx: 1, argName: 'file', resolveValue: true },
|
|
153
|
-
{ package: 'ape', name: 'write.nexus.data', argIdx: 1, argName: 'file', resolveValue: true },
|
|
154
|
-
{ package: 'seqinr', name: 'write.fasta', argIdx: 2, argName: 'file.out', resolveValue: true }
|
|
155
81
|
];
|
|
82
|
+
/* the configuration leads here too, see {@link ReadFunctions} */
|
|
156
83
|
exports.WriteFunctions = [
|
|
157
|
-
...WriteFunctionsWithMore,
|
|
158
|
-
...
|
|
84
|
+
...(0, derived_functions_1.functionInfosFromProps)([built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], [...WriteFunctionsWithMore, ...other_path_functions_1.OtherPathFunctions, ...read_functions_1.ReadFunctions]),
|
|
85
|
+
...WriteFunctionsWithMore
|
|
159
86
|
];
|
|
160
87
|
//# sourceMappingURL=write-functions.js.map
|
|
@@ -90,8 +90,8 @@ function callName(node, dataflow) {
|
|
|
90
90
|
if (name === undefined) {
|
|
91
91
|
return undefined;
|
|
92
92
|
}
|
|
93
|
-
const props = (0, query_fn_props_1.queryFnProps)(name, { environment: dataflow.environment })
|
|
94
|
-
return (props
|
|
93
|
+
const props = (0, query_fn_props_1.queryFnProps)(name, { environment: dataflow.environment });
|
|
94
|
+
return built_in_props_1.CallProps.hasAny(props, [built_in_props_1.CallProp.Invisible, built_in_props_1.SemanticCallTag.Graphics]) || test_functions_1.ExpectFunctionNames.test(identifier_1.Identifier.getName(name))
|
|
95
95
|
? undefined : name;
|
|
96
96
|
}
|
|
97
97
|
/** what to report the echo under: the called name, or the operator or lexeme producing the value */
|
|
@@ -10,7 +10,7 @@ import type { DataflowInformation } from '../../../dataflow/info';
|
|
|
10
10
|
* {@link DependencyInfo#parts}: the addons drawn onto it, plus the device opener and closer around it.
|
|
11
11
|
* Closing a device ends the plot, so an addon after it builds whatever device is open then, not this file.
|
|
12
12
|
*
|
|
13
|
-
* Openers are the `write` entries that draw ({@link
|
|
14
|
-
* ({@link
|
|
13
|
+
* Openers are the `write` entries that draw ({@link SemanticCallTag.Graphics}), closers the calls that end a device
|
|
14
|
+
* ({@link SemanticCallTag.Closes}), and the order is the one the source states.
|
|
15
15
|
*/
|
|
16
16
|
export declare function linkPlotsToDevices(written: readonly DependencyInfo[], plots: DependencyInfo[], dataflow: DataflowInformation, ast: NormalizedAst): void;
|
|
@@ -5,9 +5,8 @@ const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props"
|
|
|
5
5
|
const built_in_props_1 = require("../../../dataflow/environments/built-in-props");
|
|
6
6
|
const vertex_1 = require("../../../dataflow/graph/vertex");
|
|
7
7
|
const range_1 = require("../../../util/range");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (0, query_fn_props_1.callFnProps)(id, dataflow)?.props ?? 0;
|
|
8
|
+
function callHas(id, dataflow, props) {
|
|
9
|
+
return built_in_props_1.CallProps.hasAny((0, query_fn_props_1.callFnProps)(id, dataflow), props);
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
12
|
* Names the file each visualization lands in, and the statements that build it.
|
|
@@ -18,15 +17,15 @@ function propsOf(id, dataflow) {
|
|
|
18
17
|
* {@link DependencyInfo#parts}: the addons drawn onto it, plus the device opener and closer around it.
|
|
19
18
|
* Closing a device ends the plot, so an addon after it builds whatever device is open then, not this file.
|
|
20
19
|
*
|
|
21
|
-
* Openers are the `write` entries that draw ({@link
|
|
22
|
-
* ({@link
|
|
20
|
+
* Openers are the `write` entries that draw ({@link SemanticCallTag.Graphics}), closers the calls that end a device
|
|
21
|
+
* ({@link SemanticCallTag.Closes}), and the order is the one the source states.
|
|
23
22
|
*/
|
|
24
23
|
function linkPlotsToDevices(written, plots, dataflow, ast) {
|
|
25
24
|
const opened = new Map(written
|
|
26
|
-
.filter(w => w.value !== undefined && (
|
|
25
|
+
.filter(w => w.value !== undefined && callHas(w.nodeId, dataflow, built_in_props_1.SemanticCallTag.Graphics))
|
|
27
26
|
.map(w => [w.nodeId, w.value]));
|
|
28
27
|
const closed = new Set(dataflow.graph.vertices(true)
|
|
29
|
-
.filter(([id, v]) => vertex_1.FunctionCallVertex.is(v) && (
|
|
28
|
+
.filter(([id, v]) => vertex_1.FunctionCallVertex.is(v) && callHas(id, dataflow, built_in_props_1.SemanticCallTag.Closes))
|
|
30
29
|
.map(([id]) => id));
|
|
31
30
|
const plotAt = new Map(plots.map((p, index) => [p.nodeId, index]));
|
|
32
31
|
const located = [...opened.keys(), ...closed, ...plotAt.keys()]
|
|
@@ -15,7 +15,7 @@ async function executeDiceQuery({ analyzer }, queries) {
|
|
|
15
15
|
const ast = await analyzer.normalize();
|
|
16
16
|
const df = await analyzer.dataflow();
|
|
17
17
|
for (const query of queries) {
|
|
18
|
-
const key =
|
|
18
|
+
const key = (0, slice_query_options_1.sliceResultKey)(query);
|
|
19
19
|
if (results[key]) {
|
|
20
20
|
log_1.log.warn(`Duplicate key for dice-query: ${key}, skipping...`);
|
|
21
21
|
continue;
|
|
@@ -44,7 +44,7 @@ declare function diceQueryCompleter(line: readonly string[], startingNewArg: boo
|
|
|
44
44
|
export declare const DiceQueryDefinition: {
|
|
45
45
|
readonly title: "Dice Query";
|
|
46
46
|
readonly executor: typeof executeDiceQuery;
|
|
47
|
-
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("
|
|
47
|
+
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
48
48
|
readonly fromLine: typeof diceQueryLineParser;
|
|
49
49
|
readonly completer: typeof diceQueryCompleter;
|
|
50
50
|
readonly syntax: "@dice (<crit>;...->crit;...)[iIcB] <code | file://path>";
|
|
@@ -66,6 +66,10 @@ function makeCallMatcher(constraint) {
|
|
|
66
66
|
const matchersOr = constraint.calls.map(makeCallMatcher);
|
|
67
67
|
return (vtx, cg) => matchersOr.some(m => m(vtx, cg));
|
|
68
68
|
}
|
|
69
|
+
case 'one-of': {
|
|
70
|
+
const matchersOneOf = constraint.calls.map(makeCallMatcher);
|
|
71
|
+
return (vtx, cg) => matchersOneOf.filter(m => m(vtx, cg)).length === 1;
|
|
72
|
+
}
|
|
69
73
|
default: {
|
|
70
74
|
throw new Error(`Unhandled constraint type ${JSON.stringify(constraint)}`);
|
|
71
75
|
}
|
|
@@ -19,6 +19,12 @@ interface CallsWithNameConstraint {
|
|
|
19
19
|
readonly nameExact?: boolean;
|
|
20
20
|
}
|
|
21
21
|
interface CallsConstraints {
|
|
22
|
+
/**
|
|
23
|
+
* How to combine the given constraints:
|
|
24
|
+
* `and` requires every constraint to be satisfied by some call reached during the walk,
|
|
25
|
+
* `or` requires at least one of them to match a reached call,
|
|
26
|
+
* and `one-of` requires exactly one of them to match a reached call.
|
|
27
|
+
*/
|
|
22
28
|
readonly type: 'and' | 'or' | 'one-of';
|
|
23
29
|
readonly calls: readonly CallsConstraint[];
|
|
24
30
|
}
|
|
@@ -50,7 +56,7 @@ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly stri
|
|
|
50
56
|
export declare const DoesCallQueryDefinition: {
|
|
51
57
|
readonly title: "Does-Call Query";
|
|
52
58
|
readonly executor: typeof executeDoesCallQuery;
|
|
53
|
-
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("
|
|
59
|
+
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
54
60
|
readonly fromLine: typeof doesCallQueryLineParser;
|
|
55
61
|
readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
|
|
56
62
|
readonly schema: Joi.ObjectSchema<any>;
|
|
@@ -29,7 +29,7 @@ declare function filesQueryCompleter(line: readonly string[], startingNewArg: bo
|
|
|
29
29
|
export declare const FilesQueryDefinition: {
|
|
30
30
|
readonly title: "Files Query";
|
|
31
31
|
readonly executor: typeof executeFileQuery;
|
|
32
|
-
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("
|
|
32
|
+
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
33
33
|
readonly completer: typeof filesQueryCompleter;
|
|
34
34
|
readonly fromLine: typeof filesQueryLineParser;
|
|
35
35
|
readonly syntax: "@files [role:<r1>,<r2>,...] <code | file://path>";
|
|
@@ -186,7 +186,7 @@ declare function guessDepVersionsLineParser(_output: ReplOutput, line: readonly
|
|
|
186
186
|
export declare const GuessDepVersionsQueryDefinition: {
|
|
187
187
|
readonly title: "Guess Dependency Versions Query";
|
|
188
188
|
readonly executor: typeof executeGuessDepVersionsQuery;
|
|
189
|
-
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("
|
|
189
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly import("../../query").Query[]) => true;
|
|
190
190
|
readonly fromLine: typeof guessDepVersionsLineParser;
|
|
191
191
|
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>";
|
|
192
192
|
readonly schema: Joi.ObjectSchema<any>;
|