@eagleoutice/flowr 2.6.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -34
- package/abstract-interpretation/data-frame/absint-visitor.d.ts +1 -1
- package/abstract-interpretation/data-frame/absint-visitor.js +6 -6
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +4 -7
- package/abstract-interpretation/data-frame/dataframe-domain.js +5 -11
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +3 -2
- package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +3 -2
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +28 -24
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +3 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +3 -2
- package/abstract-interpretation/data-frame/semantics.js +54 -41
- package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
- package/abstract-interpretation/data-frame/shape-inference.js +3 -3
- package/abstract-interpretation/domains/abstract-domain.d.ts +1 -0
- package/abstract-interpretation/domains/abstract-domain.js +3 -2
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
- package/abstract-interpretation/domains/interval-domain.d.ts +2 -2
- package/abstract-interpretation/domains/interval-domain.js +3 -6
- package/abstract-interpretation/domains/lattice.d.ts +2 -0
- package/abstract-interpretation/domains/lattice.js +3 -1
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -1
- package/abstract-interpretation/domains/positive-interval-domain.js +1 -1
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +2 -2
- package/abstract-interpretation/domains/satisfiable-domain.js +2 -2
- package/abstract-interpretation/domains/set-range-domain.d.ts +98 -0
- package/abstract-interpretation/domains/set-range-domain.js +400 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.js +2 -2
- package/abstract-interpretation/domains/singleton-domain.js +2 -2
- package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
- package/benchmark/slicer.d.ts +3 -1
- package/benchmark/slicer.js +50 -27
- package/benchmark/stats/print.js +8 -5
- package/benchmark/stats/stats.d.ts +3 -2
- package/benchmark/summarizer/data.d.ts +11 -8
- package/benchmark/summarizer/first-phase/process.js +12 -9
- package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
- package/benchmark/summarizer/second-phase/graph.js +3 -1
- package/benchmark/summarizer/second-phase/process.js +24 -18
- package/cli/export-quads-app.js +1 -1
- package/cli/repl/commands/repl-dataflow.js +2 -1
- package/cli/repl/commands/repl-parse.js +16 -4
- package/cli/repl/commands/repl-query.js +1 -1
- package/cli/repl/core.js +16 -13
- package/cli/repl/server/connection.js +2 -1
- package/cli/script-core/statistics-helper-core.js +2 -1
- package/cli/slicer-app.js +3 -4
- package/cli/wiki.d.ts +4 -0
- package/cli/wiki.js +165 -0
- package/config.d.ts +4 -0
- package/config.js +6 -0
- package/control-flow/cfg-dead-code.js +14 -3
- package/control-flow/cfg-simplification.d.ts +5 -2
- package/control-flow/cfg-simplification.js +3 -0
- package/control-flow/extract-cfg.d.ts +9 -3
- package/control-flow/extract-cfg.js +44 -4
- package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -2
- package/control-flow/simple-visitor.js +2 -2
- package/control-flow/useless-loop.d.ts +3 -3
- package/control-flow/useless-loop.js +16 -5
- package/core/pipeline-executor.d.ts +3 -6
- package/core/pipeline-executor.js +4 -7
- package/core/print/normalize-printer.d.ts +1 -1
- package/core/print/normalize-printer.js +2 -2
- package/core/steps/all/core/00-parse.d.ts +1 -1
- package/core/steps/all/core/00-parse.js +1 -1
- package/core/steps/all/core/10-normalize.d.ts +3 -9
- package/core/steps/all/core/10-normalize.js +1 -16
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -3
- package/core/steps/all/core/11-normalize-tree-sitter.js +2 -3
- package/core/steps/all/core/20-dataflow.d.ts +3 -4
- package/core/steps/all/core/20-dataflow.js +2 -2
- package/core/steps/all/static-slicing/00-slice.d.ts +4 -2
- package/core/steps/all/static-slicing/00-slice.js +3 -2
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +8 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +4 -1
- package/core/steps/pipeline/default-pipelines.d.ts +94 -95
- package/core/steps/pipeline/default-pipelines.js +8 -8
- package/dataflow/cluster.js +2 -2
- package/dataflow/environments/append.d.ts +5 -0
- package/dataflow/environments/append.js +6 -20
- package/dataflow/environments/built-in.d.ts +2 -1
- package/dataflow/environments/clone.d.ts +1 -2
- package/dataflow/environments/clone.js +3 -17
- package/dataflow/environments/define.d.ts +7 -3
- package/dataflow/environments/define.js +9 -56
- package/dataflow/environments/diff.js +3 -3
- package/dataflow/environments/environment.d.ts +48 -28
- package/dataflow/environments/environment.js +187 -62
- package/dataflow/environments/overwrite.d.ts +1 -5
- package/dataflow/environments/overwrite.js +2 -61
- package/dataflow/environments/reference-to-maybe.d.ts +13 -0
- package/dataflow/environments/reference-to-maybe.js +54 -0
- package/dataflow/environments/resolve-by-name.d.ts +6 -1
- package/dataflow/environments/resolve-by-name.js +56 -4
- package/dataflow/environments/scoping.d.ts +8 -4
- package/dataflow/environments/scoping.js +13 -9
- package/dataflow/eval/resolve/alias-tracking.d.ts +10 -4
- package/dataflow/eval/resolve/alias-tracking.js +15 -13
- package/dataflow/eval/resolve/resolve-argument.d.ts +2 -1
- package/dataflow/eval/resolve/resolve-argument.js +10 -10
- package/dataflow/eval/resolve/resolve.d.ts +13 -11
- package/dataflow/eval/resolve/resolve.js +16 -15
- package/dataflow/eval/values/string/string-constants.d.ts +9 -3
- package/dataflow/eval/values/string/string-constants.js +9 -3
- package/dataflow/extractor.d.ts +2 -3
- package/dataflow/extractor.js +25 -28
- package/dataflow/fn/higher-order-function.d.ts +2 -1
- package/dataflow/fn/higher-order-function.js +4 -4
- package/dataflow/graph/dataflowgraph-builder.d.ts +9 -5
- package/dataflow/graph/dataflowgraph-builder.js +21 -11
- package/dataflow/graph/diff-dataflow-graph.js +2 -2
- package/dataflow/graph/graph.d.ts +13 -11
- package/dataflow/graph/graph.js +40 -24
- package/dataflow/graph/invert-dfg.d.ts +3 -2
- package/dataflow/graph/invert-dfg.js +3 -3
- package/dataflow/graph/resolve-graph.d.ts +2 -1
- package/dataflow/graph/resolve-graph.js +2 -2
- package/dataflow/graph/unknown-replacement.d.ts +4 -2
- package/dataflow/graph/unknown-replacement.js +4 -2
- package/dataflow/graph/vertex.d.ts +3 -3
- package/dataflow/graph/vertex.js +3 -3
- package/dataflow/info.d.ts +8 -1
- package/dataflow/info.js +21 -0
- package/dataflow/internal/linker.js +10 -11
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -2
- package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -3
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +7 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +12 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +10 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -4
- 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 +10 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +8 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +15 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +78 -75
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -5
- package/dataflow/internal/process/functions/call/common.d.ts +1 -1
- package/dataflow/internal/process/functions/call/common.js +6 -7
- package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -1
- package/dataflow/internal/process/functions/call/default-call-handling.js +3 -1
- package/dataflow/internal/process/functions/call/known-call-handling.js +4 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +1 -1
- package/dataflow/internal/process/functions/process-argument.js +1 -1
- package/dataflow/internal/process/functions/process-parameter.js +4 -4
- package/dataflow/internal/process/process-symbol.js +1 -1
- package/dataflow/internal/process/process-value.d.ts +1 -1
- package/dataflow/internal/process/process-value.js +7 -7
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -1
- package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
- package/dataflow/processor.d.ts +7 -16
- package/documentation/data/dfg/doc-data-dfg-util.d.ts +0 -2
- package/documentation/data/faq/faqs.js +27 -18
- package/documentation/data/faq/recommended-configs.d.ts +36 -0
- package/documentation/data/faq/recommended-configs.js +40 -0
- package/documentation/data/faq/wiki-faq-store.d.ts +1 -0
- package/documentation/data/faq/wiki-faq-store.js +10 -2
- package/documentation/data/server/doc-data-server-messages.js +1 -1
- package/documentation/doc-capabilities.d.ts +9 -0
- package/documentation/{print-capabilities-markdown.js → doc-capabilities.js} +18 -21
- package/documentation/doc-readme.d.ts +9 -0
- package/documentation/{print-readme.js → doc-readme.js} +31 -35
- package/documentation/doc-util/doc-benchmarks.d.ts +6 -4
- package/documentation/doc-util/doc-benchmarks.js +6 -4
- package/documentation/doc-util/doc-cfg.js +5 -8
- package/documentation/doc-util/doc-dfg.d.ts +7 -7
- package/documentation/doc-util/doc-dfg.js +15 -14
- package/documentation/doc-util/doc-escape.d.ts +6 -0
- package/documentation/doc-util/doc-escape.js +11 -0
- package/documentation/doc-util/doc-general.d.ts +22 -2
- package/documentation/doc-util/doc-general.js +22 -2
- package/documentation/doc-util/doc-normalized-ast.d.ts +10 -5
- package/documentation/doc-util/doc-normalized-ast.js +14 -10
- package/documentation/doc-util/doc-query.d.ts +12 -4
- package/documentation/doc-util/doc-query.js +18 -11
- package/documentation/doc-util/doc-search.d.ts +0 -30
- package/documentation/doc-util/doc-search.js +2 -73
- package/documentation/doc-util/doc-server-message.d.ts +5 -5
- package/documentation/doc-util/doc-server-message.js +4 -4
- package/documentation/doc-util/doc-types.d.ts +69 -32
- package/documentation/doc-util/doc-types.js +109 -62
- package/documentation/index.d.ts +9 -9
- package/documentation/index.js +9 -9
- package/documentation/issue-linting-rule.d.ts +9 -0
- package/documentation/{print-linter-issue.js → issue-linting-rule.js} +20 -23
- package/documentation/wiki-analyzer.d.ts +9 -0
- package/documentation/wiki-analyzer.js +425 -0
- package/documentation/wiki-cfg.d.ts +9 -0
- package/documentation/{print-cfg-wiki.js → wiki-cfg.js} +144 -160
- package/documentation/wiki-core.d.ts +14 -0
- package/documentation/{print-core-wiki.js → wiki-core.js} +164 -175
- package/documentation/wiki-dataflow-graph.d.ts +9 -0
- package/documentation/{print-dataflow-graph-wiki.js → wiki-dataflow-graph.js} +146 -177
- package/documentation/wiki-engine.d.ts +9 -0
- package/documentation/{print-engines-wiki.js → wiki-engine.js} +27 -42
- package/documentation/wiki-faq.d.ts +8 -0
- package/documentation/wiki-faq.js +21 -0
- package/documentation/wiki-interface.d.ts +9 -0
- package/documentation/{print-interface-wiki.js → wiki-interface.js} +59 -56
- package/documentation/wiki-linter.d.ts +9 -0
- package/documentation/{print-linter-wiki.js → wiki-linter.js} +52 -48
- package/documentation/wiki-linting-and-testing.d.ts +9 -0
- package/documentation/{print-linting-and-testing-wiki.js → wiki-linting-and-testing.js} +25 -32
- package/documentation/wiki-mk/doc-context.d.ts +186 -0
- package/documentation/wiki-mk/doc-context.js +84 -0
- package/documentation/wiki-mk/doc-maker.d.ts +95 -0
- package/documentation/wiki-mk/doc-maker.js +134 -0
- package/documentation/wiki-normalized-ast.d.ts +9 -0
- package/documentation/{print-normalized-ast-wiki.js → wiki-normalized-ast.js} +64 -47
- package/documentation/wiki-onboarding.d.ts +8 -0
- package/documentation/{print-onboarding-wiki.js → wiki-onboarding.js} +18 -15
- package/documentation/wiki-query.d.ts +9 -0
- package/documentation/{print-query-wiki.js → wiki-query.js} +62 -47
- package/documentation/wiki-search.d.ts +9 -0
- package/documentation/wiki-search.js +61 -0
- package/linter/linter-executor.js +3 -2
- package/linter/linter-format.d.ts +2 -2
- package/linter/linter-rules.d.ts +15 -19
- package/linter/rules/absolute-path.d.ts +1 -2
- package/linter/rules/absolute-path.js +5 -5
- package/linter/rules/dataframe-access-validation.d.ts +2 -2
- package/linter/rules/dataframe-access-validation.js +13 -9
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.d.ts +1 -5
- package/linter/rules/file-path-validity.d.ts +1 -1
- package/linter/rules/file-path-validity.js +4 -4
- package/linter/rules/function-finder-util.d.ts +3 -7
- package/linter/rules/function-finder-util.js +1 -1
- package/linter/rules/naming-convention.d.ts +2 -2
- package/linter/rules/naming-convention.js +1 -1
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/network-functions.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +4 -3
- package/linter/rules/seeded-randomness.js +38 -18
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/useless-loop.d.ts +2 -2
- package/linter/rules/useless-loop.js +2 -2
- package/package.json +5 -17
- package/project/cache/flowr-analyzer-cache.d.ts +7 -10
- package/project/cache/flowr-analyzer-cache.js +17 -38
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +34 -0
- package/project/cache/flowr-analyzer-controlflow-cache.js +79 -0
- package/project/context/flowr-analyzer-context.d.ts +37 -5
- package/project/context/flowr-analyzer-context.js +51 -4
- package/project/context/flowr-analyzer-environment-context.d.ts +47 -0
- package/project/context/flowr-analyzer-environment-context.js +50 -0
- package/project/context/flowr-analyzer-files-context.d.ts +63 -13
- package/project/context/flowr-analyzer-files-context.js +110 -39
- package/project/context/flowr-file.d.ts +32 -10
- package/project/context/flowr-file.js +30 -9
- package/project/flowr-analyzer-builder.d.ts +22 -28
- package/project/flowr-analyzer-builder.js +32 -70
- package/project/flowr-analyzer.d.ts +55 -14
- package/project/flowr-analyzer.js +53 -8
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +7 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +13 -5
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +3 -3
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +11 -5
- package/project/plugins/file-plugins/flowr-description-file.d.ts +3 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +33 -0
- package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.d.ts +20 -0
- package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.js +42 -0
- package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.d.ts +59 -0
- package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.js +132 -0
- package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
- package/project/plugins/file-plugins/notebooks/notebook.js +2 -0
- package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +5 -0
- package/project/plugins/flowr-analyzer-plugin-defaults.js +23 -0
- package/project/plugins/flowr-analyzer-plugin.d.ts +2 -0
- package/project/plugins/flowr-analyzer-plugin.js +2 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/plugin-registry.d.ts +34 -0
- package/project/plugins/plugin-registry.js +62 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +5 -6
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -2
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +25 -18
- 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/control-flow-query/control-flow-query-format.js +3 -2
- 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.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +5 -5
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +2 -2
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +6 -6
- package/queries/catalog/df-shape-query/df-shape-query-format.js +8 -7
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +2 -1
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -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/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +4 -4
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
- package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
- package/queries/catalog/linter-query/linter-query-format.js +13 -2
- package/queries/catalog/location-map-query/location-map-query-executor.js +2 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +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-executor.js +3 -1
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +2 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +3 -3
- 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/static-slice-query/static-slice-query-executor.js +2 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.js +13 -1
- package/queries/query.d.ts +26 -18
- package/queries/query.js +21 -1
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -1
- package/r-bridge/lang-4.x/ast/model/collect.js +4 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +29 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +15 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +5 -7
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +24 -11
- package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/type.js +2 -0
- package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +9 -8
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +11 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +4 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +20 -11
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -3
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +5 -4
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +14 -5
- package/r-bridge/parser.d.ts +15 -5
- package/r-bridge/parser.js +27 -13
- package/r-bridge/retriever.d.ts +9 -15
- package/r-bridge/retriever.js +14 -5
- package/r-bridge/shell.d.ts +1 -1
- package/r-bridge/shell.js +1 -1
- package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
- package/reconstruct/auto-select/magic-comments.js +1 -1
- package/reconstruct/reconstruct.d.ts +17 -9
- package/reconstruct/reconstruct.js +19 -8
- package/search/flowr-search.d.ts +12 -0
- package/search/search-executor/search-enrichers.d.ts +9 -2
- package/search/search-executor/search-enrichers.js +1 -3
- package/search/search-executor/search-generators.d.ts +1 -1
- package/search/search-executor/search-generators.js +9 -4
- package/slicing/criterion/collect-all.d.ts +3 -2
- package/slicing/criterion/collect-all.js +1 -1
- package/slicing/criterion/parse.js +4 -4
- package/slicing/static/slice-call.d.ts +3 -2
- package/slicing/static/slice-call.js +4 -4
- package/slicing/static/static-slicer.d.ts +3 -1
- package/slicing/static/static-slicer.js +6 -7
- package/statistics/features/supported/assignments/assignments.js +1 -1
- package/statistics/features/supported/control-flow/control-flow.js +2 -2
- package/statistics/features/supported/data-access/data-access.js +1 -1
- package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
- package/statistics/features/supported/expression-list/statistics-expression-list.js +1 -1
- package/statistics/features/supported/loops/loops.js +1 -1
- package/statistics/features/supported/used-functions/used-functions.js +2 -2
- package/statistics/features/supported/variables/variables.js +3 -2
- package/statistics/statistics.js +3 -2
- package/util/assert.d.ts +4 -0
- package/util/assert.js +4 -0
- package/util/containers.js +1 -1
- package/util/files.d.ts +1 -1
- package/util/files.js +1 -1
- package/util/mermaid/ast.d.ts +4 -3
- package/util/mermaid/ast.js +36 -8
- package/util/mermaid/cfg.js +1 -1
- package/util/mermaid/dfg.d.ts +1 -0
- package/util/mermaid/dfg.js +3 -3
- package/util/simple-df/dfg-view.d.ts +2 -1
- package/util/simple-df/dfg-view.js +2 -2
- package/util/version.js +1 -1
- package/dataflow/environments/remove.d.ts +0 -12
- package/dataflow/environments/remove.js +0 -52
- package/documentation/print-analyzer-wiki.d.ts +0 -1
- package/documentation/print-analyzer-wiki.js +0 -141
- package/documentation/print-capabilities-markdown.d.ts +0 -1
- package/documentation/print-cfg-wiki.d.ts +0 -1
- package/documentation/print-core-wiki.d.ts +0 -5
- package/documentation/print-dataflow-graph-wiki.d.ts +0 -1
- package/documentation/print-engines-wiki.d.ts +0 -1
- package/documentation/print-faq-wiki.d.ts +0 -1
- package/documentation/print-faq-wiki.js +0 -18
- package/documentation/print-interface-wiki.d.ts +0 -1
- package/documentation/print-linter-issue.d.ts +0 -1
- package/documentation/print-linter-wiki.d.ts +0 -1
- package/documentation/print-linting-and-testing-wiki.d.ts +0 -1
- package/documentation/print-normalized-ast-wiki.d.ts +0 -1
- package/documentation/print-onboarding-wiki.d.ts +0 -1
- package/documentation/print-query-wiki.d.ts +0 -1
- package/documentation/print-readme.d.ts +0 -1
- package/documentation/print-search-wiki.d.ts +0 -1
- package/documentation/print-search-wiki.js +0 -74
- package/util/formats/adapter-format.d.ts +0 -6
- package/util/formats/adapter-format.js +0 -3
- package/util/formats/adapter.d.ts +0 -27
- package/util/formats/adapter.js +0 -58
- package/util/formats/adapters/r-adapter.d.ts +0 -4
- package/util/formats/adapters/r-adapter.js +0 -7
- package/util/formats/adapters/rmd-adapter.d.ts +0 -35
- package/util/formats/adapters/rmd-adapter.js +0 -100
|
@@ -25,7 +25,7 @@ const isImplicitLoop = /[lsvmt]?apply/;
|
|
|
25
25
|
function visitLoops(info, input) {
|
|
26
26
|
// holds number of loops and their nesting depths
|
|
27
27
|
const loopStack = [];
|
|
28
|
-
(0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
|
|
28
|
+
(0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
|
|
29
29
|
switch (node.type) {
|
|
30
30
|
case type_1.RType.Next:
|
|
31
31
|
info.nextStatements++;
|
|
@@ -50,7 +50,7 @@ function classifyArguments(args, existing) {
|
|
|
50
50
|
function visitCalls(info, input) {
|
|
51
51
|
const calls = [];
|
|
52
52
|
const allCalls = [];
|
|
53
|
-
(0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
|
|
53
|
+
(0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
|
|
54
54
|
if (node.type !== type_1.RType.FunctionCall) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
@@ -84,7 +84,7 @@ function visitCalls(info, input) {
|
|
|
84
84
|
hasCallsEdge ? 1 : 0
|
|
85
85
|
]);
|
|
86
86
|
}
|
|
87
|
-
classifyArguments(node.arguments.map(e => (0, unpack_argument_1.
|
|
87
|
+
classifyArguments(node.arguments.map(e => (0, unpack_argument_1.unpackNonameArg)(e)), info.args);
|
|
88
88
|
calls.push(node);
|
|
89
89
|
}, node => {
|
|
90
90
|
// drop again :D
|
|
@@ -7,6 +7,7 @@ const visitor_1 = require("../../../../r-bridge/lang-4.x/ast/model/processing/vi
|
|
|
7
7
|
const type_1 = require("../../../../r-bridge/lang-4.x/ast/model/type");
|
|
8
8
|
const r_symbol_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol");
|
|
9
9
|
const statistics_file_1 = require("../../../output/statistics-file");
|
|
10
|
+
const vertex_1 = require("../../../../dataflow/graph/vertex");
|
|
10
11
|
const initialVariableInfo = {
|
|
11
12
|
numberOfVariableUses: 0,
|
|
12
13
|
numberOfDefinitions: 0,
|
|
@@ -15,7 +16,7 @@ const initialVariableInfo = {
|
|
|
15
16
|
unknownVariables: 0
|
|
16
17
|
};
|
|
17
18
|
function visitVariables(info, input) {
|
|
18
|
-
(0, visitor_1.visitAst)(input.normalizedRAst.ast, node => {
|
|
19
|
+
(0, visitor_1.visitAst)(input.normalizedRAst.ast.files.map(f => f.root), node => {
|
|
19
20
|
if (node.type !== type_1.RType.Symbol || (0, r_symbol_1.isSpecialSymbol)(node)) {
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
@@ -30,7 +31,7 @@ function visitVariables(info, input) {
|
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
const [dfNode] = mayNode;
|
|
33
|
-
if (dfNode.tag ===
|
|
34
|
+
if (dfNode.tag === vertex_1.VertexType.VariableDefinition) {
|
|
34
35
|
info.numberOfDefinitions++;
|
|
35
36
|
const lexeme = node.info.fullLexeme ?? node.lexeme;
|
|
36
37
|
(0, statistics_file_1.appendStatisticsFile)(exports.variables.name, 'definedVariables', [[
|
package/statistics/statistics.js
CHANGED
|
@@ -14,6 +14,7 @@ const pipeline_executor_1 = require("../core/pipeline-executor");
|
|
|
14
14
|
const default_pipelines_1 = require("../core/steps/pipeline/default-pipelines");
|
|
15
15
|
const feature_1 = require("./features/feature");
|
|
16
16
|
const convert_values_1 = require("../r-bridge/lang-4.x/convert-values");
|
|
17
|
+
const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-context");
|
|
17
18
|
/**
|
|
18
19
|
* By default, {@link extractUsageStatistics} requires a generator, but sometimes you already know all the files
|
|
19
20
|
* that you want to process. This function simply reps your requests as a generator.
|
|
@@ -82,8 +83,8 @@ function processMetaOnSuccessful(meta, request) {
|
|
|
82
83
|
const parser = new xmldom_1.DOMParser();
|
|
83
84
|
async function extractSingle(result, shell, request, features, suffixFilePath, config) {
|
|
84
85
|
const slicerOutput = await new pipeline_executor_1.PipelineExecutor(default_pipelines_1.DEFAULT_DATAFLOW_PIPELINE, {
|
|
85
|
-
request, parser: shell
|
|
86
|
-
}
|
|
86
|
+
context: (0, flowr_analyzer_context_1.contextFromInput)(request, config), parser: shell
|
|
87
|
+
}).allRemainingSteps();
|
|
87
88
|
// retrieve parsed xml through (legacy) xmlparsedata
|
|
88
89
|
const suffix = request.request === 'file' ? ', encoding="utf-8"' : '';
|
|
89
90
|
shell.sendCommands(`try(flowr_parsed<-parse(${request.request}=${JSON.stringify(request.content)},keep.source=TRUE${suffix}),silent=FALSE)`, 'try(flowr_output<-xmlparsedata::xml_parse_data(flowr_parsed,includeText=TRUE,pretty=FALSE),silent=FALSE)');
|
package/util/assert.d.ts
CHANGED
|
@@ -53,6 +53,10 @@ export declare function isUndefined<T>(x: T | undefined): x is undefined;
|
|
|
53
53
|
* @see {@link isNotUndefined}
|
|
54
54
|
*/
|
|
55
55
|
export declare function isNotNull<T>(x: T | null): x is T;
|
|
56
|
+
/**
|
|
57
|
+
* Generates a GitHub issue URL for reporting guard errors
|
|
58
|
+
*/
|
|
59
|
+
export declare function getGuardIssueUrl(message: string): string;
|
|
56
60
|
export type GuardMessage = string | (() => string);
|
|
57
61
|
/**
|
|
58
62
|
* @param assertion - will be asserted
|
package/util/assert.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.assertUnreachable = assertUnreachable;
|
|
|
5
5
|
exports.isNotUndefined = isNotUndefined;
|
|
6
6
|
exports.isUndefined = isUndefined;
|
|
7
7
|
exports.isNotNull = isNotNull;
|
|
8
|
+
exports.getGuardIssueUrl = getGuardIssueUrl;
|
|
8
9
|
exports.guard = guard;
|
|
9
10
|
/* v8 ignore next */
|
|
10
11
|
const version_1 = require("./version");
|
|
@@ -86,6 +87,9 @@ function prepareStack(stack) {
|
|
|
86
87
|
}
|
|
87
88
|
return lines.map(l => l.replaceAll(/\(\/.*(src|test)/g, '(<>/$1')).join('\n');
|
|
88
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Generates a GitHub issue URL for reporting guard errors
|
|
92
|
+
*/
|
|
89
93
|
function getGuardIssueUrl(message) {
|
|
90
94
|
const body = encodeURIComponent(`<!-- Please describe your issue in more detail below! -->
|
|
91
95
|
|
package/util/containers.js
CHANGED
|
@@ -26,7 +26,7 @@ function getAccessOperands(args) {
|
|
|
26
26
|
* @returns The indicesCollection of the resolved definitions
|
|
27
27
|
*/
|
|
28
28
|
function resolveIndicesByName(name, environment) {
|
|
29
|
-
const definitions = (0, resolve_by_name_1.
|
|
29
|
+
const definitions = (0, resolve_by_name_1.resolveByNameAnyType)(name, environment);
|
|
30
30
|
return definitions?.flatMap(def => def?.indicesCollection ?? []);
|
|
31
31
|
}
|
|
32
32
|
/**
|
package/util/files.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare function getParentDirectory(directory: string): string;
|
|
|
75
75
|
* @param file - The file to parse
|
|
76
76
|
* @returns Map containing the keys and values of the provided file.
|
|
77
77
|
*/
|
|
78
|
-
export declare function parseDCF(file: FlowrFileProvider
|
|
78
|
+
export declare function parseDCF(file: FlowrFileProvider): Map<string, string[]>;
|
|
79
79
|
/**
|
|
80
80
|
* Checks whether the given path-like object is a file that exists on the local filesystem.
|
|
81
81
|
*/
|
package/util/files.js
CHANGED
|
@@ -212,7 +212,7 @@ function parseDCF(file) {
|
|
|
212
212
|
let currentValue = '';
|
|
213
213
|
const indentRegex = new RegExp(/^\s/);
|
|
214
214
|
const firstColonRegex = new RegExp(/:(.*)/s);
|
|
215
|
-
const fileContent = file.content().split(/\r?\n/);
|
|
215
|
+
const fileContent = file.content().toString().split(/\r?\n/);
|
|
216
216
|
for (const line of fileContent) {
|
|
217
217
|
if (indentRegex.test(line)) {
|
|
218
218
|
currentValue += '\n' + line.trim();
|
package/util/mermaid/ast.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
1
|
+
import type { ParentInformation, RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
2
|
+
import type { RProject } from '../../r-bridge/lang-4.x/ast/model/nodes/r-project';
|
|
2
3
|
/**
|
|
3
4
|
* Serialize the normalized AST to mermaid format
|
|
4
5
|
*/
|
|
5
|
-
export declare function normalizedAstToMermaid(ast: RNodeWithParent, prefix?: string): string;
|
|
6
|
+
export declare function normalizedAstToMermaid(ast: RProject<ParentInformation> | RNodeWithParent, prefix?: string): string;
|
|
6
7
|
/**
|
|
7
8
|
* Use mermaid to visualize the normalized AST.
|
|
8
9
|
*/
|
|
9
|
-
export declare function normalizedAstToMermaidUrl(ast: RNodeWithParent, prefix?: string): string;
|
|
10
|
+
export declare function normalizedAstToMermaidUrl(ast: RProject<ParentInformation> | RNodeWithParent, prefix?: string): string;
|
package/util/mermaid/ast.js
CHANGED
|
@@ -6,6 +6,14 @@ const mermaid_1 = require("./mermaid");
|
|
|
6
6
|
const visitor_1 = require("../../r-bridge/lang-4.x/ast/model/processing/visitor");
|
|
7
7
|
const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
|
|
8
8
|
const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
9
|
+
const flowr_file_1 = require("../../project/context/flowr-file");
|
|
10
|
+
function identifyMermaidDirection(prefix) {
|
|
11
|
+
const directionMatch = prefix.match(/flowchart (TD|LR|RL|BT)/);
|
|
12
|
+
if (directionMatch) {
|
|
13
|
+
return directionMatch[1];
|
|
14
|
+
}
|
|
15
|
+
return 'TD';
|
|
16
|
+
}
|
|
9
17
|
/**
|
|
10
18
|
* Serialize the normalized AST to mermaid format
|
|
11
19
|
*/
|
|
@@ -24,17 +32,37 @@ function normalizedAstToMermaid(ast, prefix = 'flowchart TD\n') {
|
|
|
24
32
|
output += ` n${n.info.id} -.-|"group-close"| n${n.grouping[1].info.id}\n`;
|
|
25
33
|
}
|
|
26
34
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
function showAst(ast) {
|
|
36
|
+
(0, visitor_1.visitAst)(ast, n => {
|
|
37
|
+
showNode(n);
|
|
38
|
+
if (n.type === 'RAccess' && (n.operator !== '[' && n.operator !== '[[')) {
|
|
39
|
+
for (const k of n.access) {
|
|
40
|
+
if (k !== r_function_call_1.EmptyArgument) {
|
|
41
|
+
showNode(k);
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
}
|
|
45
|
+
return false;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (ast.type === type_1.RType.Project) {
|
|
49
|
+
for (const f of ast.files) {
|
|
50
|
+
// add a subgraph for each file
|
|
51
|
+
if (ast.files.length !== 1 || (f.filePath && f.filePath !== flowr_file_1.FlowrFile.INLINE_PATH)) {
|
|
52
|
+
output += ` subgraph "File: ${(0, mermaid_1.escapeMarkdown)(f.filePath ?? flowr_file_1.FlowrFile.INLINE_PATH)}"\n`;
|
|
53
|
+
const direction = identifyMermaidDirection(prefix);
|
|
54
|
+
output += ` direction ${direction}\n`;
|
|
55
|
+
showAst(f.root);
|
|
56
|
+
output += ' end\n';
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
showAst(f.root);
|
|
60
|
+
}
|
|
35
61
|
}
|
|
36
|
-
|
|
37
|
-
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
showAst(ast);
|
|
65
|
+
}
|
|
38
66
|
return output;
|
|
39
67
|
}
|
|
40
68
|
/**
|
package/util/mermaid/cfg.js
CHANGED
|
@@ -43,7 +43,7 @@ function cfgToMermaid(cfg, normalizedAst, prefix = 'flowchart BT\n', simplify =
|
|
|
43
43
|
if (vertex.type === control_flow_graph_1.CfgVertexType.Block) {
|
|
44
44
|
if (simplify) {
|
|
45
45
|
const ids = vertex.elems?.map(e => e.id) ?? [];
|
|
46
|
-
const reconstruct = (0, reconstruct_1.reconstructToCode)(normalizedAst, new Set(ids), auto_select_defaults_1.doNotAutoSelect).code;
|
|
46
|
+
const reconstruct = (0, reconstruct_1.reconstructToCode)(normalizedAst, { nodes: new Set(ids) }, auto_select_defaults_1.doNotAutoSelect).code;
|
|
47
47
|
const name = `"\`Basic Block (${id})\n${(0, mermaid_1.escapeMarkdown)(reconstruct)}\`"`;
|
|
48
48
|
output += ` n${id}[[${name}]]\n`;
|
|
49
49
|
}
|
package/util/mermaid/dfg.d.ts
CHANGED
package/util/mermaid/dfg.js
CHANGED
|
@@ -108,7 +108,7 @@ function encodeEdge(from, to, types) {
|
|
|
108
108
|
function mermaidNodeBrackets(tag) {
|
|
109
109
|
let open;
|
|
110
110
|
let close;
|
|
111
|
-
if (tag ===
|
|
111
|
+
if (tag === vertex_1.VertexType.FunctionDefinition || tag === vertex_1.VertexType.VariableDefinition) {
|
|
112
112
|
open = '[';
|
|
113
113
|
close = ']';
|
|
114
114
|
}
|
|
@@ -209,7 +209,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark) {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
if (info.tag ===
|
|
212
|
+
if (info.tag === vertex_1.VertexType.FunctionDefinition) {
|
|
213
213
|
subflowToMermaid(id, info.exitPoints, info.subflow, mermaid, idPrefix);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
@@ -227,7 +227,7 @@ function graphToMermaidGraph(rootIds, { simplified, graph, prefix = 'flowchart B
|
|
|
227
227
|
* Converts a dataflow graph to mermaid graph code that visualizes the graph.
|
|
228
228
|
*/
|
|
229
229
|
function graphToMermaid(config) {
|
|
230
|
-
const mermaid = graphToMermaidGraph(config.graph.rootIds(), config);
|
|
230
|
+
const mermaid = graphToMermaidGraph(config.includeOnlyIds ? config.includeOnlyIds : config.graph.rootIds(), config);
|
|
231
231
|
return { string: `${mermaid.nodeLines.join('\n')}\n${mermaid.edgeLines.join('\n')}`, mermaid };
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
@@ -2,6 +2,7 @@ import { DataflowGraph } from '../../dataflow/graph/graph';
|
|
|
2
2
|
import { VertexType } from '../../dataflow/graph/vertex';
|
|
3
3
|
import { type MergeableRecord } from '../objects';
|
|
4
4
|
import type { DeepPartial } from 'ts-essentials';
|
|
5
|
+
import type { REnvironmentInformation } from '../../dataflow/environments/environment';
|
|
5
6
|
export interface ReduceVertexOptions extends MergeableRecord {
|
|
6
7
|
tags: VertexType[];
|
|
7
8
|
nameRegex: string;
|
|
@@ -16,4 +17,4 @@ export interface ReduceOptions extends MergeableRecord {
|
|
|
16
17
|
/**
|
|
17
18
|
* Produces a reduced version of the given dataflow graph according to the given options.
|
|
18
19
|
*/
|
|
19
|
-
export declare function reduceDfg(dfg: DataflowGraph, options: DeepPartial<ReduceOptions
|
|
20
|
+
export declare function reduceDfg(dfg: DataflowGraph, options: DeepPartial<ReduceOptions>, cleanEnv: REnvironmentInformation): DataflowGraph;
|
|
@@ -36,7 +36,7 @@ function makeFilter(options, idMap) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Produces a reduced version of the given dataflow graph according to the given options.
|
|
38
38
|
*/
|
|
39
|
-
function reduceDfg(dfg, options) {
|
|
39
|
+
function reduceDfg(dfg, options, cleanEnv) {
|
|
40
40
|
const newDfg = new graph_1.DataflowGraph(dfg.idMap);
|
|
41
41
|
const applyOptions = (0, objects_1.deepMergeObject)(defaultReduceOptions, options);
|
|
42
42
|
// overwrite the tag set if possible
|
|
@@ -48,7 +48,7 @@ function reduceDfg(dfg, options) {
|
|
|
48
48
|
for (const [id, info] of dfg.vertices(!applyOptions)) {
|
|
49
49
|
const result = applyFilter(info);
|
|
50
50
|
if (result) {
|
|
51
|
-
newDfg.addVertex(result, dfg.isRoot(id));
|
|
51
|
+
newDfg.addVertex(result, cleanEnv, dfg.isRoot(id));
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
for (const [from, out] of dfg.edges()) {
|
package/util/version.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
|
|
|
6
6
|
const semver_1 = require("semver");
|
|
7
7
|
const assert_1 = require("./assert");
|
|
8
8
|
// this is automatically replaced with the current version by release-it
|
|
9
|
-
const version = '2.
|
|
9
|
+
const version = '2.7.0';
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
12
12
|
*/
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IEnvironment, REnvironmentInformation } from './environment';
|
|
2
|
-
import type { Identifier } from './identifier';
|
|
3
|
-
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
4
|
-
/**
|
|
5
|
-
* Removes all definitions of a given name from the environment.
|
|
6
|
-
*/
|
|
7
|
-
export declare function remove(name: Identifier, environment: REnvironmentInformation, defaultEnvironment: IEnvironment): REnvironmentInformation;
|
|
8
|
-
/** Creates a copy of the original environment but without the definitions of the given ids */
|
|
9
|
-
export declare function removeAll(definitions: readonly {
|
|
10
|
-
nodeId: NodeId;
|
|
11
|
-
name: Identifier | undefined;
|
|
12
|
-
}[], environment: REnvironmentInformation): REnvironmentInformation;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.remove = remove;
|
|
4
|
-
exports.removeAll = removeAll;
|
|
5
|
-
const info_1 = require("../info");
|
|
6
|
-
const clone_1 = require("./clone");
|
|
7
|
-
/**
|
|
8
|
-
* Removes all definitions of a given name from the environment.
|
|
9
|
-
*/
|
|
10
|
-
function remove(name, environment, defaultEnvironment) {
|
|
11
|
-
let current = environment.current;
|
|
12
|
-
do {
|
|
13
|
-
const definition = current.memory.get(name);
|
|
14
|
-
if (definition !== undefined) {
|
|
15
|
-
current.memory.delete(name);
|
|
16
|
-
if (definition.every(d => (0, info_1.happensInEveryBranch)(d.controlDependencies))) {
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
current = current.parent;
|
|
21
|
-
} while (current.id !== defaultEnvironment.id);
|
|
22
|
-
// we never remove built ins
|
|
23
|
-
return environment;
|
|
24
|
-
}
|
|
25
|
-
/** Creates a copy of the original environment but without the definitions of the given ids */
|
|
26
|
-
function removeAll(definitions, environment) {
|
|
27
|
-
environment = (0, clone_1.cloneEnvironmentInformation)(environment, true);
|
|
28
|
-
let current = environment.current;
|
|
29
|
-
do {
|
|
30
|
-
for (const { nodeId, name } of definitions) {
|
|
31
|
-
if (name) {
|
|
32
|
-
current.memory.delete(name);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
// remove all definitions for the node id
|
|
36
|
-
for (const [key, values] of current.memory) {
|
|
37
|
-
const res = values.filter(v => v.nodeId === nodeId);
|
|
38
|
-
if (res.length > 0) {
|
|
39
|
-
current.memory.set(key, values);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
current.memory.delete(key);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
current = current.parent;
|
|
48
|
-
} while (!current.builtInEnv);
|
|
49
|
-
// we never remove built ins so we can stop one early
|
|
50
|
-
return environment;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const shell_1 = require("../r-bridge/shell");
|
|
7
|
-
const log_1 = require("../../test/functionality/_helper/log");
|
|
8
|
-
const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
|
|
9
|
-
const doc_types_1 = require("./doc-util/doc-types");
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const flowr_analyzer_1 = require("../project/flowr-analyzer");
|
|
12
|
-
const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
|
|
13
|
-
const doc_structure_1 = require("./doc-util/doc-structure");
|
|
14
|
-
const doc_files_1 = require("./doc-util/doc-files");
|
|
15
|
-
async function analyzerQuickExample() {
|
|
16
|
-
const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
|
|
17
|
-
.addRequestFromInput('x <- 1; print(x)')
|
|
18
|
-
.setEngine('tree-sitter')
|
|
19
|
-
.build();
|
|
20
|
-
// get the dataflow
|
|
21
|
-
const df = await analyzer.dataflow();
|
|
22
|
-
// obtain the identified loading order
|
|
23
|
-
console.log(analyzer.inspectContext().files.loadingOrder.getLoadingOrder());
|
|
24
|
-
// run a dependency query
|
|
25
|
-
const results = await analyzer.query([{ type: 'dependencies' }]);
|
|
26
|
-
return { analyzer, df, results };
|
|
27
|
-
}
|
|
28
|
-
async function getText(shell) {
|
|
29
|
-
const rversion = (await shell.usedRVersion())?.format() ?? 'unknown';
|
|
30
|
-
const types = (0, doc_types_1.getTypesFromFolder)({
|
|
31
|
-
rootFolder: path_1.default.resolve('src/'),
|
|
32
|
-
inlineTypes: doc_types_1.mermaidHide
|
|
33
|
-
});
|
|
34
|
-
return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'analyzer', rVersion: rversion })}
|
|
35
|
-
|
|
36
|
-
We are currently working on documenting the capabilities of the analyzer (with the plugins, their loading order, etc.). In general, the code documentation
|
|
37
|
-
starting with the ${(0, doc_types_1.shortLink)(flowr_analyzer_1.FlowrAnalyzer.name, types.info)} and the ${(0, doc_types_1.shortLink)(flowr_analyzer_builder_1.FlowrAnalyzerBuilder.name, types.info)}
|
|
38
|
-
should be the best starting point.
|
|
39
|
-
|
|
40
|
-
${(0, doc_structure_1.collapsibleToc)({
|
|
41
|
-
'Overview': undefined,
|
|
42
|
-
'Builder Configuration': undefined,
|
|
43
|
-
'Plugins': {
|
|
44
|
-
'Plugin Types': {
|
|
45
|
-
'Dependency Identification': undefined,
|
|
46
|
-
'Project Discovery': undefined,
|
|
47
|
-
'File Loading': undefined,
|
|
48
|
-
'Loading Order': undefined
|
|
49
|
-
},
|
|
50
|
-
'How to add a new plugin': undefined,
|
|
51
|
-
'How to add a new plugin type': undefined
|
|
52
|
-
},
|
|
53
|
-
'Context Information': {
|
|
54
|
-
'Files Context': undefined,
|
|
55
|
-
'Loading Order Context': undefined,
|
|
56
|
-
'Dependencies Context': undefined
|
|
57
|
-
},
|
|
58
|
-
'Analyzer Internals': undefined
|
|
59
|
-
})}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
${(0, doc_structure_1.section)('Overview', 2)}
|
|
63
|
-
|
|
64
|
-
No matter whether you want to analyze a single R script, a couple of R notebooks, or a complete project,
|
|
65
|
-
your journey starts with the ${(0, doc_types_1.shortLink)(flowr_analyzer_builder_1.FlowrAnalyzerBuilder.name, types.info)} (further described in [Builder Configuration](#builder-configuration) below).
|
|
66
|
-
This builder allows you to configure the analysis in many different ways, for example, by specifying which files to analyze, which plugins to use, or
|
|
67
|
-
what [Engine](${doc_files_1.FlowrWikiBaseRef}/Engines) to use for the analysis.
|
|
68
|
-
|
|
69
|
-
${(0, doc_structure_1.block)({
|
|
70
|
-
type: 'NOTE',
|
|
71
|
-
content: `If you want to quickly try out the analyzer, you can use the following code snippet that analyzes a simple R expression:
|
|
72
|
-
|
|
73
|
-
${(0, doc_types_1.printCodeOfElement)({ program: types.program, info: types.info, dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true }, analyzerQuickExample.name)}
|
|
74
|
-
`
|
|
75
|
-
})}
|
|
76
|
-
|
|
77
|
-
In general, we work on providing a set of example repositories that demonstrate how to use the analyzer in different scenarios:
|
|
78
|
-
|
|
79
|
-
* [${doc_files_1.FlowrGithubGroupName}/sample-analyzer-project-query](${doc_files_1.FlowrGithubBaseRef}/sample-analyzer-project-query) for an example project that runs queries on an R project
|
|
80
|
-
|
|
81
|
-
**TODO**: mention [Context](#Context_Information)
|
|
82
|
-
|
|
83
|
-
${(0, doc_structure_1.section)('Builder Configuration', 2)}
|
|
84
|
-
|
|
85
|
-
**TODO** also explain buildSync and that TreeSitter has to be initialized for this
|
|
86
|
-
|
|
87
|
-
${(0, doc_structure_1.section)('Plugins', 2)}
|
|
88
|
-
|
|
89
|
-
${(0, doc_structure_1.section)('Plugin Types', 3)}
|
|
90
|
-
|
|
91
|
-
During the construction of a new ${(0, doc_types_1.shortLink)(flowr_analyzer_1.FlowrAnalyzer.name, types.info)}, plugins of different types are applied at different stages of the analysis.
|
|
92
|
-
These plugins are grouped by their ${(0, doc_types_1.shortLink)('PluginType', types.info)} and are applied in the following order (as shown in the documentation of the ${(0, doc_types_1.shortLink)('PluginType', types.info)}):
|
|
93
|
-
|
|
94
|
-
${(() => {
|
|
95
|
-
const doc = (0, doc_types_1.getDocumentationForType)('PluginType', types.info);
|
|
96
|
-
// skip until the first ```text
|
|
97
|
-
const lines = doc.split('\n');
|
|
98
|
-
const start = lines.findIndex(l => l.trim().startsWith('```text'));
|
|
99
|
-
const end = lines.findIndex((l, i) => i > start && l.trim().startsWith('```'));
|
|
100
|
-
// github rendering pls fix xD
|
|
101
|
-
return start >= 0 && end > start ? '```text\n' + lines.slice(start + 1, end).join('\n').replaceAll('▶', '>') + '\n```' : doc;
|
|
102
|
-
})()}
|
|
103
|
-
|
|
104
|
-
We describe the different plugin types in more detail below.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
${(0, doc_structure_1.section)('Project Discovery', 4)}
|
|
108
|
-
|
|
109
|
-
${(0, doc_structure_1.section)('File Loading', 4)}
|
|
110
|
-
|
|
111
|
-
${(0, doc_structure_1.section)('Dependency Identification', 4)}
|
|
112
|
-
|
|
113
|
-
${(0, doc_structure_1.section)('Loading Order', 4)}
|
|
114
|
-
|
|
115
|
-
${(0, doc_structure_1.section)('How to add a new plugin', 3)}
|
|
116
|
-
|
|
117
|
-
${(0, doc_structure_1.section)('How to add a new plugin type', 3)}
|
|
118
|
-
|
|
119
|
-
${(0, doc_structure_1.section)('Context Information', 2)}
|
|
120
|
-
|
|
121
|
-
${(0, doc_structure_1.section)('Files Context', 3)}
|
|
122
|
-
|
|
123
|
-
${(0, doc_structure_1.section)('Loading Order Context', 3)}
|
|
124
|
-
|
|
125
|
-
${(0, doc_structure_1.section)('Dependencies Context', 3)}
|
|
126
|
-
|
|
127
|
-
${(0, doc_structure_1.section)('Analyzer Internals', 2)}
|
|
128
|
-
|
|
129
|
-
`;
|
|
130
|
-
}
|
|
131
|
-
/** if we run this script, we want a Markdown representation of the capabilities */
|
|
132
|
-
if (require.main === module) {
|
|
133
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
134
|
-
const shell = new shell_1.RShell();
|
|
135
|
-
void getText(shell).then(str => {
|
|
136
|
-
console.log(str);
|
|
137
|
-
}).finally(() => {
|
|
138
|
-
shell.close();
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=print-analyzer-wiki.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const log_1 = require("../../test/functionality/_helper/log");
|
|
4
|
-
const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
|
|
5
|
-
const faqs_1 = require("./data/faq/faqs");
|
|
6
|
-
function print() {
|
|
7
|
-
const faqs = (0, faqs_1.registerFaqs)();
|
|
8
|
-
return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'frequently asked questions' })}
|
|
9
|
-
|
|
10
|
-
${faqs.toMarkdown()}
|
|
11
|
-
|
|
12
|
-
`.trim();
|
|
13
|
-
}
|
|
14
|
-
if (require.main === module) {
|
|
15
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
16
|
-
console.log(print());
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=print-faq-wiki.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|