@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/benchmark/slicer.js
CHANGED
|
@@ -28,7 +28,10 @@ const config_1 = require("../config");
|
|
|
28
28
|
const extract_cfg_1 = require("../control-flow/extract-cfg");
|
|
29
29
|
const absint_info_1 = require("../abstract-interpretation/data-frame/absint-info");
|
|
30
30
|
const shape_inference_1 = require("../abstract-interpretation/data-frame/shape-inference");
|
|
31
|
+
const lattice_1 = require("../abstract-interpretation/domains/lattice");
|
|
32
|
+
const set_range_domain_1 = require("../abstract-interpretation/domains/set-range-domain");
|
|
31
33
|
const fs_1 = __importDefault(require("fs"));
|
|
34
|
+
const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-context");
|
|
32
35
|
/**
|
|
33
36
|
* The logger to be used for benchmarking as a global object.
|
|
34
37
|
*/
|
|
@@ -40,6 +43,7 @@ class BenchmarkSlicer {
|
|
|
40
43
|
deltas = new Map();
|
|
41
44
|
parserName;
|
|
42
45
|
config;
|
|
46
|
+
context;
|
|
43
47
|
stats;
|
|
44
48
|
loadedXml;
|
|
45
49
|
dataflow;
|
|
@@ -71,13 +75,14 @@ class BenchmarkSlicer {
|
|
|
71
75
|
return new tree_sitter_executor_1.TreeSitterExecutor();
|
|
72
76
|
}
|
|
73
77
|
});
|
|
78
|
+
this.context = (0, flowr_analyzer_context_1.contextFromInput)({ ...request }, config);
|
|
74
79
|
this.executor = (0, default_pipelines_1.createSlicePipeline)(this.parser, {
|
|
75
|
-
|
|
80
|
+
context: this.context,
|
|
76
81
|
criterion: [],
|
|
77
82
|
autoSelectIf,
|
|
78
83
|
threshold,
|
|
79
|
-
}
|
|
80
|
-
this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).parsed;
|
|
84
|
+
});
|
|
85
|
+
this.loadedXml = (await this.measureCommonStep('parse', 'retrieve AST from R code')).files.map(p => p.parsed);
|
|
81
86
|
this.normalizedAst = await this.measureCommonStep('normalize', 'normalize R AST');
|
|
82
87
|
this.dataflow = await this.measureCommonStep('dataflow', 'produce dataflow information');
|
|
83
88
|
this.executor.switchToRequestStage();
|
|
@@ -100,9 +105,9 @@ class BenchmarkSlicer {
|
|
|
100
105
|
}
|
|
101
106
|
return ret;
|
|
102
107
|
};
|
|
103
|
-
const root = this.loadedXml.rootNode;
|
|
104
|
-
numberOfRTokens = countChildren(
|
|
105
|
-
numberOfRTokensNoComments = countChildren(
|
|
108
|
+
const root = this.loadedXml.map(t => t.rootNode);
|
|
109
|
+
numberOfRTokens = root.map(r => countChildren(r)).reduce((a, b) => a + b, 0);
|
|
110
|
+
numberOfRTokensNoComments = root.map(r => countChildren(r, true)).reduce((a, b) => a + b, 0);
|
|
106
111
|
}
|
|
107
112
|
(0, assert_1.guard)(this.normalizedAst !== undefined, 'normalizedAst should be defined after initialization');
|
|
108
113
|
(0, assert_1.guard)(this.dataflow !== undefined, 'dataflow should be defined after initialization');
|
|
@@ -114,10 +119,10 @@ class BenchmarkSlicer {
|
|
|
114
119
|
for (const [n, info] of vertices) {
|
|
115
120
|
const outgoingEdges = this.dataflow.graph.outgoingEdges(n);
|
|
116
121
|
numberOfEdges += outgoingEdges?.size ?? 0;
|
|
117
|
-
if (info.tag ===
|
|
122
|
+
if (info.tag === vertex_1.VertexType.FunctionCall) {
|
|
118
123
|
numberOfCalls++;
|
|
119
124
|
}
|
|
120
|
-
else if (info.tag ===
|
|
125
|
+
else if (info.tag === vertex_1.VertexType.FunctionDefinition) {
|
|
121
126
|
numberOfDefinitions++;
|
|
122
127
|
}
|
|
123
128
|
}
|
|
@@ -125,7 +130,7 @@ class BenchmarkSlicer {
|
|
|
125
130
|
let nodesNoComments = 0;
|
|
126
131
|
let commentChars = 0;
|
|
127
132
|
let commentCharsNoWhitespace = 0;
|
|
128
|
-
(0, visitor_1.visitAst)(this.normalizedAst.ast, t => {
|
|
133
|
+
(0, visitor_1.visitAst)(this.normalizedAst.ast.files.map(f => f.root), t => {
|
|
129
134
|
nodes++;
|
|
130
135
|
const comments = t.info.additionalTokens?.filter(t => t.type === type_1.RType.Comment);
|
|
131
136
|
if (comments && comments.length > 0) {
|
|
@@ -160,7 +165,7 @@ class BenchmarkSlicer {
|
|
|
160
165
|
numberOfNormalizedTokensNoComments: nodesNoComments
|
|
161
166
|
},
|
|
162
167
|
dataflow: {
|
|
163
|
-
numberOfNodes:
|
|
168
|
+
numberOfNodes: this.dataflow.graph.vertices(true).toArray().length,
|
|
164
169
|
numberOfEdges: numberOfEdges,
|
|
165
170
|
numberOfCalls: numberOfCalls,
|
|
166
171
|
numberOfFunctionDefinitions: numberOfDefinitions,
|
|
@@ -254,7 +259,7 @@ class BenchmarkSlicer {
|
|
|
254
259
|
}).join('')}`);
|
|
255
260
|
}
|
|
256
261
|
// if it is not in the dataflow graph it was kept to be safe and should not count to the included nodes
|
|
257
|
-
stats.numberOfDataflowNodesSliced =
|
|
262
|
+
stats.numberOfDataflowNodesSliced = Array.from(slicedOutput.result).filter(id => results.dataflow.graph.hasVertex(id, false)).length;
|
|
258
263
|
stats.timesHitThreshold = slicedOutput.timesHitThreshold;
|
|
259
264
|
stats.measurements = measurements.get();
|
|
260
265
|
return {
|
|
@@ -274,8 +279,7 @@ class BenchmarkSlicer {
|
|
|
274
279
|
(0, assert_1.guard)(this.config !== undefined, 'config should be defined for control flow extraction');
|
|
275
280
|
const ast = this.normalizedAst;
|
|
276
281
|
const dfg = this.dataflow.graph;
|
|
277
|
-
|
|
278
|
-
this.controlFlow = this.measureSimpleStep('extract control flow graph', () => (0, extract_cfg_1.extractCfg)(ast, config, dfg));
|
|
282
|
+
this.controlFlow = this.measureSimpleStep('extract control flow graph', () => (0, extract_cfg_1.extractCfg)(ast, this.context, dfg));
|
|
279
283
|
}
|
|
280
284
|
/**
|
|
281
285
|
* Infer the shape of data frames using abstract interpretation with {@link inferDataFrameShapes}
|
|
@@ -291,21 +295,20 @@ class BenchmarkSlicer {
|
|
|
291
295
|
const ast = this.normalizedAst;
|
|
292
296
|
const dfg = this.dataflow.graph;
|
|
293
297
|
const cfinfo = this.controlFlow;
|
|
294
|
-
const config = this.config;
|
|
295
298
|
const stats = {
|
|
296
299
|
numberOfDataFrameFiles: 0,
|
|
297
300
|
numberOfNonDataFrameFiles: 0,
|
|
298
301
|
numberOfResultConstraints: 0,
|
|
299
302
|
numberOfResultingValues: 0,
|
|
300
|
-
numberOfResultingTop: 0,
|
|
301
303
|
numberOfResultingBottom: 0,
|
|
304
|
+
numberOfResultingTop: 0,
|
|
302
305
|
numberOfEmptyNodes: 0,
|
|
303
306
|
numberOfOperationNodes: 0,
|
|
304
307
|
numberOfValueNodes: 0,
|
|
305
308
|
sizeOfInfo: 0,
|
|
306
309
|
perNodeStats: new Map()
|
|
307
310
|
};
|
|
308
|
-
const result = this.measureSimpleStep('infer data frame shapes', () => (0, shape_inference_1.inferDataFrameShapes)(cfinfo, dfg, ast,
|
|
311
|
+
const result = this.measureSimpleStep('infer data frame shapes', () => (0, shape_inference_1.inferDataFrameShapes)(cfinfo, dfg, ast, this.context));
|
|
309
312
|
stats.numberOfResultConstraints = result.value.size;
|
|
310
313
|
for (const value of result.value.values()) {
|
|
311
314
|
if (value.isTop()) {
|
|
@@ -318,7 +321,7 @@ class BenchmarkSlicer {
|
|
|
318
321
|
stats.numberOfResultingValues++;
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
|
-
(0, visitor_1.visitAst)(this.normalizedAst.ast, (node) => {
|
|
324
|
+
(0, visitor_1.visitAst)(this.normalizedAst.ast.files.map(f => f.root), (node) => {
|
|
322
325
|
if (node.info.dataFrame === undefined) {
|
|
323
326
|
return;
|
|
324
327
|
}
|
|
@@ -337,11 +340,12 @@ class BenchmarkSlicer {
|
|
|
337
340
|
nodeStats.mappedOperations = expression.operations.map(op => op.operation);
|
|
338
341
|
stats.numberOfOperationNodes++;
|
|
339
342
|
if (value !== undefined) {
|
|
340
|
-
nodeStats.inferredColNames =
|
|
341
|
-
nodeStats.inferredColCount = this.
|
|
342
|
-
nodeStats.inferredRowCount = this.
|
|
343
|
-
nodeStats.
|
|
344
|
-
nodeStats.
|
|
343
|
+
nodeStats.inferredColNames = this.getInferredNumber(value.colnames);
|
|
344
|
+
nodeStats.inferredColCount = this.getInferredNumber(value.cols);
|
|
345
|
+
nodeStats.inferredRowCount = this.getInferredNumber(value.rows);
|
|
346
|
+
nodeStats.approxRangeColNames = this.getInferredRange(value.colnames);
|
|
347
|
+
nodeStats.approxRangeColCount = this.getInferredRange(value.cols);
|
|
348
|
+
nodeStats.approxRangeRowCount = this.getInferredRange(value.rows);
|
|
345
349
|
}
|
|
346
350
|
}
|
|
347
351
|
if (value !== undefined) {
|
|
@@ -358,15 +362,34 @@ class BenchmarkSlicer {
|
|
|
358
362
|
this.stats.dataFrameShape = stats;
|
|
359
363
|
return stats;
|
|
360
364
|
}
|
|
361
|
-
|
|
365
|
+
getInferredRange(value) {
|
|
366
|
+
if (value.isValue()) {
|
|
367
|
+
if (value instanceof set_range_domain_1.SetRangeDomain) {
|
|
368
|
+
return value.value.range === lattice_1.Top ? Infinity : value.value.range.size;
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
return value.value[1] - value.value[0];
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return 0;
|
|
375
|
+
}
|
|
376
|
+
getInferredNumber(value) {
|
|
362
377
|
if (value.isTop()) {
|
|
363
378
|
return 'top';
|
|
364
379
|
}
|
|
365
|
-
else if (value.isValue() && !isFinite(value.value[1])) {
|
|
366
|
-
return 'infinite';
|
|
367
|
-
}
|
|
368
380
|
else if (value.isValue()) {
|
|
369
|
-
|
|
381
|
+
if (value instanceof set_range_domain_1.SetRangeDomain) {
|
|
382
|
+
if (value.value.range === lattice_1.Top) {
|
|
383
|
+
return 'infinite';
|
|
384
|
+
}
|
|
385
|
+
return Math.floor(value.value.min.size + (value.value.range.size / 2));
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
if (!isFinite(value.value[1])) {
|
|
389
|
+
return 'infinite';
|
|
390
|
+
}
|
|
391
|
+
return Math.floor((value.value[0] + value.value[1]) / 2);
|
|
392
|
+
}
|
|
370
393
|
}
|
|
371
394
|
return 'bottom';
|
|
372
395
|
}
|
package/benchmark/stats/print.js
CHANGED
|
@@ -176,15 +176,16 @@ Dataframe shape inference:
|
|
|
176
176
|
Number of total top: ${pad(stats.dataFrameShape.numberOfTotalTop)}
|
|
177
177
|
Inferred column names per node: ${pad(stats.dataFrameShape.inferredColNames.mean)}
|
|
178
178
|
Number of column names values: ${pad(stats.dataFrameShape.numberOfColNamesValues)}
|
|
179
|
-
Number of column names
|
|
179
|
+
Number of column names infinite:${pad(stats.dataFrameShape.numberOfColNamesInfinite)}
|
|
180
|
+
Number of column names top: ${pad(stats.dataFrameShape.numberOfColNamesTop)}
|
|
180
181
|
Inferred column count per node: ${pad(stats.dataFrameShape.inferredColCount.mean)}
|
|
181
182
|
Number of column count values: ${pad(stats.dataFrameShape.numberOfColCountValues)}
|
|
182
|
-
Number of column count Top: ${pad(stats.dataFrameShape.numberOfColCountTop)}
|
|
183
183
|
Number of column count infinite:${pad(stats.dataFrameShape.numberOfColCountInfinite)}
|
|
184
|
+
Number of column count top: ${pad(stats.dataFrameShape.numberOfColCountTop)}
|
|
184
185
|
Inferred row count per node: ${pad(stats.dataFrameShape.inferredRowCount.mean)}
|
|
185
186
|
Number of row count values: ${pad(stats.dataFrameShape.numberOfRowCountValues)}
|
|
186
|
-
Number of row count Top: ${pad(stats.dataFrameShape.numberOfRowCountTop)}
|
|
187
187
|
Number of row count infinite: ${pad(stats.dataFrameShape.numberOfRowCountInfinite)}
|
|
188
|
+
Number of row count top: ${pad(stats.dataFrameShape.numberOfRowCountTop)}
|
|
188
189
|
Size of data frame shape info: ${convertNumberToNiceBytes(stats.dataFrameShape.sizeOfInfo)}`;
|
|
189
190
|
}
|
|
190
191
|
return result;
|
|
@@ -276,18 +277,20 @@ Dataframe shape inference:
|
|
|
276
277
|
Number of total values: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfTotalValues)}
|
|
277
278
|
Number of total top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfTotalTop)}
|
|
278
279
|
Inferred column names per node: ${formatSummarizedMeasure(stats.dataFrameShape.inferredColNames)}
|
|
280
|
+
Number of column names exact: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColNamesExact)}
|
|
279
281
|
Number of column names values: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColNamesValues)}
|
|
282
|
+
Number of column names infinite:${formatSummarizedMeasure(stats.dataFrameShape.numberOfColNamesInfinite)}
|
|
280
283
|
Number of column names top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColNamesTop)}
|
|
281
284
|
Inferred column count per node: ${formatSummarizedMeasure(stats.dataFrameShape.inferredColCount)}
|
|
282
285
|
Number of column count exact: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColCountExact)}
|
|
283
286
|
Number of column count values: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColCountValues)}
|
|
284
|
-
Number of column count top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColCountTop)}
|
|
285
287
|
Number of column count infinite:${formatSummarizedMeasure(stats.dataFrameShape.numberOfColCountInfinite)}
|
|
288
|
+
Number of column count top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfColCountTop)}
|
|
286
289
|
Inferred row count per node: ${formatSummarizedMeasure(stats.dataFrameShape.inferredRowCount)}
|
|
287
290
|
Number of row count exact: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfRowCountExact)}
|
|
288
291
|
Number of row count values: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfRowCountValues)}
|
|
289
|
-
Number of row count top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfRowCountTop)}
|
|
290
292
|
Number of row count infinite: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfRowCountInfinite)}
|
|
293
|
+
Number of row count top: ${formatSummarizedMeasure(stats.dataFrameShape.numberOfRowCountTop)}
|
|
291
294
|
Size of data frame shape info: ${formatSummarizedMeasure(stats.dataFrameShape.sizeOfInfo, convertNumberToNiceBytes)}`;
|
|
292
295
|
}
|
|
293
296
|
return result;
|
|
@@ -49,8 +49,8 @@ export interface SlicerStatsDfShape<T = number> {
|
|
|
49
49
|
numberOfNonDataFrameFiles: T extends number ? 0 | 1 : number;
|
|
50
50
|
numberOfResultConstraints: T;
|
|
51
51
|
numberOfResultingValues: T;
|
|
52
|
-
numberOfResultingTop: T;
|
|
53
52
|
numberOfResultingBottom: T;
|
|
53
|
+
numberOfResultingTop: T;
|
|
54
54
|
numberOfEmptyNodes: T;
|
|
55
55
|
numberOfOperationNodes: T;
|
|
56
56
|
numberOfValueNodes: T;
|
|
@@ -60,10 +60,11 @@ export interface SlicerStatsDfShape<T = number> {
|
|
|
60
60
|
export interface PerNodeStatsDfShape<T = number> {
|
|
61
61
|
numberOfEntries: T;
|
|
62
62
|
mappedOperations?: DataFrameOperationName[];
|
|
63
|
-
inferredColNames?: T | 'bottom' | 'top';
|
|
63
|
+
inferredColNames?: T | 'bottom' | 'infinite' | 'top';
|
|
64
64
|
inferredColCount?: T | 'bottom' | 'infinite' | 'top';
|
|
65
65
|
inferredRowCount?: T | 'bottom' | 'infinite' | 'top';
|
|
66
66
|
/** difference between upper and lower bound of interval domain (to estimate approximation) */
|
|
67
|
+
approxRangeColNames?: T;
|
|
67
68
|
approxRangeColCount?: T;
|
|
68
69
|
approxRangeRowCount?: T;
|
|
69
70
|
}
|
|
@@ -84,25 +84,28 @@ export interface SummarizedDfShapeStats<T = number> extends Omit<SlicerStatsDfSh
|
|
|
84
84
|
numberOfEntriesPerNode: SummarizedMeasurement;
|
|
85
85
|
numberOfOperations: T;
|
|
86
86
|
numberOfTotalValues: T;
|
|
87
|
-
numberOfTotalTop: T;
|
|
88
87
|
numberOfTotalBottom: T;
|
|
88
|
+
numberOfTotalTop: T;
|
|
89
89
|
inferredColNames: SummarizedMeasurement;
|
|
90
|
+
approxRangeColNames: SummarizedMeasurement;
|
|
91
|
+
numberOfColNamesExact: T;
|
|
90
92
|
numberOfColNamesValues: T;
|
|
91
|
-
numberOfColNamesTop: T;
|
|
92
93
|
numberOfColNamesBottom: T;
|
|
94
|
+
numberOfColNamesInfinite: T;
|
|
95
|
+
numberOfColNamesTop: T;
|
|
93
96
|
inferredColCount: SummarizedMeasurement;
|
|
97
|
+
approxRangeColCount: SummarizedMeasurement;
|
|
94
98
|
numberOfColCountExact: T;
|
|
95
99
|
numberOfColCountValues: T;
|
|
96
|
-
numberOfColCountTop: T;
|
|
97
|
-
numberOfColCountInfinite: T;
|
|
98
100
|
numberOfColCountBottom: T;
|
|
99
|
-
|
|
101
|
+
numberOfColCountInfinite: T;
|
|
102
|
+
numberOfColCountTop: T;
|
|
100
103
|
inferredRowCount: SummarizedMeasurement;
|
|
104
|
+
approxRangeRowCount: SummarizedMeasurement;
|
|
101
105
|
numberOfRowCountExact: T;
|
|
102
106
|
numberOfRowCountValues: T;
|
|
103
|
-
numberOfRowCountTop: T;
|
|
104
|
-
numberOfRowCountInfinite: T;
|
|
105
107
|
numberOfRowCountBottom: T;
|
|
106
|
-
|
|
108
|
+
numberOfRowCountInfinite: T;
|
|
109
|
+
numberOfRowCountTop: T;
|
|
107
110
|
perOperationNumber: Map<DataFrameOperationName, T>;
|
|
108
111
|
}
|
|
@@ -159,7 +159,7 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
159
159
|
let numberOfNormalizedTokensNoComments = 0;
|
|
160
160
|
let commentChars = 0;
|
|
161
161
|
let commentCharsNoWhitespace = 0;
|
|
162
|
-
(0, visitor_1.visitAst)(reParsed.ast, t => {
|
|
162
|
+
(0, visitor_1.visitAst)(reParsed.ast.files.map(f => f.root), t => {
|
|
163
163
|
numberOfNormalizedTokens++;
|
|
164
164
|
const comments = t.info.additionalTokens?.filter(t => t.type === type_1.RType.Comment);
|
|
165
165
|
if (comments && comments.length > 0) {
|
|
@@ -266,26 +266,29 @@ function summarizeDfShapeStats({ perNodeStats, ...stats }) {
|
|
|
266
266
|
numberOfEntriesPerNode: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.numberOfEntries)),
|
|
267
267
|
numberOfOperations: (0, arrays_1.arraySum)(nodeStats.map(s => s.mappedOperations?.length).filter(assert_1.isNotUndefined)),
|
|
268
268
|
numberOfTotalValues: nodeStats.filter(s => isValue(s.inferredColNames) && isValue(s.inferredColCount) && isValue(s.inferredRowCount)).length,
|
|
269
|
-
numberOfTotalTop: nodeStats.filter(s => isTop(s.inferredColNames) && isTop(s.inferredColCount) && isTop(s.inferredRowCount)).length,
|
|
270
269
|
numberOfTotalBottom: nodeStats.filter(s => s.inferredColNames === 0 && isBottom(s.inferredColCount) && isBottom(s.inferredRowCount)).length,
|
|
270
|
+
numberOfTotalTop: nodeStats.filter(s => isTop(s.inferredColNames) && isTop(s.inferredColCount) && isTop(s.inferredRowCount)).length,
|
|
271
271
|
inferredColNames: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.inferredColNames).filter(isValue)),
|
|
272
|
+
approxRangeColNames: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.approxRangeColNames).filter(assert_1.isNotUndefined).filter(isFinite)),
|
|
273
|
+
numberOfColNamesExact: nodeStats.map(s => s.approxRangeColNames).filter(range => range === 0).length,
|
|
272
274
|
numberOfColNamesValues: nodeStats.map(s => s.inferredColNames).filter(isValue).length,
|
|
275
|
+
numberOfColNamesBottom: nodeStats.map(s => s.inferredColNames).filter(isBottom).length,
|
|
276
|
+
numberOfColNamesInfinite: nodeStats.map(s => s.inferredColNames).filter(isInfinite).length,
|
|
273
277
|
numberOfColNamesTop: nodeStats.map(s => s.inferredColNames).filter(isTop).length,
|
|
274
|
-
numberOfColNamesBottom: nodeStats.map(s => s.inferredColNames).filter(number => number === 0).length,
|
|
275
278
|
inferredColCount: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.inferredColCount).filter(isValue)),
|
|
279
|
+
approxRangeColCount: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.approxRangeColCount).filter(assert_1.isNotUndefined).filter(isFinite)),
|
|
276
280
|
numberOfColCountExact: nodeStats.map(s => s.approxRangeColCount).filter(range => range === 0).length,
|
|
277
281
|
numberOfColCountValues: nodeStats.map(s => s.inferredColCount).filter(isValue).length,
|
|
278
|
-
numberOfColCountTop: nodeStats.map(s => s.inferredColCount).filter(isTop).length,
|
|
279
|
-
numberOfColCountInfinite: nodeStats.map(s => s.inferredColCount).filter(isInfinite).length,
|
|
280
282
|
numberOfColCountBottom: nodeStats.map(s => s.inferredColCount).filter(isBottom).length,
|
|
281
|
-
|
|
283
|
+
numberOfColCountInfinite: nodeStats.map(s => s.inferredColCount).filter(isInfinite).length,
|
|
284
|
+
numberOfColCountTop: nodeStats.map(s => s.inferredColCount).filter(isTop).length,
|
|
282
285
|
inferredRowCount: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.inferredRowCount).filter(isValue)),
|
|
286
|
+
approxRangeRowCount: (0, summarizer_1.summarizeMeasurement)(nodeStats.map(s => s.approxRangeRowCount).filter(assert_1.isNotUndefined).filter(isFinite)),
|
|
283
287
|
numberOfRowCountExact: nodeStats.map(s => s.approxRangeRowCount).filter(range => range === 0).length,
|
|
284
288
|
numberOfRowCountValues: nodeStats.map(s => s.inferredRowCount).filter(isValue).length,
|
|
285
|
-
numberOfRowCountTop: nodeStats.map(s => s.inferredRowCount).filter(isTop).length,
|
|
286
|
-
numberOfRowCountInfinite: nodeStats.map(s => s.inferredRowCount).filter(isInfinite).length,
|
|
287
289
|
numberOfRowCountBottom: nodeStats.map(s => s.inferredRowCount).filter(isBottom).length,
|
|
288
|
-
|
|
290
|
+
numberOfRowCountInfinite: nodeStats.map(s => s.inferredRowCount).filter(isInfinite).length,
|
|
291
|
+
numberOfRowCountTop: nodeStats.map(s => s.inferredRowCount).filter(isTop).length,
|
|
289
292
|
perOperationNumber: summarizePerOperationStats(nodeStats),
|
|
290
293
|
};
|
|
291
294
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { UltimateSlicerStats } from '../data';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Write the graph output for the ultimate slicer stats to a file
|
|
4
|
+
* @param ultimate - The ultimate slicer stats
|
|
5
|
+
* @param outputGraphPath - The path to write the graph output to
|
|
4
6
|
*/
|
|
5
7
|
export declare function writeGraphOutput(ultimate: UltimateSlicerStats, outputGraphPath: string): void;
|
|
@@ -7,7 +7,9 @@ exports.writeGraphOutput = writeGraphOutput;
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const json_1 = require("../../../util/json");
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Write the graph output for the ultimate slicer stats to a file
|
|
11
|
+
* @param ultimate - The ultimate slicer stats
|
|
12
|
+
* @param outputGraphPath - The path to write the graph output to
|
|
11
13
|
*/
|
|
12
14
|
function writeGraphOutput(ultimate, outputGraphPath) {
|
|
13
15
|
console.log(`Producing benchmark graph data (${outputGraphPath})...`);
|
|
@@ -114,8 +114,8 @@ function summarizeAllSummarizedStats(stats) {
|
|
|
114
114
|
numberOfNonDataFrameFiles: (0, arrays_1.arraySum)(stats.map(s => s.dataFrameShape?.numberOfNonDataFrameFiles).filter(assert_1.isNotUndefined)),
|
|
115
115
|
numberOfResultConstraints: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultConstraints).filter(assert_1.isNotUndefined)),
|
|
116
116
|
numberOfResultingValues: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingValues).filter(assert_1.isNotUndefined)),
|
|
117
|
-
numberOfResultingTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingTop).filter(assert_1.isNotUndefined)),
|
|
118
117
|
numberOfResultingBottom: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingBottom).filter(assert_1.isNotUndefined)),
|
|
118
|
+
numberOfResultingTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingTop).filter(assert_1.isNotUndefined)),
|
|
119
119
|
numberOfEmptyNodes: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfEmptyNodes).filter(assert_1.isNotUndefined)),
|
|
120
120
|
numberOfOperationNodes: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfOperationNodes).filter(assert_1.isNotUndefined)),
|
|
121
121
|
numberOfValueNodes: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfValueNodes).filter(assert_1.isNotUndefined)),
|
|
@@ -123,26 +123,29 @@ function summarizeAllSummarizedStats(stats) {
|
|
|
123
123
|
numberOfEntriesPerNode: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfEntriesPerNode).filter(assert_1.isNotUndefined)),
|
|
124
124
|
numberOfOperations: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfOperations).filter(assert_1.isNotUndefined)),
|
|
125
125
|
numberOfTotalValues: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalValues).filter(assert_1.isNotUndefined)),
|
|
126
|
-
numberOfTotalTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalTop).filter(assert_1.isNotUndefined)),
|
|
127
126
|
numberOfTotalBottom: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalBottom).filter(assert_1.isNotUndefined)),
|
|
127
|
+
numberOfTotalTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalTop).filter(assert_1.isNotUndefined)),
|
|
128
128
|
inferredColNames: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredColNames).filter(assert_1.isNotUndefined)),
|
|
129
|
+
approxRangeColNames: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeColNames).filter(assert_1.isNotUndefined)),
|
|
130
|
+
numberOfColNamesExact: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesExact).filter(assert_1.isNotUndefined)),
|
|
129
131
|
numberOfColNamesValues: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesValues).filter(assert_1.isNotUndefined)),
|
|
130
|
-
numberOfColNamesTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesTop).filter(assert_1.isNotUndefined)),
|
|
131
132
|
numberOfColNamesBottom: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesBottom).filter(assert_1.isNotUndefined)),
|
|
133
|
+
numberOfColNamesInfinite: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesInfinite).filter(assert_1.isNotUndefined)),
|
|
134
|
+
numberOfColNamesTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesTop).filter(assert_1.isNotUndefined)),
|
|
132
135
|
inferredColCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredColCount).filter(assert_1.isNotUndefined)),
|
|
136
|
+
approxRangeColCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeColCount).filter(assert_1.isNotUndefined)),
|
|
133
137
|
numberOfColCountExact: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountExact).filter(assert_1.isNotUndefined)),
|
|
134
138
|
numberOfColCountValues: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountValues).filter(assert_1.isNotUndefined)),
|
|
135
|
-
numberOfColCountTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountTop).filter(assert_1.isNotUndefined)),
|
|
136
|
-
numberOfColCountInfinite: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountInfinite).filter(assert_1.isNotUndefined)),
|
|
137
139
|
numberOfColCountBottom: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountBottom).filter(assert_1.isNotUndefined)),
|
|
138
|
-
|
|
140
|
+
numberOfColCountInfinite: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountInfinite).filter(assert_1.isNotUndefined)),
|
|
141
|
+
numberOfColCountTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountTop).filter(assert_1.isNotUndefined)),
|
|
139
142
|
inferredRowCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredRowCount).filter(assert_1.isNotUndefined)),
|
|
143
|
+
approxRangeRowCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeRowCount).filter(assert_1.isNotUndefined)),
|
|
140
144
|
numberOfRowCountExact: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountExact).filter(assert_1.isNotUndefined)),
|
|
141
145
|
numberOfRowCountValues: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountValues).filter(assert_1.isNotUndefined)),
|
|
142
|
-
numberOfRowCountTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountTop).filter(assert_1.isNotUndefined)),
|
|
143
|
-
numberOfRowCountInfinite: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountInfinite).filter(assert_1.isNotUndefined)),
|
|
144
146
|
numberOfRowCountBottom: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountBottom).filter(assert_1.isNotUndefined)),
|
|
145
|
-
|
|
147
|
+
numberOfRowCountInfinite: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountInfinite).filter(assert_1.isNotUndefined)),
|
|
148
|
+
numberOfRowCountTop: (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountTop).filter(assert_1.isNotUndefined)),
|
|
146
149
|
perOperationNumber: new Map(semantics_1.DataFrameOperationNames.map(n => [n, (0, summarizer_1.summarizeMeasurement)(stats.map(s => s.dataFrameShape?.perOperationNumber.get(n) ?? 0))]))
|
|
147
150
|
} : undefined
|
|
148
151
|
};
|
|
@@ -198,8 +201,8 @@ function summarizeAllUltimateStats(stats) {
|
|
|
198
201
|
numberOfNonDataFrameFiles: (0, arrays_1.arraySum)(stats.map(s => s.dataFrameShape?.numberOfNonDataFrameFiles).filter(assert_1.isNotUndefined)),
|
|
199
202
|
numberOfResultConstraints: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultConstraints).filter(assert_1.isNotUndefined)),
|
|
200
203
|
numberOfResultingValues: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingValues).filter(assert_1.isNotUndefined)),
|
|
201
|
-
numberOfResultingTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingTop).filter(assert_1.isNotUndefined)),
|
|
202
204
|
numberOfResultingBottom: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingBottom).filter(assert_1.isNotUndefined)),
|
|
205
|
+
numberOfResultingTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfResultingTop).filter(assert_1.isNotUndefined)),
|
|
203
206
|
numberOfEmptyNodes: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfEmptyNodes).filter(assert_1.isNotUndefined)),
|
|
204
207
|
numberOfOperationNodes: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfOperationNodes).filter(assert_1.isNotUndefined)),
|
|
205
208
|
numberOfValueNodes: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfValueNodes).filter(assert_1.isNotUndefined)),
|
|
@@ -207,26 +210,29 @@ function summarizeAllUltimateStats(stats) {
|
|
|
207
210
|
numberOfEntriesPerNode: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfEntriesPerNode).filter(assert_1.isNotUndefined)),
|
|
208
211
|
numberOfOperations: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfOperations).filter(assert_1.isNotUndefined)),
|
|
209
212
|
numberOfTotalValues: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalValues).filter(assert_1.isNotUndefined)),
|
|
210
|
-
numberOfTotalTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalTop).filter(assert_1.isNotUndefined)),
|
|
211
213
|
numberOfTotalBottom: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalBottom).filter(assert_1.isNotUndefined)),
|
|
214
|
+
numberOfTotalTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfTotalTop).filter(assert_1.isNotUndefined)),
|
|
212
215
|
inferredColNames: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredColNames).filter(assert_1.isNotUndefined)),
|
|
216
|
+
approxRangeColNames: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeColNames).filter(assert_1.isNotUndefined)),
|
|
217
|
+
numberOfColNamesExact: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesExact).filter(assert_1.isNotUndefined)),
|
|
213
218
|
numberOfColNamesValues: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesValues).filter(assert_1.isNotUndefined)),
|
|
214
|
-
numberOfColNamesTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesTop).filter(assert_1.isNotUndefined)),
|
|
215
219
|
numberOfColNamesBottom: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesBottom).filter(assert_1.isNotUndefined)),
|
|
220
|
+
numberOfColNamesInfinite: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesInfinite).filter(assert_1.isNotUndefined)),
|
|
221
|
+
numberOfColNamesTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColNamesTop).filter(assert_1.isNotUndefined)),
|
|
216
222
|
inferredColCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredColCount).filter(assert_1.isNotUndefined)),
|
|
223
|
+
approxRangeColCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeColCount).filter(assert_1.isNotUndefined)),
|
|
217
224
|
numberOfColCountExact: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountExact).filter(assert_1.isNotUndefined)),
|
|
218
225
|
numberOfColCountValues: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountValues).filter(assert_1.isNotUndefined)),
|
|
219
|
-
numberOfColCountTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountTop).filter(assert_1.isNotUndefined)),
|
|
220
|
-
numberOfColCountInfinite: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountInfinite).filter(assert_1.isNotUndefined)),
|
|
221
226
|
numberOfColCountBottom: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountBottom).filter(assert_1.isNotUndefined)),
|
|
222
|
-
|
|
227
|
+
numberOfColCountInfinite: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountInfinite).filter(assert_1.isNotUndefined)),
|
|
228
|
+
numberOfColCountTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfColCountTop).filter(assert_1.isNotUndefined)),
|
|
223
229
|
inferredRowCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.inferredRowCount).filter(assert_1.isNotUndefined)),
|
|
230
|
+
approxRangeRowCount: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.approxRangeRowCount).filter(assert_1.isNotUndefined)),
|
|
224
231
|
numberOfRowCountExact: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountExact).filter(assert_1.isNotUndefined)),
|
|
225
232
|
numberOfRowCountValues: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountValues).filter(assert_1.isNotUndefined)),
|
|
226
|
-
numberOfRowCountTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountTop).filter(assert_1.isNotUndefined)),
|
|
227
|
-
numberOfRowCountInfinite: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountInfinite).filter(assert_1.isNotUndefined)),
|
|
228
233
|
numberOfRowCountBottom: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountBottom).filter(assert_1.isNotUndefined)),
|
|
229
|
-
|
|
234
|
+
numberOfRowCountInfinite: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountInfinite).filter(assert_1.isNotUndefined)),
|
|
235
|
+
numberOfRowCountTop: (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.numberOfRowCountTop).filter(assert_1.isNotUndefined)),
|
|
230
236
|
perOperationNumber: new Map(semantics_1.DataFrameOperationNames.map(n => [n, (0, process_1.summarizeSummarizedMeasurement)(stats.map(s => s.dataFrameShape?.perOperationNumber.get(n)).filter(assert_1.isNotUndefined))]))
|
|
231
237
|
} : undefined
|
|
232
238
|
};
|
package/cli/export-quads-app.js
CHANGED
|
@@ -21,7 +21,7 @@ const options = (0, script_1.processCommandLineArgs)('export-quads', [], {
|
|
|
21
21
|
const shell = new shell_1.RShell((0, config_1.getEngineConfig)((0, config_1.getConfig)(), 'r-shell'));
|
|
22
22
|
async function writeQuadForSingleFile(request, output) {
|
|
23
23
|
const normalized = await (0, retriever_1.retrieveNormalizedAstFromRCode)(request, shell);
|
|
24
|
-
const serialized = (0, quads_1.serialize2quads)(normalized.ast, { context: request.content });
|
|
24
|
+
const serialized = (0, quads_1.serialize2quads)(normalized.ast.files[0].root, { context: request.content });
|
|
25
25
|
log_1.log.info(`Appending quads to ${output}`);
|
|
26
26
|
fs_1.default.appendFileSync(output, serialized);
|
|
27
27
|
}
|
|
@@ -57,7 +57,8 @@ exports.dataflowCommand = {
|
|
|
57
57
|
clipboard.default.writeSync(mermaid);
|
|
58
58
|
output.stdout(formatInfo(output, 'mermaid code', result));
|
|
59
59
|
}
|
|
60
|
-
catch { /* do nothing this is a service thing */
|
|
60
|
+
catch { /* do nothing this is a service thing */
|
|
61
|
+
}
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
exports.dataflowStarCommand = {
|
|
@@ -4,6 +4,7 @@ exports.parseCommand = void 0;
|
|
|
4
4
|
const format_1 = require("../../../r-bridge/lang-4.x/ast/parser/json/format");
|
|
5
5
|
const normalize_meta_1 = require("../../../r-bridge/lang-4.x/ast/parser/main/normalize-meta");
|
|
6
6
|
const retriever_1 = require("../../../r-bridge/retriever");
|
|
7
|
+
const flowr_file_1 = require("../../../project/context/flowr-file");
|
|
7
8
|
function toDepthMap(entry) {
|
|
8
9
|
const visit = [{ depth: 0, node: entry }];
|
|
9
10
|
const result = [];
|
|
@@ -138,15 +139,26 @@ exports.parseCommand = {
|
|
|
138
139
|
};
|
|
139
140
|
},
|
|
140
141
|
fn: async ({ output, analyzer }) => {
|
|
141
|
-
const result = await analyzer.parse();
|
|
142
|
+
const result = (await analyzer.parse()).files;
|
|
142
143
|
const parserInfo = analyzer.parserInformation();
|
|
143
144
|
if (parserInfo.name === 'r-shell') {
|
|
144
|
-
const
|
|
145
|
-
|
|
145
|
+
for (const { parsed, filePath } of result) {
|
|
146
|
+
if (filePath && filePath !== flowr_file_1.FlowrFile.INLINE_PATH) {
|
|
147
|
+
output.stdout(output.formatter.format(`File: ${filePath}\n`, { style: 4 /* FontStyles.Underline */ }));
|
|
148
|
+
}
|
|
149
|
+
const object = toDepthMap((0, format_1.convertPreparedParsedData)((0, format_1.prepareParsedData)(parsed)));
|
|
150
|
+
output.stdout(depthListToTextTree(object, output.formatter));
|
|
151
|
+
}
|
|
146
152
|
}
|
|
147
153
|
else {
|
|
148
154
|
// print the tree-sitter ast
|
|
149
|
-
|
|
155
|
+
for (const { parsed, filePath } of result) {
|
|
156
|
+
if (filePath && filePath !== flowr_file_1.FlowrFile.INLINE_PATH) {
|
|
157
|
+
output.stdout(output.formatter.format(`File: ${filePath}\n`, { style: 4 /* FontStyles.Underline */ }));
|
|
158
|
+
}
|
|
159
|
+
const object = treeSitterToDepthList(parsed.rootNode);
|
|
160
|
+
output.stdout(depthListToTextTree(object, output.formatter));
|
|
161
|
+
}
|
|
150
162
|
}
|
|
151
163
|
}
|
|
152
164
|
};
|
|
@@ -65,7 +65,7 @@ async function processQueryArgs(output, analyzer, remainingArgs) {
|
|
|
65
65
|
}
|
|
66
66
|
if (input) {
|
|
67
67
|
analyzer.reset();
|
|
68
|
-
analyzer.addRequest(
|
|
68
|
+
analyzer.addRequest(input);
|
|
69
69
|
}
|
|
70
70
|
return {
|
|
71
71
|
query: await (0, query_1.executeQueries)({
|
package/cli/repl/core.js
CHANGED
|
@@ -150,28 +150,30 @@ async function replProcessStatement(output, statement, analyzer, allowRSessionAc
|
|
|
150
150
|
const bold = (s) => output.formatter.format(s, { style: 1 /* FontStyles.Bold */ });
|
|
151
151
|
if (processor) {
|
|
152
152
|
try {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
await (0, query_1.genericWrapReplFailIfNoRequest)(async () => {
|
|
154
|
+
const remainingLine = statement.slice(command.length + 2).trim();
|
|
155
|
+
if (processor.isCodeCommand) {
|
|
156
|
+
const args = processor.argsParser(remainingLine);
|
|
157
|
+
if (args.rCode) {
|
|
158
|
+
analyzer.reset();
|
|
159
|
+
analyzer.addRequest(args.rCode);
|
|
160
|
+
}
|
|
161
|
+
await processor.fn({ output, analyzer, remainingArgs: args.remaining });
|
|
159
162
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
163
|
+
else {
|
|
164
|
+
await processor.fn({ output, analyzer, remainingLine, allowRSessionAccess });
|
|
165
|
+
}
|
|
166
|
+
}, output, analyzer);
|
|
165
167
|
}
|
|
166
168
|
catch (e) {
|
|
167
|
-
output.
|
|
169
|
+
output.stderr(`${bold(`Failed to execute command ${command}`)}: ${e?.message}. Using the ${bold('--verbose')} flag on startup may provide additional information.\n`);
|
|
168
170
|
if (log_1.log.settings.minLevel < 6 /* LogLevel.Fatal */) {
|
|
169
171
|
console.error(e);
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
175
|
else {
|
|
174
|
-
output.
|
|
176
|
+
output.stderr(`the command '${command}' is unknown, try ${bold(':help')} for more information\n`);
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
else {
|
|
@@ -206,6 +208,7 @@ async function repl({ analyzer, rl = readline.createInterface(makeDefaultReplRea
|
|
|
206
208
|
rl.on('history', h => fs_1.default.writeFileSync(historyFile, h.join('\n'), { encoding: 'utf-8' }));
|
|
207
209
|
}
|
|
208
210
|
// the incredible repl :D, we kill it with ':quit'
|
|
211
|
+
// noinspection InfiniteLoopJS
|
|
209
212
|
while (true) {
|
|
210
213
|
await new Promise((resolve, reject) => {
|
|
211
214
|
rl.question((0, prompt_1.prompt)(), answer => {
|
|
@@ -214,10 +214,11 @@ class FlowRServerConnection {
|
|
|
214
214
|
else {
|
|
215
215
|
throw new Error('Either content or filepath must be defined.');
|
|
216
216
|
}
|
|
217
|
-
const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder(
|
|
217
|
+
const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
|
|
218
218
|
.setConfig(this.config)
|
|
219
219
|
.setParser(this.parser)
|
|
220
220
|
.build();
|
|
221
|
+
analyzer.addRequest(request);
|
|
221
222
|
if (message.filetoken) {
|
|
222
223
|
this.logger.info(`Storing file token ${message.filetoken}`);
|
|
223
224
|
this.fileMap.set(message.filetoken, {
|
|
@@ -21,6 +21,7 @@ const time_1 = require("../../util/text/time");
|
|
|
21
21
|
const tar_1 = require("tar");
|
|
22
22
|
const ansi_1 = require("../../util/text/ansi");
|
|
23
23
|
const config_1 = require("../../config");
|
|
24
|
+
const flowr_analyzer_context_1 = require("../../project/context/flowr-analyzer-context");
|
|
24
25
|
function compressFolder(folder, target) {
|
|
25
26
|
return (0, tar_1.create)({
|
|
26
27
|
gzip: true,
|
|
@@ -62,7 +63,7 @@ async function getStatsForSingleFile(options, config) {
|
|
|
62
63
|
if (stats.outputs.size === 1) {
|
|
63
64
|
if (options['dump-json']) {
|
|
64
65
|
const [, output] = [...stats.outputs.entries()][0];
|
|
65
|
-
const cfg = (0, extract_cfg_1.extractCfg)(output.normalize, config, output.dataflow.graph);
|
|
66
|
+
const cfg = (0, extract_cfg_1.extractCfg)(output.normalize, (0, flowr_analyzer_context_1.contextFromInput)('', config), output.dataflow.graph);
|
|
66
67
|
statistics_file_1.statisticsFileProvider.append('output-json', 'parse', await (0, print_1.printStepResult)(_00_parse_1.PARSE_WITH_R_SHELL_STEP, output.parse, 2 /* StepOutputFormat.Json */));
|
|
67
68
|
statistics_file_1.statisticsFileProvider.append('output-json', 'normalize', await (0, print_1.printStepResult)(_10_normalize_1.NORMALIZE, output.normalize, 2 /* StepOutputFormat.Json */));
|
|
68
69
|
statistics_file_1.statisticsFileProvider.append('output-json', 'dataflow', await (0, print_1.printStepResult)(_20_dataflow_1.STATIC_DATAFLOW, output.dataflow, 2 /* StepOutputFormat.Json */));
|