@eagleoutice/flowr 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -30
- package/abstract-interpretation/data-frame/absint-info.d.ts +1 -1
- package/abstract-interpretation/data-frame/absint-visitor.d.ts +2 -3
- package/abstract-interpretation/data-frame/absint-visitor.js +15 -10
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +18 -12
- package/abstract-interpretation/data-frame/dataframe-domain.js +25 -13
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -1
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -10
- package/abstract-interpretation/data-frame/mappers/arguments.js +0 -7
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +0 -1
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +4 -5
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +3 -4
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -1
- package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
- package/abstract-interpretation/data-frame/semantics.d.ts +3 -4
- package/abstract-interpretation/data-frame/semantics.js +171 -162
- package/abstract-interpretation/data-frame/shape-inference.d.ts +1 -4
- package/abstract-interpretation/data-frame/shape-inference.js +7 -9
- package/abstract-interpretation/domains/abstract-domain.d.ts +59 -18
- package/abstract-interpretation/domains/abstract-domain.js +74 -1
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +37 -24
- package/abstract-interpretation/domains/bounded-set-domain.js +70 -47
- package/abstract-interpretation/domains/interval-domain.d.ts +33 -25
- package/abstract-interpretation/domains/interval-domain.js +109 -50
- package/abstract-interpretation/domains/lattice.d.ts +19 -11
- package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +34 -0
- package/abstract-interpretation/domains/mapped-abstract-domain.js +189 -0
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +16 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +20 -11
- package/abstract-interpretation/domains/product-domain.d.ts +18 -23
- package/abstract-interpretation/domains/product-domain.js +11 -19
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +29 -0
- package/abstract-interpretation/domains/satisfiable-domain.js +24 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +54 -0
- package/abstract-interpretation/domains/set-upper-bound-domain.js +197 -0
- package/abstract-interpretation/domains/singleton-domain.d.ts +24 -19
- package/abstract-interpretation/domains/singleton-domain.js +52 -37
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +8 -24
- package/abstract-interpretation/domains/state-abstract-domain.js +2 -167
- package/abstract-interpretation/normalized-ast-fold.d.ts +1 -7
- package/abstract-interpretation/normalized-ast-fold.js +0 -5
- package/benchmark/slicer.d.ts +3 -7
- package/benchmark/slicer.js +14 -19
- package/benchmark/stats/print.d.ts +6 -0
- package/benchmark/stats/print.js +6 -0
- package/benchmark/stats/size-of.d.ts +0 -1
- package/benchmark/stats/size-of.js +0 -1
- package/benchmark/stats/stats.d.ts +2 -2
- package/benchmark/stopwatch.d.ts +11 -13
- package/benchmark/stopwatch.js +11 -13
- package/benchmark/summarizer/first-phase/input.d.ts +6 -0
- package/benchmark/summarizer/first-phase/input.js +6 -0
- package/benchmark/summarizer/first-phase/process.d.ts +13 -1
- package/benchmark/summarizer/first-phase/process.js +12 -0
- package/benchmark/summarizer/second-phase/graph.d.ts +3 -0
- package/benchmark/summarizer/second-phase/graph.js +3 -0
- package/benchmark/summarizer/second-phase/process.d.ts +12 -0
- package/benchmark/summarizer/second-phase/process.js +12 -0
- package/benchmark/summarizer/summarizer.d.ts +1 -2
- package/cli/benchmark-app.js +0 -2
- package/cli/common/features.d.ts +7 -1
- package/cli/common/features.js +6 -0
- package/cli/common/script.d.ts +3 -1
- package/cli/common/script.js +3 -1
- package/cli/common/scripts-info.d.ts +3 -1
- package/cli/common/scripts-info.js +3 -0
- package/cli/flowr-main-options.d.ts +3 -0
- package/cli/flowr-main-options.js +3 -0
- package/cli/repl/commands/repl-commands.d.ts +13 -0
- package/cli/repl/commands/repl-commands.js +13 -2
- package/cli/repl/commands/repl-execute.d.ts +4 -0
- package/cli/repl/commands/repl-execute.js +6 -2
- package/cli/repl/commands/repl-main.d.ts +15 -9
- package/cli/repl/commands/repl-parse.js +2 -2
- package/cli/repl/commands/repl-query.js +16 -5
- package/cli/repl/core.d.ts +24 -6
- package/cli/repl/core.js +28 -19
- package/cli/repl/execute.d.ts +0 -2
- package/cli/repl/execute.js +0 -2
- package/cli/repl/parser/slice-query-parser.d.ts +14 -0
- package/cli/repl/parser/slice-query-parser.js +34 -0
- package/cli/repl/print-version.d.ts +6 -0
- package/cli/repl/print-version.js +6 -0
- package/cli/repl/server/compact.d.ts +8 -0
- package/cli/repl/server/compact.js +8 -0
- package/cli/repl/server/connection.d.ts +4 -3
- package/cli/repl/server/connection.js +3 -31
- package/cli/repl/server/messages/all-messages.d.ts +1 -3
- package/cli/repl/server/messages/all-messages.js +0 -1
- package/cli/repl/server/messages/message-analysis.d.ts +0 -2
- package/cli/repl/server/messages/message-query.d.ts +1 -1
- package/cli/repl/server/messages/message-repl.d.ts +0 -1
- package/cli/repl/server/send.d.ts +6 -0
- package/cli/repl/server/send.js +6 -0
- package/cli/repl/server/server.d.ts +1 -1
- package/cli/repl/server/validate.d.ts +10 -1
- package/cli/repl/server/validate.js +9 -0
- package/cli/run-script.d.ts +1 -2
- package/cli/run-script.js +0 -1
- package/cli/script-core/statistics-core.d.ts +3 -0
- package/cli/script-core/statistics-core.js +3 -0
- package/cli/script-core/statistics-helper-core.d.ts +4 -1
- package/cli/script-core/statistics-helper-core.js +3 -0
- package/cli/script-core/summarizer-core.d.ts +3 -0
- package/cli/script-core/summarizer-core.js +3 -0
- package/cli/summarizer-app.d.ts +2 -3
- package/cli/summarizer-app.js +2 -3
- package/config.d.ts +17 -3
- package/config.js +15 -0
- package/control-flow/basic-cfg-guided-visitor.d.ts +1 -2
- package/control-flow/basic-cfg-guided-visitor.js +0 -1
- package/control-flow/cfg-to-basic-blocks.d.ts +1 -1
- package/control-flow/control-flow-graph.d.ts +20 -12
- package/control-flow/control-flow-graph.js +16 -4
- package/control-flow/dfg-cfg-guided-visitor.d.ts +2 -3
- package/control-flow/diff-cfg.d.ts +3 -5
- package/control-flow/diff-cfg.js +0 -1
- package/control-flow/extract-cfg.d.ts +3 -6
- package/control-flow/extract-cfg.js +0 -3
- package/control-flow/happens-before.d.ts +1 -1
- package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -31
- package/control-flow/semantic-cfg-guided-visitor.js +0 -28
- package/control-flow/simple-visitor.d.ts +1 -3
- package/control-flow/simple-visitor.js +0 -2
- package/control-flow/syntax-cfg-guided-visitor.d.ts +1 -2
- package/control-flow/useless-loop.d.ts +0 -3
- package/control-flow/useless-loop.js +2 -5
- package/core/pipeline-executor.d.ts +8 -16
- package/core/pipeline-executor.js +9 -18
- package/core/print/dataflow-printer.d.ts +19 -0
- package/core/print/dataflow-printer.js +19 -0
- package/core/print/normalize-printer.d.ts +21 -1
- package/core/print/normalize-printer.js +20 -0
- package/core/print/parse-printer.d.ts +6 -1
- package/core/print/parse-printer.js +5 -0
- package/core/print/print.d.ts +0 -1
- package/core/print/print.js +0 -1
- package/core/print/slice-diff-ansi.d.ts +3 -0
- package/core/print/slice-diff-ansi.js +3 -0
- package/core/steps/all/core/00-parse.d.ts +1 -1
- package/core/steps/all/core/01-parse-tree-sitter.d.ts +1 -11
- package/core/steps/all/core/10-normalize.d.ts +3 -0
- package/core/steps/all/core/10-normalize.js +3 -0
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +4 -3
- package/core/steps/pipeline/create-pipeline.d.ts +1 -1
- package/core/steps/pipeline/default-pipelines.d.ts +47 -47
- package/core/steps/pipeline/default-pipelines.js +0 -4
- package/core/steps/pipeline/pipeline.d.ts +1 -8
- package/core/steps/pipeline/pipeline.js +1 -3
- package/core/steps/pipeline-step.d.ts +0 -1
- package/core/steps/pipeline-step.js +0 -1
- package/dataflow/cluster.d.ts +3 -0
- package/dataflow/cluster.js +3 -0
- package/dataflow/environments/append.d.ts +1 -1
- package/dataflow/environments/built-in-config.d.ts +1 -5
- package/dataflow/environments/built-in-config.js +0 -1
- package/dataflow/environments/built-in.d.ts +10 -5
- package/dataflow/environments/built-in.js +6 -1
- package/dataflow/environments/clone.d.ts +1 -1
- package/dataflow/environments/default-builtin-config.d.ts +3 -0
- package/dataflow/environments/default-builtin-config.js +4 -1
- package/dataflow/environments/diff.d.ts +11 -2
- package/dataflow/environments/diff.js +9 -0
- package/dataflow/environments/environment.d.ts +3 -3
- package/dataflow/environments/environment.js +8 -6
- package/dataflow/environments/identifier.d.ts +0 -4
- package/dataflow/environments/identifier.js +0 -1
- package/dataflow/environments/overwrite.d.ts +4 -1
- package/dataflow/environments/overwrite.js +3 -0
- package/dataflow/environments/resolve-by-name.d.ts +4 -4
- package/dataflow/environments/resolve-by-name.js +3 -2
- package/dataflow/environments/scoping.d.ts +4 -1
- package/dataflow/environments/scoping.js +3 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +4 -10
- package/dataflow/eval/resolve/alias-tracking.js +11 -14
- package/dataflow/eval/resolve/resolve-argument.d.ts +1 -1
- package/dataflow/eval/resolve/resolve.d.ts +1 -7
- package/dataflow/eval/resolve/resolve.js +0 -5
- package/dataflow/eval/values/general.d.ts +1 -3
- package/dataflow/eval/values/general.js +0 -1
- package/dataflow/eval/values/intervals/interval-constants.d.ts +7 -1
- package/dataflow/eval/values/intervals/interval-constants.js +6 -0
- package/dataflow/eval/values/logical/logical-constants.d.ts +4 -1
- package/dataflow/eval/values/logical/logical-constants.js +3 -0
- package/dataflow/eval/values/r-value.d.ts +12 -0
- package/dataflow/eval/values/r-value.js +12 -0
- package/dataflow/eval/values/scalar/scalar-consatnts.d.ts +7 -1
- package/dataflow/eval/values/scalar/scalar-consatnts.js +6 -0
- package/dataflow/eval/values/sets/set-constants.d.ts +7 -2
- package/dataflow/eval/values/sets/set-constants.js +6 -0
- package/dataflow/eval/values/string/string-constants.d.ts +10 -1
- package/dataflow/eval/values/string/string-constants.js +9 -0
- package/dataflow/eval/values/vectors/vector-constants.d.ts +1 -1
- package/dataflow/extractor.d.ts +1 -1
- package/dataflow/graph/dataflowgraph-builder.d.ts +20 -38
- package/dataflow/graph/dataflowgraph-builder.js +6 -23
- package/dataflow/graph/diff-dataflow-graph.d.ts +16 -6
- package/dataflow/graph/diff-dataflow-graph.js +12 -1
- package/dataflow/graph/edge.d.ts +9 -0
- package/dataflow/graph/edge.js +9 -0
- package/dataflow/graph/graph.d.ts +6 -19
- package/dataflow/graph/graph.js +4 -15
- package/dataflow/graph/invert-dfg.d.ts +3 -0
- package/dataflow/graph/invert-dfg.js +3 -0
- package/dataflow/graph/quads.d.ts +1 -1
- package/dataflow/graph/unknown-replacement.d.ts +6 -0
- package/dataflow/graph/unknown-replacement.js +6 -0
- package/dataflow/graph/unknown-side-effect.d.ts +8 -0
- package/dataflow/graph/unknown-side-effect.js +8 -0
- package/dataflow/graph/vertex.d.ts +9 -9
- package/dataflow/graph/vertex.js +9 -1
- package/dataflow/info.d.ts +9 -10
- package/dataflow/info.js +6 -1
- package/dataflow/internal/linker.d.ts +25 -9
- package/dataflow/internal/linker.js +23 -7
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +6 -0
- package/dataflow/internal/process/functions/call/argument/make-argument.js +6 -0
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +6 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +10 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +6 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +6 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +23 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +20 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +3 -0
- package/dataflow/internal/process/functions/call/common.d.ts +11 -5
- package/dataflow/internal/process/functions/call/common.js +6 -0
- package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -0
- package/dataflow/internal/process/functions/call/default-call-handling.js +3 -0
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -5
- package/dataflow/internal/process/functions/call/known-call-handling.js +7 -0
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +7 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +6 -0
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +4 -1
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +3 -0
- package/dataflow/internal/process/functions/process-argument.d.ts +8 -2
- package/dataflow/internal/process/functions/process-argument.js +6 -0
- package/dataflow/internal/process/functions/process-parameter.d.ts +5 -2
- package/dataflow/internal/process/functions/process-parameter.js +3 -0
- package/dataflow/internal/process/process-symbol.d.ts +3 -0
- package/dataflow/internal/process/process-symbol.js +3 -0
- package/dataflow/internal/process/process-uninteresting-leaf.d.ts +3 -0
- package/dataflow/internal/process/process-uninteresting-leaf.js +3 -0
- package/dataflow/internal/process/process-value.d.ts +3 -0
- package/dataflow/internal/process/process-value.js +3 -0
- package/dataflow/origin/dfg-get-origin.d.ts +0 -2
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +5 -7
- package/dataflow/origin/dfg-get-symbol-refs.js +6 -8
- package/dataflow/processor.d.ts +0 -1
- package/dataflow/processor.js +0 -1
- package/documentation/data/dfg/doc-data-dfg-util.d.ts +6 -0
- package/documentation/data/dfg/doc-data-dfg-util.js +6 -0
- package/documentation/data/faq/faqs.d.ts +5 -0
- package/documentation/data/faq/faqs.js +78 -0
- package/documentation/data/faq/wiki-faq-store.d.ts +18 -0
- package/documentation/data/faq/wiki-faq-store.js +75 -0
- package/documentation/data/server/doc-data-server-messages.d.ts +3 -0
- package/documentation/data/server/doc-data-server-messages.js +4 -63
- package/documentation/doc-util/doc-auto-gen.d.ts +6 -0
- package/documentation/doc-util/doc-auto-gen.js +6 -0
- package/documentation/doc-util/doc-benchmarks.d.ts +12 -0
- package/documentation/doc-util/doc-benchmarks.js +12 -0
- package/documentation/doc-util/doc-cfg.d.ts +7 -1
- package/documentation/doc-util/doc-cfg.js +9 -0
- package/documentation/doc-util/doc-cli-option.d.ts +9 -0
- package/documentation/doc-util/doc-cli-option.js +9 -0
- package/documentation/doc-util/doc-code.d.ts +24 -0
- package/documentation/doc-util/doc-code.js +24 -0
- package/documentation/doc-util/doc-dfg.d.ts +7 -1
- package/documentation/doc-util/doc-dfg.js +9 -0
- package/documentation/doc-util/doc-env.d.ts +3 -0
- package/documentation/doc-util/doc-env.js +3 -0
- package/documentation/doc-util/doc-escape.d.ts +0 -1
- package/documentation/doc-util/doc-escape.js +0 -1
- package/documentation/doc-util/doc-files.d.ts +11 -0
- package/documentation/doc-util/doc-files.js +15 -4
- package/documentation/doc-util/doc-general.d.ts +6 -0
- package/documentation/doc-util/doc-general.js +6 -0
- package/documentation/doc-util/doc-normalized-ast.d.ts +7 -1
- package/documentation/doc-util/doc-normalized-ast.js +6 -0
- package/documentation/doc-util/doc-query.d.ts +15 -0
- package/documentation/doc-util/doc-query.js +17 -2
- package/documentation/doc-util/doc-repl.d.ts +6 -0
- package/documentation/doc-util/doc-repl.js +6 -0
- package/documentation/doc-util/doc-search.d.ts +15 -0
- package/documentation/doc-util/doc-search.js +17 -2
- package/documentation/doc-util/doc-server-message.d.ts +13 -1
- package/documentation/doc-util/doc-server-message.js +13 -1
- package/documentation/doc-util/doc-structure.d.ts +9 -0
- package/documentation/doc-util/doc-structure.js +10 -1
- package/documentation/doc-util/doc-types.d.ts +42 -0
- package/documentation/doc-util/doc-types.js +42 -0
- package/documentation/print-analyzer-wiki.js +4 -0
- package/documentation/print-core-wiki.d.ts +3 -0
- package/documentation/print-core-wiki.js +5 -2
- package/documentation/print-dataflow-graph-wiki.js +5 -5
- package/documentation/print-faq-wiki.js +3 -75
- package/documentation/print-interface-wiki.js +1 -1
- package/documentation/print-onboarding-wiki.js +1 -1
- package/documentation/print-query-wiki.js +4 -34
- package/documentation/print-readme.js +105 -0
- package/engines.d.ts +1 -1
- package/linter/linter-executor.d.ts +6 -3
- package/linter/linter-executor.js +3 -0
- package/linter/linter-format.d.ts +8 -0
- package/linter/linter-format.js +8 -0
- package/linter/rules/absolute-path.d.ts +3 -4
- package/linter/rules/dataframe-access-validation.d.ts +3 -4
- package/linter/rules/dataframe-access-validation.js +9 -11
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.d.ts +1 -1
- package/linter/rules/file-path-validity.d.ts +1 -2
- package/linter/rules/function-finder-util.d.ts +1 -2
- package/linter/rules/naming-convention.d.ts +13 -2
- package/linter/rules/naming-convention.js +13 -1
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/seeded-randomness.d.ts +1 -2
- package/linter/rules/unused-definition.d.ts +2 -3
- package/linter/rules/useless-loop.d.ts +1 -2
- package/package.json +2 -2
- package/project/cache/flowr-analyzer-cache.d.ts +2 -9
- package/project/cache/flowr-analyzer-cache.js +0 -6
- package/project/context/flowr-analyzer-context.d.ts +3 -6
- package/project/context/flowr-analyzer-dependencies-context.d.ts +0 -1
- package/project/context/flowr-analyzer-files-context.d.ts +2 -4
- package/project/context/flowr-file.d.ts +0 -1
- package/project/flowr-analyzer-builder.d.ts +1 -3
- package/project/flowr-analyzer-builder.js +5 -6
- package/project/flowr-analyzer.d.ts +34 -25
- package/project/flowr-analyzer.js +10 -11
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-description-file.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-description-file.js +0 -1
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +1 -1
- package/queries/base-query-format.d.ts +2 -2
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +3 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +3 -0
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +3 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +11 -2
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +9 -0
- package/queries/catalog/cluster-query/cluster-query-executor.d.ts +3 -0
- package/queries/catalog/cluster-query/cluster-query-executor.js +3 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/config-query/config-query-executor.d.ts +3 -0
- package/queries/catalog/config-query/config-query-executor.js +3 -0
- package/queries/catalog/config-query/config-query-format.d.ts +5 -2
- package/queries/catalog/config-query/config-query-format.js +13 -16
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +3 -0
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +3 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +3 -3
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +3 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +3 -0
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +3 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +4 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +7 -4
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +4 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +4 -1
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +8 -4
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +10 -3
- package/queries/catalog/df-shape-query/df-shape-query-format.js +24 -5
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +3 -0
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +3 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-executor.d.ts +3 -0
- package/queries/catalog/id-map-query/id-map-query-executor.js +3 -0
- 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 +3 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
- package/queries/catalog/linter-query/linter-query-executor.d.ts +4 -0
- package/queries/catalog/linter-query/linter-query-executor.js +4 -0
- package/queries/catalog/linter-query/linter-query-format.d.ts +12 -3
- package/queries/catalog/linter-query/linter-query-format.js +67 -0
- package/queries/catalog/location-map-query/location-map-query-executor.d.ts +4 -0
- package/queries/catalog/location-map-query/location-map-query-executor.js +5 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +12 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +3 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +3 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.d.ts +7 -1
- package/queries/catalog/origin-query/origin-query-executor.js +6 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +7 -1
- package/queries/catalog/origin-query/origin-query-format.js +17 -1
- package/queries/catalog/project-query/project-query-executor.d.ts +3 -0
- package/queries/catalog/project-query/project-query-executor.js +3 -0
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +6 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +6 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +7 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +19 -1
- package/queries/catalog/search-query/search-query-executor.d.ts +3 -0
- package/queries/catalog/search-query/search-query-executor.js +3 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +9 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +9 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +7 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.js +17 -0
- package/queries/query-print.d.ts +20 -4
- package/queries/query-print.js +18 -2
- package/queries/query.d.ts +85 -55
- package/queries/query.js +35 -23
- package/queries/virtual-query/virtual-queries.d.ts +1 -2
- package/r-bridge/data/get.d.ts +6 -0
- package/r-bridge/data/get.js +6 -0
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/collect.js +0 -1
- package/r-bridge/lang-4.x/ast/model/model.d.ts +8 -11
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +3 -0
- package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +6 -7
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +6 -6
- package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/processing/visitor.js +0 -1
- package/r-bridge/lang-4.x/ast/model/type.d.ts +4 -5
- package/r-bridge/lang-4.x/ast/model/type.js +4 -5
- package/r-bridge/lang-4.x/ast/model/versions.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/model/versions.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +4 -5
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-line-directive.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-line-directive.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.js +3 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +9 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +9 -0
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.d.ts +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +0 -2
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +14 -5
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +13 -6
- package/r-bridge/lang-4.x/convert-values.d.ts +12 -1
- package/r-bridge/lang-4.x/convert-values.js +12 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +7 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +17 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +13 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +48 -19
- package/r-bridge/parser.d.ts +28 -7
- package/r-bridge/retriever.d.ts +16 -1
- package/r-bridge/retriever.js +15 -0
- package/r-bridge/shell-executor.d.ts +3 -3
- package/r-bridge/shell-executor.js +6 -1
- package/r-bridge/shell.d.ts +24 -23
- package/r-bridge/shell.js +37 -31
- package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
- package/reconstruct/auto-select/magic-comments.d.ts +1 -2
- package/reconstruct/auto-select/magic-comments.js +1 -2
- package/reconstruct/reconstruct.d.ts +1 -3
- package/reconstruct/reconstruct.js +0 -2
- package/search/flowr-search-builder.d.ts +12 -5
- package/search/flowr-search-builder.js +7 -2
- package/search/flowr-search-executor.d.ts +3 -3
- package/search/flowr-search-filters.d.ts +14 -1
- package/search/flowr-search-filters.js +13 -0
- package/search/flowr-search-printer.d.ts +6 -0
- package/search/flowr-search-printer.js +6 -0
- package/search/flowr-search-traverse.d.ts +1 -1
- package/search/flowr-search.d.ts +3 -3
- package/search/search-executor/search-enrichers.d.ts +9 -6
- package/search/search-executor/search-enrichers.js +3 -0
- package/search/search-executor/search-generators.d.ts +19 -10
- package/search/search-executor/search-generators.js +49 -2
- package/search/search-executor/search-mappers.d.ts +8 -5
- package/search/search-executor/search-mappers.js +3 -0
- package/search/search-executor/search-transformer.d.ts +19 -16
- package/search/search-executor/search-transformer.js +3 -0
- package/slicing/criterion/collect-all.d.ts +10 -10
- package/slicing/criterion/parse.d.ts +4 -2
- package/slicing/criterion/parse.js +4 -2
- package/slicing/static/fingerprint.d.ts +9 -1
- package/slicing/static/fingerprint.js +8 -0
- package/slicing/static/slice-call.d.ts +2 -2
- package/slicing/static/static-slicer.d.ts +8 -4
- package/slicing/static/static-slicer.js +5 -1
- package/slicing/static/visiting-queue.d.ts +1 -1
- package/statistics/features/common-syntax-probability.d.ts +10 -1
- package/statistics/features/common-syntax-probability.js +9 -0
- package/statistics/features/feature.d.ts +0 -4
- package/statistics/features/feature.js +0 -1
- package/statistics/features/post-processing.d.ts +6 -0
- package/statistics/features/post-processing.js +6 -0
- package/statistics/features/supported/assignments/post-process.d.ts +3 -0
- package/statistics/features/supported/assignments/post-process.js +3 -0
- package/statistics/features/supported/comments/post-process.d.ts +3 -0
- package/statistics/features/supported/comments/post-process.js +3 -0
- package/statistics/features/supported/control-flow/post-process.d.ts +3 -0
- package/statistics/features/supported/control-flow/post-process.js +3 -0
- package/statistics/features/supported/data-access/data-access.d.ts +1 -1
- package/statistics/features/supported/data-access/post-process.d.ts +3 -0
- package/statistics/features/supported/data-access/post-process.js +3 -0
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +1 -1
- package/statistics/features/supported/expression-list/post-process.d.ts +3 -0
- package/statistics/features/supported/expression-list/post-process.js +3 -0
- package/statistics/features/supported/loops/post-process.d.ts +3 -0
- package/statistics/features/supported/loops/post-process.js +3 -0
- package/statistics/features/supported/used-functions/used-functions.d.ts +1 -1
- package/statistics/features/supported/used-packages/post-process.d.ts +3 -0
- package/statistics/features/supported/used-packages/post-process.js +3 -0
- package/statistics/features/supported/values/post-process.d.ts +3 -0
- package/statistics/features/supported/values/post-process.js +3 -0
- package/statistics/features/supported/variables/post-process.d.ts +7 -1
- package/statistics/features/supported/variables/post-process.js +6 -0
- package/statistics/meta-statistics.d.ts +8 -9
- package/statistics/output/file-provider.d.ts +5 -6
- package/statistics/output/file-provider.js +5 -6
- package/statistics/output/print-stats.d.ts +13 -1
- package/statistics/output/print-stats.js +12 -0
- package/statistics/output/statistics-file.d.ts +1 -2
- package/statistics/output/statistics-file.js +0 -1
- package/statistics/statistics.d.ts +3 -4
- package/statistics/statistics.js +1 -2
- package/statistics/summarizer/auto-detect.d.ts +3 -0
- package/statistics/summarizer/auto-detect.js +3 -0
- package/statistics/summarizer/post-process/clusterer.d.ts +3 -4
- package/statistics/summarizer/post-process/clusterer.js +0 -2
- package/statistics/summarizer/post-process/file-based-count.d.ts +0 -1
- package/statistics/summarizer/post-process/file-based-count.js +0 -1
- package/statistics/summarizer/post-process/histogram.d.ts +0 -2
- package/statistics/summarizer/post-process/histogram.js +0 -2
- package/statistics/summarizer/post-process/post-process-output.d.ts +2 -4
- package/statistics/summarizer/post-process/post-process-output.js +0 -3
- package/statistics/summarizer/second-phase/process.d.ts +5 -3
- package/statistics/summarizer/second-phase/process.js +3 -1
- package/statistics/summarizer/summarizer.d.ts +1 -2
- package/util/assert.d.ts +52 -2
- package/util/assert.js +52 -2
- package/util/collections/arrays.d.ts +10 -5
- package/util/collections/arrays.js +10 -5
- package/util/collections/defaultmap.d.ts +11 -11
- package/util/collections/defaultmap.js +11 -11
- package/util/containers.d.ts +2 -7
- package/util/containers.js +0 -5
- package/util/diff-graph.d.ts +0 -1
- package/util/diff-graph.js +0 -1
- package/util/diff.d.ts +3 -1
- package/util/diff.js +3 -1
- package/util/files.d.ts +11 -11
- package/util/files.js +10 -10
- package/util/formats/adapter.d.ts +9 -0
- package/util/formats/adapter.js +9 -0
- package/util/formats/adapters/rmd-adapter.d.ts +10 -1
- package/util/formats/adapters/rmd-adapter.js +10 -1
- package/util/html-hover-over.d.ts +5 -0
- package/util/html-hover-over.js +5 -0
- package/util/json.d.ts +13 -0
- package/util/json.js +13 -0
- package/util/log.d.ts +2 -2
- package/util/log.js +2 -2
- package/util/mermaid/ast.d.ts +3 -0
- package/util/mermaid/ast.js +3 -0
- package/util/mermaid/cfg.d.ts +1 -1
- package/util/mermaid/dfg.d.ts +12 -4
- package/util/mermaid/dfg.js +9 -1
- package/util/mermaid/mermaid.d.ts +6 -1
- package/util/mermaid/mermaid.js +6 -1
- package/util/numbers.d.ts +7 -0
- package/util/numbers.js +7 -0
- package/util/objects.d.ts +0 -2
- package/util/os.d.ts +3 -0
- package/util/os.js +3 -0
- package/util/parallel.d.ts +4 -4
- package/util/parallel.js +4 -4
- package/util/prefix.d.ts +0 -1
- package/util/prefix.js +0 -1
- package/util/quads.d.ts +14 -17
- package/util/quads.js +3 -5
- package/util/r-value.d.ts +10 -1
- package/util/r-value.js +21 -0
- package/util/random.d.ts +3 -0
- package/util/random.js +3 -0
- package/util/range.d.ts +9 -3
- package/util/range.js +15 -2
- package/util/schema.d.ts +14 -1
- package/util/schema.js +15 -2
- package/util/simple-df/dfg-view.d.ts +4 -1
- package/util/simple-df/dfg-view.js +4 -1
- package/util/summarizer.d.ts +9 -1
- package/util/summarizer.js +9 -0
- package/util/text/ansi.d.ts +3 -0
- package/util/text/ansi.js +3 -0
- package/util/text/args.d.ts +2 -4
- package/util/text/args.js +7 -5
- package/util/text/text.d.ts +4 -0
- package/util/text/text.js +4 -0
- package/util/text/time.d.ts +0 -1
- package/util/text/time.js +0 -1
- package/util/version.d.ts +12 -3
- package/util/version.js +12 -3
- package/abstract-interpretation/data-frame/domain.d.ts +0 -107
- package/abstract-interpretation/data-frame/domain.js +0 -315
- package/abstract-interpretation/domains/set-bounded-set-domain.d.ts +0 -43
- package/abstract-interpretation/domains/set-bounded-set-domain.js +0 -164
- package/cli/repl/commands/repl-lineage.d.ts +0 -15
- package/cli/repl/commands/repl-lineage.js +0 -66
- package/cli/repl/server/messages/message-lineage.d.ts +0 -17
- package/cli/repl/server/messages/message-lineage.js +0 -25
- package/queries/catalog/lineage-query/lineage-query-executor.d.ts +0 -3
- package/queries/catalog/lineage-query/lineage-query-executor.js +0 -22
- package/queries/catalog/lineage-query/lineage-query-format.d.ts +0 -22
- package/queries/catalog/lineage-query/lineage-query-format.js +0 -31
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ It offers a wide variety of features, for example:
|
|
|
16
16
|
Analyze your R scripts for common issues and potential bugs (see the [wiki page](https://github.com/flowr-analysis/flowr/wiki/Linter) for more information on the currently supported linters).
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
<details><summary
|
|
19
|
+
<details><summary>Example: Linting code with flowR</summary>
|
|
20
20
|
|
|
21
21
|
To lint your code, you can use the [REPL](https://github.com/flowr-analysis/flowr/wiki/Interface#using-the-repl) or the [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr) (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
|
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
26
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
27
|
-
flowR repl using flowR v2.6.
|
|
27
|
+
flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
|
|
28
28
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -41,11 +41,11 @@ It offers a wide variety of features, for example:
|
|
|
41
41
|
╰ Path `/root/x.txt` at 1.1-23
|
|
42
42
|
╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":1,"processTimeMs":0}</code>
|
|
43
43
|
╰ **Seeded Randomness** (seeded-randomness):
|
|
44
|
-
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":
|
|
44
|
+
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
45
45
|
╰ **Absolute Paths** (absolute-file-paths):
|
|
46
46
|
╰ certain:
|
|
47
47
|
╰ Path `/root/x.txt` at 1.1-23
|
|
48
|
-
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":
|
|
48
|
+
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":1,"processTimeMs":0}</code>
|
|
49
49
|
╰ **Unused Definitions** (unused-definitions):
|
|
50
50
|
╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
51
51
|
╰ **Naming Convention** (naming-convention):
|
|
@@ -53,7 +53,7 @@ It offers a wide variety of features, for example:
|
|
|
53
53
|
╰ **Network Functions** (network-functions):
|
|
54
54
|
╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
55
55
|
╰ **Dataframe Access Validation** (dataframe-access-validation):
|
|
56
|
-
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":
|
|
56
|
+
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":1}</code>
|
|
57
57
|
╰ **Dead Code** (dead-code):
|
|
58
58
|
╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":0}</code>
|
|
59
59
|
╰ **Useless Loops** (useless-loop):
|
|
@@ -80,36 +80,36 @@ It offers a wide variety of features, for example:
|
|
|
80
80
|
|
|
81
81
|
_Results (prettified and summarized):_
|
|
82
82
|
|
|
83
|
-
Query: **linter** (
|
|
83
|
+
Query: **linter** (212 ms)\
|
|
84
84
|
╰ **Deprecated Functions** (deprecated-functions):\
|
|
85
|
-
╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":
|
|
85
|
+
╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":198,"processTimeMs":0}</code>\
|
|
86
86
|
╰ **File Path Validity** (file-path-validity):\
|
|
87
87
|
╰ certain:\
|
|
88
88
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
89
|
-
╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":
|
|
89
|
+
╰ _Metadata_: <code>{"totalReads":1,"totalUnknown":0,"totalWritesBeforeAlways":0,"totalValid":0,"searchTimeMs":5,"processTimeMs":1}</code>\
|
|
90
90
|
╰ **Seeded Randomness** (seeded-randomness):\
|
|
91
|
-
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":
|
|
91
|
+
╰ _Metadata_: <code>{"consumerCalls":0,"callsWithFunctionProducers":0,"callsWithAssignmentProducers":0,"callsWithNonConstantProducers":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
92
92
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
93
93
|
╰ certain:\
|
|
94
94
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
95
|
-
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":2,"processTimeMs":
|
|
95
|
+
╰ _Metadata_: <code>{"totalConsidered":1,"totalUnknown":0,"searchTimeMs":2,"processTimeMs":1}</code>\
|
|
96
96
|
╰ **Unused Definitions** (unused-definitions):\
|
|
97
97
|
╰ _Metadata_: <code>{"totalConsidered":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
98
98
|
╰ **Naming Convention** (naming-convention):\
|
|
99
99
|
╰ _Metadata_: <code>{"numMatches":0,"numBreak":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
100
100
|
╰ **Network Functions** (network-functions):\
|
|
101
|
-
╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":
|
|
101
|
+
╰ _Metadata_: <code>{"totalCalls":0,"totalFunctionDefinitions":0,"searchTimeMs":0,"processTimeMs":1}</code>\
|
|
102
102
|
╰ **Dataframe Access Validation** (dataframe-access-validation):\
|
|
103
|
-
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":
|
|
103
|
+
╰ _Metadata_: <code>{"numOperations":0,"numAccesses":0,"totalAccessed":0,"searchTimeMs":0,"processTimeMs":2}</code>\
|
|
104
104
|
╰ **Dead Code** (dead-code):\
|
|
105
105
|
╰ _Metadata_: <code>{"consideredNodes":5,"searchTimeMs":0,"processTimeMs":1}</code>\
|
|
106
106
|
╰ **Useless Loops** (useless-loop):\
|
|
107
107
|
╰ _Metadata_: <code>{"numOfUselessLoops":0,"searchTimeMs":0,"processTimeMs":0}</code>\
|
|
108
|
-
_All queries together required ≈213 ms (1ms accuracy, total
|
|
108
|
+
_All queries together required ≈213 ms (1ms accuracy, total 213 ms)_
|
|
109
109
|
|
|
110
110
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
111
111
|
|
|
112
|
-
The analysis required
|
|
112
|
+
The analysis required _213.3 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
113
113
|
|
|
114
114
|
In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
|
|
115
115
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -126,8 +126,8 @@ It offers a wide variety of features, for example:
|
|
|
126
126
|
".meta": {
|
|
127
127
|
"totalCalls": 0,
|
|
128
128
|
"totalFunctionDefinitions": 0,
|
|
129
|
-
"searchTimeMs":
|
|
130
|
-
"processTimeMs":
|
|
129
|
+
"searchTimeMs": 198,
|
|
130
|
+
"processTimeMs": 0
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"file-path-validity": {
|
|
@@ -148,7 +148,7 @@ It offers a wide variety of features, for example:
|
|
|
148
148
|
"totalUnknown": 0,
|
|
149
149
|
"totalWritesBeforeAlways": 0,
|
|
150
150
|
"totalValid": 0,
|
|
151
|
-
"searchTimeMs":
|
|
151
|
+
"searchTimeMs": 5,
|
|
152
152
|
"processTimeMs": 1
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -160,7 +160,7 @@ It offers a wide variety of features, for example:
|
|
|
160
160
|
"callsWithAssignmentProducers": 0,
|
|
161
161
|
"callsWithNonConstantProducers": 0,
|
|
162
162
|
"searchTimeMs": 0,
|
|
163
|
-
"processTimeMs":
|
|
163
|
+
"processTimeMs": 0
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
"absolute-file-paths": {
|
|
@@ -180,7 +180,7 @@ It offers a wide variety of features, for example:
|
|
|
180
180
|
"totalConsidered": 1,
|
|
181
181
|
"totalUnknown": 0,
|
|
182
182
|
"searchTimeMs": 2,
|
|
183
|
-
"processTimeMs":
|
|
183
|
+
"processTimeMs": 1
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"unused-definitions": {
|
|
@@ -205,8 +205,8 @@ It offers a wide variety of features, for example:
|
|
|
205
205
|
".meta": {
|
|
206
206
|
"totalCalls": 0,
|
|
207
207
|
"totalFunctionDefinitions": 0,
|
|
208
|
-
"searchTimeMs":
|
|
209
|
-
"processTimeMs":
|
|
208
|
+
"searchTimeMs": 0,
|
|
209
|
+
"processTimeMs": 1
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
212
|
"dataframe-access-validation": {
|
|
@@ -216,7 +216,7 @@ It offers a wide variety of features, for example:
|
|
|
216
216
|
"numAccesses": 0,
|
|
217
217
|
"totalAccessed": 0,
|
|
218
218
|
"searchTimeMs": 0,
|
|
219
|
-
"processTimeMs":
|
|
219
|
+
"processTimeMs": 2
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"dead-code": {
|
|
@@ -237,7 +237,7 @@ It offers a wide variety of features, for example:
|
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
".meta": {
|
|
240
|
-
"timing":
|
|
240
|
+
"timing": 212
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
243
|
".meta": {
|
|
@@ -272,7 +272,7 @@ It offers a wide variety of features, for example:
|
|
|
272
272
|
for the computation of the point of interest.
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
<details><summary
|
|
275
|
+
<details><summary>Example: Slicing with flowR</summary>
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
The simplest way to retrieve slices is with flowR's [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr).
|
|
@@ -306,7 +306,7 @@ It offers a wide variety of features, for example:
|
|
|
306
306
|
|
|
307
307
|
```shell
|
|
308
308
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
309
|
-
flowR repl using flowR v2.6.
|
|
309
|
+
flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
|
|
310
310
|
R> :slicer test/testfiles/example.R --criterion "11@sum"
|
|
311
311
|
```
|
|
312
312
|
|
|
@@ -340,7 +340,7 @@ It offers a wide variety of features, for example:
|
|
|
340
340
|
the data files it reads, the scripts it sources, and the data it outputs.
|
|
341
341
|
|
|
342
342
|
|
|
343
|
-
<details><summary
|
|
343
|
+
<details><summary>Example: Dependency Analysis with flowR</summary>
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
The following showcases the dependency view of the [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr):
|
|
@@ -353,12 +353,12 @@ It offers a wide variety of features, for example:
|
|
|
353
353
|
|
|
354
354
|
|
|
355
355
|
* 🚀 **fast data- and control-flow graphs**\
|
|
356
|
-
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
356
|
+
Within just <i><span title="This measurement is automatically fetched from the latest benchmark!">137.6 ms</span></i> (as of Oct 21, 2025),
|
|
357
357
|
_flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
|
|
358
358
|
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the dataflow graph.
|
|
359
359
|
|
|
360
360
|
|
|
361
|
-
<details><summary
|
|
361
|
+
<details><summary>Example: Generating a dataflow graph with flowR</summary>
|
|
362
362
|
|
|
363
363
|
|
|
364
364
|
You can investigate flowR's analyses using the [REPL](https://github.com/flowr-analysis/flowr/wiki/Interface#using-the-repl).
|
|
@@ -389,7 +389,7 @@ It offers a wide variety of features, for example:
|
|
|
389
389
|
|
|
390
390
|
```shell
|
|
391
391
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
392
|
-
flowR repl using flowR v2.6.
|
|
392
|
+
flowR repl using flowR v2.6.1, R v4.5.0 (r-shell engine)
|
|
393
393
|
R> :dataflow* test/testfiles/example.R
|
|
394
394
|
```
|
|
395
395
|
|
|
@@ -694,7 +694,7 @@ It offers a wide variety of features, for example:
|
|
|
694
694
|
```
|
|
695
695
|
|
|
696
696
|
|
|
697
|
-
(The analysis required
|
|
697
|
+
(The analysis required _14.2 ms_ (including parse and normalize, using the [r-shell](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
|
|
698
698
|
|
|
699
699
|
|
|
700
700
|
|
|
@@ -752,6 +752,107 @@ If you want to use the same commands:
|
|
|
752
752
|
For more details on how to use _flowR_ please refer to the [wiki pages](https://github.com/flowr-analysis/flowr/wiki),
|
|
753
753
|
as well as the deployed [code documentation](https://flowr-analysis.github.io/flowr/doc/).
|
|
754
754
|
|
|
755
|
+
## 📃 Publications on flowR
|
|
756
|
+
|
|
757
|
+
If you are interested in the theoretical background of _flowR_,
|
|
758
|
+
please check out the following publications (if you find that a paper is missing here, please open [a new issue](https://github.com/flowr-analysis/flowr/issues/new/choose)):
|
|
759
|
+
|
|
760
|
+
* [Statically Analyzing the Dataflow of R Programs (OOPSLA '25)](https://doi.org/10.1145/3763087)
|
|
761
|
+
Please cite this paper if you are using flowR in your research.
|
|
762
|
+
<details><summary>BibTeX</summary>
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
```bibtex
|
|
766
|
+
@article{10.1145/3763087,
|
|
767
|
+
author = {Sihler, Florian and Tichy, Matthias},
|
|
768
|
+
title = {Statically Analyzing the Dataflow of R Programs},
|
|
769
|
+
year = {2025},
|
|
770
|
+
issue_date = {October 2025},
|
|
771
|
+
publisher = {Association for Computing Machinery},
|
|
772
|
+
address = {New York, NY, USA},
|
|
773
|
+
volume = {9},
|
|
774
|
+
number = {OOPSLA2},
|
|
775
|
+
url = {https://doi.org/10.1145/3763087},
|
|
776
|
+
doi = {10.1145/3763087},
|
|
777
|
+
abstract = {The R programming language is primarily designed for statistical computing and mostly used by researchers without a background in computer science. R provides a wide range of dynamic features and peculiarities that are difficult to analyze statically like dynamic scoping and lazy evaluation with dynamic side effects. At the same time, the R ecosystem lacks sophisticated analysis tools that support researchers in understanding and improving their code. In this paper, we present a novel static dataflow analysis framework for the R programming language that is capable of handling the dynamic nature of R programs and produces the dataflow graph of given R programs. This graph can be essential in a range of analyses, including program slicing, which we implement as a proof of concept. The core analysis works as a stateful fold over a normalized version of the abstract syntax tree of the R program, which tracks (re-)definitions, values, function calls, side effects, external files, and a dynamic control flow to produce one dataflow graph per program. We evaluate the correctness of our analysis using output equivalence testing on a manually curated dataset of 779 sensible slicing points from executable real-world R scripts. Additionally, we use a set of systematic test cases based on the capabilities of the R language and the implementation of the R interpreter and measure the runtimes well as the memory consumption on a set of 4,230 real-world R scripts and 20,815 packages available on R’s package manager CRAN. Furthermore, we evaluate the recall of our program slicer, its accuracy using shrinking, and its improvement over the state of the art. We correctly analyze almost all programs in our equivalence test suite, preserving the identical output for 99.7\% of the manually curated slicing points. On average, we require 576ms to analyze the dataflow and around 213kB to store the graph of a research script. This shows that our analysis is capable of analyzing real-world sources quickly and correctly. Our slicer achieves an average reduction of 84.8\% of tokens indicating its potential to improve program comprehension.},
|
|
778
|
+
journal = {Proc. ACM Program. Lang.},
|
|
779
|
+
month = oct,
|
|
780
|
+
articleno = {309},
|
|
781
|
+
numpages = {29},
|
|
782
|
+
keywords = {Dataflow Analysis, R Programming Language, Static Analysis}
|
|
783
|
+
}
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
</details>
|
|
788
|
+
|
|
789
|
+
* [flowR: A Static Program Slicer for R (ASE '24, Tool)](https://doi.org/10.1145/3691620.3695359)
|
|
790
|
+
This refers to the tool-demonstration of the <a href="https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr">VS Code Extension</a>.
|
|
791
|
+
<details><summary>BibTeX</summary>
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
```bibtex
|
|
795
|
+
@inproceedings{DBLP:conf/kbse/SihlerT24,
|
|
796
|
+
author = {Florian Sihler and
|
|
797
|
+
Matthias Tichy},
|
|
798
|
+
editor = {Vladimir Filkov and
|
|
799
|
+
Baishakhi Ray and
|
|
800
|
+
Minghui Zhou},
|
|
801
|
+
title = {flowR: {A} Static Program Slicer for {R}},
|
|
802
|
+
booktitle = {Proceedings of the 39th {IEEE/ACM} International Conference on Automated
|
|
803
|
+
Software Engineering, {ASE} 2024, Sacramento, CA, USA, October 27
|
|
804
|
+
- November 1, 2024},
|
|
805
|
+
pages = {2390--2393},
|
|
806
|
+
publisher = {{ACM}},
|
|
807
|
+
year = {2024},
|
|
808
|
+
url = {https://doi.org/10.1145/3691620.3695359},
|
|
809
|
+
doi = {10.1145/3691620.3695359},
|
|
810
|
+
timestamp = {Mon, 03 Mar 2025 21:16:51 +0100},
|
|
811
|
+
biburl = {https://dblp.org/rec/conf/kbse/SihlerT24.bib},
|
|
812
|
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
|
813
|
+
}
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
</details>
|
|
818
|
+
|
|
819
|
+
* [On the Anatomy of Real-World R Code for Static Analysis (MSR '24)](https://doi.org/10.1145/3643991.3644911)
|
|
820
|
+
This paper lays the foundation for flowR by analyzing the characteristics of real-world R code.
|
|
821
|
+
<details><summary>BibTeX</summary>
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
```bibtex
|
|
825
|
+
@inproceedings{DBLP:conf/msr/SihlerPSTDD24,
|
|
826
|
+
author = {Florian Sihler and
|
|
827
|
+
Lukas Pietzschmann and
|
|
828
|
+
Raphael Straub and
|
|
829
|
+
Matthias Tichy and
|
|
830
|
+
Andor Diera and
|
|
831
|
+
Abdelhalim Hafedh Dahou},
|
|
832
|
+
editor = {Diomidis Spinellis and
|
|
833
|
+
Alberto Bacchelli and
|
|
834
|
+
Eleni Constantinou},
|
|
835
|
+
title = {On the Anatomy of Real-World {R} Code for Static Analysis},
|
|
836
|
+
booktitle = {21st {IEEE/ACM} International Conference on Mining Software Repositories,
|
|
837
|
+
{MSR} 2024, Lisbon, Portugal, April 15-16, 2024},
|
|
838
|
+
pages = {619--630},
|
|
839
|
+
publisher = {{ACM}},
|
|
840
|
+
year = {2024},
|
|
841
|
+
url = {https://doi.org/10.1145/3643991.3644911},
|
|
842
|
+
doi = {10.1145/3643991.3644911},
|
|
843
|
+
timestamp = {Sun, 19 Jan 2025 13:31:27 +0100},
|
|
844
|
+
biburl = {https://dblp.org/rec/conf/msr/SihlerPSTDD24.bib},
|
|
845
|
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
|
846
|
+
}
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
</details>
|
|
851
|
+
|
|
852
|
+
Works using flowR include:
|
|
853
|
+
[Computational Reproducibility of R Code Supplements on OSF](https://doi.org/10.36190/2025.49) and [Multi-View Structural Graph Summaries](https://doi.org/10.1109/WI-IAT62293.2024.00037).
|
|
854
|
+
|
|
855
|
+
|
|
755
856
|
## 🚀 Contributing
|
|
756
857
|
|
|
757
858
|
We welcome every contribution! Please check out the [developer onboarding](https://github.com/flowr-analysis/flowr/wiki/Onboarding) section in the wiki for all the information you will need.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RNode } from '../../r-bridge/lang-4.x/ast/model/model';
|
|
2
2
|
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
3
3
|
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
4
|
-
import type { DataFrameStateDomain } from './domain';
|
|
4
|
+
import type { DataFrameStateDomain } from './dataframe-domain';
|
|
5
5
|
import type { ConstraintType, DataFrameOperationArgs, DataFrameOperationName, DataFrameOperationOptions } from './semantics';
|
|
6
6
|
/**
|
|
7
7
|
* An abstract data frame operation without additional options.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import { SemanticCfgGuidedVisitor } from '../../control-flow/semantic-cfg-guided-visitor';
|
|
1
|
+
import { type CfgBasicBlockVertex, type CfgSimpleVertex, type ControlFlowInformation } from '../../control-flow/control-flow-graph';
|
|
2
|
+
import { type SemanticCfgGuidedVisitorConfiguration, SemanticCfgGuidedVisitor } from '../../control-flow/semantic-cfg-guided-visitor';
|
|
4
3
|
import type { DataflowGraph } from '../../dataflow/graph/graph';
|
|
5
4
|
import type { DataflowGraphVertexFunctionCall, DataflowGraphVertexVariableDefinition } from '../../dataflow/graph/vertex';
|
|
6
5
|
import type { NoInfo } from '../../r-bridge/lang-4.x/ast/model/model';
|
|
@@ -5,7 +5,7 @@ const control_flow_graph_1 = require("../../control-flow/control-flow-graph");
|
|
|
5
5
|
const semantic_cfg_guided_visitor_1 = require("../../control-flow/semantic-cfg-guided-visitor");
|
|
6
6
|
const assert_1 = require("../../util/assert");
|
|
7
7
|
const absint_info_1 = require("./absint-info");
|
|
8
|
-
const
|
|
8
|
+
const dataframe_domain_1 = require("./dataframe-domain");
|
|
9
9
|
const access_mapper_1 = require("./mappers/access-mapper");
|
|
10
10
|
const assignment_mapper_1 = require("./mappers/assignment-mapper");
|
|
11
11
|
const function_mapper_1 = require("./mappers/function-mapper");
|
|
@@ -20,12 +20,12 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
20
20
|
* The old domain of an AST node before processing the node retrieved from the attached {@link AbstractInterpretationInfo}.
|
|
21
21
|
* This is used to check whether the state has changed and successors should be visited again, and is also required for widening.
|
|
22
22
|
*/
|
|
23
|
-
oldDomain =
|
|
23
|
+
oldDomain = dataframe_domain_1.DataFrameStateDomain.bottom();
|
|
24
24
|
/**
|
|
25
25
|
* The new domain of an AST node during and after processing the node.
|
|
26
26
|
* This information is stored in the {@link AbstractInterpretationInfo} afterward.
|
|
27
27
|
*/
|
|
28
|
-
newDomain =
|
|
28
|
+
newDomain = dataframe_domain_1.DataFrameStateDomain.bottom();
|
|
29
29
|
constructor(config) {
|
|
30
30
|
super({ ...config, defaultVisitingOrder: 'forward', defaultVisitingType: 'exit' });
|
|
31
31
|
}
|
|
@@ -36,22 +36,26 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
36
36
|
return true;
|
|
37
37
|
}
|
|
38
38
|
const predecessors = this.getPredecessorNodes(vertex.id);
|
|
39
|
-
|
|
39
|
+
const predecessorDomains = predecessors.map(node => node.info.dataFrame?.domain).filter(assert_1.isNotUndefined);
|
|
40
|
+
this.newDomain = dataframe_domain_1.DataFrameStateDomain.bottom().joinAll(predecessorDomains);
|
|
40
41
|
this.onVisitNode(nodeId);
|
|
41
42
|
const visitedCount = this.visited.get(vertex.id) ?? 0;
|
|
42
43
|
this.visited.set(vertex.id, visitedCount + 1);
|
|
43
44
|
// only continue visiting if the node has not been visited before or the data frame value of the node changed
|
|
44
|
-
return visitedCount === 0 || !
|
|
45
|
+
return visitedCount === 0 || !this.oldDomain.equals(this.newDomain);
|
|
45
46
|
}
|
|
46
47
|
visitDataflowNode(vertex) {
|
|
47
48
|
const node = this.getNormalizedAst((0, control_flow_graph_1.getVertexRootId)(vertex));
|
|
48
49
|
if (node === undefined) {
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
|
-
this.oldDomain = node.info.dataFrame?.domain ??
|
|
52
|
+
this.oldDomain = node.info.dataFrame?.domain ?? dataframe_domain_1.DataFrameStateDomain.bottom();
|
|
52
53
|
super.visitDataflowNode(vertex);
|
|
54
|
+
if (this.config.dfg.unknownSideEffects.has((0, control_flow_graph_1.getVertexRootId)(vertex))) {
|
|
55
|
+
this.newDomain = this.newDomain.bottom();
|
|
56
|
+
}
|
|
53
57
|
if (this.shouldWiden(vertex)) {
|
|
54
|
-
this.newDomain =
|
|
58
|
+
this.newDomain = this.oldDomain.widen(this.newDomain);
|
|
55
59
|
}
|
|
56
60
|
node.info.dataFrame ??= {};
|
|
57
61
|
node.info.dataFrame.domain = this.newDomain;
|
|
@@ -107,7 +111,7 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
107
111
|
const identifier = this.getNormalizedAst(node.info.dataFrame.identifier);
|
|
108
112
|
if (identifier !== undefined) {
|
|
109
113
|
identifier.info.dataFrame ??= {};
|
|
110
|
-
identifier.info.dataFrame.domain =
|
|
114
|
+
identifier.info.dataFrame.domain = this.newDomain.create(this.newDomain.value);
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
117
|
}
|
|
@@ -115,10 +119,11 @@ class DataFrameShapeInferenceVisitor extends semantic_cfg_guided_visitor_1.Seman
|
|
|
115
119
|
if (!(0, absint_info_1.hasDataFrameExpressionInfo)(node)) {
|
|
116
120
|
return;
|
|
117
121
|
}
|
|
118
|
-
|
|
122
|
+
const maxColNames = this.config.flowrConfig.abstractInterpretation.dataFrame.maxColNames;
|
|
123
|
+
let value = dataframe_domain_1.DataFrameDomain.top(maxColNames);
|
|
119
124
|
for (const { operation, operand, type, options, ...args } of node.info.dataFrame.operations) {
|
|
120
125
|
const operandValue = operand !== undefined ? (0, shape_inference_1.resolveIdToDataFrameShape)(operand, this.config.dfg, this.newDomain) : value;
|
|
121
|
-
value = (0, semantics_1.applyDataFrameSemantics)(operation, operandValue ??
|
|
126
|
+
value = (0, semantics_1.applyDataFrameSemantics)(operation, operandValue ?? dataframe_domain_1.DataFrameDomain.top(maxColNames), args, options);
|
|
122
127
|
const constraintType = type ?? (0, semantics_1.getConstraintType)(operation);
|
|
123
128
|
if (operand !== undefined && constraintType === semantics_1.ConstraintType.OperandModification) {
|
|
124
129
|
this.newDomain.set(operand, value);
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
2
|
+
import type { AbstractDomainValue } from '../domains/abstract-domain';
|
|
2
3
|
import { PosIntervalDomain } from '../domains/positive-interval-domain';
|
|
3
4
|
import { ProductDomain } from '../domains/product-domain';
|
|
4
|
-
import {
|
|
5
|
+
import { SetUpperBoundDomain } from '../domains/set-upper-bound-domain';
|
|
5
6
|
import { StateAbstractDomain } from '../domains/state-abstract-domain';
|
|
6
7
|
/** The type of the abstract product representing the shape of data frames */
|
|
7
8
|
export type AbstractDataFrameShape = {
|
|
8
|
-
colnames:
|
|
9
|
+
colnames: SetUpperBoundDomain<string>;
|
|
9
10
|
cols: PosIntervalDomain;
|
|
10
11
|
rows: PosIntervalDomain;
|
|
11
12
|
};
|
|
12
|
-
/** The type of abstract values of a sub abstract domain (shape property) of the data frame shape product */
|
|
13
|
-
type DataFrameShapeProperty<Property extends keyof AbstractDataFrameShape> = AbstractDataFrameShape[Property]
|
|
13
|
+
/** The type of abstract values of a sub abstract domain (shape property) of the data frame shape product domain */
|
|
14
|
+
export type DataFrameShapeProperty<Property extends keyof AbstractDataFrameShape> = AbstractDomainValue<AbstractDataFrameShape[Property]>;
|
|
14
15
|
/**
|
|
15
16
|
* The data frame abstract domain as product domain of a column names domain, column count domain, and row count domain.
|
|
16
17
|
*/
|
|
17
18
|
export declare class DataFrameDomain extends ProductDomain<AbstractDataFrameShape> {
|
|
18
19
|
constructor(value: AbstractDataFrameShape, maxColNames?: number);
|
|
19
|
-
create(value: AbstractDataFrameShape
|
|
20
|
+
create(value: AbstractDataFrameShape): this;
|
|
20
21
|
/**
|
|
21
22
|
* The current abstract value of the column names domain.
|
|
22
23
|
*/
|
|
23
|
-
get colnames():
|
|
24
|
+
get colnames(): AbstractDataFrameShape['colnames'];
|
|
24
25
|
/**
|
|
25
26
|
* The current abstract value of the column count domain.
|
|
26
27
|
*/
|
|
27
|
-
get cols():
|
|
28
|
+
get cols(): AbstractDataFrameShape['cols'];
|
|
28
29
|
/**
|
|
29
30
|
* The current abstract value of the row count domain.
|
|
30
31
|
*/
|
|
31
|
-
get rows():
|
|
32
|
+
get rows(): AbstractDataFrameShape['rows'];
|
|
33
|
+
/**
|
|
34
|
+
* The maximum number of inferred column names of the column names domain.
|
|
35
|
+
*/
|
|
36
|
+
get maxColNames(): number;
|
|
32
37
|
static bottom(maxColNames?: number): DataFrameDomain;
|
|
33
38
|
static top(maxColNames?: number): DataFrameDomain;
|
|
34
39
|
}
|
|
35
40
|
/**
|
|
36
|
-
* The data frame state abstract domain as state
|
|
41
|
+
* The data frame state abstract domain as state domain mapping AST node IDs to inferred abstract data frame shapes.
|
|
37
42
|
*/
|
|
38
|
-
export declare class
|
|
43
|
+
export declare class DataFrameStateDomain extends StateAbstractDomain<DataFrameDomain> {
|
|
44
|
+
create(value: ReadonlyMap<NodeId, DataFrameDomain>): this;
|
|
45
|
+
static bottom(): DataFrameStateDomain;
|
|
39
46
|
}
|
|
40
|
-
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DataFrameStateDomain = exports.DataFrameDomain = void 0;
|
|
4
4
|
const positive_interval_domain_1 = require("../domains/positive-interval-domain");
|
|
5
5
|
const product_domain_1 = require("../domains/product-domain");
|
|
6
|
-
const
|
|
6
|
+
const set_upper_bound_domain_1 = require("../domains/set-upper-bound-domain");
|
|
7
7
|
const state_abstract_domain_1 = require("../domains/state-abstract-domain");
|
|
8
8
|
/**
|
|
9
9
|
* The data frame abstract domain as product domain of a column names domain, column count domain, and row count domain.
|
|
@@ -11,42 +11,48 @@ const state_abstract_domain_1 = require("../domains/state-abstract-domain");
|
|
|
11
11
|
class DataFrameDomain extends product_domain_1.ProductDomain {
|
|
12
12
|
constructor(value, maxColNames) {
|
|
13
13
|
super({
|
|
14
|
-
colnames: new
|
|
14
|
+
colnames: new set_upper_bound_domain_1.SetUpperBoundDomain(value.colnames.value, maxColNames ?? value.colnames.limit),
|
|
15
15
|
cols: new positive_interval_domain_1.PosIntervalDomain(value.cols.value),
|
|
16
16
|
rows: new positive_interval_domain_1.PosIntervalDomain(value.rows.value)
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
create(value
|
|
20
|
-
return new DataFrameDomain(value, maxColNames);
|
|
19
|
+
create(value) {
|
|
20
|
+
return new DataFrameDomain(value, this.maxColNames);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* The current abstract value of the column names domain.
|
|
24
24
|
*/
|
|
25
25
|
get colnames() {
|
|
26
|
-
return this.value.colnames
|
|
26
|
+
return this.value.colnames;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* The current abstract value of the column count domain.
|
|
30
30
|
*/
|
|
31
31
|
get cols() {
|
|
32
|
-
return this.value.cols
|
|
32
|
+
return this.value.cols;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* The current abstract value of the row count domain.
|
|
36
36
|
*/
|
|
37
37
|
get rows() {
|
|
38
|
-
return this.value.rows
|
|
38
|
+
return this.value.rows;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The maximum number of inferred column names of the column names domain.
|
|
42
|
+
*/
|
|
43
|
+
get maxColNames() {
|
|
44
|
+
return this.value.colnames.limit;
|
|
39
45
|
}
|
|
40
46
|
static bottom(maxColNames) {
|
|
41
47
|
return new DataFrameDomain({
|
|
42
|
-
colnames:
|
|
48
|
+
colnames: set_upper_bound_domain_1.SetUpperBoundDomain.bottom(maxColNames),
|
|
43
49
|
cols: positive_interval_domain_1.PosIntervalDomain.bottom(),
|
|
44
50
|
rows: positive_interval_domain_1.PosIntervalDomain.bottom()
|
|
45
51
|
});
|
|
46
52
|
}
|
|
47
53
|
static top(maxColNames) {
|
|
48
54
|
return new DataFrameDomain({
|
|
49
|
-
colnames:
|
|
55
|
+
colnames: set_upper_bound_domain_1.SetUpperBoundDomain.top(maxColNames),
|
|
50
56
|
cols: positive_interval_domain_1.PosIntervalDomain.top(),
|
|
51
57
|
rows: positive_interval_domain_1.PosIntervalDomain.top()
|
|
52
58
|
});
|
|
@@ -54,9 +60,15 @@ class DataFrameDomain extends product_domain_1.ProductDomain {
|
|
|
54
60
|
}
|
|
55
61
|
exports.DataFrameDomain = DataFrameDomain;
|
|
56
62
|
/**
|
|
57
|
-
* The data frame state abstract domain as state
|
|
63
|
+
* The data frame state abstract domain as state domain mapping AST node IDs to inferred abstract data frame shapes.
|
|
58
64
|
*/
|
|
59
|
-
class
|
|
65
|
+
class DataFrameStateDomain extends state_abstract_domain_1.StateAbstractDomain {
|
|
66
|
+
create(value) {
|
|
67
|
+
return new DataFrameStateDomain(value);
|
|
68
|
+
}
|
|
69
|
+
static bottom() {
|
|
70
|
+
return new DataFrameStateDomain(new Map());
|
|
71
|
+
}
|
|
60
72
|
}
|
|
61
|
-
exports.
|
|
73
|
+
exports.DataFrameStateDomain = DataFrameStateDomain;
|
|
62
74
|
//# sourceMappingURL=dataframe-domain.js.map
|
|
@@ -5,7 +5,6 @@ import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/pro
|
|
|
5
5
|
import type { DataFrameExpressionInfo } from '../absint-info';
|
|
6
6
|
/**
|
|
7
7
|
* Maps a concrete data frame access to abstract data frame operations.
|
|
8
|
-
*
|
|
9
8
|
* @param node - The R node of the access
|
|
10
9
|
* @param dfg - The data flow graph for resolving the arguments
|
|
11
10
|
* @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame access
|
|
@@ -16,7 +16,6 @@ const SpecialAccessArgumentsMapper = {
|
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Maps a concrete data frame access to abstract data frame operations.
|
|
19
|
-
*
|
|
20
19
|
* @param node - The R node of the access
|
|
21
20
|
* @param dfg - The data flow graph for resolving the arguments
|
|
22
21
|
* @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame access
|