@eagleoutice/flowr 2.14.1 → 2.14.2
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 +154 -87
- package/abstract-interpretation/absint-visitor.d.ts +91 -25
- package/abstract-interpretation/absint-visitor.js +235 -74
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
- package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
- package/abstract-interpretation/data-frame/resolve-args.js +6 -4
- package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
- package/abstract-interpretation/domains/partial-product-domain.js +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-range-domain.js +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
- package/benchmark/calibration.d.ts +11 -6
- package/benchmark/calibration.js +19 -8
- package/benchmark/slicer.d.ts +7 -1
- package/benchmark/slicer.js +38 -34
- package/benchmark/stats/count-comments.d.ts +16 -0
- package/benchmark/stats/count-comments.js +30 -0
- package/benchmark/stats/print.js +2 -0
- package/benchmark/stats/size-of.d.ts +7 -3
- package/benchmark/stats/size-of.js +7 -3
- package/benchmark/stats/stats.d.ts +7 -0
- package/benchmark/summarizer/first-phase/process.js +2 -19
- package/benchmark/summarizer/second-phase/graph.js +13 -3
- package/benchmark/summarizer/second-phase/process.js +2 -0
- package/cli/repl/commands/repl-dataflow.js +70 -27
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/core.js +1 -1
- package/cli/repl/parser/slice-query-parser.js +2 -1
- package/cli/repl/server/connection.d.ts +4 -0
- package/cli/repl/server/connection.js +19 -16
- package/cli/repl/server/messages/message-analysis.d.ts +1 -1
- package/config.d.ts +6 -0
- package/config.js +8 -4
- package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
- package/control-flow/basic-cfg-guided-visitor.js +37 -24
- package/control-flow/cfg-dead-code.js +44 -33
- package/control-flow/cfg-properties.js +2 -2
- package/control-flow/cfg-simplification.js +6 -5
- package/control-flow/cfg-to-basic-blocks.js +11 -13
- package/control-flow/control-flow-graph.d.ts +179 -189
- package/control-flow/control-flow-graph.js +400 -263
- package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
- package/control-flow/dfg-cfg-guided-visitor.js +17 -13
- package/control-flow/diff-cfg.js +6 -14
- package/control-flow/happens-before.js +5 -4
- package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
- package/control-flow/semantic-cfg-guided-visitor.js +6 -26
- package/control-flow/simple-visitor.js +14 -15
- package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
- package/control-flow/useless-loop.js +18 -14
- package/core/steps/all/core/20-dataflow.d.ts +1 -3
- package/core/steps/pipeline/default-pipelines.d.ts +141 -157
- package/dataflow/cluster.js +7 -0
- package/dataflow/environments/apply-kill.d.ts +6 -0
- package/dataflow/environments/apply-kill.js +63 -31
- package/dataflow/environments/built-in-props.d.ts +5 -1
- package/dataflow/environments/built-in-props.js +4 -0
- package/dataflow/environments/built-in.d.ts +6 -3
- package/dataflow/environments/built-in.js +8 -5
- package/dataflow/environments/clone.d.ts +3 -3
- package/dataflow/environments/clone.js +5 -5
- package/dataflow/environments/default-builtin-config.d.ts +112 -7
- package/dataflow/environments/default-builtin-config.js +82 -34
- package/dataflow/environments/environment.d.ts +5 -5
- package/dataflow/environments/environment.js +5 -5
- package/dataflow/environments/identifier.d.ts +11 -1
- package/dataflow/environments/identifier.js +4 -1
- package/dataflow/environments/resolve-by-name.d.ts +7 -0
- package/dataflow/environments/resolve-by-name.js +12 -0
- package/dataflow/environments/resolve-helper.d.ts +3 -1
- package/dataflow/environments/resolve-helper.js +2 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
- package/dataflow/eval/resolve/alias-tracking.js +2 -2
- package/dataflow/eval/resolve/match-arguments.js +7 -5
- package/dataflow/eval/resolve/node-value.d.ts +3 -1
- package/dataflow/eval/resolve/node-value.js +12 -0
- package/dataflow/eval/resolve/resolve-argument.js +5 -4
- package/dataflow/eval/resolve/resolve-operators.js +9 -6
- package/dataflow/eval/resolve/resolve-strings.js +2 -2
- package/dataflow/eval/resolve/resolve-working-directory.js +4 -3
- package/dataflow/eval/resolve/resolve.js +3 -2
- package/dataflow/eval/values/general.js +8 -5
- package/dataflow/extractor.d.ts +1 -4
- package/dataflow/extractor.js +11 -10
- package/dataflow/fn/exceptions-of-function.d.ts +3 -1
- package/dataflow/fn/strict-function.js +7 -5
- package/dataflow/graph/call-graph.js +2 -2
- package/dataflow/graph/df-helper.d.ts +8 -1
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +19 -2
- package/dataflow/graph/edge.d.ts +38 -2
- package/dataflow/graph/edge.js +32 -2
- package/dataflow/graph/graph.d.ts +4 -3
- package/dataflow/graph/graph.js +6 -2
- package/dataflow/graph/match-args.d.ts +69 -0
- package/dataflow/graph/match-args.js +167 -0
- package/dataflow/info.d.ts +14 -0
- package/dataflow/internal/control-flow.d.ts +102 -0
- package/dataflow/internal/control-flow.js +200 -0
- package/dataflow/internal/linker.d.ts +6 -31
- package/dataflow/internal/linker.js +24 -81
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +8 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +27 -20
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +35 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +8 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +71 -33
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +12 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +14 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +45 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +19 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
- package/dataflow/internal/process/functions/call/common.js +5 -6
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +23 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
- package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
- package/dataflow/internal/process/functions/call/nse.js +6 -1
- package/dataflow/internal/process/functions/call/quoted.js +2 -2
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
- package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/process-argument.js +12 -4
- package/dataflow/internal/process/functions/process-parameter.js +13 -0
- package/dataflow/internal/process/process-named-call.d.ts +2 -2
- package/dataflow/internal/process/process-named-call.js +9 -7
- package/documentation/data/server/doc-data-server-messages.js +4 -4
- package/documentation/doc-readme.js +45 -0
- package/documentation/doc-util/doc-cfg.d.ts +8 -7
- package/documentation/doc-util/doc-cfg.js +10 -10
- package/documentation/doc-util/doc-playground.d.ts +12 -0
- package/documentation/doc-util/doc-playground.js +21 -0
- package/documentation/doc-util/doc-query.d.ts +4 -1
- package/documentation/doc-util/doc-query.js +4 -2
- package/documentation/wiki-absint.d.ts +3 -4
- package/documentation/wiki-absint.js +12 -5
- package/documentation/wiki-analyzer.js +2 -2
- package/documentation/wiki-cfg.js +101 -106
- package/documentation/wiki-dataflow-graph.js +84 -53
- package/documentation/wiki-linter.js +15 -1
- package/documentation/wiki-linting-and-testing.js +1 -16
- package/documentation/wiki-mk/doc-maker.js +6 -4
- package/documentation/wiki-query.js +14 -4
- package/documentation/wiki-signature-database.js +28 -2
- package/linter/linter-fix.d.ts +16 -0
- package/linter/linter-fix.js +104 -0
- package/linter/linter-format.d.ts +18 -1
- package/linter/linter-format.js +31 -1
- package/linter/linter-output.js +46 -10
- package/linter/linter-rules.d.ts +40 -9
- package/linter/linter-rules.js +2 -0
- package/linter/rules/absolute-path.js +4 -2
- package/linter/rules/dataframe-access-validation.js +6 -7
- package/linter/rules/deprecated-functions.d.ts +107 -10
- package/linter/rules/deprecated-functions.js +309 -23
- package/linter/rules/file-path-validity.js +5 -4
- package/linter/rules/function-finder-util.d.ts +6 -0
- package/linter/rules/function-finder-util.js +21 -13
- package/linter/rules/naming-convention.js +1 -1
- package/linter/rules/network-functions.d.ts +2 -2
- package/linter/rules/stop-with-call-arg.js +2 -2
- package/linter/rules/unclosed-connection.js +2 -2
- package/linter/rules/undefined-symbol-util.js +6 -4
- package/linter/rules/undefined-symbol.js +2 -2
- package/linter/rules/unused-definition.js +8 -4
- package/linter/rules/unused-import.d.ts +60 -0
- package/linter/rules/unused-import.js +179 -0
- package/package.json +2 -2
- package/project/attached-packages.js +2 -1
- package/project/cache/flowr-analyzer-cache.d.ts +2 -5
- package/project/cache/flowr-analyzer-cache.js +4 -7
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
- package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
- package/project/cache/flowr-cache.d.ts +9 -0
- package/project/cache/flowr-cache.js +19 -0
- package/project/context/flowr-analyzer-context.d.ts +7 -3
- package/project/context/flowr-analyzer-context.js +15 -9
- package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
- package/project/context/flowr-analyzer-dependencies-context.js +9 -14
- package/project/context/flowr-analyzer-files-context.js +15 -17
- package/project/context/flowr-analyzer-meta-context.js +2 -12
- package/project/dependency-version-space.d.ts +0 -7
- package/project/dependency-version-space.js +8 -7
- package/project/flowr-analyzer.d.ts +4 -6
- package/project/flowr-analyzer.js +4 -5
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +22 -34
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
- package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
- package/project/sigdb/build.d.ts +2 -2
- package/project/sigdb/decode.d.ts +0 -5
- package/project/sigdb/decode.js +0 -8
- package/project/sigdb/index-format.d.ts +4 -4
- package/project/sigdb/manifest.d.ts +2 -2
- package/project/sigdb/reader.d.ts +48 -13
- package/project/sigdb/reader.js +2 -1
- package/project/sigdb/schema.d.ts +3 -1
- package/project/sigdb/signature-db.d.ts +69 -0
- package/project/sigdb/signature-db.js +54 -0
- package/project/sigdb/signature-match.d.ts +10 -5
- package/project/sigdb/signature-match.js +13 -8
- package/queries/catalog/absint-query/absint-query-executor.js +1 -2
- package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
- package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
- package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
- package/queries/catalog/signature-query/signature-query-executor.js +4 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -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-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
- 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-binary-op.js +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-break.js +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-comment.js +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-expression-list.js +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-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
- 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-function-definition.js +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-if-then-else.js +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-line-directive.js +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-logical.js +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-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -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-parameter.js +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-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +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-repeat-loop.js +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-string.js +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-symbol.js +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-unary-op.js +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/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
- package/reconstruct/inline/source-inline-map.js +3 -3
- package/reconstruct/reconstruct.js +6 -4
- package/search/flowr-search-builder.d.ts +8 -8
- package/search/flowr-search-builder.js +4 -4
- package/search/flowr-search-filters.d.ts +2 -2
- package/search/flowr-search-filters.js +3 -2
- package/search/search-executor/search-enrichers.d.ts +6 -4
- package/search/search-executor/search-enrichers.js +44 -5
- package/slicing/criterion/filters/all-variables.js +2 -1
- package/slicing/criterion/parse.js +8 -6
- package/slicing/static/slice-call.js +2 -2
- package/util/arg-matching.d.ts +3 -0
- package/util/arg-matching.js +12 -1
- package/util/collections/arrays.d.ts +0 -4
- package/util/collections/arrays.js +4 -26
- package/util/diff-graph.d.ts +1 -1
- package/util/diff-graph.js +17 -3
- package/util/diff.d.ts +6 -0
- package/util/mermaid/ast.d.ts +1 -1
- package/util/mermaid/ast.js +5 -4
- package/util/mermaid/cfg.js +130 -24
- package/util/mermaid/dfg.js +31 -10
- package/util/mermaid/mermaid.js +2 -0
- package/util/objects.d.ts +9 -0
- package/util/objects.js +12 -0
- package/util/prefix.d.ts +1 -1
- package/util/text/playground-link.d.ts +131 -0
- package/util/text/playground-link.js +214 -0
- package/util/text/strings.js +7 -3
- package/util/version.js +1 -1
- package/control-flow/cfg-builder.d.ts +0 -30
- package/control-flow/cfg-builder.js +0 -79
- package/control-flow/extract-cfg.d.ts +0 -36
- package/control-flow/extract-cfg.js +0 -693
- package/project/cfg-kind.d.ts +0 -21
- package/project/cfg-kind.js +0 -26
|
@@ -4,35 +4,22 @@ exports.FlowrAnalyzerMetaTestFilesPlugin = void 0;
|
|
|
4
4
|
const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
7
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
const TestPathPattern = /tests?/i;
|
|
9
8
|
/**
|
|
10
9
|
* This plugin provides supports for the identification of test files.
|
|
11
10
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
12
11
|
*/
|
|
13
|
-
class FlowrAnalyzerMetaTestFilesPlugin extends flowr_analyzer_file_plugin_1.
|
|
12
|
+
class FlowrAnalyzerMetaTestFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
14
13
|
name = 'flowr-analyzer-test-files-plugin';
|
|
15
14
|
description = 'Loads test files.';
|
|
16
15
|
version = new semver_1.SemVer('0.1.0');
|
|
17
|
-
|
|
16
|
+
roles = [flowr_file_1.FileRole.Test];
|
|
18
17
|
/**
|
|
19
18
|
* Creates a new instance of the TEST file plugin.
|
|
20
19
|
* @param pathPattern - The pathPattern to identify TEST files, see {@link TestPathPattern} for the default pathPattern.
|
|
21
20
|
*/
|
|
22
21
|
constructor(pathPattern = TestPathPattern) {
|
|
23
|
-
super();
|
|
24
|
-
this.pathPattern = pathPattern;
|
|
25
|
-
}
|
|
26
|
-
applies(file) {
|
|
27
|
-
return this.pathPattern.test((0, built_in_source_1.platformDirname)(file.toString()));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Processes the given file, assigning it the {@link FileRole.Test} role.
|
|
31
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
32
|
-
*/
|
|
33
|
-
process(_ctx, file) {
|
|
34
|
-
file.assignRole(flowr_file_1.FileRole.Test);
|
|
35
|
-
return [file, true];
|
|
22
|
+
super(pathPattern, flowr_analyzer_file_plugin_1.PathPart.Dirname);
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
exports.FlowrAnalyzerMetaTestFilesPlugin = FlowrAnalyzerMetaTestFilesPlugin;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowrAnalyzerRoleFilePlugin } from './flowr-analyzer-file-plugin';
|
|
2
2
|
import { SemVer } from 'semver';
|
|
3
|
-
import
|
|
4
|
-
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
5
|
-
import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
3
|
+
import { FileRole } from '../../context/flowr-file';
|
|
6
4
|
/**
|
|
7
5
|
* This plugin provides supports for the loading of Vignette files.
|
|
8
6
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
9
7
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerMetaVignetteFilesPlugin extends
|
|
8
|
+
export declare class FlowrAnalyzerMetaVignetteFilesPlugin extends FlowrAnalyzerRoleFilePlugin {
|
|
11
9
|
readonly name = "flowr-analyzer-vignette-files-plugin";
|
|
12
10
|
readonly description = "Loads vignette files.";
|
|
13
11
|
readonly version: SemVer;
|
|
14
|
-
|
|
12
|
+
protected readonly roles: FileRole[];
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the VIGNETTE file plugin.
|
|
17
15
|
* @param pathPattern - The pathPattern to identify VIGNETTE files, see {@link VignettePathPattern} for the default pathPattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(pathPattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Processes the given file, assigning it the {@link FileRole.Vignette} role.
|
|
23
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
24
|
-
*/
|
|
25
|
-
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
26
18
|
}
|
|
@@ -4,35 +4,22 @@ exports.FlowrAnalyzerMetaVignetteFilesPlugin = void 0;
|
|
|
4
4
|
const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
7
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
const VignettePathPattern = /vignettes?/i;
|
|
9
8
|
/**
|
|
10
9
|
* This plugin provides supports for the loading of Vignette files.
|
|
11
10
|
* If you use multiple plugins, this should be included *before* other plugins.
|
|
12
11
|
*/
|
|
13
|
-
class FlowrAnalyzerMetaVignetteFilesPlugin extends flowr_analyzer_file_plugin_1.
|
|
12
|
+
class FlowrAnalyzerMetaVignetteFilesPlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
14
13
|
name = 'flowr-analyzer-vignette-files-plugin';
|
|
15
14
|
description = 'Loads vignette files.';
|
|
16
15
|
version = new semver_1.SemVer('0.1.0');
|
|
17
|
-
|
|
16
|
+
roles = [flowr_file_1.FileRole.Vignette];
|
|
18
17
|
/**
|
|
19
18
|
* Creates a new instance of the VIGNETTE file plugin.
|
|
20
19
|
* @param pathPattern - The pathPattern to identify VIGNETTE files, see {@link VignettePathPattern} for the default pathPattern.
|
|
21
20
|
*/
|
|
22
21
|
constructor(pathPattern = VignettePathPattern) {
|
|
23
|
-
super();
|
|
24
|
-
this.pathPattern = pathPattern;
|
|
25
|
-
}
|
|
26
|
-
applies(file) {
|
|
27
|
-
return this.pathPattern.test((0, built_in_source_1.platformDirname)(file.toString()));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Processes the given file, assigning it the {@link FileRole.Vignette} role.
|
|
31
|
-
* Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose.
|
|
32
|
-
*/
|
|
33
|
-
process(_ctx, file) {
|
|
34
|
-
file.assignRole(flowr_file_1.FileRole.Vignette);
|
|
35
|
-
return [file, true];
|
|
22
|
+
super(pathPattern, flowr_analyzer_file_plugin_1.PathPart.Dirname);
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
exports.FlowrAnalyzerMetaVignetteFilesPlugin = FlowrAnalyzerMetaVignetteFilesPlugin;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowrAnalyzerRoleFilePlugin } from './flowr-analyzer-file-plugin';
|
|
2
2
|
import { SemVer } from 'semver';
|
|
3
|
-
import
|
|
4
|
-
import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context';
|
|
5
|
-
import type { FlowrFileProvider } from '../../context/flowr-file';
|
|
3
|
+
import { FileRole } from '../../context/flowr-file';
|
|
6
4
|
/**
|
|
7
5
|
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
8
6
|
* plugins that read them can look them up by role instead of scanning every project file.
|
|
9
7
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerVirtualEnvFilePlugin extends
|
|
8
|
+
export declare class FlowrAnalyzerVirtualEnvFilePlugin extends FlowrAnalyzerRoleFilePlugin {
|
|
11
9
|
readonly name = "flowr-analyzer-virtualenv-files-plugin";
|
|
12
10
|
readonly description = "Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).";
|
|
13
11
|
readonly version: SemVer;
|
|
14
|
-
|
|
12
|
+
protected readonly roles: FileRole[];
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the virtual-environment file plugin.
|
|
17
15
|
* @param pathPattern - The pattern to identify lockfiles, see {@link VirtualEnvFilePattern} for the default.
|
|
18
16
|
*/
|
|
19
17
|
constructor(pathPattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Processes the given file, assigning it the {@link FileRole.VirtualEnv} role. The file may still be
|
|
23
|
-
* relevant to other plugins, so this returns the `true` flag to keep the loader chain going.
|
|
24
|
-
*/
|
|
25
|
-
process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true];
|
|
26
18
|
}
|
|
@@ -4,36 +4,23 @@ exports.FlowrAnalyzerVirtualEnvFilePlugin = void 0;
|
|
|
4
4
|
const flowr_analyzer_file_plugin_1 = require("./flowr-analyzer-file-plugin");
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
7
|
-
const built_in_source_1 = require("../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
/** Lockfiles pinning a project's package environment (`renv.lock`, `rv.lock`, `uvr.lock`, `packrat.lock`). */
|
|
9
8
|
const VirtualEnvFilePattern = /^(renv|rv|uvr|packrat)\.lock$/i;
|
|
10
9
|
/**
|
|
11
10
|
* Tags a project's virtual-environment lockfiles with the {@link FileRole.VirtualEnv} role, so the version
|
|
12
11
|
* plugins that read them can look them up by role instead of scanning every project file.
|
|
13
12
|
*/
|
|
14
|
-
class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
13
|
+
class FlowrAnalyzerVirtualEnvFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerRoleFilePlugin {
|
|
15
14
|
name = 'flowr-analyzer-virtualenv-files-plugin';
|
|
16
15
|
description = 'Marks virtual-environment lockfiles (renv.lock, rv.lock, uvr.lock).';
|
|
17
16
|
version = new semver_1.SemVer('0.1.0');
|
|
18
|
-
|
|
17
|
+
roles = [flowr_file_1.FileRole.VirtualEnv];
|
|
19
18
|
/**
|
|
20
19
|
* Creates a new instance of the virtual-environment file plugin.
|
|
21
20
|
* @param pathPattern - The pattern to identify lockfiles, see {@link VirtualEnvFilePattern} for the default.
|
|
22
21
|
*/
|
|
23
22
|
constructor(pathPattern = VirtualEnvFilePattern) {
|
|
24
|
-
super();
|
|
25
|
-
this.pathPattern = pathPattern;
|
|
26
|
-
}
|
|
27
|
-
applies(file) {
|
|
28
|
-
return this.pathPattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Processes the given file, assigning it the {@link FileRole.VirtualEnv} role. The file may still be
|
|
32
|
-
* relevant to other plugins, so this returns the `true` flag to keep the loader chain going.
|
|
33
|
-
*/
|
|
34
|
-
process(_ctx, file) {
|
|
35
|
-
file.assignRole(flowr_file_1.FileRole.VirtualEnv);
|
|
36
|
-
return [file, true];
|
|
23
|
+
super(pathPattern);
|
|
37
24
|
}
|
|
38
25
|
}
|
|
39
26
|
exports.FlowrAnalyzerVirtualEnvFilePlugin = FlowrAnalyzerVirtualEnvFilePlugin;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrJupyterFile } from '../files/flowr-jupyter-file';
|
|
7
6
|
/**
|
|
8
7
|
* The plugin provides support for Jupyter (`.ipynb`) files
|
|
9
8
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerJupyterFilePlugin extends
|
|
9
|
+
export declare class FlowrAnalyzerJupyterFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly name = "ipynb-file-plugin";
|
|
12
11
|
readonly description = "Parses Jupyter files";
|
|
13
12
|
readonly version: SemVer;
|
|
14
|
-
private readonly pattern;
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the Jupyter file plugin.
|
|
17
15
|
* @param filePattern - The pattern to identify Jupyter files, see {@link IpynbPattern} for the default pattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(filePattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
18
|
protected process(_ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrJupyterFile;
|
|
22
19
|
}
|
|
@@ -3,27 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowrAnalyzerJupyterFilePlugin = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
7
6
|
const flowr_jupyter_file_1 = require("../files/flowr-jupyter-file");
|
|
8
7
|
const IpynbPattern = /\.ipynb$/i;
|
|
9
8
|
/**
|
|
10
9
|
* The plugin provides support for Jupyter (`.ipynb`) files
|
|
11
10
|
*/
|
|
12
|
-
class FlowrAnalyzerJupyterFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
11
|
+
class FlowrAnalyzerJupyterFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
13
12
|
name = 'ipynb-file-plugin';
|
|
14
13
|
description = 'Parses Jupyter files';
|
|
15
14
|
version = new semver_1.SemVer('0.1.0');
|
|
16
|
-
pattern;
|
|
17
15
|
/**
|
|
18
16
|
* Creates a new instance of the Jupyter file plugin.
|
|
19
17
|
* @param filePattern - The pattern to identify Jupyter files, see {@link IpynbPattern} for the default pattern.
|
|
20
18
|
*/
|
|
21
19
|
constructor(filePattern = IpynbPattern) {
|
|
22
|
-
super();
|
|
23
|
-
this.pattern = filePattern;
|
|
24
|
-
}
|
|
25
|
-
applies(file) {
|
|
26
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
+
super(filePattern);
|
|
27
21
|
}
|
|
28
22
|
process(_ctx, arg) {
|
|
29
23
|
return flowr_jupyter_file_1.FlowrJupyterFile.from(arg);
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrRMarkdownFile } from '../files/flowr-rmarkdown-file';
|
|
7
6
|
/**
|
|
8
7
|
* Common base of the plugins reading an R Markdown flavor, which differ only in the files they claim.
|
|
9
8
|
*/
|
|
10
|
-
export declare abstract class FlowrAnalyzerRMarkdownFilePlugin extends
|
|
9
|
+
export declare abstract class FlowrAnalyzerRMarkdownFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly version: SemVer;
|
|
12
|
-
private readonly pattern;
|
|
13
|
-
protected constructor(filePattern: RegExp);
|
|
14
|
-
applies(file: PathLike): boolean;
|
|
15
11
|
protected process(ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrRMarkdownFile;
|
|
16
12
|
}
|
|
@@ -4,20 +4,11 @@ exports.FlowrAnalyzerRMarkdownFilePlugin = void 0;
|
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
6
|
const flowr_rmarkdown_file_1 = require("../files/flowr-rmarkdown-file");
|
|
7
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
8
7
|
/**
|
|
9
8
|
* Common base of the plugins reading an R Markdown flavor, which differ only in the files they claim.
|
|
10
9
|
*/
|
|
11
|
-
class FlowrAnalyzerRMarkdownFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
10
|
+
class FlowrAnalyzerRMarkdownFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
12
11
|
version = new semver_1.SemVer('0.1.0');
|
|
13
|
-
pattern;
|
|
14
|
-
constructor(filePattern) {
|
|
15
|
-
super();
|
|
16
|
-
this.pattern = filePattern;
|
|
17
|
-
}
|
|
18
|
-
applies(file) {
|
|
19
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
-
}
|
|
21
12
|
process(ctx, arg) {
|
|
22
13
|
return flowr_rmarkdown_file_1.FlowrRMarkdownFile.from(arg, ctx);
|
|
23
14
|
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import type { PathLike } from 'fs';
|
|
2
1
|
import { SemVer } from 'semver';
|
|
3
2
|
import type { FlowrAnalyzerContext } from '../../../context/flowr-analyzer-context';
|
|
4
3
|
import type { FlowrFileProvider } from '../../../context/flowr-file';
|
|
5
|
-
import {
|
|
4
|
+
import { FlowrAnalyzerPatternFilePlugin } from '../flowr-analyzer-file-plugin';
|
|
6
5
|
import { FlowrSweaveFile } from '../files/flowr-sweave-file';
|
|
7
6
|
/**
|
|
8
7
|
* The plugin provides support for Sweave (`.Rnw`) files
|
|
9
8
|
*/
|
|
10
|
-
export declare class FlowrAnalyzerSweaveFilePlugin extends
|
|
9
|
+
export declare class FlowrAnalyzerSweaveFilePlugin extends FlowrAnalyzerPatternFilePlugin {
|
|
11
10
|
readonly name = "sweave-file-plugin";
|
|
12
11
|
readonly description = "Parses R Sweave files";
|
|
13
12
|
readonly version: SemVer;
|
|
14
|
-
private readonly pattern;
|
|
15
13
|
/**
|
|
16
14
|
* Creates a new instance of the Sweave file plugin.
|
|
17
15
|
* @param filePattern - The pattern to identify Sweave files, see {@link SweavePattern} for the default pattern.
|
|
18
16
|
*/
|
|
19
17
|
constructor(filePattern?: RegExp);
|
|
20
|
-
applies(file: PathLike): boolean;
|
|
21
18
|
protected process(_ctx: FlowrAnalyzerContext, arg: FlowrFileProvider<string>): FlowrSweaveFile;
|
|
22
19
|
}
|
|
@@ -3,27 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowrAnalyzerSweaveFilePlugin = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin");
|
|
6
|
-
const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source");
|
|
7
6
|
const flowr_sweave_file_1 = require("../files/flowr-sweave-file");
|
|
8
7
|
const SweavePattern = /\.Rnw$/i;
|
|
9
8
|
/**
|
|
10
9
|
* The plugin provides support for Sweave (`.Rnw`) files
|
|
11
10
|
*/
|
|
12
|
-
class FlowrAnalyzerSweaveFilePlugin extends flowr_analyzer_file_plugin_1.
|
|
11
|
+
class FlowrAnalyzerSweaveFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerPatternFilePlugin {
|
|
13
12
|
name = 'sweave-file-plugin';
|
|
14
13
|
description = 'Parses R Sweave files';
|
|
15
14
|
version = new semver_1.SemVer('0.1.0');
|
|
16
|
-
pattern;
|
|
17
15
|
/**
|
|
18
16
|
* Creates a new instance of the Sweave file plugin.
|
|
19
17
|
* @param filePattern - The pattern to identify Sweave files, see {@link SweavePattern} for the default pattern.
|
|
20
18
|
*/
|
|
21
19
|
constructor(filePattern = SweavePattern) {
|
|
22
|
-
super();
|
|
23
|
-
this.pattern = filePattern;
|
|
24
|
-
}
|
|
25
|
-
applies(file) {
|
|
26
|
-
return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString()));
|
|
20
|
+
super(filePattern);
|
|
27
21
|
}
|
|
28
22
|
process(_ctx, arg) {
|
|
29
23
|
return flowr_sweave_file_1.FlowrSweaveFile.from(arg);
|
package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js
CHANGED
|
@@ -11,6 +11,7 @@ const flowr_file_1 = require("../../context/flowr-file");
|
|
|
11
11
|
const flowr_description_file_1 = require("../file-plugins/files/flowr-description-file");
|
|
12
12
|
const flowr_namespace_file_1 = require("../file-plugins/files/flowr-namespace-file");
|
|
13
13
|
const log_1 = require("../../../util/log");
|
|
14
|
+
const arrays_1 = require("../../../util/collections/arrays");
|
|
14
15
|
const fs_1 = __importDefault(require("fs"));
|
|
15
16
|
const path_1 = __importDefault(require("path"));
|
|
16
17
|
exports.libraryLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-package-versions-library-plugin' });
|
|
@@ -38,7 +39,7 @@ function libraryRoots(opts, projectRoot) {
|
|
|
38
39
|
const local = opts.useProjectLibrary === false || projectRoot === undefined ? [] :
|
|
39
40
|
['renv/library', 'renv/staging', 'packrat/lib'].map(d => path_1.default.join(projectRoot, d))
|
|
40
41
|
.flatMap(d => [d, ...libraryDirs(d, opts.maxDepth ?? 3)]);
|
|
41
|
-
return
|
|
42
|
+
return (0, arrays_1.uniqueArray)([...fromEnv, ...local]).filter(d => d.length > 0);
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* The package installed under `name` in one of `roots`, read from its own `DESCRIPTION` and `NAMESPACE`.
|
package/project/sigdb/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SigDbMagic, SigDbSchema, type PkgBlob, type SigDb, type SigDbFeatures, type
|
|
1
|
+
import { SigDbMagic, SigDbSchema, type PkgBlob, type SigDb, type SigDbFeatures, type SigDbPkgMetaIndex, type SigDbShard, type SigDbTier, type SigVersionInfo } from './schema';
|
|
2
2
|
import { type SigDbIndex, type SigShardIndexWire } from './index-format';
|
|
3
3
|
import { type SigDbManifest, type SigDbShardRef, type SigDbDictRef } from './manifest';
|
|
4
4
|
/** per-package metadata handed to {@link SigDbBuilder.addPackage} (everything but `latest` defaults) */
|
|
@@ -73,7 +73,7 @@ export interface ShardedSigDb {
|
|
|
73
73
|
strings: string[];
|
|
74
74
|
dictHash: string;
|
|
75
75
|
/** package name to metadata, shared by every shard */
|
|
76
|
-
meta:
|
|
76
|
+
meta: SigDbPkgMetaIndex;
|
|
77
77
|
shards: SigShard[];
|
|
78
78
|
}
|
|
79
79
|
/** options for {@link SigDbBuilder.build} */
|
|
@@ -38,11 +38,6 @@ export interface DecodedFunction {
|
|
|
38
38
|
/** the Rd help topic (man-page name) documenting this function, when it differs from {@link name} */
|
|
39
39
|
readonly topic?: string;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The formal parameter names of a known signature, ready for `RFunctionCall.matchArgumentsToParameters`: the
|
|
43
|
-
* `...` parameter is excluded so partial (`pmatch`) matches against the remaining names stay unambiguous.
|
|
44
|
-
*/
|
|
45
|
-
export declare function signatureParameterNames(signature: readonly SigParameter[]): string[];
|
|
46
41
|
/**
|
|
47
42
|
* The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
|
|
48
43
|
* version's set) is expanded, names outside the set stay as leaves. Deduplicated and ascending.
|
package/project/sigdb/decode.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.blobTuple = void 0;
|
|
4
4
|
exports.cranBlobUrl = cranBlobUrl;
|
|
5
5
|
exports.tupleToBlob = tupleToBlob;
|
|
6
|
-
exports.signatureParameterNames = signatureParameterNames;
|
|
7
6
|
exports.transitiveCallees = transitiveCallees;
|
|
8
7
|
exports.decodeFunction = decodeFunction;
|
|
9
8
|
exports.decodeDependencies = decodeDependencies;
|
|
@@ -38,13 +37,6 @@ exports.blobTuple = blobTuple;
|
|
|
38
37
|
function tupleToBlob(t) {
|
|
39
38
|
return { sigs: t[0], cgs: t[1], fns: t[2], versions: t[3], noncran: t[4]?.length ? t[4] : undefined, deps: t[5] ?? [], depsByVersion: t[6] ?? {}, dates: t[7] ?? {} };
|
|
40
39
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The formal parameter names of a known signature, ready for `RFunctionCall.matchArgumentsToParameters`: the
|
|
43
|
-
* `...` parameter is excluded so partial (`pmatch`) matches against the remaining names stay unambiguous.
|
|
44
|
-
*/
|
|
45
|
-
function signatureParameterNames(signature) {
|
|
46
|
-
return signature.map(p => p.name).filter(n => n !== '...');
|
|
47
|
-
}
|
|
48
40
|
/**
|
|
49
41
|
* The transitive callees of `name`. Each local callee that is itself a function of `functions` (one package
|
|
50
42
|
* version's set) is expanded, names outside the set stay as leaves. Deduplicated and ascending.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SigDbPkgMetaIndex } from './schema';
|
|
2
2
|
/** a byte range `[startByte, bytes]` in the plain `.ndjson` */
|
|
3
3
|
export type ByteRange = [startByte: number, bytes: number];
|
|
4
4
|
/**
|
|
@@ -16,7 +16,7 @@ export interface SigDbIndex {
|
|
|
16
16
|
/** package name to blob index */
|
|
17
17
|
pkgs: Record<string, number>;
|
|
18
18
|
/** package name to metadata */
|
|
19
|
-
meta:
|
|
19
|
+
meta: SigDbPkgMetaIndex;
|
|
20
20
|
}
|
|
21
21
|
/** the on-disk (compact) form of a {@link SigDbIndex}: short keys, `meta` optional (hoisted into a manifest) */
|
|
22
22
|
export interface SigDbIndexWire {
|
|
@@ -24,7 +24,7 @@ export interface SigDbIndexWire {
|
|
|
24
24
|
d: ByteRange;
|
|
25
25
|
b: ByteRange[];
|
|
26
26
|
p: Record<string, number>;
|
|
27
|
-
m?:
|
|
27
|
+
m?: SigDbPkgMetaIndex;
|
|
28
28
|
}
|
|
29
29
|
/** the on-disk (compact) index of a blob-only shard (no dictionary of its own; it shares a dictionary file) */
|
|
30
30
|
export interface SigShardIndexWire {
|
|
@@ -35,6 +35,6 @@ export interface SigShardIndexWire {
|
|
|
35
35
|
/** encode an index to its compact on-disk form; omit `meta` when it is hoisted elsewhere (a manifest) */
|
|
36
36
|
export declare function encodeIndex(i: SigDbIndex, withMeta?: boolean): SigDbIndexWire;
|
|
37
37
|
/** decode a compact index; `meta` falls back to a hoisted map, and `dict` to empty (a blob-only shard) */
|
|
38
|
-
export declare function decodeIndex(w: SigDbIndexWire | SigShardIndexWire, meta?:
|
|
38
|
+
export declare function decodeIndex(w: SigDbIndexWire | SigShardIndexWire, meta?: SigDbPkgMetaIndex): SigDbIndex;
|
|
39
39
|
/** read a plain bundle's sidecar `.idx` file and decode it */
|
|
40
40
|
export declare function readSigDbIndex(plainFile: string): SigDbIndex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SigDbPkgMetaIndex, type SigDbShard, type SigDbTier } from './schema';
|
|
2
2
|
import type { ByteRange, SigDbIndexWire, SigShardIndexWire } from './index-format';
|
|
3
3
|
export declare const SigDbManifestMagic = "flowr-sigdb-manifest";
|
|
4
4
|
export declare const SigDbManifestSchema = 2;
|
|
@@ -39,7 +39,7 @@ export interface SigDbManifest {
|
|
|
39
39
|
generated: number;
|
|
40
40
|
cranBase?: string;
|
|
41
41
|
/** package metadata, hoisted here once and shared by every shard (they hold overlapping package sets) */
|
|
42
|
-
meta?:
|
|
42
|
+
meta?: SigDbPkgMetaIndex;
|
|
43
43
|
/** shared string dictionaries; a shard references one by id (they are stored once, not per shard) */
|
|
44
44
|
dicts?: SigDbDictRef[];
|
|
45
45
|
shards: SigDbShardRef[];
|
|
@@ -10,6 +10,11 @@ export declare function readSignatureDb(file: string): Promise<SigDb>;
|
|
|
10
10
|
* The read interface every package-signature source implements, so a single {@link SigDatabase} and a
|
|
11
11
|
* sharded {@link SigDatabaseSet} are interchangeable. Queries are synchronous; any decompression/caching
|
|
12
12
|
* happens once during `open`.
|
|
13
|
+
*
|
|
14
|
+
* Where a query takes an optional `version` and none is given, it answers for the newest version the database
|
|
15
|
+
* holds for that package. That is not the version flowR assumed for the project, and nothing here reads the
|
|
16
|
+
* configuration, the `DESCRIPTION`, or a lockfile. A caller wanting the assumed version resolves it and passes
|
|
17
|
+
* it, as {@link FlowrAnalyzerDependenciesContext} does before falling back to the versionless call.
|
|
13
18
|
*/
|
|
14
19
|
export interface PackageSignatureSource {
|
|
15
20
|
/** whether the source can resolve the package at all */
|
|
@@ -18,28 +23,53 @@ export interface PackageSignatureSource {
|
|
|
18
23
|
hasVersion(pkg: string, version: string): boolean;
|
|
19
24
|
/** whether a version is a current CRAN release (i.e. not in the package's `noncran`/removed set) */
|
|
20
25
|
isCranVersion(pkg: string, version: string): boolean;
|
|
21
|
-
/** the export view of a package version (defaults to its latest) */
|
|
22
|
-
lookup(pkg: string, version?: string): LibraryExports | undefined;
|
|
23
26
|
/**
|
|
24
|
-
* The
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* by a reverse index over every package's latest version, built once and cached.
|
|
27
|
+
* The export view of a package version.
|
|
28
|
+
* @param pkg - The package to look up.
|
|
29
|
+
* @param version - The version to answer for, the database's newest if omitted.
|
|
28
30
|
*/
|
|
31
|
+
lookup(pkg: string, version?: string): LibraryExports | undefined;
|
|
29
32
|
/**
|
|
30
33
|
* The packages exporting `name`, ordered by downloads (descending, ties by name). Answered without building
|
|
31
|
-
* a reverse index
|
|
32
|
-
* it are decoded.
|
|
34
|
+
* a reverse index, as a name the database never stores is rejected outright and only the blobs that may
|
|
35
|
+
* hold it are decoded.
|
|
36
|
+
* @param name - The exported name to search for.
|
|
33
37
|
*/
|
|
34
38
|
packagesExporting(name: string): readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* The package that OWNS the class `className`, either as an S3 class (a same-named constructor plus a
|
|
41
|
+
* registered method, see {@link LibraryExports.s3Classes}) or as an S4 class (exported via `exportClasses`,
|
|
42
|
+
* see {@link LibraryExports.s4Classes}). S3 ownership wins a tie, and `undefined` means no package owns it.
|
|
43
|
+
* @param className - The class to find the owner of.
|
|
44
|
+
* @param version - The version *every candidate package* is inspected at, each one's newest if omitted.
|
|
45
|
+
* Only the versionless form reuses the cached reverse index, the other scans package by package.
|
|
46
|
+
*/
|
|
35
47
|
classOwner(className: string, version?: string): string | undefined;
|
|
36
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Rich per-function view (signatures and call graphs) of a package version.
|
|
50
|
+
* @param pkg - The package to decode.
|
|
51
|
+
* @param version - The version to answer for, the database's newest if omitted.
|
|
52
|
+
*/
|
|
37
53
|
functions(pkg: string, version?: string): DecodedFunction[] | undefined;
|
|
38
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The rich view of a single function by name, decoding only it, unlike {@link functions}.
|
|
56
|
+
* @param pkg - The package the function belongs to.
|
|
57
|
+
* @param name - The function to decode.
|
|
58
|
+
* @param version - The version to answer for, the database's newest if omitted.
|
|
59
|
+
*/
|
|
39
60
|
functionByName(pkg: string, name: string, version?: string): DecodedFunction | undefined;
|
|
40
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* The transitive callees of a function within one package version, expanding the stored local call graphs.
|
|
63
|
+
* @param pkg - The package the function belongs to.
|
|
64
|
+
* @param name - The function whose callees are expanded.
|
|
65
|
+
* @param version - The version to answer for, the database's newest if omitted.
|
|
66
|
+
*/
|
|
41
67
|
transitiveCallees(pkg: string, name: string, version?: string): string[] | undefined;
|
|
42
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Declared dependencies (Depends, Imports, ...) of a package version, with version qualifiers.
|
|
70
|
+
* @param pkg - The package to read the dependencies of.
|
|
71
|
+
* @param version - The version to answer for, the database's newest if omitted.
|
|
72
|
+
*/
|
|
43
73
|
dependencies(pkg: string, version?: string): ResolvedDependency[] | undefined;
|
|
44
74
|
/** every package name this source can resolve */
|
|
45
75
|
packageNames(): string[];
|
|
@@ -49,7 +79,12 @@ export interface PackageSignatureSource {
|
|
|
49
79
|
downloads(pkg: string): number;
|
|
50
80
|
/** for a base package, the R versions it was part of core (ascending); `undefined` otherwise */
|
|
51
81
|
coreVersions(pkg: string): RVersion[] | undefined;
|
|
52
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The release date of a package version, `undefined` if unknown.
|
|
84
|
+
* @param pkg - The package to date.
|
|
85
|
+
* @param version - The version to answer for. Omitted, this defaults to the newest release *by recorded
|
|
86
|
+
* date*, unlike the queries above, which take the package's recorded latest.
|
|
87
|
+
*/
|
|
53
88
|
releaseDate(pkg: string, version?: string): Date | undefined;
|
|
54
89
|
/** every known release of a package (version + date), ascending by R-version order */
|
|
55
90
|
releaseDates(pkg: string): VersionRelease[];
|
package/project/sigdb/reader.js
CHANGED
|
@@ -29,6 +29,7 @@ const decompress_1 = require("./decompress");
|
|
|
29
29
|
const codec_1 = require("./codec");
|
|
30
30
|
const hash_1 = require("./hash");
|
|
31
31
|
const manifest_1 = require("./manifest");
|
|
32
|
+
const arrays_1 = require("../../util/collections/arrays");
|
|
32
33
|
/** apply one `d` line (`["d", start, payload]`, new newline-blob or legacy `string[]` form) to the dictionary in place */
|
|
33
34
|
function applyDictLine(json, strings) {
|
|
34
35
|
const [, start, payload] = JSON.parse(json);
|
|
@@ -214,7 +215,7 @@ class MergedSignatureSource {
|
|
|
214
215
|
return this.pick(pkg, version)?.dependencies(pkg, version);
|
|
215
216
|
}
|
|
216
217
|
packageNames() {
|
|
217
|
-
return
|
|
218
|
+
return (0, arrays_1.uniqueArray)(this.sources.flatMap(s => s.packageNames()));
|
|
218
219
|
}
|
|
219
220
|
isBaseR(pkg) {
|
|
220
221
|
return this.sources.some(s => s.has(pkg) && s.isBaseR(pkg));
|
|
@@ -127,6 +127,8 @@ export type PkgBlobTuple = [Sig[], number[][], SigFn[], Record<string, number[]>
|
|
|
127
127
|
* the package shipped with core R, so the set of versions is exactly the R versions it was part of core.
|
|
128
128
|
*/
|
|
129
129
|
export type SigDbPkgMeta = [latest: string, archived: number, downloads: number, core?: number];
|
|
130
|
+
/** Every package the database knows, mapped from its name to its {@link SigDbPkgMeta}. */
|
|
131
|
+
export type SigDbPkgMetaIndex = Record<string, SigDbPkgMeta>;
|
|
130
132
|
/**
|
|
131
133
|
* Temporal tier of a bundle's packages:
|
|
132
134
|
* - `current` -- only each package's latest version.
|
|
@@ -169,7 +171,7 @@ export interface SigDb {
|
|
|
169
171
|
/** package name to its index into {@link SigDb.blobs} */
|
|
170
172
|
pkgs: Record<string, number>;
|
|
171
173
|
/** package name to its {@link SigDbPkgMeta} */
|
|
172
|
-
meta:
|
|
174
|
+
meta: SigDbPkgMetaIndex;
|
|
173
175
|
}
|
|
174
176
|
export interface SigParamInfo {
|
|
175
177
|
readonly name: string;
|