@eagleoutice/flowr 2.14.1 → 2.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -87
- package/abstract-interpretation/absint-visitor.d.ts +132 -25
- package/abstract-interpretation/absint-visitor.js +459 -99
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
- package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
- package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
- package/abstract-interpretation/data-frame/resolve-args.js +6 -4
- package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
- package/abstract-interpretation/domains/partial-product-domain.js +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-range-domain.js +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
- package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
- package/benchmark/calibration.d.ts +11 -6
- package/benchmark/calibration.js +19 -8
- package/benchmark/slicer.d.ts +7 -1
- package/benchmark/slicer.js +38 -34
- package/benchmark/stats/count-comments.d.ts +16 -0
- package/benchmark/stats/count-comments.js +30 -0
- package/benchmark/stats/print.js +2 -0
- package/benchmark/stats/size-of.d.ts +7 -3
- package/benchmark/stats/size-of.js +7 -3
- package/benchmark/stats/stats.d.ts +7 -0
- package/benchmark/summarizer/first-phase/process.js +2 -19
- package/benchmark/summarizer/second-phase/graph.js +13 -3
- package/benchmark/summarizer/second-phase/process.js +2 -0
- package/cli/repl/commands/repl-dataflow.js +70 -27
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/core.js +1 -1
- package/cli/repl/parser/slice-query-parser.js +2 -1
- package/cli/repl/server/connection.d.ts +4 -0
- package/cli/repl/server/connection.js +19 -16
- package/cli/repl/server/messages/message-analysis.d.ts +1 -1
- package/config.d.ts +21 -8
- package/config.js +12 -5
- package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
- package/control-flow/basic-cfg-guided-visitor.js +37 -24
- package/control-flow/cfg-dead-code.js +44 -33
- package/control-flow/cfg-properties.js +2 -2
- package/control-flow/cfg-simplification.js +6 -5
- package/control-flow/cfg-to-basic-blocks.js +11 -13
- package/control-flow/control-flow-graph.d.ts +179 -189
- package/control-flow/control-flow-graph.js +400 -263
- package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
- package/control-flow/dfg-cfg-guided-visitor.js +17 -13
- package/control-flow/diff-cfg.js +6 -14
- package/control-flow/happens-before.js +5 -4
- package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
- package/control-flow/semantic-cfg-guided-visitor.js +6 -3
- package/control-flow/simple-visitor.js +14 -15
- package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
- package/control-flow/useless-loop.js +18 -14
- package/core/steps/all/core/20-dataflow.d.ts +1 -3
- package/core/steps/pipeline/default-pipelines.d.ts +141 -157
- package/dataflow/cluster.js +7 -0
- package/dataflow/environments/apply-kill.d.ts +6 -0
- package/dataflow/environments/apply-kill.js +63 -31
- package/dataflow/environments/built-in-props.d.ts +5 -1
- package/dataflow/environments/built-in-props.js +4 -0
- package/dataflow/environments/built-in.d.ts +6 -3
- package/dataflow/environments/built-in.js +8 -5
- package/dataflow/environments/clone.d.ts +3 -3
- package/dataflow/environments/clone.js +5 -5
- package/dataflow/environments/default-builtin-config.d.ts +114 -3
- package/dataflow/environments/default-builtin-config.js +137 -35
- package/dataflow/environments/environment.d.ts +5 -5
- package/dataflow/environments/environment.js +5 -5
- package/dataflow/environments/identifier.d.ts +11 -1
- package/dataflow/environments/identifier.js +4 -1
- package/dataflow/environments/resolve-by-name.d.ts +7 -0
- package/dataflow/environments/resolve-by-name.js +12 -0
- package/dataflow/environments/resolve-helper.d.ts +3 -1
- package/dataflow/environments/resolve-helper.js +2 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +3 -3
- package/dataflow/eval/resolve/alias-tracking.js +3 -3
- package/dataflow/eval/resolve/match-arguments.js +7 -5
- package/dataflow/eval/resolve/node-value.d.ts +3 -1
- package/dataflow/eval/resolve/node-value.js +12 -0
- package/dataflow/eval/resolve/resolve-argument.js +5 -4
- package/dataflow/eval/resolve/resolve-operators.js +9 -6
- package/dataflow/eval/resolve/resolve-strings.js +2 -2
- package/dataflow/eval/resolve/resolve-working-directory.js +4 -3
- package/dataflow/eval/resolve/resolve.js +3 -2
- package/dataflow/eval/values/general.js +8 -5
- package/dataflow/extractor.d.ts +1 -4
- package/dataflow/extractor.js +11 -10
- package/dataflow/fn/exceptions-of-function.d.ts +3 -1
- package/dataflow/fn/strict-function.js +7 -5
- package/dataflow/graph/call-graph.js +2 -2
- package/dataflow/graph/df-helper.d.ts +8 -1
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +19 -2
- package/dataflow/graph/edge.d.ts +38 -2
- package/dataflow/graph/edge.js +32 -2
- package/dataflow/graph/graph.d.ts +4 -3
- package/dataflow/graph/graph.js +6 -2
- package/dataflow/graph/match-args.d.ts +69 -0
- package/dataflow/graph/match-args.js +167 -0
- package/dataflow/info.d.ts +15 -6
- package/dataflow/info.js +0 -17
- package/dataflow/internal/control-flow.d.ts +114 -0
- package/dataflow/internal/control-flow.js +224 -0
- package/dataflow/internal/linker.d.ts +6 -31
- package/dataflow/internal/linker.js +24 -81
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +18 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +12 -1
- 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 +38 -30
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +36 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
- 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-list.js +6 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +9 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +11 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +71 -33
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +13 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +14 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +50 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +20 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
- package/dataflow/internal/process/functions/call/common.js +5 -6
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +41 -15
- package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
- package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
- package/dataflow/internal/process/functions/call/nse.js +6 -1
- package/dataflow/internal/process/functions/call/quoted.js +2 -2
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
- package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/process-argument.js +12 -4
- package/dataflow/internal/process/functions/process-parameter.js +13 -0
- package/dataflow/internal/process/process-named-call.d.ts +2 -2
- package/dataflow/internal/process/process-named-call.js +9 -7
- package/documentation/data/server/doc-data-server-messages.js +4 -4
- package/documentation/doc-readme.js +33 -0
- package/documentation/doc-util/doc-cfg.d.ts +8 -7
- package/documentation/doc-util/doc-cfg.js +10 -10
- package/documentation/doc-util/doc-playground.d.ts +12 -0
- package/documentation/doc-util/doc-playground.js +21 -0
- package/documentation/doc-util/doc-query.d.ts +4 -1
- package/documentation/doc-util/doc-query.js +4 -2
- package/documentation/wiki-absint.d.ts +3 -4
- package/documentation/wiki-absint.js +17 -5
- package/documentation/wiki-analyzer.js +2 -2
- package/documentation/wiki-cfg.js +101 -106
- package/documentation/wiki-dataflow-graph.js +84 -53
- package/documentation/wiki-interface.js +1 -0
- package/documentation/wiki-linter.js +15 -1
- package/documentation/wiki-linting-and-testing.js +1 -16
- package/documentation/wiki-mk/doc-maker.js +6 -4
- package/documentation/wiki-query.js +14 -4
- package/documentation/wiki-signature-database.js +28 -2
- package/linter/linter-fix.d.ts +16 -0
- package/linter/linter-fix.js +104 -0
- package/linter/linter-format.d.ts +18 -1
- package/linter/linter-format.js +31 -1
- package/linter/linter-output.js +46 -10
- package/linter/linter-rules.d.ts +40 -9
- package/linter/linter-rules.js +2 -0
- package/linter/rules/absolute-path.js +4 -2
- package/linter/rules/dataframe-access-validation.js +6 -7
- package/linter/rules/deprecated-functions.d.ts +107 -10
- package/linter/rules/deprecated-functions.js +311 -23
- package/linter/rules/file-path-validity.js +5 -4
- package/linter/rules/function-finder-util.d.ts +6 -0
- package/linter/rules/function-finder-util.js +21 -13
- package/linter/rules/naming-convention.js +1 -1
- package/linter/rules/network-functions.d.ts +2 -2
- package/linter/rules/stop-with-call-arg.js +2 -2
- package/linter/rules/unclosed-connection.js +2 -2
- package/linter/rules/undefined-symbol-util.js +6 -4
- package/linter/rules/undefined-symbol.js +2 -2
- package/linter/rules/unused-definition.js +8 -4
- package/linter/rules/unused-import.d.ts +60 -0
- package/linter/rules/unused-import.js +179 -0
- package/package.json +2 -2
- package/project/attached-packages.js +2 -1
- package/project/cache/flowr-analyzer-cache.d.ts +2 -5
- package/project/cache/flowr-analyzer-cache.js +4 -7
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
- package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
- package/project/cache/flowr-cache.d.ts +9 -0
- package/project/cache/flowr-cache.js +19 -0
- package/project/context/flowr-analyzer-context.d.ts +7 -3
- package/project/context/flowr-analyzer-context.js +15 -9
- package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
- package/project/context/flowr-analyzer-dependencies-context.js +9 -14
- package/project/context/flowr-analyzer-files-context.js +15 -17
- package/project/context/flowr-analyzer-meta-context.js +2 -12
- package/project/dependency-version-space.d.ts +1 -7
- package/project/dependency-version-space.js +9 -8
- package/project/flowr-analyzer-builder.d.ts +4 -4
- package/project/flowr-analyzer.d.ts +4 -6
- package/project/flowr-analyzer.js +4 -5
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +22 -34
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
- package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
- package/project/sigdb/build.d.ts +2 -2
- package/project/sigdb/decode.d.ts +0 -5
- package/project/sigdb/decode.js +0 -8
- package/project/sigdb/index-format.d.ts +4 -4
- package/project/sigdb/manifest.d.ts +2 -2
- package/project/sigdb/reader.d.ts +54 -13
- package/project/sigdb/reader.js +4 -3
- package/project/sigdb/schema.d.ts +3 -1
- package/project/sigdb/signature-db.d.ts +69 -0
- package/project/sigdb/signature-db.js +54 -0
- package/project/sigdb/signature-match.d.ts +10 -5
- package/project/sigdb/signature-match.js +13 -8
- package/queries/catalog/absint-query/absint-query-executor.js +1 -2
- package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
- package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
- package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
- package/queries/catalog/signature-query/signature-query-executor.js +4 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +8 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +8 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +5 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +0 -5
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
- package/reconstruct/inline/source-inline-map.js +3 -3
- package/reconstruct/reconstruct.js +6 -4
- package/search/flowr-search-builder.d.ts +8 -8
- package/search/flowr-search-builder.js +4 -4
- package/search/flowr-search-filters.d.ts +2 -2
- package/search/flowr-search-filters.js +3 -2
- package/search/search-executor/search-enrichers.d.ts +6 -0
- package/search/search-executor/search-enrichers.js +44 -5
- package/slicing/criterion/filters/all-variables.js +2 -1
- package/slicing/criterion/parse.js +8 -6
- package/slicing/static/slice-call.js +2 -2
- package/util/arg-matching.d.ts +3 -0
- package/util/arg-matching.js +12 -1
- package/util/collections/arrays.d.ts +0 -4
- package/util/collections/arrays.js +4 -26
- package/util/diff-graph.d.ts +1 -1
- package/util/diff-graph.js +17 -3
- package/util/diff.d.ts +6 -0
- package/util/mermaid/ast.d.ts +1 -1
- package/util/mermaid/ast.js +5 -4
- package/util/mermaid/cfg.js +130 -24
- package/util/mermaid/dfg.js +31 -10
- package/util/mermaid/mermaid.js +2 -0
- package/util/objects.d.ts +24 -4
- package/util/objects.js +12 -0
- package/util/prefix.d.ts +1 -1
- package/util/text/playground-link.d.ts +131 -0
- package/util/text/playground-link.js +214 -0
- package/util/text/strings.js +7 -3
- package/util/version.js +1 -1
- package/control-flow/cfg-builder.d.ts +0 -30
- package/control-flow/cfg-builder.js +0 -79
- package/control-flow/extract-cfg.d.ts +0 -36
- package/control-flow/extract-cfg.js +0 -693
- package/project/cfg-kind.d.ts +0 -21
- package/project/cfg-kind.js +0 -26
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processWithEnv = processWithEnv;
|
|
4
|
+
const match_args_1 = require("../../../../../graph/match-args");
|
|
4
5
|
const processor_1 = require("../../../../../processor");
|
|
5
6
|
const known_call_handling_1 = require("../known-call-handling");
|
|
6
|
-
const r_function_call_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
7
7
|
const identifier_1 = require("../../../../../environments/identifier");
|
|
8
8
|
const built_in_envir_utils_1 = require("./built-in-envir-utils");
|
|
9
9
|
const built_in_proc_name_1 = require("../../../../../environments/built-in-proc-name");
|
|
10
10
|
const common_1 = require("../common");
|
|
11
11
|
const edge_1 = require("../../../../../graph/edge");
|
|
12
|
+
const control_flow_1 = require("../../../../control-flow");
|
|
12
13
|
const linker_1 = require("../../../../linker");
|
|
13
14
|
/** Fallback formal parameter names for `with(data, expr, ...)` / `within(data, expr, ...)` when the signature database has no `base::with`. */
|
|
14
15
|
const withParamsFallback = ['data', 'expr'];
|
|
@@ -40,7 +41,7 @@ function processWithEnv(name, args, rootId, data) {
|
|
|
40
41
|
}
|
|
41
42
|
// prefer R's real `base::with` signature from the database, falling back to the known formals when it is absent
|
|
42
43
|
// use the call's own name (`with` or `within`) qualified to base, so each gets its real signature
|
|
43
|
-
const bound =
|
|
44
|
+
const bound = match_args_1.MatchArgs.toNames(args, (0, built_in_envir_utils_1.signatureParamNames)(data, identifier_1.Identifier.make(identifier_1.Identifier.getName(name.content), "base" /* PkgName.Base */), withParamsFallback));
|
|
44
45
|
const dataArg = bound.get('data');
|
|
45
46
|
const exprArg = bound.get('expr');
|
|
46
47
|
// when we cannot resolve the data to a tracked environment, `expr` is still data-masked: its symbols name
|
|
@@ -77,6 +78,7 @@ function processWithEnv(name, args, rootId, data) {
|
|
|
77
78
|
});
|
|
78
79
|
const merged = dfDataArg.graph.mergeWith(dfExpr.graph);
|
|
79
80
|
merged.addEdge(rootId, envirResolution.envirNodeId, edge_1.EdgeType.Reads);
|
|
81
|
+
const cfgEntry = control_flow_1.ControlFlow.inSequence(merged, [dfDataArg, dfExpr], rootId);
|
|
80
82
|
const ingoing = dfDataArg.in.concat(dfExpr.in, dfDataArg.unknownReferences, remainingFromExpr, /* unresolved expr refs propagate to outer scope */ [{ nodeId: rootId, name: name.content, cds: data.cds, type: identifier_1.ReferenceType.Function }]);
|
|
81
83
|
/* within routes body writes back into the data environment; with discards them */
|
|
82
84
|
const isWithin = identifier_1.Identifier.getName(name.content) === 'within';
|
|
@@ -91,6 +93,8 @@ function processWithEnv(name, args, rootId, data) {
|
|
|
91
93
|
exitPoints: dfDataArg.exitPoints.concat(dfExpr.exitPoints),
|
|
92
94
|
graph: merged,
|
|
93
95
|
entryPoint: rootId,
|
|
96
|
+
cfgEntry,
|
|
97
|
+
cfgExit: rootId,
|
|
94
98
|
in: ingoing,
|
|
95
99
|
out: [], /* writes are inside envState, not directly in outer scope */
|
|
96
100
|
unknownReferences: []
|
|
@@ -17,7 +17,6 @@ const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/no
|
|
|
17
17
|
const identifier_1 = require("../../../../environments/identifier");
|
|
18
18
|
const overwrite_1 = require("../../../../environments/overwrite");
|
|
19
19
|
const resolve_by_name_1 = require("../../../../environments/resolve-by-name");
|
|
20
|
-
const type_1 = require("../../../../../r-bridge/lang-4.x/ast/model/type");
|
|
21
20
|
const process_argument_1 = require("../process-argument");
|
|
22
21
|
const vertex_1 = require("../../../../graph/vertex");
|
|
23
22
|
const edge_1 = require("../../../../graph/edge");
|
|
@@ -68,10 +67,10 @@ function convertFnArguments(args) {
|
|
|
68
67
|
* Please be aware, that the ids here are those inferred from the AST, not from the dataflow graph!
|
|
69
68
|
*/
|
|
70
69
|
function convertFnArgument(arg) {
|
|
71
|
-
if (arg
|
|
70
|
+
if (r_argument_1.RArgument.isEmpty(arg)) {
|
|
72
71
|
return r_function_call_1.EmptyArgument;
|
|
73
72
|
}
|
|
74
|
-
else if (!arg.name ||
|
|
73
|
+
else if (!arg.name || !r_argument_1.RArgument.is(arg)) {
|
|
75
74
|
return { nodeId: arg.info.id, cds: undefined, type: identifier_1.ReferenceType.Argument };
|
|
76
75
|
}
|
|
77
76
|
else {
|
|
@@ -99,7 +98,7 @@ function processAllArguments({ functionName, args, data, finalGraph, functionRoo
|
|
|
99
98
|
i++;
|
|
100
99
|
data = { ...data, environment: argEnv };
|
|
101
100
|
data = patchData?.(data, i) ?? data;
|
|
102
|
-
if (arg
|
|
101
|
+
if (r_argument_1.RArgument.isEmpty(arg)) {
|
|
103
102
|
callArgs.push(r_function_call_1.EmptyArgument);
|
|
104
103
|
processedArguments.push(undefined);
|
|
105
104
|
continue;
|
|
@@ -109,7 +108,7 @@ function processAllArguments({ functionName, args, data, finalGraph, functionRoo
|
|
|
109
108
|
processed = data.precomputedFirstArg.info;
|
|
110
109
|
}
|
|
111
110
|
else {
|
|
112
|
-
processed =
|
|
111
|
+
processed = r_argument_1.RArgument.is(arg) ? (0, process_argument_1.processFunctionArgument)(arg, data) : (0, processor_1.processDataflowFor)(arg, data);
|
|
113
112
|
}
|
|
114
113
|
if (r_argument_1.RArgument.isWithValue(arg) && (forceArgs === 'all' || forceArgs[i]) && !model_1.RConstant.is(arg.value)) {
|
|
115
114
|
forceVertexArgumentValueReferences(functionRootId, processed, processed.graph, data.environment);
|
|
@@ -150,7 +149,7 @@ function processAllArguments({ functionName, args, data, finalGraph, functionRoo
|
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
argEnv = (0, overwrite_1.overwriteEnvironment)(argEnv, processed.environment);
|
|
153
|
-
if (
|
|
152
|
+
if (!r_argument_1.RArgument.is(arg) || !arg.name) {
|
|
154
153
|
callArgs.push({ nodeId: processed.entryPoint, cds: undefined, type: identifier_1.ReferenceType.Argument });
|
|
155
154
|
}
|
|
156
155
|
else {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Deferred = void 0;
|
|
4
4
|
const model_1 = require("../../../../../r-bridge/lang-4.x/ast/model/model");
|
|
5
5
|
const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
6
|
-
const type_1 = require("../../../../../r-bridge/lang-4.x/ast/model/type");
|
|
7
6
|
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
8
7
|
const identifier_1 = require("../../../../environments/identifier");
|
|
9
8
|
const retriever_1 = require("../../../../../r-bridge/retriever");
|
|
@@ -12,6 +11,7 @@ const vertex_1 = require("../../../../graph/vertex");
|
|
|
12
11
|
const happens_before_1 = require("../../../../../control-flow/happens-before");
|
|
13
12
|
const logic_1 = require("../../../../../util/logic");
|
|
14
13
|
const graph_1 = require("../../../../graph/graph");
|
|
14
|
+
const r_symbol_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol");
|
|
15
15
|
/** Drops the read of `target` from `use`, for a binding another write has replaced. */
|
|
16
16
|
function dropRead(graph, use, target) {
|
|
17
17
|
graph.removeEdgeType(use, target, edge_1.EdgeType.Reads);
|
|
@@ -38,7 +38,7 @@ function namesWithin(expr, graph, idMap) {
|
|
|
38
38
|
callees.add(inner.functionName.info.id);
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
|
-
else if (
|
|
41
|
+
else if (!r_symbol_1.RSymbol.is(inner) || callees.has(inner.info.id)) {
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
44
44
|
const vertex = graph.getVertex(inner.info.id);
|
|
@@ -3,7 +3,7 @@ import type { DataflowInformation } from '../../../../info';
|
|
|
3
3
|
import { type ForceArguments } from './common';
|
|
4
4
|
import type { RSymbol } from '../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
5
5
|
import type { ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
6
|
-
import type
|
|
6
|
+
import { type PotentiallyEmptyRArgument } from '../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
7
7
|
import type { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
8
8
|
import type { RNode } from '../../../../../r-bridge/lang-4.x/ast/model/model';
|
|
9
9
|
import { type IdentifierReference } from '../../../../environments/identifier';
|
|
@@ -31,6 +31,16 @@ export interface ProcessKnownFunctionCallInput<OtherInfo> extends ForceArguments
|
|
|
31
31
|
readonly origin: FunctionOriginInformation | 'default';
|
|
32
32
|
/** see {@link ProcessAllArgumentInput#nonFunction} */
|
|
33
33
|
readonly nonFunction?: ReadonlySet<NodeId>;
|
|
34
|
+
/**
|
|
35
|
+
* Suppress the default control flow linkage (arguments in order, then the call).
|
|
36
|
+
* Constructs that branch or loop set this and wire their control flow themselves.
|
|
37
|
+
*/
|
|
38
|
+
readonly customControlFlow?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* From this argument index on, the arguments are alternatives of which at most one is evaluated,
|
|
41
|
+
* which is how `switch` picks an arm. The arguments before it are evaluated in order as usual.
|
|
42
|
+
*/
|
|
43
|
+
readonly alternativeArgsFrom?: number;
|
|
34
44
|
}
|
|
35
45
|
/** The result of processing a known function call. */
|
|
36
46
|
export interface ProcessKnownFunctionCallResult {
|
|
@@ -86,4 +96,4 @@ export declare function markArgumentsAsNonStandardEvaluation(graph: DataflowGrap
|
|
|
86
96
|
* The main processor for function calls for which we know the target but need not
|
|
87
97
|
* add any specific handling.
|
|
88
98
|
*/
|
|
89
|
-
export declare function processKnownFunctionCall<OtherInfo>({ name, args, rootId, data, reverseOrder, markAsNSE, forceArgs, patchData, hasUnknownSideEffect, origin, nonFunction }: ProcessKnownFunctionCallInput<OtherInfo>): ProcessKnownFunctionCallResult;
|
|
99
|
+
export declare function processKnownFunctionCall<OtherInfo>({ name, args, rootId, data, reverseOrder, markAsNSE, forceArgs, patchData, hasUnknownSideEffect, origin, nonFunction, customControlFlow, alternativeArgsFrom }: ProcessKnownFunctionCallInput<OtherInfo>): ProcessKnownFunctionCallResult;
|
|
@@ -5,9 +5,12 @@ exports.markArgumentsAsNonStandardEvaluation = markArgumentsAsNonStandardEvaluat
|
|
|
5
5
|
exports.processKnownFunctionCall = processKnownFunctionCall;
|
|
6
6
|
const processor_1 = require("../../../../processor");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
|
+
const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
9
|
+
const r_argument_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
8
10
|
const identifier_1 = require("../../../../environments/identifier");
|
|
9
11
|
const graph_1 = require("../../../../graph/graph");
|
|
10
12
|
const edge_1 = require("../../../../graph/edge");
|
|
13
|
+
const control_flow_1 = require("../../../control-flow");
|
|
11
14
|
const logger_1 = require("../../../../logger");
|
|
12
15
|
const vertex_1 = require("../../../../graph/vertex");
|
|
13
16
|
const unknown_side_effect_1 = require("../../../../graph/unknown-side-effect");
|
|
@@ -90,7 +93,7 @@ function markArgument(graph, rootId, arg, kind, evaluated) {
|
|
|
90
93
|
* The main processor for function calls for which we know the target but need not
|
|
91
94
|
* add any specific handling.
|
|
92
95
|
*/
|
|
93
|
-
function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = false, markAsNSE = undefined, forceArgs, patchData = d => d, hasUnknownSideEffect, origin, nonFunction }) {
|
|
96
|
+
function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = false, markAsNSE = undefined, forceArgs, patchData = d => d, hasUnknownSideEffect, origin, nonFunction, customControlFlow, alternativeArgsFrom }) {
|
|
94
97
|
const functionName = (0, processor_1.processDataflowFor)(name, data);
|
|
95
98
|
const finalGraph = new graph_1.DataflowGraph(data.completeAst.idMap);
|
|
96
99
|
const functionCallName = name.content;
|
|
@@ -117,22 +120,44 @@ function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = fal
|
|
|
117
120
|
inIds.push(fnRef);
|
|
118
121
|
// if force args is not none, we need to collect all non-default exit points from our arguments!
|
|
119
122
|
let exitPoints = undefined;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
/* a jump that only happens under a condition still lets the call complete, so its default exit has to stay */
|
|
124
|
+
let alwaysJumps = false;
|
|
125
|
+
if (forceArgs) {
|
|
126
|
+
for (let i = 0; i < processedArguments.length; i++) {
|
|
127
|
+
const p = processedArguments[i];
|
|
128
|
+
if (p === undefined || (forceArgs !== 'all' && !forceArgs[i])) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const before = exitPoints?.length ?? 0;
|
|
132
|
+
for (const exit of p.exitPoints) {
|
|
133
|
+
if (exit.type !== 0 /* ExitPointType.Default */) {
|
|
134
|
+
(exitPoints ??= []).push(exit);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
alwaysJumps ||= (exitPoints?.length ?? 0) > before && control_flow_1.ControlFlow.alwaysExits(p);
|
|
138
|
+
}
|
|
139
|
+
if (exitPoints !== undefined && !alwaysJumps) {
|
|
140
|
+
exitPoints.push({ nodeId: rootId, type: 0 /* ExitPointType.Default */, cds: data.cds });
|
|
124
141
|
}
|
|
125
142
|
}
|
|
126
|
-
else
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
143
|
+
/* an alternative without a name is the default arm, which runs when nothing else matched */
|
|
144
|
+
const cfgEntry = customControlFlow ? rootId
|
|
145
|
+
: alternativeArgsFrom === undefined ? control_flow_1.ControlFlow.inSequence(finalGraph, processedArguments, rootId)
|
|
146
|
+
: control_flow_1.ControlFlow.picksOneOf(finalGraph, processedArguments, alternativeArgsFrom, rootId, processArgs.slice(alternativeArgsFrom).some(a => a !== r_function_call_1.EmptyArgument && (!r_argument_1.RArgument.is(a) || a.name === undefined)));
|
|
147
|
+
if (!customControlFlow) {
|
|
148
|
+
/*
|
|
149
|
+
* A jump within an argument that the call does not pass on is caught here (the callee decides whether it
|
|
150
|
+
* ever forces that argument), so control resumes at the call rather than leaving it.
|
|
151
|
+
*/
|
|
152
|
+
for (const argument of processedArguments) {
|
|
153
|
+
for (const exit of argument?.exitPoints ?? []) {
|
|
154
|
+
/*
|
|
155
|
+
* A jump within an argument the call does not pass on resumes at the call. A `return` leaves the
|
|
156
|
+
* enclosing function wherever the argument runs at all, so only a call that never evaluates it
|
|
157
|
+
* may catch one (see `processQuote`).
|
|
158
|
+
*/
|
|
159
|
+
if (exit.type !== 0 /* ExitPointType.Default */ && exit.type !== 1 /* ExitPointType.Return */ && !exitPoints?.includes(exit)) {
|
|
160
|
+
finalGraph.addEdge(exit.nodeId, rootId, edge_1.EdgeType.FlowEdge);
|
|
136
161
|
}
|
|
137
162
|
}
|
|
138
163
|
}
|
|
@@ -146,6 +171,7 @@ function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = fal
|
|
|
146
171
|
graph: finalGraph,
|
|
147
172
|
environment: finalEnv,
|
|
148
173
|
entryPoint: rootId,
|
|
174
|
+
cfgEntry: cfgEntry === rootId ? undefined : cfgEntry,
|
|
149
175
|
exitPoints: exitPoints ?? [{ nodeId: rootId, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
150
176
|
hooks: functionName.hooks
|
|
151
177
|
},
|
|
@@ -25,6 +25,8 @@ function mergeInformation(info, newInfo) {
|
|
|
25
25
|
graph: info.graph.mergeWith(newInfo.graph),
|
|
26
26
|
environment: (0, append_1.appendEnvironment)(info.environment, newInfo.environment),
|
|
27
27
|
entryPoint: newInfo.entryPoint,
|
|
28
|
+
cfgEntry: newInfo.cfgEntry,
|
|
29
|
+
cfgExit: newInfo.cfgExit,
|
|
28
30
|
exitPoints: info.exitPoints.concat(newInfo.exitPoints),
|
|
29
31
|
hooks: info.hooks.concat(newInfo.hooks)
|
|
30
32
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RNode } from '../../../../../r-bridge/lang-4.x/ast/model/model';
|
|
2
|
-
import
|
|
2
|
+
import { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
3
3
|
import type { ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
4
4
|
import { Identifier } from '../../../../environments/identifier';
|
|
5
5
|
import { type DataflowGraph } from '../../../../graph/graph';
|
|
@@ -4,11 +4,13 @@ exports.Nse = exports.Unquote = void 0;
|
|
|
4
4
|
const model_1 = require("../../../../../r-bridge/lang-4.x/ast/model/model");
|
|
5
5
|
const r_unary_op_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-unary-op");
|
|
6
6
|
const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
7
|
+
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
7
8
|
const identifier_1 = require("../../../../environments/identifier");
|
|
8
9
|
const data_masking_functions_1 = require("../../../../environments/data-masking-functions");
|
|
9
10
|
const graph_1 = require("../../../../graph/graph");
|
|
10
11
|
const vertex_1 = require("../../../../graph/vertex");
|
|
11
12
|
const edge_1 = require("../../../../graph/edge");
|
|
13
|
+
const r_argument_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
12
14
|
/** The escape a quoting function offers, a property of the function: `quote(!!x)` negates, `expr(!!x)` splices. */
|
|
13
15
|
var Unquote;
|
|
14
16
|
(function (Unquote) {
|
|
@@ -26,7 +28,7 @@ function unquotedOperandOf(node, style) {
|
|
|
26
28
|
return undefined;
|
|
27
29
|
}
|
|
28
30
|
const arg = node.arguments[0];
|
|
29
|
-
return arg
|
|
31
|
+
return r_argument_1.RArgument.isEmpty(arg) ? undefined : arg.value;
|
|
30
32
|
}
|
|
31
33
|
if (!isNegation(node) || !isNegation(node.operand)) {
|
|
32
34
|
return undefined;
|
|
@@ -47,6 +49,9 @@ function isNegation(node) {
|
|
|
47
49
|
* tell that it does not. Only where nothing at all can be attached is a function ruled out as an operand.
|
|
48
50
|
*/
|
|
49
51
|
function definesAFunction(graph, id) {
|
|
52
|
+
if (node_id_1.NodeId.isBuiltIn(id)) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
50
55
|
const vertex = graph.getVertex(id);
|
|
51
56
|
if (vertex_1.FunctionDefinitionVertex.is(vertex)) {
|
|
52
57
|
return true;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Quoted = void 0;
|
|
4
4
|
const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
5
|
-
const type_1 = require("../../../../../r-bridge/lang-4.x/ast/model/type");
|
|
6
5
|
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
7
6
|
const identifier_1 = require("../../../../environments/identifier");
|
|
8
7
|
const built_in_proc_name_1 = require("../../../../environments/built-in-proc-name");
|
|
@@ -13,6 +12,7 @@ const linker_1 = require("../../../linker");
|
|
|
13
12
|
const nse_1 = require("./nse");
|
|
14
13
|
const deferred_1 = require("./deferred");
|
|
15
14
|
const vertex_2 = require("../../../../graph/vertex");
|
|
15
|
+
const r_argument_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
16
16
|
/** Calls capturing a language object. */
|
|
17
17
|
const CapturingProcessors = [built_in_proc_name_1.BuiltInProcName.Quote];
|
|
18
18
|
/** Calls capturing an expression as a promise, forced at some later read of the variable they bind. */
|
|
@@ -186,7 +186,7 @@ function* escapingArguments(graph, id) {
|
|
|
186
186
|
/** The value an argument reference points at. */
|
|
187
187
|
function unwrapArgument(reference, idMap) {
|
|
188
188
|
const node = reference === undefined ? undefined : idMap.get(reference);
|
|
189
|
-
return
|
|
189
|
+
return r_argument_1.RArgument.is(node) ? node.value?.info.id : reference;
|
|
190
190
|
}
|
|
191
191
|
/** `eval(expr, envir)` runs elsewhere, so the bindings here say nothing. */
|
|
192
192
|
function evaluatesElsewhere(call) {
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnnamedFunctionCallPrefix = void 0;
|
|
4
4
|
exports.processUnnamedFunctionCall = processUnnamedFunctionCall;
|
|
5
|
+
const match_args_1 = require("../../../../graph/match-args");
|
|
5
6
|
const processor_1 = require("../../../../processor");
|
|
7
|
+
const control_flow_1 = require("../../../control-flow");
|
|
6
8
|
const common_1 = require("./common");
|
|
7
|
-
const linker_1 = require("../../../linker");
|
|
8
9
|
const edge_1 = require("../../../../graph/edge");
|
|
9
10
|
const graph_1 = require("../../../../graph/graph");
|
|
10
11
|
const unknown_side_effect_1 = require("../../../../graph/unknown-side-effect");
|
|
11
12
|
const vertex_1 = require("../../../../graph/vertex");
|
|
12
|
-
const type_1 = require("../../../../../r-bridge/lang-4.x/ast/model/type");
|
|
13
13
|
const logger_1 = require("../../../../logger");
|
|
14
14
|
const identifier_1 = require("../../../../environments/identifier");
|
|
15
15
|
const built_in_proc_name_1 = require("../../../../environments/built-in-proc-name");
|
|
16
16
|
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
17
|
+
const r_access_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-access");
|
|
18
|
+
const r_function_definition_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
17
19
|
exports.UnnamedFunctionCallPrefix = 'unnamed-fc-';
|
|
18
20
|
/**
|
|
19
21
|
* Whether a `$`/`[[` access callee resolved a field to a stored function: a resolved dispatch (`dispatch$foo()`)
|
|
@@ -48,7 +50,7 @@ function processUnnamedFunctionCall(functionCall, data) {
|
|
|
48
50
|
finalGraph.addEdge(functionRootId, calledRootId, edge_1.EdgeType.Reads);
|
|
49
51
|
// keep the defined function
|
|
50
52
|
finalGraph.mergeWith(calledFunction.graph);
|
|
51
|
-
const { finalEnv, callArgs, remainingReadInArgs } = (0, common_1.processAllArguments)({
|
|
53
|
+
const { finalEnv, callArgs, remainingReadInArgs, processedArguments } = (0, common_1.processAllArguments)({
|
|
52
54
|
functionName: calledFunction,
|
|
53
55
|
args: functionCall.arguments,
|
|
54
56
|
data,
|
|
@@ -67,13 +69,22 @@ function processUnnamedFunctionCall(functionCall, data) {
|
|
|
67
69
|
args: callArgs, // same reference
|
|
68
70
|
origin: [built_in_proc_name_1.BuiltInProcName.Unnamed]
|
|
69
71
|
}, data.ctx.env.makeCleanEnv());
|
|
72
|
+
const cfgEntry = control_flow_1.ControlFlow.inSequence(finalGraph, [calledFunction, ...processedArguments], functionRootId);
|
|
73
|
+
/* a jump within an argument is caught here, just like for a named call */
|
|
74
|
+
for (const argument of processedArguments) {
|
|
75
|
+
for (const exit of argument?.exitPoints ?? []) {
|
|
76
|
+
if (exit.type !== 0 /* ExitPointType.Default */) {
|
|
77
|
+
finalGraph.addEdge(exit.nodeId, functionRootId, edge_1.EdgeType.FlowEdge);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
70
81
|
let inIds = remainingReadInArgs;
|
|
71
82
|
inIds.push({ nodeId: functionRootId, name: functionCallName, cds: data.cds, type: identifier_1.ReferenceType.Function });
|
|
72
83
|
// if we just call a nested fdef
|
|
73
|
-
if (functionCall.calledFunction
|
|
74
|
-
|
|
84
|
+
if (r_function_definition_1.RFunctionDefinition.is(functionCall.calledFunction)) {
|
|
85
|
+
match_args_1.MatchArgs.onCallAndLink(callArgs, functionCall.calledFunction.parameters, finalGraph);
|
|
75
86
|
}
|
|
76
|
-
else if (functionCall.calledFunction
|
|
87
|
+
else if (r_access_1.RAccess.is(functionCall.calledFunction) && !accessResolvesToField(finalGraph, calledRootId, functionCall.calledFunction.accessed.info.id)) {
|
|
77
88
|
// `obj$method()` whose callee did not resolve to a stored function: reached-but-unknown rather than dropped
|
|
78
89
|
(0, unknown_side_effect_1.handleUnknownSideEffect)(finalGraph, data.environment, functionRootId);
|
|
79
90
|
}
|
|
@@ -87,6 +98,8 @@ function processUnnamedFunctionCall(functionCall, data) {
|
|
|
87
98
|
graph: finalGraph,
|
|
88
99
|
environment: finalEnv,
|
|
89
100
|
entryPoint: functionCall.info.id,
|
|
101
|
+
cfgEntry: cfgEntry === functionRootId ? undefined : cfgEntry,
|
|
102
|
+
cfgExit: functionRootId,
|
|
90
103
|
exitPoints: calledFunction.exitPoints,
|
|
91
104
|
hooks: calledFunction.hooks,
|
|
92
105
|
};
|
|
@@ -4,7 +4,7 @@ import type { ParentInformation } from '../../../../r-bridge/lang-4.x/ast/model/
|
|
|
4
4
|
import { RNode } from '../../../../r-bridge/lang-4.x/ast/model/model';
|
|
5
5
|
import type { IdentifierReference } from '../../../environments/identifier';
|
|
6
6
|
import { DataflowGraph } from '../../../graph/graph';
|
|
7
|
-
import
|
|
7
|
+
import { RArgument } from '../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument';
|
|
8
8
|
/**
|
|
9
9
|
* Links all reads that occur before the argument to the argument root node.
|
|
10
10
|
*/
|
|
@@ -5,15 +5,17 @@ exports.processFunctionArgument = processFunctionArgument;
|
|
|
5
5
|
const processor_1 = require("../../../processor");
|
|
6
6
|
const model_1 = require("../../../../r-bridge/lang-4.x/ast/model/model");
|
|
7
7
|
const graph_1 = require("../../../graph/graph");
|
|
8
|
-
const type_1 = require("../../../../r-bridge/lang-4.x/ast/model/type");
|
|
9
8
|
const edge_1 = require("../../../graph/edge");
|
|
9
|
+
const control_flow_1 = require("../../control-flow");
|
|
10
|
+
const r_argument_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
10
11
|
const vertex_1 = require("../../../graph/vertex");
|
|
12
|
+
const r_function_definition_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
11
13
|
/**
|
|
12
14
|
* Links all reads that occur before the argument to the argument root node.
|
|
13
15
|
*/
|
|
14
16
|
function linkReadsForArgument(root, ingoingRefs, graph) {
|
|
15
17
|
const rid = root.info.id;
|
|
16
|
-
const allIdsBeforeArguments = new Set(model_1.RNode.collectAllIdsWithStop(root, n =>
|
|
18
|
+
const allIdsBeforeArguments = new Set(model_1.RNode.collectAllIdsWithStop(root, n => r_argument_1.RArgument.is(n) && n.info.id !== rid));
|
|
17
19
|
const ingoingBeforeArgs = ingoingRefs.filter(r => allIdsBeforeArguments.has(r.nodeId));
|
|
18
20
|
for (const ref of ingoingBeforeArgs) {
|
|
19
21
|
// link against the root reference currently I do not know how to deal with nested function calls otherwise
|
|
@@ -50,7 +52,10 @@ function processFunctionArgument(argument, data) {
|
|
|
50
52
|
entryPoint = argument.info.id;
|
|
51
53
|
}
|
|
52
54
|
const ingoingRefs = value ? value.unknownReferences.concat(value.in, name?.in ?? []) : name?.in;
|
|
53
|
-
if (
|
|
55
|
+
if (argumentName && value) {
|
|
56
|
+
control_flow_1.ControlFlow.continuesWith(graph, value, argument.info.id);
|
|
57
|
+
}
|
|
58
|
+
if (entryPoint && r_function_definition_1.RFunctionDefinition.is(argument.value)) {
|
|
54
59
|
graph.addEdge(entryPoint, argument.value.info.id, edge_1.EdgeType.Reads);
|
|
55
60
|
}
|
|
56
61
|
else if (argumentName && ingoingRefs) {
|
|
@@ -65,8 +70,11 @@ function processFunctionArgument(argument, data) {
|
|
|
65
70
|
graph: graph,
|
|
66
71
|
environment: value?.environment ?? data.environment,
|
|
67
72
|
entryPoint: entryPoint ?? argument.info.id,
|
|
73
|
+
cfgEntry: argumentName ? (value ? control_flow_1.ControlFlow.entryOf(value) : undefined) : value?.cfgEntry,
|
|
74
|
+
cfgExit: argumentName ? argument.info.id : value?.cfgExit,
|
|
68
75
|
exitPoints: value?.exitPoints ?? name?.exitPoints ?? [{ nodeId: argument.info.id, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
69
|
-
hooks: []
|
|
76
|
+
hooks: [],
|
|
77
|
+
kill: value?.kill
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
//# sourceMappingURL=process-argument.js.map
|
|
@@ -6,6 +6,7 @@ const log_1 = require("../../../../util/log");
|
|
|
6
6
|
const identifier_1 = require("../../../environments/identifier");
|
|
7
7
|
const define_1 = require("../../../environments/define");
|
|
8
8
|
const edge_1 = require("../../../graph/edge");
|
|
9
|
+
const control_flow_1 = require("../../control-flow");
|
|
9
10
|
const r_function_definition_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
10
11
|
/**
|
|
11
12
|
*
|
|
@@ -38,6 +39,16 @@ function processFunctionParameter(parameter, data) {
|
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
}
|
|
42
|
+
const boundAt = name.entryPoint;
|
|
43
|
+
if (defaultValue !== undefined) {
|
|
44
|
+
control_flow_1.ControlFlow.continuesWith(graph, defaultValue, boundAt);
|
|
45
|
+
for (const exit of defaultValue.exitPoints) {
|
|
46
|
+
/* R only forces a default when the parameter is used, so a jump within one does not cut the binding */
|
|
47
|
+
if (exit.type !== 0 /* ExitPointType.Default */) {
|
|
48
|
+
graph.addEdge(exit.nodeId, boundAt, edge_1.EdgeType.FlowEdge);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
41
52
|
return {
|
|
42
53
|
unknownReferences: [],
|
|
43
54
|
in: defaultValue === undefined ? [] : defaultValue.in.concat(defaultValue.unknownReferences, name.in),
|
|
@@ -45,6 +56,8 @@ function processFunctionParameter(parameter, data) {
|
|
|
45
56
|
graph: graph,
|
|
46
57
|
environment: environment,
|
|
47
58
|
entryPoint: parameter.info.id,
|
|
59
|
+
cfgEntry: defaultValue === undefined ? boundAt : control_flow_1.ControlFlow.entryOf(defaultValue),
|
|
60
|
+
cfgExit: boundAt,
|
|
48
61
|
exitPoints: [{ nodeId: parameter.info.id, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
49
62
|
hooks: []
|
|
50
63
|
};
|
|
@@ -4,8 +4,8 @@ import type { RAstNodeBase, RNode, Location } from '../../../r-bridge/lang-4.x/a
|
|
|
4
4
|
import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
5
5
|
import { EmptyArgument, type RNamedFunctionCall } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
6
6
|
import type { Identifier } from '../../environments/identifier';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { RBinaryOp } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-binary-op';
|
|
8
|
+
import { RPipe } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-pipe';
|
|
9
9
|
/**
|
|
10
10
|
* Helper function for {@link processNamedCall} using the given `functionName` as the name of the function.
|
|
11
11
|
*/
|
|
@@ -8,6 +8,8 @@ const process_argument_1 = require("./functions/process-argument");
|
|
|
8
8
|
const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
|
|
9
9
|
const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
10
10
|
const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
11
|
+
const r_binary_op_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-binary-op");
|
|
12
|
+
const r_pipe_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-pipe");
|
|
11
13
|
const assert_1 = require("../../../util/assert");
|
|
12
14
|
/**
|
|
13
15
|
* Helper function for {@link processNamedCall} using the given `functionName` as the name of the function.
|
|
@@ -22,10 +24,10 @@ function processAsNamedCall({ info, lexeme, location }, data, name, args) {
|
|
|
22
24
|
}, (0, make_argument_1.wrapArgumentsUnnamed)(args, data.completeAst.idMap), info.id, data);
|
|
23
25
|
}
|
|
24
26
|
function isBinaryOpOrPipe(node) {
|
|
25
|
-
return
|
|
27
|
+
return r_binary_op_1.RBinaryOp.is(node) || r_pipe_1.RPipe.is(node);
|
|
26
28
|
}
|
|
27
29
|
function isInfixSpecialCall(node) {
|
|
28
|
-
return
|
|
30
|
+
return r_function_call_1.RFunctionCall.isNamed(node) && node.infixSpecial === true && node.arguments.length === 2;
|
|
29
31
|
}
|
|
30
32
|
function isChainNode(node) {
|
|
31
33
|
return node !== undefined && (isBinaryOpOrPipe(node) || isInfixSpecialCall(node));
|
|
@@ -38,15 +40,15 @@ function isChainNode(node) {
|
|
|
38
40
|
* {@link RArgument}, so those need unwrapping via `.value` first.
|
|
39
41
|
*/
|
|
40
42
|
function chainLhsRaw(node) {
|
|
41
|
-
if (
|
|
43
|
+
if (r_function_call_1.RFunctionCall.is(node)) {
|
|
42
44
|
const arg = node.arguments[0];
|
|
43
|
-
return arg
|
|
45
|
+
return r_argument_1.RArgument.isEmpty(arg) ? undefined : arg.value;
|
|
44
46
|
}
|
|
45
47
|
return r_argument_1.RArgument.is(node.lhs) ? node.lhs.value : node.lhs;
|
|
46
48
|
}
|
|
47
49
|
/** The left operand of a chain node, wrapped as the {@link RArgument} that {@link processAllArguments} would process it as. */
|
|
48
50
|
function chainLhsArgument(node, idMap) {
|
|
49
|
-
if (
|
|
51
|
+
if (r_function_call_1.RFunctionCall.is(node)) {
|
|
50
52
|
const arg = node.arguments[0];
|
|
51
53
|
(0, assert_1.guard)(arg !== r_function_call_1.EmptyArgument, 'an infix-special call always has a non-empty first argument');
|
|
52
54
|
return arg;
|
|
@@ -64,14 +66,14 @@ function chainLhsArgument(node, idMap) {
|
|
|
64
66
|
* `data.precomputedFirstArg` (keyed by `node.info.id`) to avoid recursing into it again.
|
|
65
67
|
*/
|
|
66
68
|
function processSingleChainNode(node, data) {
|
|
67
|
-
if (
|
|
69
|
+
if (r_function_call_1.RFunctionCall.is(node)) {
|
|
68
70
|
return (0, named_call_handling_1.processNamedCall)(node.functionName, node.arguments, node.info.id, data);
|
|
69
71
|
}
|
|
70
72
|
const { info, lexeme, location, lhs, rhs } = node;
|
|
71
73
|
return (0, named_call_handling_1.processNamedCall)({
|
|
72
74
|
type: type_1.RType.Symbol,
|
|
73
75
|
info,
|
|
74
|
-
content:
|
|
76
|
+
content: r_pipe_1.RPipe.is(node) ? lexeme : node.operator,
|
|
75
77
|
lexeme,
|
|
76
78
|
location,
|
|
77
79
|
}, (0, make_argument_1.wrapArgumentsUnnamed)([lhs, rhs], data.completeAst.idMap), info.id, data);
|
|
@@ -142,9 +142,9 @@ ${await (0, doc_server_message_1.documentServerMessageResponse)({
|
|
|
142
142
|
<a id="analysis-include-cfg"></a>
|
|
143
143
|
**Including the Control Flow Graph**
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
the
|
|
147
|
-
|
|
145
|
+
The control flow graph is a view on the dataflow graph: the dataflow analysis records the control flow while it walks
|
|
146
|
+
the program, and the graph projects those edges on demand. The server can expose that structure as well (please create
|
|
147
|
+
a [new issue](${doc_issue_1.NewIssueUrl}) for any bug you may encounter).
|
|
148
148
|
For this, the analysis request may add \`cfg: true\` to its list of options.
|
|
149
149
|
|
|
150
150
|
${await (0, doc_server_message_1.documentServerMessageResponse)({
|
|
@@ -307,7 +307,7 @@ The \`results\` field of the response contains two keys of importance:
|
|
|
307
307
|
|
|
308
308
|
- \`slice\`: which contains the result of the slicing (e.g., the ids included in the slice in \`result\`).
|
|
309
309
|
- \`reconstruct\`: contains the reconstructed code, as well as additional meta information.
|
|
310
|
-
The automatically selected lines correspond to additional filters (e.g., magic comments) which force the
|
|
310
|
+
The automatically selected lines correspond to additional filters (e.g., magic comments) which force the unconditional inclusion of certain elements.
|
|
311
311
|
`
|
|
312
312
|
}]
|
|
313
313
|
})}
|