@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
package/dataflow/processor.d.ts
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { ControlDependency, DataflowInformation } from './info';
|
|
5
5
|
import type { NormalizedAst, ParentInformation, RNodeWithParent } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
6
|
-
import type {
|
|
7
|
-
import type { RParseRequest } from '../r-bridge/retriever';
|
|
6
|
+
import type { REnvironmentInformation } from './environments/environment';
|
|
8
7
|
import type { RNode } from '../r-bridge/lang-4.x/ast/model/model';
|
|
9
8
|
import type { KnownParserType, Parser } from '../r-bridge/parser';
|
|
10
|
-
import type {
|
|
9
|
+
import type { FlowrAnalyzerContext } from '../project/context/flowr-analyzer-context';
|
|
11
10
|
export interface DataflowProcessorInformation<OtherInfo> {
|
|
12
11
|
readonly parser: Parser<KnownParserType>;
|
|
13
12
|
/**
|
|
@@ -24,26 +23,18 @@ export interface DataflowProcessorInformation<OtherInfo> {
|
|
|
24
23
|
*/
|
|
25
24
|
readonly processors: DataflowProcessors<OtherInfo>;
|
|
26
25
|
/**
|
|
27
|
-
* The
|
|
26
|
+
* The chain of file paths that lead to this inclusion.
|
|
27
|
+
* The most recent (last) entry is expected to always be the current one.
|
|
28
28
|
*/
|
|
29
|
-
readonly
|
|
30
|
-
/**
|
|
31
|
-
* The chain of {@link RParseRequests} that lead to the {@link currentRequest}.
|
|
32
|
-
* The most recent (last) entry is expected to always be the {@link currentRequest}.
|
|
33
|
-
*/
|
|
34
|
-
readonly referenceChain: RParseRequest[];
|
|
29
|
+
readonly referenceChain: (string | undefined)[];
|
|
35
30
|
/**
|
|
36
31
|
* The chain of control-flow {@link NodeId}s that lead to the current node (e.g., of known ifs).
|
|
37
32
|
*/
|
|
38
33
|
readonly controlDependencies: ControlDependency[] | undefined;
|
|
39
34
|
/**
|
|
40
|
-
* The
|
|
41
|
-
*/
|
|
42
|
-
readonly builtInEnvironment: IEnvironment;
|
|
43
|
-
/**
|
|
44
|
-
* The flowr configuration used for environment seeding, and precision control
|
|
35
|
+
* The flowr context used for environment seeding, files, and precision control, ...
|
|
45
36
|
*/
|
|
46
|
-
readonly
|
|
37
|
+
readonly ctx: FlowrAnalyzerContext;
|
|
47
38
|
}
|
|
48
39
|
export type DataflowProcessor<OtherInfo, NodeType extends RNodeWithParent<OtherInfo>> = (node: NodeType, data: DataflowProcessorInformation<OtherInfo>) => DataflowInformation;
|
|
49
40
|
type NodeWithKey<OtherInfo, Key> = RNode<OtherInfo & ParentInformation> & {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RShell } from '../../../r-bridge/shell';
|
|
2
1
|
import { VertexType } from '../../../dataflow/graph/vertex';
|
|
3
2
|
import { EdgeType } from '../../../dataflow/graph/edge';
|
|
4
3
|
import type { DataflowGraph } from '../../../dataflow/graph/graph';
|
|
@@ -9,7 +8,6 @@ export interface SubExplanationParameters {
|
|
|
9
8
|
readonly expectedSubgraph: DataflowGraph;
|
|
10
9
|
}
|
|
11
10
|
export interface ExplanationParameters {
|
|
12
|
-
readonly shell: RShell;
|
|
13
11
|
readonly name: string;
|
|
14
12
|
readonly type: VertexType | EdgeType;
|
|
15
13
|
readonly description: string;
|
|
@@ -4,6 +4,7 @@ exports.registerFaqs = registerFaqs;
|
|
|
4
4
|
const wiki_faq_store_1 = require("./wiki-faq-store");
|
|
5
5
|
const doc_files_1 = require("../../doc-util/doc-files");
|
|
6
6
|
const doc_code_1 = require("../../doc-util/doc-code");
|
|
7
|
+
const recommended_configs_1 = require("./recommended-configs");
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
*/
|
|
@@ -11,12 +12,12 @@ function registerFaqs() {
|
|
|
11
12
|
const wikiFaq = new wiki_faq_store_1.FaqStore();
|
|
12
13
|
wikiFaq.withTopic('flowr.development')
|
|
13
14
|
.addFaq('What are *test labels*?', `
|
|
14
|
-
Tests are labeled based on the *flowR* capabilities that they test for.
|
|
15
|
-
The list of supported capabilities can be found on the [Capabilities](${doc_files_1.FlowrWikiBaseRef}/Capabilities) wiki page.
|
|
15
|
+
Tests are labeled based on the *flowR* capabilities that they test for.
|
|
16
|
+
The list of supported capabilities can be found on the [Capabilities](${doc_files_1.FlowrWikiBaseRef}/Capabilities) wiki page.
|
|
16
17
|
For more extensive information on test labels, see the [test labels wiki section](${doc_files_1.FlowrWikiBaseRef}/Linting-and-Testing#test-labels).
|
|
17
18
|
`)
|
|
18
19
|
.addFaq('How to get a REPL with debug-info/*hot-reload*?', `
|
|
19
|
-
To enter the development repl, execute \`npm run main-dev\` in contrast to \`npm run flowr\`
|
|
20
|
+
To enter the development repl, execute \`npm run main-dev\` in contrast to \`npm run flowr\`
|
|
20
21
|
this will use an unminified build (keeping debug info) and also watches the source files for changes.
|
|
21
22
|
In case of a change, this mode automatically recompiles.
|
|
22
23
|
Please note, that this may have negative performance implications (so do not use this for e.g., benchmarking).
|
|
@@ -29,14 +30,16 @@ There are several ways to generate mermaid diagrams based on the input data that
|
|
|
29
30
|
`)
|
|
30
31
|
.addFaq('How to create *new wiki* pages?', `
|
|
31
32
|
To create an automatically generated wiki page, you can follow these steps:
|
|
32
|
-
- Create a new file in \`src/documentation\` with a name like \`
|
|
33
|
-
-
|
|
34
|
-
- Add the wiki generation script to the \`broken-links-and-wiki.yml\` GitHub workflow file to enable automatic generation through the CI. You can copy one of the existing ones of the form \`update_page wiki/"My page" wiki:my-page\`.
|
|
33
|
+
- Create a new file in \`src/documentation\` with a name like \`wiki-thename.ts\`.
|
|
34
|
+
- Register your new wiki page in the \`src/cli/wiki.ts\` file to have it executed by the wiki generation tool.
|
|
35
35
|
|
|
36
36
|
You can test your page by piping the wiki generation script to a file. For example, you can run the following command:
|
|
37
|
-
${(0, doc_code_1.codeBlock)('shell', 'npm run
|
|
37
|
+
${(0, doc_code_1.codeBlock)('shell', 'npm run wiki')}
|
|
38
|
+
Alternatively use the following to generate a specific wiki page:
|
|
39
|
+
${(0, doc_code_1.codeBlock)('shell', 'npm run wiki -- --filter=Dataflow')}
|
|
40
|
+
Or, activate the watch mode to automatically regenerate the wiki on changes:
|
|
41
|
+
${(0, doc_code_1.codeBlock)('shell', 'npm run wiki:watch')}
|
|
38
42
|
|
|
39
|
-
Remember not to commit this file, as it's only meant for testing.
|
|
40
43
|
`)
|
|
41
44
|
.addFaq('Why can\'t I pass *arguments* when running flowR *with npm*?', `
|
|
42
45
|
With \`npm\` you have to pass arguments in a specific way. The \`--\` operator is used to separate the \`npm\` arguments from the script arguments. For example, if you want to run \`flowR\` with the \`--help\` argument, you can use the following command:
|
|
@@ -48,31 +51,37 @@ Check out the [Logging Section in the Linting and Testing wiki page](${doc_files
|
|
|
48
51
|
wikiFaq.withTopic('flowr.use')
|
|
49
52
|
.addFaq('How to *query* an R project?', `
|
|
50
53
|
For this you can use flowR's [Query API](${doc_files_1.FlowrWikiBaseRef}/Query-API).
|
|
51
|
-
If you want to create your own project using flowR as a library, check out the
|
|
54
|
+
If you want to create your own project using flowR as a library, check out the
|
|
52
55
|
[${doc_files_1.FlowrGithubGroupName}/sample-analyzer-project-query](${doc_files_1.FlowrGithubBaseRef}/sample-analyzer-project-query) repository for an example project setup.
|
|
53
56
|
`);
|
|
54
57
|
wikiFaq.withTopic('r.packages')
|
|
55
58
|
.addFaq('What is the R *prelude* and R *base* package?', `
|
|
56
|
-
The base package contains lots of base functions like \`source\` for example.
|
|
59
|
+
The base package contains lots of base functions like \`source\` for example.
|
|
57
60
|
The R prelude includes the base package along with several other packages.
|
|
58
|
-
Packages that were loaded by the prelude can be called without prefixing the
|
|
59
|
-
function call with the package name and the \`::\` operator.
|
|
61
|
+
Packages that were loaded by the prelude can be called without prefixing the
|
|
62
|
+
function call with the package name and the \`::\` operator.
|
|
60
63
|
|
|
61
|
-
The packages loaded by the R prelude can be seen in the \`attached base packages\`
|
|
64
|
+
The packages loaded by the R prelude can be seen in the \`attached base packages\`
|
|
62
65
|
sections in the output of \`sessionInfo()\`.
|
|
63
66
|
`)
|
|
64
67
|
.addFaq('How to get *documentation* for a function or package?', `
|
|
65
|
-
There are a couple of ways to get documentation for a function or package.
|
|
68
|
+
There are a couple of ways to get documentation for a function or package.
|
|
66
69
|
|
|
67
|
-
🖥️ Firstly, if you have already installed the package the function originated from you can simply run \`?<package name>::<function name>\` in an R session to print the
|
|
68
|
-
relevant documentation. If you don't know the origin of the package, you can use
|
|
69
|
-
\`??<function name>\` in an R shell to fuzzy find all documentations containing
|
|
70
|
-
\`<function name>\` or something similar.
|
|
70
|
+
🖥️ Firstly, if you have already installed the package the function originated from you can simply run \`?<package name>::<function name>\` in an R session to print the
|
|
71
|
+
relevant documentation. If you don't know the origin of the package, you can use
|
|
72
|
+
\`??<function name>\` in an R shell to fuzzy find all documentations containing
|
|
73
|
+
\`<function name>\` or something similar.
|
|
71
74
|
|
|
72
75
|
🌐 Secondly, if you don't have or don't want to install the package you can simply google the fully qualified name of the function. Good sources include [rdrr.io](https://rdrr.io/)
|
|
73
76
|
or [rdocumentation.org](https://rdocumentation.org/). Additionally, the package documentation PDF can also
|
|
74
77
|
be downloaded directly from [cran](https://cran.r-project.org/).
|
|
75
78
|
`);
|
|
79
|
+
wikiFaq.withTopic('editor.configs')
|
|
80
|
+
.addFaq('How can I make eslint and ZED work together?', `Use this project config (\`.zed/settings.json\`) to disable all formatters except eslint:
|
|
81
|
+
${(0, doc_code_1.codeBlock)('json', JSON.stringify(recommended_configs_1.recommendedZedConfig, null, 2))}`);
|
|
82
|
+
wikiFaq.withTopic('editor.configs')
|
|
83
|
+
.addFaq('How can I launch the flowr repl form vs code?', `You can use the following launch task (\`.vscode/launch.json\`):
|
|
84
|
+
${(0, doc_code_1.codeBlock)('json', JSON.stringify(recommended_configs_1.recommendedVsCodeTask, null, 2))}`);
|
|
76
85
|
return wikiFaq;
|
|
77
86
|
}
|
|
78
87
|
//# sourceMappingURL=faqs.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const recommendedZedConfig: {
|
|
2
|
+
languages: {
|
|
3
|
+
TypeScript: {
|
|
4
|
+
formatter: never[];
|
|
5
|
+
prettier: {
|
|
6
|
+
allowed: boolean;
|
|
7
|
+
};
|
|
8
|
+
code_actions_on_format: {
|
|
9
|
+
'source.fixAll.eslint': boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
hard_tabs: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const recommendedVsCodeTask: {
|
|
16
|
+
version: string;
|
|
17
|
+
configurations: ({
|
|
18
|
+
type: string;
|
|
19
|
+
request: string;
|
|
20
|
+
name: string;
|
|
21
|
+
skipFiles: string[];
|
|
22
|
+
program: string;
|
|
23
|
+
preLaunchTask: string;
|
|
24
|
+
console: string;
|
|
25
|
+
port?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
type: string;
|
|
28
|
+
request: string;
|
|
29
|
+
name: string;
|
|
30
|
+
port: number;
|
|
31
|
+
skipFiles?: undefined;
|
|
32
|
+
program?: undefined;
|
|
33
|
+
preLaunchTask?: undefined;
|
|
34
|
+
console?: undefined;
|
|
35
|
+
})[];
|
|
36
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recommendedVsCodeTask = exports.recommendedZedConfig = void 0;
|
|
4
|
+
exports.recommendedZedConfig = {
|
|
5
|
+
'languages': {
|
|
6
|
+
'TypeScript': {
|
|
7
|
+
'formatter': [],
|
|
8
|
+
'prettier': {
|
|
9
|
+
'allowed': false
|
|
10
|
+
},
|
|
11
|
+
'code_actions_on_format': {
|
|
12
|
+
'source.fixAll.eslint': true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
'hard_tabs': true
|
|
17
|
+
};
|
|
18
|
+
exports.recommendedVsCodeTask = {
|
|
19
|
+
'version': '0.2.0',
|
|
20
|
+
'configurations': [
|
|
21
|
+
{
|
|
22
|
+
'type': 'node',
|
|
23
|
+
'request': 'launch',
|
|
24
|
+
'name': 'Launch Program',
|
|
25
|
+
'skipFiles': [
|
|
26
|
+
'node_modules/**'
|
|
27
|
+
],
|
|
28
|
+
'program': '${workspaceFolder}/src/cli/flowr.ts',
|
|
29
|
+
'preLaunchTask': 'npm: build-dev',
|
|
30
|
+
'console': 'integratedTerminal',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
'type': 'node',
|
|
34
|
+
'request': 'attach',
|
|
35
|
+
'name': 'Attach to Process',
|
|
36
|
+
'port': 9229
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=recommended-configs.js.map
|
|
@@ -2,6 +2,7 @@ declare const FlowrFaqTopics: {
|
|
|
2
2
|
readonly 'flowr.use': "✨ Using <i>flowR</i>";
|
|
3
3
|
readonly 'flowr.development': "🧑💻 <i>flowR</i> Development";
|
|
4
4
|
readonly 'r.packages': "📦 R Packages";
|
|
5
|
+
readonly 'editor.configs': "⚙️ Recommended Editor Configs";
|
|
5
6
|
};
|
|
6
7
|
type Topic = keyof typeof FlowrFaqTopics;
|
|
7
8
|
/**
|
|
@@ -7,7 +7,8 @@ const assert_1 = require("../../../util/assert");
|
|
|
7
7
|
const FlowrFaqTopics = {
|
|
8
8
|
'flowr.use': '✨ Using <i>flowR</i>',
|
|
9
9
|
'flowr.development': '🧑💻 <i>flowR</i> Development',
|
|
10
|
-
'r.packages': '📦 R Packages'
|
|
10
|
+
'r.packages': '📦 R Packages',
|
|
11
|
+
'editor.configs': '⚙️ Recommended Editor Configs'
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* Manage all questions and answers by topic.
|
|
@@ -55,6 +56,9 @@ ${(0, doc_structure_1.collapsibleToc)({
|
|
|
55
56
|
},
|
|
56
57
|
['🇷 R FAQ']: {
|
|
57
58
|
[FlowrFaqTopics['r.packages']]: {}
|
|
59
|
+
},
|
|
60
|
+
['💻 Editor FAQ']: {
|
|
61
|
+
[FlowrFaqTopics['editor.configs']]: {}
|
|
58
62
|
}
|
|
59
63
|
})}
|
|
60
64
|
|
|
@@ -64,7 +68,11 @@ ${this.printAllTopics(/^flowr.*$/)}
|
|
|
64
68
|
|
|
65
69
|
${(0, doc_structure_1.section)('🇷 R FAQ', 2)}
|
|
66
70
|
|
|
67
|
-
${this.printAllTopics(/^r.*$/)}
|
|
71
|
+
${this.printAllTopics(/^r.*$/)}
|
|
72
|
+
|
|
73
|
+
${(0, doc_structure_1.section)('💻 Editor FAQ', 2)}
|
|
74
|
+
|
|
75
|
+
${this.printAllTopics(/^editor.*$/)}
|
|
68
76
|
`;
|
|
69
77
|
}
|
|
70
78
|
}
|
|
@@ -84,7 +84,7 @@ ${await (0, doc_server_message_1.documentServerMessageResponse)({
|
|
|
84
84
|
messages: [
|
|
85
85
|
{
|
|
86
86
|
type: 'request',
|
|
87
|
-
description: `Let' suppose you simply want to analyze the following script:\n ${(0, doc_code_1.codeBlock)('r', 'x <- 1\nx + 1')}\n For this, you can send the following request:`,
|
|
87
|
+
description: `Let's suppose you simply want to analyze the following script:\n ${(0, doc_code_1.codeBlock)('r', 'x <- 1\nx + 1')}\n For this, you can send the following request:`,
|
|
88
88
|
message: {
|
|
89
89
|
type: 'request-file-analysis',
|
|
90
90
|
id: '1',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DocMakerArgs } from './wiki-mk/doc-maker';
|
|
2
|
+
import { DocMaker } from './wiki-mk/doc-maker';
|
|
3
|
+
/**
|
|
4
|
+
* https://github.com/flowr-analysis/flowr/wiki/Capabilities
|
|
5
|
+
*/
|
|
6
|
+
export declare class DocCapabilities extends DocMaker {
|
|
7
|
+
constructor();
|
|
8
|
+
protected text({ treeSitter }: DocMakerArgs): Promise<string>;
|
|
9
|
+
}
|
|
@@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DocCapabilities = void 0;
|
|
6
7
|
const data_1 = require("../r-bridge/data/data");
|
|
7
|
-
const log_1 = require("../../test/functionality/_helper/log");
|
|
8
|
-
const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
|
|
9
8
|
const strings_1 = require("../util/text/strings");
|
|
10
9
|
const doc_general_1 = require("./doc-util/doc-general");
|
|
11
|
-
const tree_sitter_executor_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
|
|
12
10
|
const fs_1 = __importDefault(require("fs"));
|
|
13
11
|
const doc_structure_1 = require("./doc-util/doc-structure");
|
|
12
|
+
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
14
13
|
const detailedInfoFile = 'coverage/flowr-test-details.json';
|
|
15
14
|
function obtainDetailedInfos() {
|
|
16
15
|
if (!fs_1.default.existsSync(detailedInfoFile)) {
|
|
@@ -130,8 +129,7 @@ async function printAsMarkdown(info, capabilities, depth = 0, lines = []) {
|
|
|
130
129
|
return lines.join('\n');
|
|
131
130
|
}
|
|
132
131
|
function getPreamble() {
|
|
133
|
-
return
|
|
134
|
-
|
|
132
|
+
return `
|
|
135
133
|
Each capability has an id that can be used to link to it (use the link symbol to get a direct link to the capability).
|
|
136
134
|
The internal id is also mentioned in the capability description. This id can be used to reference the capability in a labeled test within flowR.
|
|
137
135
|
Besides, we use colored bullets like this:
|
|
@@ -154,21 +152,20 @@ Please prefer using a statement like "flowR has only partial support for feature
|
|
|
154
152
|
})}
|
|
155
153
|
`;
|
|
156
154
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
/**
|
|
156
|
+
* https://github.com/flowr-analysis/flowr/wiki/Capabilities
|
|
157
|
+
*/
|
|
158
|
+
class DocCapabilities extends doc_maker_1.DocMaker {
|
|
159
|
+
constructor() {
|
|
160
|
+
super('wiki/Capabilities.md', module.filename, 'flowR capabilities overview');
|
|
161
|
+
}
|
|
162
|
+
async text({ treeSitter }) {
|
|
163
|
+
/* check if the detailed test data is available */
|
|
164
|
+
if (!fs_1.default.existsSync(detailedInfoFile)) {
|
|
165
|
+
console.warn('\x1b[31mNo detailed test data available. Run the full tests (npm run test-full) to generate it.\x1b[m');
|
|
166
|
+
}
|
|
167
|
+
return getPreamble() + await printAsMarkdown({ parser: treeSitter, info: obtainDetailedInfos() }, data_1.flowrCapabilities.capabilities);
|
|
161
168
|
}
|
|
162
|
-
return getPreamble() + await printAsMarkdown({ parser, info: obtainDetailedInfos() }, data_1.flowrCapabilities.capabilities);
|
|
163
|
-
}
|
|
164
|
-
/** if we run this script, we want a Markdown representation of the capabilities */
|
|
165
|
-
if (require.main === module) {
|
|
166
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
167
|
-
void tree_sitter_executor_1.TreeSitterExecutor.initTreeSitter().then(() => {
|
|
168
|
-
const parser = new tree_sitter_executor_1.TreeSitterExecutor();
|
|
169
|
-
void print(parser).then(str => {
|
|
170
|
-
console.log(str);
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
169
|
}
|
|
174
|
-
|
|
170
|
+
exports.DocCapabilities = DocCapabilities;
|
|
171
|
+
//# sourceMappingURL=doc-capabilities.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DocMakerArgs } from './wiki-mk/doc-maker';
|
|
2
|
+
import { DocMaker } from './wiki-mk/doc-maker';
|
|
3
|
+
/**
|
|
4
|
+
* https://github.com/flowr-analysis/flowr/blob/main/README.md
|
|
5
|
+
*/
|
|
6
|
+
export declare class DocReadme extends DocMaker {
|
|
7
|
+
constructor();
|
|
8
|
+
text({ treeSitter }: DocMakerArgs): Promise<string>;
|
|
9
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const log_1 = require("../../test/functionality/_helper/log");
|
|
5
|
-
const tree_sitter_executor_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
|
|
3
|
+
exports.DocReadme = void 0;
|
|
6
4
|
const doc_files_1 = require("./doc-util/doc-files");
|
|
7
5
|
const doc_code_1 = require("./doc-util/doc-code");
|
|
8
6
|
const doc_cli_option_1 = require("./doc-util/doc-cli-option");
|
|
@@ -17,6 +15,7 @@ const doc_dfg_1 = require("./doc-util/doc-dfg");
|
|
|
17
15
|
const doc_query_1 = require("./doc-util/doc-query");
|
|
18
16
|
const doc_issue_1 = require("./doc-util/doc-issue");
|
|
19
17
|
const strings_1 = require("../util/text/strings");
|
|
18
|
+
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
20
19
|
const PublicationsMain = [
|
|
21
20
|
{
|
|
22
21
|
header: 'Statically Analyzing the Dataflow of R Programs (OOPSLA \'25)',
|
|
@@ -113,9 +112,16 @@ ${(0, doc_general_1.prefixLines)((0, doc_code_1.codeBlock)('bibtex', pub.bibtex)
|
|
|
113
112
|
}).join('\n\n') + '\n\n Works using flowR include:\n' +
|
|
114
113
|
(0, strings_1.joinWithLast)(OtherWorksUsingFlowr.map(pub => `[${pub.name}](${pub.doi})`)) + '.\n';
|
|
115
114
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
/**
|
|
116
|
+
* https://github.com/flowr-analysis/flowr/blob/main/README.md
|
|
117
|
+
*/
|
|
118
|
+
class DocReadme extends doc_maker_1.DocMaker {
|
|
119
|
+
constructor() {
|
|
120
|
+
super('README.md', module.filename, 'flowR README', false);
|
|
121
|
+
}
|
|
122
|
+
async text({ treeSitter }) {
|
|
123
|
+
const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
|
|
124
|
+
return `
|
|
119
125
|
[](${doc_files_1.FlowrGithubBaseRef}/flowr/wiki)\\
|
|
120
126
|
[](${doc_files_1.FlowrGithubBaseRef}/flowr/actions/workflows/qa.yaml)
|
|
121
127
|
[](https://codecov.io/gh/flowr-analysis/flowr)
|
|
@@ -136,18 +142,18 @@ It offers a wide variety of features, for example:
|
|
|
136
142
|
${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Linting code with flowR', `To lint your code, you can use the [REPL](${doc_files_1.FlowrWikiBaseRef}/Interface#using-the-repl) or the [Visual Studio Code extension](${doc_files_1.FlowrVsCode}) (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
|
|
137
143
|
|
|
138
144
|
${await (async () => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
const code = 'read.csv("/root/x.txt")';
|
|
146
|
+
const res = await (0, doc_query_1.showQuery)(treeSitter, code, [{ type: 'linter' }], { showCode: false, collapseQuery: true, collapseResult: false });
|
|
147
|
+
return await (0, doc_repl_1.documentReplSession)(treeSitter, [{
|
|
148
|
+
command: `:query @linter ${JSON.stringify(code)}`,
|
|
149
|
+
description: `
|
|
144
150
|
The linter will analyze the code and return any issues found.
|
|
145
151
|
Formatted more nicely, this returns:
|
|
146
152
|
|
|
147
153
|
${res}
|
|
148
154
|
`
|
|
149
|
-
|
|
150
|
-
|
|
155
|
+
}]);
|
|
156
|
+
})()}
|
|
151
157
|
|
|
152
158
|
`), ' ')}
|
|
153
159
|
|
|
@@ -169,10 +175,10 @@ ${(0, doc_code_1.codeBlock)('r', (0, doc_files_1.getFileContentFromRoot)('test/t
|
|
|
169
175
|
Let's suppose we are interested only in the \`sum\` which is printed in line 11.
|
|
170
176
|
To get a slice for this, you can use the following command:
|
|
171
177
|
|
|
172
|
-
${await (0, doc_repl_1.documentReplSession)(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
${await (0, doc_repl_1.documentReplSession)(treeSitter, [{
|
|
179
|
+
command: ':query @static-slice (11@sum) file://test/testfiles/example.R',
|
|
180
|
+
description: ''
|
|
181
|
+
}])}
|
|
176
182
|
|
|
177
183
|
`), ' ')}
|
|
178
184
|
|
|
@@ -203,12 +209,12 @@ ${(0, doc_code_1.codeBlock)('r', (0, doc_files_1.getFileContentFromRoot)('test/t
|
|
|
203
209
|
|
|
204
210
|
To get the dataflow graph for this script, you can use the following command:
|
|
205
211
|
|
|
206
|
-
${await (0, doc_repl_1.documentReplSession)(
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
${await (0, doc_repl_1.documentReplSession)(treeSitter, [{
|
|
213
|
+
command: ':dataflow* test/testfiles/example.R',
|
|
214
|
+
description: `
|
|
209
215
|
Following the link output should show the following:
|
|
210
|
-
${await (0, doc_dfg_1.printDfGraphForCode)(
|
|
211
|
-
|
|
216
|
+
${await (0, doc_dfg_1.printDfGraphForCode)(treeSitter, (0, doc_files_1.getFileContentFromRoot)('test/testfiles/example.R'), { showCode: false })}`
|
|
217
|
+
}])}
|
|
212
218
|
|
|
213
219
|
`), ' ')}
|
|
214
220
|
|
|
@@ -285,17 +291,7 @@ If you want to make changes please edit the source file (the CI will take care o
|
|
|
285
291
|
In fact, many files in the [wiki](${doc_files_1.FlowrWikiBaseRef}) are generated, so make sure to check for the source file if you want to make changes.
|
|
286
292
|
|
|
287
293
|
`.trim();
|
|
294
|
+
}
|
|
288
295
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
void tree_sitter_executor_1.TreeSitterExecutor.initTreeSitter().then(() => {
|
|
292
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
293
|
-
const shell = new shell_1.RShell();
|
|
294
|
-
void getText(shell).then(str => {
|
|
295
|
-
console.log(str);
|
|
296
|
-
}).finally(() => {
|
|
297
|
-
shell.close();
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
//# sourceMappingURL=print-readme.js.map
|
|
296
|
+
exports.DocReadme = DocReadme;
|
|
297
|
+
//# sourceMappingURL=doc-readme.js.map
|
|
@@ -17,19 +17,21 @@ interface BenchmarkElementBench {
|
|
|
17
17
|
readonly extra: string;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Loads the benchmark data from the predefined path.
|
|
21
|
+
* This is the location which is used by the CI to store benchmark results.
|
|
21
22
|
*/
|
|
22
23
|
export declare function loadBenchmarkData(): Promise<BenchmarkData>;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* Returns the latest benchmark for the given suite.
|
|
25
26
|
*/
|
|
26
27
|
export declare function getLatestBenchmark(suite: string): Promise<BenchmarkElement>;
|
|
27
28
|
/**
|
|
28
|
-
*
|
|
29
|
+
* Returns the timestamp of the last benchmark update.
|
|
30
|
+
* We can use this to find out when the last (recorded) benchmark run was.
|
|
29
31
|
*/
|
|
30
32
|
export declare function getLastBenchmarkUpdate(): Promise<number>;
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
34
|
+
* Get the total time taken for dataflow analysis in the given suite.
|
|
33
35
|
*/
|
|
34
36
|
export declare function getLatestDfAnalysisTime(suite: string): Promise<number>;
|
|
35
37
|
export {};
|
|
@@ -45,7 +45,8 @@ const assert_1 = require("../../util/assert");
|
|
|
45
45
|
const BenchmarkDataPath = path_1.default.resolve(__dirname, '..', '..', '..', 'wiki', 'stats', 'benchmark', 'data.js');
|
|
46
46
|
let benchmarkData = null;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Loads the benchmark data from the predefined path.
|
|
49
|
+
* This is the location which is used by the CI to store benchmark results.
|
|
49
50
|
*/
|
|
50
51
|
async function loadBenchmarkData() {
|
|
51
52
|
if (benchmarkData === null) {
|
|
@@ -58,7 +59,7 @@ async function loadBenchmarkData() {
|
|
|
58
59
|
return benchmarkData;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
*
|
|
62
|
+
* Returns the latest benchmark for the given suite.
|
|
62
63
|
*/
|
|
63
64
|
async function getLatestBenchmark(suite) {
|
|
64
65
|
// provide a window object to attach to in the import
|
|
@@ -67,7 +68,8 @@ async function getLatestBenchmark(suite) {
|
|
|
67
68
|
return suiteData.sort((a, b) => b.date - a.date)[0];
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
*
|
|
71
|
+
* Returns the timestamp of the last benchmark update.
|
|
72
|
+
* We can use this to find out when the last (recorded) benchmark run was.
|
|
71
73
|
*/
|
|
72
74
|
async function getLastBenchmarkUpdate() {
|
|
73
75
|
return (await loadBenchmarkData()).lastUpdate;
|
|
@@ -78,7 +80,7 @@ function getBenchmarkElement(bench, name) {
|
|
|
78
80
|
return element;
|
|
79
81
|
}
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
83
|
+
* Get the total time taken for dataflow analysis in the given suite.
|
|
82
84
|
*/
|
|
83
85
|
async function getLatestDfAnalysisTime(suite) {
|
|
84
86
|
const elem = await getLatestBenchmark(suite);
|
|
@@ -5,23 +5,20 @@ exports.printCfg = printCfg;
|
|
|
5
5
|
exports.printCfgCode = printCfgCode;
|
|
6
6
|
const extract_cfg_1 = require("../../control-flow/extract-cfg");
|
|
7
7
|
const default_pipelines_1 = require("../../core/steps/pipeline/default-pipelines");
|
|
8
|
-
const retriever_1 = require("../../r-bridge/retriever");
|
|
9
8
|
const time_1 = require("../../util/text/time");
|
|
10
9
|
const doc_files_1 = require("./doc-files");
|
|
11
10
|
const cfg_1 = require("../../util/mermaid/cfg");
|
|
12
11
|
const doc_code_1 = require("./doc-code");
|
|
13
12
|
const cfg_simplification_1 = require("../../control-flow/cfg-simplification");
|
|
14
|
-
const
|
|
13
|
+
const flowr_analyzer_context_1 = require("../../project/context/flowr-analyzer-context");
|
|
15
14
|
/**
|
|
16
15
|
* Returns the control flow graph for the given code.
|
|
17
16
|
*/
|
|
18
17
|
async function getCfg(parser, code, simplifications = [], useDfg = true) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, config_1.defaultConfigOptions).allRemainingSteps();
|
|
24
|
-
const cfg = (0, extract_cfg_1.extractCfg)(result.normalize, config_1.defaultConfigOptions, useDfg ? result.dataflow.graph : undefined, [...cfg_simplification_1.DefaultCfgSimplificationOrder, ...simplifications]);
|
|
18
|
+
const context = (0, flowr_analyzer_context_1.contextFromInput)(code);
|
|
19
|
+
const result = await (useDfg ? (0, default_pipelines_1.createDataflowPipeline)(parser, { context })
|
|
20
|
+
: (0, default_pipelines_1.createNormalizePipeline)(parser, { context })).allRemainingSteps();
|
|
21
|
+
const cfg = (0, extract_cfg_1.extractCfg)(result.normalize, context, useDfg ? result.dataflow.graph : undefined, [...cfg_simplification_1.DefaultCfgSimplificationOrder, ...simplifications]);
|
|
25
22
|
return {
|
|
26
23
|
info: cfg,
|
|
27
24
|
ast: result.normalize,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { DataflowGraph,
|
|
2
|
-
import type { RShell } from '../../r-bridge/shell';
|
|
1
|
+
import type { DataflowGraph, UnknownSideEffect } from '../../dataflow/graph/graph';
|
|
3
2
|
import { type MermaidMarkdownMark } from '../../util/mermaid/dfg';
|
|
4
|
-
import { DEFAULT_DATAFLOW_PIPELINE } from '../../core/steps/pipeline/default-pipelines';
|
|
3
|
+
import type { DEFAULT_DATAFLOW_PIPELINE } from '../../core/steps/pipeline/default-pipelines';
|
|
5
4
|
import type { PipelineOutput } from '../../core/steps/pipeline/pipeline';
|
|
6
5
|
import type { KnownParser } from '../../r-bridge/parser';
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
|
|
8
|
+
* Please use this only for documentation purposes, for programmatic usage use {@link graphToMermaid} directly.
|
|
9
9
|
*/
|
|
10
10
|
export declare function printDfGraph(graph: DataflowGraph, mark?: ReadonlySet<MermaidMarkdownMark>, simplified?: boolean): string;
|
|
11
11
|
export interface PrintDataflowGraphOptions {
|
|
@@ -17,9 +17,9 @@ export interface PrintDataflowGraphOptions {
|
|
|
17
17
|
readonly simplified?: boolean;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Visualizes a side effect for documentation purposes.
|
|
21
21
|
*/
|
|
22
|
-
export declare function formatSideEffect(ef:
|
|
22
|
+
export declare function formatSideEffect(ef: UnknownSideEffect): string;
|
|
23
23
|
export declare function printDfGraphForCode(parser: KnownParser, code: string, options: PrintDataflowGraphOptions & {
|
|
24
24
|
exposeResult: true;
|
|
25
25
|
}): Promise<[string, PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>]>;
|
|
@@ -27,4 +27,4 @@ export declare function printDfGraphForCode(parser: KnownParser, code: string, o
|
|
|
27
27
|
exposeResult?: false | undefined;
|
|
28
28
|
}): Promise<string>;
|
|
29
29
|
/** returns resolved expected df graph */
|
|
30
|
-
export declare function verifyExpectedSubgraph(
|
|
30
|
+
export declare function verifyExpectedSubgraph(parser: KnownParser, code: string, expectedSubgraph: DataflowGraph): Promise<DataflowGraph>;
|