@eagleoutice/flowr 2.6.2 → 2.6.3
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.js +3 -3
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +20 -16
- package/abstract-interpretation/data-frame/semantics.js +8 -0
- package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
- package/abstract-interpretation/data-frame/shape-inference.js +3 -3
- package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
- package/benchmark/slicer.d.ts +1 -0
- package/benchmark/slicer.js +13 -12
- package/benchmark/summarizer/first-phase/process.js +1 -1
- package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
- package/benchmark/summarizer/second-phase/graph.js +3 -1
- 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 +13 -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 +14 -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 +1 -2
- package/core/steps/all/static-slicing/00-slice.js +1 -1
- 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 +55 -56
- package/core/steps/pipeline/default-pipelines.js +8 -8
- package/dataflow/environments/clone.d.ts +0 -1
- package/dataflow/environments/clone.js +12 -2
- package/dataflow/environments/diff.js +2 -2
- package/dataflow/environments/overwrite.d.ts +1 -5
- package/dataflow/environments/overwrite.js +3 -19
- package/dataflow/environments/scoping.d.ts +6 -2
- package/dataflow/environments/scoping.js +6 -2
- package/dataflow/eval/resolve/resolve-argument.js +2 -2
- 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 -22
- package/dataflow/graph/graph.d.ts +3 -9
- package/dataflow/graph/graph.js +0 -13
- package/dataflow/graph/unknown-replacement.d.ts +4 -2
- package/dataflow/graph/unknown-replacement.js +4 -2
- package/dataflow/info.d.ts +7 -0
- package/dataflow/info.js +21 -0
- package/dataflow/internal/linker.js +7 -4
- 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/built-in/built-in-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +6 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +1 -1
- 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 +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.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 +3 -3
- 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 +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -2
- 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 +1 -1
- package/dataflow/internal/process/functions/call/common.d.ts +1 -1
- package/dataflow/internal/process/functions/call/common.js +4 -4
- 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 +3 -3
- package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
- package/dataflow/internal/process/functions/process-parameter.js +4 -4
- 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 +6 -11
- 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 +13 -13
- 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 +12 -9
- 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 +108 -61
- 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 +412 -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} +142 -172
- 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 +22 -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 +133 -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 +13 -17
- package/linter/rules/absolute-path.d.ts +1 -2
- package/linter/rules/absolute-path.js +2 -2
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +12 -8
- 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 +1 -5
- 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 +3 -2
- package/linter/rules/seeded-randomness.js +33 -13
- 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 +6 -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 +30 -5
- package/project/context/flowr-analyzer-context.js +48 -4
- 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 +4 -2
- 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/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 +1 -1
- 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.js +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +2 -2
- package/queries/catalog/df-shape-query/df-shape-query-format.js +6 -5
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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/statistics/features/supported/assignments/assignments.js +1 -1
- package/statistics/features/supported/control-flow/control-flow.js +1 -1
- 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 +1 -1
- package/statistics/features/supported/variables/variables.js +1 -1
- package/statistics/statistics.js +3 -2
- package/util/assert.d.ts +4 -0
- package/util/assert.js +4 -0
- 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/version.js +1 -1
- 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
|
@@ -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/Engines
|
|
5
|
+
*/
|
|
6
|
+
export declare class WikiEngine extends DocMaker {
|
|
7
|
+
constructor();
|
|
8
|
+
text({ ctx }: DocMakerArgs): string;
|
|
9
|
+
}
|
|
@@ -1,43 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WikiEngine = void 0;
|
|
6
4
|
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
5
|
const shell_executor_1 = require("../r-bridge/shell-executor");
|
|
12
6
|
const tree_sitter_executor_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
|
|
13
7
|
const doc_files_1 = require("./doc-util/doc-files");
|
|
14
8
|
const doc_cli_option_1 = require("./doc-util/doc-cli-option");
|
|
15
9
|
const doc_structure_1 = require("./doc-util/doc-structure");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
11
|
+
/**
|
|
12
|
+
* https://github.com/flowr-analysis/flowr/wiki/Engines
|
|
13
|
+
*/
|
|
14
|
+
class WikiEngine extends doc_maker_1.DocMaker {
|
|
15
|
+
constructor() {
|
|
16
|
+
super('wiki/Engines.md', module.filename, 'engines');
|
|
17
|
+
}
|
|
18
|
+
text({ ctx }) {
|
|
19
|
+
return `
|
|
25
20
|
To analyze R scripts, flowR needs to parse the R code and for that, we require a parser.
|
|
26
|
-
Originally, flowR shipped with an ${
|
|
27
|
-
Later we extended this with the ${
|
|
28
|
-
However, these interfaces are relatively slow as they require communication with an underlying R interpreter.
|
|
21
|
+
Originally, flowR shipped with an ${ctx.link(shell_1.RShell)}, an asynchronous interface to the R interpreter, still available today.
|
|
22
|
+
Later we extended this with the ${ctx.link(shell_executor_1.RShellExecutor)}, the synchronous counterpart to the ${ctx.link(shell_1.RShell)}.
|
|
23
|
+
However, these interfaces are relatively slow as they require communication with an underlying R interpreter.
|
|
29
24
|
Using [tree-sitter](https://tree-sitter.github.io/tree-sitter/), with its [node bindings](https://github.com/tree-sitter/node-tree-sitter)
|
|
30
|
-
and [R grammar](https://github.com/r-lib/tree-sitter-r), we can provide the ${
|
|
25
|
+
and [R grammar](https://github.com/r-lib/tree-sitter-r), we can provide the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} which
|
|
31
26
|
is synchronous, faster, and no longer needs an R installation, but requires the appropriate bindings.
|
|
32
27
|
To allow users of R to freely choose their backend between the R interpreter and the tree-sitter parser,
|
|
33
|
-
we provide the concept of engines.
|
|
28
|
+
we provide the concept of engines.
|
|
34
29
|
|
|
35
30
|
Engines can be loaded with [flowR's configuration file](${doc_files_1.FlowrWikiBaseRef}/Interface#configuring-flowr). Additionally, they
|
|
36
31
|
are exposed with some command line options (e.g., when using the docker image of flowR):
|
|
37
32
|
|
|
38
|
-
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.r-shell.disabled', false)} to disable the ${
|
|
33
|
+
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.r-shell.disabled', false)} to disable the ${ctx.link(shell_1.RShell)} engine
|
|
39
34
|
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.r-shell.r-path', false)} (which is the canonical version of ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'r-path')})
|
|
40
|
-
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.disabled', false)} to disable the ${
|
|
35
|
+
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.disabled', false)} to disable the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} engine
|
|
41
36
|
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.lax', false)} to use lax parsing with tree-sitter
|
|
42
37
|
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.wasm-path', false)} pass the path to the wasm of the r grammar of tree-sitter (see [below](#tree-sitter))
|
|
43
38
|
- ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.tree-sitter-wasm-path', false)} pass the path to the wasm of tree-sitter (see [below](#tree-sitter))
|
|
@@ -47,36 +42,26 @@ are exposed with some command line options (e.g., when using the docker image of
|
|
|
47
42
|
## Dealing with the Tree-Sitter Engine
|
|
48
43
|
|
|
49
44
|
${(0, doc_structure_1.block)({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
type: 'WARNING',
|
|
46
|
+
content: 'As the tree-sitter engine is only for parsing, it cannot execute R code. This engine is now the default.'
|
|
47
|
+
})}
|
|
53
48
|
|
|
54
|
-
In general, there is no need for you to pass custom paths using either
|
|
49
|
+
In general, there is no need for you to pass custom paths using either
|
|
55
50
|
${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.wasm-path', false)} or
|
|
56
51
|
${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'engine.tree-sitter.tree-sitter-wasm-path', false)}.
|
|
57
52
|
However, you may want to experiment with the R grammar or provide a newer
|
|
58
|
-
one in case that of _flowR_ is outdated.
|
|
53
|
+
one in case that of _flowR_ is outdated.
|
|
59
54
|
|
|
60
55
|
To use a newer [R grammar](https://github.com/r-lib/tree-sitter-r),
|
|
61
56
|
you first must build the new wasm file. For this you have to:
|
|
62
57
|
|
|
63
58
|
1. Install the dependencies with \`npm ci\` in the tree-sitter-r repository.
|
|
64
|
-
2. Build the wasm using \`tree-sitter build --wasm .\` the [tree sitter cli](https://github.com/tree-sitter/tree-sitter)
|
|
65
|
-
which should be a dev dependency.
|
|
59
|
+
2. Build the wasm using \`tree-sitter build --wasm .\` the [tree sitter cli](https://github.com/tree-sitter/tree-sitter) which should be a dev dependency.
|
|
66
60
|
3. Pass the \`tree-sitter-r.wasm\` to flowR.
|
|
67
61
|
|
|
68
62
|
For tree-sitter, please rely on the [releases](https://github.com/tree-sitter/tree-sitter/releases).
|
|
69
|
-
|
|
70
63
|
`;
|
|
64
|
+
}
|
|
71
65
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
75
|
-
const shell = new shell_1.RShell();
|
|
76
|
-
void getText(shell).then(str => {
|
|
77
|
-
console.log(str);
|
|
78
|
-
}).finally(() => {
|
|
79
|
-
shell.close();
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=print-engines-wiki.js.map
|
|
66
|
+
exports.WikiEngine = WikiEngine;
|
|
67
|
+
//# sourceMappingURL=wiki-engine.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WikiFaq = void 0;
|
|
4
|
+
const faqs_1 = require("./data/faq/faqs");
|
|
5
|
+
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
6
|
+
/**
|
|
7
|
+
* https://github.com/flowr-analysis/flowr/wiki/FAQ
|
|
8
|
+
*/
|
|
9
|
+
class WikiFaq extends doc_maker_1.DocMaker {
|
|
10
|
+
constructor() {
|
|
11
|
+
super('wiki/FAQ.md', module.filename, 'frequently asked questions');
|
|
12
|
+
}
|
|
13
|
+
text() {
|
|
14
|
+
const faqs = (0, faqs_1.registerFaqs)();
|
|
15
|
+
return `
|
|
16
|
+
${faqs.toMarkdown()}
|
|
17
|
+
|
|
18
|
+
`.trim();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.WikiFaq = WikiFaq;
|
|
22
|
+
//# sourceMappingURL=wiki-faq.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/wiki/Interface
|
|
5
|
+
*/
|
|
6
|
+
export declare class WikiInterface extends DocMaker {
|
|
7
|
+
constructor();
|
|
8
|
+
protected text({ shell, ctx, treeSitter }: DocMakerArgs): Promise<string>;
|
|
9
|
+
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WikiInterface = void 0;
|
|
6
4
|
const shell_1 = require("../r-bridge/shell");
|
|
7
|
-
const log_1 = require("../../test/functionality/_helper/log");
|
|
8
5
|
const doc_files_1 = require("./doc-util/doc-files");
|
|
9
|
-
const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
|
|
10
6
|
const doc_cli_option_1 = require("./doc-util/doc-cli-option");
|
|
11
7
|
const doc_server_message_1 = require("./doc-util/doc-server-message");
|
|
12
8
|
const doc_data_server_messages_1 = require("./data/server/doc-data-server-messages");
|
|
@@ -22,11 +18,10 @@ const flowr_main_options_1 = require("../cli/flowr-main-options");
|
|
|
22
18
|
const doc_issue_1 = require("./doc-util/doc-issue");
|
|
23
19
|
const pipeline_executor_1 = require("../core/pipeline-executor");
|
|
24
20
|
const doc_structure_1 = require("./doc-util/doc-structure");
|
|
25
|
-
const doc_types_1 = require("./doc-util/doc-types");
|
|
26
|
-
const path_1 = __importDefault(require("path"));
|
|
27
21
|
const tree_sitter_executor_1 = require("../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
|
|
28
22
|
const flowr_analyzer_1 = require("../project/flowr-analyzer");
|
|
29
|
-
|
|
23
|
+
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
24
|
+
async function explainServer(parser) {
|
|
30
25
|
(0, doc_data_server_messages_1.documentAllServerMessages)();
|
|
31
26
|
return `
|
|
32
27
|
As explained in the [Overview](${doc_files_1.FlowrWikiBaseRef}/Overview), you can simply run the [TCP](https://de.wikipedia.org/wiki/Transmission_Control_Protocol) server by adding the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'server', true)} flag (and, due to the interactive mode, exit with the conventional <kbd>CTRL</kbd>+<kbd>C</kbd>).
|
|
@@ -43,7 +38,7 @@ connection. If you want _flowR_ to expose a [WebSocket](https://de.wikipedia.org
|
|
|
43
38
|
`
|
|
44
39
|
})}
|
|
45
40
|
|
|
46
|
-
${await (0, doc_server_message_1.printServerMessages)(
|
|
41
|
+
${await (0, doc_server_message_1.printServerMessages)(parser)}
|
|
47
42
|
|
|
48
43
|
### 📡 Ways of Connecting
|
|
49
44
|
|
|
@@ -99,23 +94,26 @@ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
|
99
94
|
|
|
100
95
|
`;
|
|
101
96
|
}
|
|
102
|
-
async function explainRepl(
|
|
97
|
+
async function explainRepl(parser) {
|
|
103
98
|
return `
|
|
104
99
|
> [!NOTE]
|
|
105
100
|
> To execute arbitrary R commands with a repl request, _flowR_ has to be started explicitly with ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'r-session-access')}.
|
|
106
101
|
> Please be aware that this introduces a security risk and note that this relies on the [\`r-shell\` engine](${doc_files_1.FlowrWikiBaseRef}/Engines).
|
|
107
102
|
|
|
108
|
-
|
|
109
103
|
Although primarily meant for users to explore,
|
|
110
104
|
there is nothing which forbids simply calling _flowR_ as a subprocess to use standard-in, -output, and -error
|
|
111
105
|
for communication (although you can access the REPL using the server as well,
|
|
112
106
|
with the [REPL Request](#message-request-repl-execution) message).
|
|
113
107
|
|
|
114
108
|
The read-eval-print loop (REPL) works relatively simple.
|
|
115
|
-
You can submit an expression (using
|
|
109
|
+
You can submit an expression (using <kbd>Enter</kbd>),
|
|
116
110
|
which is interpreted as an R expression by default but interpreted as a *command* if it starts with a colon (\`:\`).
|
|
117
111
|
The best command to get started with the REPL is ${(0, doc_cli_option_1.getReplCommand)('help')}.
|
|
118
|
-
Besides, you can leave the REPL either with the command ${(0, doc_cli_option_1.getReplCommand)('quit')} or by pressing <kbd>
|
|
112
|
+
Besides, you can leave the REPL either with the command ${(0, doc_cli_option_1.getReplCommand)('quit')} or by pressing <kbd>Ctrl</kbd>+<kbd>C</kbd> twice.
|
|
113
|
+
When writing a *command*, you may press <kbd>Tab</kbd> to get a list of completions, if available.
|
|
114
|
+
Multiple commands can be entered in a single line by separating them with a semicolon (\`;\`), e.g. \`:parse "x<-2"; :df*\`.
|
|
115
|
+
If a command is given without R code, the REPL will re-use R code given in a previous command.
|
|
116
|
+
The prior example will hence return first the parsed AST of the program and then the dataflow graph for \`"x <- 2"\`.
|
|
119
117
|
|
|
120
118
|
> [!NOTE]
|
|
121
119
|
> If you develop flowR, you may want to launch the repl using the \`npm run main-dev\` command, this way, you get a non-minified version of flowR with debug information and hot-reloading of source files.
|
|
@@ -129,15 +127,26 @@ ${(0, doc_repl_1.printReplHelpAsMarkdownTable)()}
|
|
|
129
127
|
|
|
130
128
|
</details>
|
|
131
129
|
|
|
130
|
+
${(0, doc_structure_1.block)({
|
|
131
|
+
type: 'TIP',
|
|
132
|
+
content: `
|
|
133
|
+
As indicated by the examples before, all REPL commands that operate on code keep track of the state.
|
|
134
|
+
Hence, if you run a command like ${(0, doc_cli_option_1.getReplCommand)('dataflow*')} without providing R code,
|
|
135
|
+
the REPL will re-use the R code provided in a previous command.
|
|
136
|
+
Likewise, doing this will benefit from incrementality!
|
|
137
|
+
If you request the dataflow graph with \`:df* x <- 2 * y\` and then want to see the parsed AST with \`:parse\`,
|
|
138
|
+
the REPL will re-use previously obtained information and not re-parse the code again.
|
|
139
|
+
`
|
|
140
|
+
})}
|
|
132
141
|
|
|
133
142
|
### Example: Retrieving the Dataflow Graph
|
|
134
143
|
|
|
135
144
|
To retrieve a URL to the [mermaid](https://mermaid.js.org/) diagram of the dataflow of a given expression,
|
|
136
145
|
use ${(0, doc_cli_option_1.getReplCommand)('dataflow*')} (or ${(0, doc_cli_option_1.getReplCommand)('dataflow')} to get the mermaid code in the cli):
|
|
137
146
|
|
|
138
|
-
${await (0, doc_repl_1.documentReplSession)(
|
|
147
|
+
${await (0, doc_repl_1.documentReplSession)(parser, [{
|
|
139
148
|
command: ':dataflow* y <- 1 + x',
|
|
140
|
-
description: `Retrieve the dataflow graph of the expression \`y <- 1 + x\`. It looks like this:\n${await (0, doc_dfg_1.printDfGraphForCode)(
|
|
149
|
+
description: `Retrieve the dataflow graph of the expression \`y <- 1 + x\`. It looks like this:\n${await (0, doc_dfg_1.printDfGraphForCode)(parser, 'y <- 1 + x')}`
|
|
141
150
|
}])}
|
|
142
151
|
|
|
143
152
|
For the slicing with ${(0, doc_cli_option_1.getReplCommand)('slicer')}, you have access to the same [magic comments](#slice-magic-comments) as with the [slice request](#message-request-slice).
|
|
@@ -148,7 +157,7 @@ Many commands that allow for an R-expression (like ${(0, doc_cli_option_1.getRep
|
|
|
148
157
|
if the argument starts with \`${retriever_1.fileProtocol}\`.
|
|
149
158
|
If you are working from the root directory of the _flowR_ repository, the following gives you the parsed AST of the example file using the ${(0, doc_cli_option_1.getReplCommand)('parse')} command:
|
|
150
159
|
|
|
151
|
-
${await (0, doc_repl_1.documentReplSession)(
|
|
160
|
+
${await (0, doc_repl_1.documentReplSession)(parser, [{
|
|
152
161
|
command: `:parse ${retriever_1.fileProtocol}test/testfiles/example.R`,
|
|
153
162
|
description: `Retrieve the parsed AST of the example file.
|
|
154
163
|
|
|
@@ -204,6 +213,9 @@ ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
|
|
|
204
213
|
}
|
|
205
214
|
}
|
|
206
215
|
},
|
|
216
|
+
project: {
|
|
217
|
+
resolveUnknownPathsOnDisk: true
|
|
218
|
+
},
|
|
207
219
|
engines: [{ type: 'r-shell' }],
|
|
208
220
|
solver: {
|
|
209
221
|
variables: config_1.VariableResolve.Alias,
|
|
@@ -262,43 +274,38 @@ ${(0, schema_1.describeSchema)(config_1.flowrConfigFileSchema, ansi_1.markdownFo
|
|
|
262
274
|
|
|
263
275
|
`;
|
|
264
276
|
}
|
|
265
|
-
function explainWritingCode(shell) {
|
|
266
|
-
const types = (0, doc_types_1.getTypesFromFolder)({
|
|
267
|
-
rootFolder: path_1.default.resolve('./src/'),
|
|
268
|
-
files: [path_1.default.resolve('./src/core/pipeline-executor.ts'), path_1.default.resolve('./src/core/steps/pipeline/default-pipelines.ts')],
|
|
269
|
-
inlineTypes: doc_types_1.mermaidHide
|
|
270
|
-
});
|
|
277
|
+
function explainWritingCode(shell, ctx) {
|
|
271
278
|
return `
|
|
272
279
|
_flowR_ can be used as a [module](${doc_files_1.FlowrNpmRef}) and offers several main classes and interfaces that are interesting for extension writers
|
|
273
280
|
(see the [Visual Studio Code extension](${doc_files_1.FlowrGithubBaseRef}/vscode-flowr) or the [core](${doc_files_1.FlowrWikiBaseRef}/Core) wiki page for more information).
|
|
274
281
|
|
|
275
|
-
### Using the ${
|
|
282
|
+
### Using the ${ctx.link(shell_1.RShell)} to Interact with R
|
|
276
283
|
|
|
277
|
-
The ${
|
|
278
|
-
Please have a look at [flowR's engines](${doc_files_1.FlowrWikiBaseRef}/Engines) for more information on alterantives (for example, the ${
|
|
284
|
+
The ${ctx.link(shell_1.RShell.name)} class allows interfacing with the \`R\` ecosystem installed on the host system.
|
|
285
|
+
Please have a look at [flowR's engines](${doc_files_1.FlowrWikiBaseRef}/Engines) for more information on alterantives (for example, the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)}).
|
|
279
286
|
|
|
280
287
|
${(0, doc_structure_1.block)({
|
|
281
288
|
type: 'IMPORTANT',
|
|
282
289
|
content: `
|
|
283
|
-
Each ${
|
|
284
|
-
make sure to call ${(0, doc_code_1.codeInline)(
|
|
290
|
+
Each ${ctx.link(shell_1.RShell.name)} controls a new instance of the R interpreter,
|
|
291
|
+
make sure to call ${(0, doc_code_1.codeInline)(ctx.linkM(shell_1.RShell, 'close', { codeFont: false, realNameWrapper: 'i' }) + '()')} when you are done.`
|
|
285
292
|
})}
|
|
286
293
|
|
|
287
|
-
You can start a new "session" simply by constructing a new object with ${(0, doc_code_1.codeInline)('new ' +
|
|
294
|
+
You can start a new "session" simply by constructing a new object with ${(0, doc_code_1.codeInline)('new ' + ctx.link(shell_1.RShell, { codeFont: false }) + '()')}.
|
|
288
295
|
|
|
289
296
|
However, there are several options that may be of interest
|
|
290
297
|
(e.g., to automatically revive the shell in case of errors or to control the name location of the R process on the system).
|
|
291
298
|
|
|
292
|
-
With a shell object (let's call it \`shell\`), you can execute R code by using ${
|
|
293
|
-
for example ${(0, doc_code_1.codeInline)('shell.' +
|
|
299
|
+
With a shell object (let's call it \`shell\`), you can execute R code by using ${ctx.linkM(shell_1.RShell, 'sendCommand', { realNameWrapper: 'i' })},
|
|
300
|
+
for example ${(0, doc_code_1.codeInline)('shell.' + ctx.linkM(shell_1.RShell, 'sendCommand', { codeFont: false, hideClass: true }) + '("1 + 1")')}.
|
|
294
301
|
However, this does not return anything, so if you want to collect the output of your command, use
|
|
295
|
-
${
|
|
302
|
+
${ctx.linkM(shell_1.RShell, 'sendCommandWithOutput', { realNameWrapper: 'i' })} instead.
|
|
296
303
|
|
|
297
|
-
Besides that, the command ${
|
|
304
|
+
Besides that, the command ${ctx.linkM(shell_1.RShell, 'tryToInjectHomeLibPath')} may be of interest, as it enables all libraries available on the host system.
|
|
298
305
|
|
|
299
306
|
### Creating _flowR_ analyses
|
|
300
307
|
|
|
301
|
-
Nowadays, instances of ${
|
|
308
|
+
Nowadays, instances of ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} should be used as central frontend to get analysis results from _flowR_.
|
|
302
309
|
For example, a program slice can be created like this:
|
|
303
310
|
|
|
304
311
|
${(0, doc_code_1.codeBlock)('ts', `
|
|
@@ -315,10 +322,10 @@ const result = await analyzer.query([
|
|
|
315
322
|
### The Pipeline Executor
|
|
316
323
|
|
|
317
324
|
Once, in the beginning, _flowR_ was meant to produce a dataflow graph merely to provide *program slices*.
|
|
318
|
-
However, with continuous updates, the [dataflow graph](${doc_files_1.FlowrWikiBaseRef}/Dataflow
|
|
325
|
+
However, with continuous updates, the [dataflow graph](${doc_files_1.FlowrWikiBaseRef}/Dataflow-Graph) repeatedly proves to be the more interesting part.
|
|
319
326
|
With this, we restructured _flowR_'s originally *hardcoded* pipeline to be far more flexible.
|
|
320
327
|
Now, it can be theoretically extended or replaced with arbitrary steps, optional steps, and what we call 'decorations' of these steps.
|
|
321
|
-
In short, a slicing pipeline using the ${
|
|
328
|
+
In short, a slicing pipeline using the ${ctx.link(pipeline_executor_1.PipelineExecutor)} looks like this:
|
|
322
329
|
|
|
323
330
|
${(0, doc_code_1.codeBlock)('ts', `
|
|
324
331
|
const slicer = new ${pipeline_executor_1.PipelineExecutor.name}(DEFAULT_SLICING_PIPELINE, {
|
|
@@ -333,9 +340,9 @@ const slice = await slicer.allRemainingSteps()
|
|
|
333
340
|
${(0, doc_structure_1.details)('More Information', `
|
|
334
341
|
|
|
335
342
|
If you compare this, with what you would have done with the old (and removed) \`SteppingSlicer\`,
|
|
336
|
-
this essentially just requires you to replace the \`SteppingSlicer\` with the ${
|
|
337
|
-
and to pass the ${
|
|
338
|
-
The ${
|
|
343
|
+
this essentially just requires you to replace the \`SteppingSlicer\` with the ${ctx.link(pipeline_executor_1.PipelineExecutor)}
|
|
344
|
+
and to pass the ${ctx.link('DEFAULT_SLICING_PIPELINE')} as the first argument.
|
|
345
|
+
The ${ctx.link(pipeline_executor_1.PipelineExecutor)}...
|
|
339
346
|
|
|
340
347
|
1. Provides structures to investigate the results of all intermediate steps
|
|
341
348
|
2. Can be executed step-by-step
|
|
@@ -420,10 +427,15 @@ We use \`example.name\` to avoid duplication with the name that we’ve assigned
|
|
|
420
427
|
</details>
|
|
421
428
|
`;
|
|
422
429
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
430
|
+
/**
|
|
431
|
+
* https://github.com/flowr-analysis/flowr/wiki/Interface
|
|
432
|
+
*/
|
|
433
|
+
class WikiInterface extends doc_maker_1.DocMaker {
|
|
434
|
+
constructor() {
|
|
435
|
+
super('wiki/Interface.md', module.filename, 'interface');
|
|
436
|
+
}
|
|
437
|
+
async text({ shell, ctx, treeSitter }) {
|
|
438
|
+
return `
|
|
427
439
|
Although far from being as detailed as the in-depth explanation of
|
|
428
440
|
[_flowR_](${doc_files_1.FlowrWikiBaseRef}/Core),
|
|
429
441
|
this wiki page explains how to interface with _flowR_ in more detail.
|
|
@@ -442,7 +454,7 @@ ${await explainServer(shell)}
|
|
|
442
454
|
<a id='using-the-repl'></a>
|
|
443
455
|
## 💻 Using the REPL
|
|
444
456
|
|
|
445
|
-
${await explainRepl(
|
|
457
|
+
${await explainRepl(treeSitter)}
|
|
446
458
|
|
|
447
459
|
<a id='configuring-flowr'></a>
|
|
448
460
|
## ⚙️ Configuring FlowR
|
|
@@ -452,18 +464,9 @@ ${explainConfigFile()}
|
|
|
452
464
|
<a id='writing-code'></a>
|
|
453
465
|
## ⚒️ Writing Code
|
|
454
466
|
|
|
455
|
-
${explainWritingCode(shell)}
|
|
456
|
-
|
|
467
|
+
${explainWritingCode(shell, ctx)}
|
|
457
468
|
`;
|
|
469
|
+
}
|
|
458
470
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
(0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
|
|
462
|
-
const shell = new shell_1.RShell();
|
|
463
|
-
void getText(shell).then(str => {
|
|
464
|
-
console.log(str);
|
|
465
|
-
}).finally(() => {
|
|
466
|
-
shell.close();
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
//# sourceMappingURL=print-interface-wiki.js.map
|
|
471
|
+
exports.WikiInterface = WikiInterface;
|
|
472
|
+
//# sourceMappingURL=wiki-interface.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/wiki/Linter
|
|
5
|
+
*/
|
|
6
|
+
export declare class WikiLinter extends DocMaker {
|
|
7
|
+
constructor();
|
|
8
|
+
protected text({ treeSitter }: DocMakerArgs): Promise<string>;
|
|
9
|
+
}
|