@eagleoutice/flowr 2.17.3 → 2.17.5
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 +13 -52
- package/abstract-interpretation/absint-inference.js +1 -2
- package/abstract-interpretation/data-frame/arguments.d.ts +14 -3
- package/abstract-interpretation/data-frame/arguments.js +34 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.js +7 -15
- package/abstract-interpretation/data-frame/resolve-args.d.ts +2 -2
- package/abstract-interpretation/data-frame/semantics.d.ts +8 -1
- package/abstract-interpretation/data-frame/semantics.js +14 -6
- package/abstract-interpretation/domains/state-abstract-domain.js +28 -18
- package/abstract-interpretation/domains/state-map.d.ts +43 -0
- package/abstract-interpretation/domains/state-map.js +147 -0
- package/benchmark/slicer.d.ts +1 -1
- package/benchmark/slicer.js +8 -7
- package/cli/repl/commands/repl-dataflow.js +5 -5
- package/cli/repl/commands/repl-execute.js +3 -2
- package/cli/repl/commands/repl-parse.js +2 -1
- package/cli/repl/commands/repl-signature.d.ts +1 -1
- package/cli/repl/completion.d.ts +23 -0
- package/cli/repl/completion.js +9 -0
- package/cli/repl/core.d.ts +0 -23
- package/cli/repl/core.js +0 -5
- package/cli/repl/parser/slice-query-parser.d.ts +1 -1
- package/cli/repl/parser/slice-query-parser.js +3 -3
- package/cli/repl/print-version.d.ts +1 -1
- package/cli/repl/print-version.js +2 -1
- package/cli/repl/server/connection.d.ts +1 -1
- package/cli/repl/server/connection.js +7 -9
- package/cli/slicer-app.js +2 -1
- package/clones/algorithms/baxter-ast.d.ts +33 -0
- package/clones/algorithms/baxter-ast.js +70 -0
- package/clones/algorithms/greedy-string-tiling.d.ts +17 -0
- package/clones/algorithms/greedy-string-tiling.js +56 -0
- package/clones/algorithms/winnowing.d.ts +27 -0
- package/clones/algorithms/winnowing.js +66 -0
- package/clones/clone-ast.d.ts +75 -0
- package/clones/clone-ast.js +174 -0
- package/clones/clone-dataflow.d.ts +11 -0
- package/clones/clone-dataflow.js +83 -0
- package/clones/clone-detector.d.ts +116 -0
- package/clones/clone-detector.js +200 -0
- package/clones/clone-index.d.ts +54 -0
- package/clones/clone-index.js +56 -0
- package/config.d.ts +21 -2
- package/config.js +7 -1
- package/control-flow/basic-cfg-guided-visitor.js +1 -2
- package/control-flow/happens-before.d.ts +2 -0
- package/control-flow/happens-before.js +15 -9
- package/control-flow/simple-visitor.js +2 -4
- package/core/steps/all/core/00-parse.js +2 -1
- package/core/steps/all/core/01-parse-tree-sitter.js +2 -1
- package/core/steps/all/core/10-normalize.js +2 -1
- package/core/steps/all/core/11-normalize-tree-sitter.js +2 -1
- package/core/steps/all/static-slicing/00-slice.js +2 -1
- package/core/steps/all/static-slicing/10-reconstruct.js +2 -1
- package/core/steps/pipeline/create-pipeline.js +1 -2
- package/core/steps/pipeline/default-pipelines.d.ts +1 -1
- package/core/steps/pipeline/default-pipelines.js +5 -4
- package/core/steps/pipeline-step.d.ts +3 -1
- package/core/steps/pipeline-step.js +5 -0
- package/data/r-base-primitives.generated.d.ts +2 -1
- package/dataflow/cluster.js +1 -2
- package/dataflow/environments/ambient-state-name.d.ts +14 -22
- package/dataflow/environments/ambient-state-name.js +4 -18
- package/dataflow/environments/apply-kill.d.ts +9 -20
- package/dataflow/environments/apply-kill.js +51 -25
- package/dataflow/environments/built-in-config.d.ts +7 -15
- package/dataflow/environments/built-in-config.js +15 -16
- package/dataflow/environments/built-in-eval-name.d.ts +5 -6
- package/dataflow/environments/built-in-eval-name.js +4 -5
- package/dataflow/environments/built-in-kinds.d.ts +111 -0
- package/dataflow/environments/built-in-kinds.js +35 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +11 -0
- package/dataflow/environments/built-in-props.d.ts +66 -172
- package/dataflow/environments/built-in-props.js +47 -151
- package/dataflow/environments/built-in.d.ts +42 -76
- package/dataflow/environments/built-in.js +46 -66
- package/dataflow/environments/data-masking-functions.d.ts +2 -2
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +7 -0
- package/dataflow/environments/default-builtin-config/base-functions.js +339 -0
- package/dataflow/environments/default-builtin-config/base-language.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/base-language.js +66 -0
- package/dataflow/environments/default-builtin-config/base-operators.d.ts +58 -0
- package/dataflow/environments/default-builtin-config/base-operators.js +169 -0
- package/dataflow/environments/default-builtin-config/database-access.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/database-access.js +16 -0
- package/dataflow/environments/default-builtin-config/define-helpers.d.ts +45 -0
- package/dataflow/environments/default-builtin-config/define-helpers.js +50 -0
- package/dataflow/environments/default-builtin-config/dev-tooling.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/dev-tooling.js +63 -0
- package/dataflow/environments/default-builtin-config/file-io.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/file-io.js +81 -0
- package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/graphics-devices.js +57 -0
- package/dataflow/environments/default-builtin-config/index.d.ts +18 -0
- package/dataflow/environments/default-builtin-config/index.js +114 -0
- package/dataflow/environments/default-builtin-config/media-formats.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/media-formats.js +41 -0
- package/dataflow/environments/default-builtin-config/misc-packages.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/misc-packages.js +18 -0
- package/dataflow/environments/default-builtin-config/network-access.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/network-access.js +47 -0
- package/dataflow/environments/default-builtin-config/object-systems.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/object-systems.js +39 -0
- package/dataflow/environments/default-builtin-config/package-data-table.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-data-table.js +18 -0
- package/dataflow/environments/default-builtin-config/package-spatial.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-spatial.js +32 -0
- package/dataflow/environments/default-builtin-config/package-tidyverse.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-tidyverse.js +96 -0
- package/dataflow/environments/default-builtin-config/package-utils.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-utils.js +35 -0
- package/dataflow/environments/default-builtin-config/package-withr.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/package-withr.js +41 -0
- package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/parallel-execution.js +31 -0
- package/dataflow/environments/default-builtin-config/session-interactive.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/session-interactive.js +31 -0
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +267 -0
- package/dataflow/environments/default-builtin-config/shared-configs.js +483 -0
- package/dataflow/environments/default-builtin-config/shared-signatures.d.ts +21 -0
- package/dataflow/environments/default-builtin-config/shared-signatures.js +32 -0
- package/dataflow/environments/default-builtin-config/statistics.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/statistics.js +32 -0
- package/dataflow/environments/default-builtin-config/unit-testing.d.ts +3 -0
- package/dataflow/environments/default-builtin-config/unit-testing.js +13 -0
- package/dataflow/environments/environment.d.ts +28 -52
- package/dataflow/environments/environment.js +24 -71
- package/dataflow/environments/group-generics.d.ts +12 -19
- package/dataflow/environments/group-generics.js +17 -14
- package/dataflow/environments/identifier.d.ts +72 -427
- package/dataflow/environments/identifier.js +34 -145
- package/dataflow/environments/pkg-name.d.ts +197 -0
- package/dataflow/environments/pkg-name.js +3 -0
- package/dataflow/environments/query-fn-props.d.ts +27 -76
- package/dataflow/environments/query-fn-props.js +34 -95
- package/dataflow/environments/resolve-by-name.d.ts +6 -16
- package/dataflow/environments/resolve-by-name.js +23 -35
- package/dataflow/environments/scoping.d.ts +5 -5
- package/dataflow/environments/scoping.js +13 -5
- package/dataflow/eval/resolve/alias-tracking.d.ts +31 -68
- package/dataflow/eval/resolve/alias-tracking.js +611 -126
- package/dataflow/eval/resolve/match-arguments.d.ts +5 -3
- package/dataflow/eval/resolve/resolve-argument.d.ts +11 -11
- package/dataflow/eval/resolve/resolve-argument.js +35 -35
- package/dataflow/eval/resolve/resolve-field.d.ts +10 -0
- package/dataflow/eval/resolve/resolve-field.js +127 -0
- package/dataflow/eval/resolve/resolve-numbers.d.ts +1 -178
- package/dataflow/eval/resolve/resolve-numbers.js +2 -13
- package/dataflow/eval/resolve/resolve-replacement.d.ts +10 -0
- package/dataflow/eval/resolve/resolve-replacement.js +80 -0
- package/dataflow/eval/resolve/resolve-strings.d.ts +3 -95
- package/dataflow/eval/resolve/resolve-strings.js +2 -17
- package/dataflow/eval/resolve/resolve-working-directory.js +3 -4
- package/dataflow/eval/resolve/resolve.d.ts +13 -10
- package/dataflow/eval/resolve/resolve.js +81 -32
- package/dataflow/eval/values/general.d.ts +6 -24
- package/dataflow/eval/values/general.js +12 -29
- package/dataflow/eval/values/lists/list-constants.d.ts +11 -0
- package/dataflow/eval/values/lists/list-constants.js +65 -0
- package/dataflow/eval/values/r-value.d.ts +20 -23
- package/dataflow/eval/values/r-value.js +22 -17
- package/dataflow/extractor.d.ts +2 -10
- package/dataflow/extractor.js +134 -62
- package/dataflow/fn/argument-roles.d.ts +2 -4
- package/dataflow/fn/argument-roles.js +49 -23
- package/dataflow/fn/class-declaration.d.ts +36 -52
- package/dataflow/fn/class-declaration.js +22 -56
- package/dataflow/fn/condition-handlers.d.ts +2 -1
- package/dataflow/fn/dispatch.d.ts +70 -0
- package/dataflow/fn/dispatch.js +434 -0
- package/dataflow/fn/exceptions-of-function.d.ts +1 -2
- package/dataflow/fn/exceptions-of-function.js +36 -106
- package/dataflow/fn/frame-reflection.d.ts +1 -3
- package/dataflow/fn/frame-reflection.js +8 -16
- package/dataflow/fn/function-props.d.ts +2 -5
- package/dataflow/fn/function-props.js +27 -36
- package/dataflow/fn/function-semantics.d.ts +14 -26
- package/dataflow/fn/function-semantics.js +4 -18
- package/dataflow/fn/higher-order-function.js +2 -4
- package/dataflow/fn/strict-function.d.ts +10 -35
- package/dataflow/fn/strict-function.js +126 -138
- package/dataflow/graph/ambient-access.d.ts +51 -0
- package/dataflow/graph/ambient-access.js +80 -0
- package/dataflow/graph/call-graph.d.ts +9 -29
- package/dataflow/graph/call-graph.js +17 -41
- package/dataflow/graph/closure-frames.d.ts +46 -0
- package/dataflow/graph/closure-frames.js +225 -0
- package/dataflow/graph/dataflowgraph-builder.d.ts +25 -96
- package/dataflow/graph/dataflowgraph-builder.js +29 -97
- package/dataflow/graph/df-helper.d.ts +48 -187
- package/dataflow/graph/df-helper.js +107 -207
- package/dataflow/graph/diff-dataflow-graph.d.ts +5 -15
- package/dataflow/graph/diff-dataflow-graph.js +25 -25
- package/dataflow/graph/edge.js +1 -1
- package/dataflow/graph/graph-helper.d.ts +10 -46
- package/dataflow/graph/graph-helper.js +16 -50
- package/dataflow/graph/graph.d.ts +44 -97
- package/dataflow/graph/graph.js +83 -79
- package/dataflow/graph/match-args.d.ts +21 -88
- package/dataflow/graph/match-args.js +284 -97
- package/dataflow/graph/vertex.d.ts +101 -128
- package/dataflow/graph/vertex.js +23 -20
- package/dataflow/hooks.d.ts +7 -14
- package/dataflow/hooks.js +15 -13
- package/dataflow/info.d.ts +2 -17
- package/dataflow/internal/dispatch-linking.d.ts +71 -0
- package/dataflow/internal/dispatch-linking.js +332 -0
- package/dataflow/internal/linker.d.ts +48 -50
- package/dataflow/internal/linker.js +458 -155
- package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -46
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +7 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +10 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +25 -69
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +292 -89
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +10 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +66 -45
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +15 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +85 -64
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +15 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +416 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +37 -54
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +192 -111
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +60 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +80 -76
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +1 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +4 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +436 -140
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +18 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +90 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +5 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +9 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +3 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +9 -24
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +10 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +8 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +20 -28
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +17 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +117 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +5 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +8 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +18 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +7 -34
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +42 -56
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +4 -18
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +16 -22
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +18 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +130 -65
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +39 -21
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +587 -107
- package/dataflow/internal/process/functions/call/common.d.ts +8 -24
- package/dataflow/internal/process/functions/call/common.js +24 -24
- package/dataflow/internal/process/functions/call/deferred.d.ts +7 -27
- package/dataflow/internal/process/functions/call/deferred.js +6 -27
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +7 -50
- package/dataflow/internal/process/functions/call/known-call-handling.js +14 -50
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +14 -35
- package/dataflow/internal/process/functions/call/nse-kind.d.ts +24 -0
- package/dataflow/internal/process/functions/call/nse-kind.js +30 -0
- package/dataflow/internal/process/functions/call/nse.d.ts +2 -9
- package/dataflow/internal/process/functions/call/nse.js +6 -13
- package/dataflow/internal/process/functions/call/quoted.d.ts +4 -15
- package/dataflow/internal/process/functions/call/quoted.js +26 -62
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +3 -6
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +29 -11
- package/dataflow/internal/process/functions/process-parameter.js +1 -1
- package/dataflow/internal/program-order.d.ts +3 -10
- package/dataflow/internal/program-order.js +19 -10
- package/dataflow/origin/dfg-get-origin.js +2 -1
- package/documentation/data/faq/faqs.js +16 -1
- package/documentation/data/interface/doc-writing-code.js +5 -7
- package/documentation/doc-capabilities.js +3 -3
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-code.d.ts +0 -5
- package/documentation/doc-util/doc-code.js +2 -22
- package/documentation/doc-util/doc-query.d.ts +1 -2
- package/documentation/doc-util/doc-query.js +4 -5
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/wiki-analyzer.js +4 -3
- package/documentation/wiki-core.js +5 -5
- package/documentation/wiki-dataflow-graph.js +6 -0
- package/documentation/wiki-interface.js +2 -1
- package/documentation/wiki-linter.js +15 -3
- package/documentation/wiki-linting-and-testing.js +15 -2
- package/documentation/wiki-query.js +114 -31
- package/index.d.ts +3 -1
- package/index.js +6 -3
- package/linter/linter-executor.js +1 -1
- package/linter/linter-rules.d.ts +37 -8
- package/linter/linter-rules.js +8 -1
- package/linter/linter-util.d.ts +3 -3
- package/linter/linter-util.js +1 -1
- package/linter/rules/absolute-path.js +5 -5
- package/linter/rules/cmd-check/bogus-return.d.ts +2 -1
- package/linter/rules/cmd-check/call-arguments.d.ts +3 -2
- package/linter/rules/cmd-check/call-arguments.js +5 -5
- package/linter/rules/cmd-check/cmd-check-util.d.ts +9 -8
- package/linter/rules/cmd-check/dependency-declaration.d.ts +2 -1
- package/linter/rules/cmd-check/dependency-declaration.js +3 -3
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +3 -2
- package/linter/rules/cmd-check/documentation-mismatch.js +2 -1
- package/linter/rules/cmd-check/file-checks.d.ts +2 -2
- package/linter/rules/cmd-check/foreign-function-calls.d.ts +2 -1
- package/linter/rules/cmd-check/global-environment-modification.d.ts +6 -5
- package/linter/rules/cmd-check/namespace-tampering.d.ts +2 -1
- package/linter/rules/cmd-check/non-ascii-code.js +1 -1
- package/linter/rules/cmd-check/package-files.d.ts +2 -2
- package/linter/rules/cmd-check/package-hooks.d.ts +5 -4
- package/linter/rules/cmd-check/package-runtime.js +4 -4
- package/linter/rules/cmd-check/rd-files.js +2 -1
- package/linter/rules/cmd-check/s-three-method-consistency.d.ts +3 -2
- package/linter/rules/cmd-check/s-three-method-consistency.js +2 -1
- package/linter/rules/code-clones.d.ts +57 -0
- package/linter/rules/code-clones.js +53 -0
- package/linter/rules/deprecated-functions.js +5 -8
- package/linter/rules/file-path-validity.js +11 -9
- package/linter/rules/function-finder-util.d.ts +4 -2
- package/linter/rules/function-finder-util.js +2 -2
- package/linter/rules/naming-convention.d.ts +6 -5
- package/linter/rules/naming-convention.js +2 -3
- package/linter/rules/no-leaked-credentials.d.ts +2 -1
- package/linter/rules/no-leaked-credentials.js +1 -1
- package/linter/rules/overwritten-file.d.ts +2 -1
- package/linter/rules/overwritten-file.js +2 -4
- package/linter/rules/problematic-inputs.d.ts +2 -1
- package/linter/rules/problematic-inputs.js +3 -3
- package/linter/rules/process-state-in-session.d.ts +7 -6
- package/linter/rules/process-state-in-session.js +1 -1
- package/linter/rules/roxygen-arguments.d.ts +1 -1
- package/linter/rules/secret-exfiltration.d.ts +3 -2
- package/linter/rules/secret-exfiltration.js +9 -4
- package/linter/rules/seeded-randomness.d.ts +3 -3
- package/linter/rules/unclosed-connection.js +1 -2
- package/linter/rules/undefined-symbol-util.d.ts +3 -2
- package/linter/rules/undefined-symbol.d.ts +3 -2
- package/linter/rules/unescaped-arguments.d.ts +1 -1
- package/linter/rules/unescaped-arguments.js +6 -8
- package/linter/rules/unused-definition.d.ts +4 -3
- package/linter/rules/unused-definition.js +10 -12
- package/linter/rules/unused-import.d.ts +6 -5
- package/linter/rules/unused-import.js +20 -6
- package/package.json +1 -1
- package/project/attached-packages.d.ts +5 -4
- package/project/cache/flowr-analyzer-cache.d.ts +14 -1
- package/project/cache/flowr-analyzer-cache.js +40 -3
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +0 -6
- package/project/cache/flowr-analyzer-controlflow-cache.js +7 -27
- package/project/context/flowr-analyzer-context.d.ts +2 -2
- package/project/context/flowr-analyzer-context.js +2 -2
- package/project/context/flowr-analyzer-dependencies-context.d.ts +12 -12
- package/project/context/flowr-analyzer-environment-context.d.ts +3 -3
- package/project/context/flowr-analyzer-environment-context.js +3 -3
- package/project/context/flowr-analyzer-files-context.d.ts +8 -0
- package/project/context/flowr-analyzer-files-context.js +51 -6
- package/project/context/flowr-analyzer-functions-context.d.ts +9 -7
- package/project/context/flowr-analyzer-gas-context.d.ts +25 -0
- package/project/context/flowr-analyzer-gas-context.js +34 -4
- package/project/dependency-version-space.d.ts +30 -29
- package/project/dependency-version-space.js +1 -2
- package/project/flowr-analyzer-builder.d.ts +2 -3
- package/project/flowr-analyzer.d.ts +35 -12
- package/project/flowr-analyzer.js +18 -33
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +15 -17
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +57 -163
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -3
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -3
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -2
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -2
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +5 -4
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +2 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +2 -2
- package/project/plugins/package-version-plugins/package.d.ts +6 -5
- package/project/plugins/package-version-plugins/package.js +1 -1
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -3
- package/project/sigdb/build.js +1 -1
- package/project/sigdb/decode.d.ts +8 -7
- package/project/sigdb/decode.js +1 -2
- package/project/sigdb/dict.d.ts +2 -1
- package/project/sigdb/dict.js +2 -2
- package/project/sigdb/index-format.d.ts +2 -1
- package/project/sigdb/manifest.d.ts +1 -1
- package/project/sigdb/memory-source.d.ts +18 -17
- package/project/sigdb/on-demand/package-sources.d.ts +4 -3
- package/project/sigdb/on-demand/recoverer.d.ts +2 -1
- package/project/sigdb/on-demand/remote-sources.d.ts +2 -1
- package/project/sigdb/reader.d.ts +85 -80
- package/project/sigdb/reader.js +0 -4
- package/project/sigdb/schema.d.ts +9 -8
- package/project/sigdb/signature-db.d.ts +6 -6
- package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +6 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +50 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +54 -0
- package/queries/catalog/ambient-access-query/ambient-access-query-format.js +45 -0
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +2 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +3 -2
- package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +6 -0
- package/queries/catalog/code-clones-query/code-clones-query-executor.js +38 -0
- package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +54 -0
- package/queries/catalog/code-clones-query/code-clones-query-format.js +73 -0
- package/queries/catalog/config-query/config-query-format.d.ts +1 -1
- package/queries/catalog/config-query/config-query-format.js +4 -4
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -3
- package/queries/catalog/dependencies-query/data-flow.d.ts +5 -4
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +5 -2
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +11 -10
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -6
- package/queries/catalog/dependencies-query/dependencies-query-format.js +12 -12
- package/queries/catalog/dependencies-query/dependency-values.d.ts +9 -0
- package/queries/catalog/dependencies-query/dependency-values.js +13 -0
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +6 -4
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/write-functions.js +8 -7
- package/queries/catalog/dependencies-query/implicit-echo.js +4 -2
- package/queries/catalog/dependencies-query/plot-description.d.ts +1 -1
- package/queries/catalog/dependencies-query/plot-description.js +2 -2
- package/queries/catalog/dice-query/dice-query-format.d.ts +2 -1
- package/queries/catalog/dice-query/dice-query-format.js +1 -0
- package/queries/catalog/does-call-query/does-call-query-executor.js +1 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +1 -0
- package/queries/catalog/files-query/files-query-format.d.ts +1 -1
- package/queries/catalog/function-info-query/function-info-query-format.d.ts +2 -1
- package/queries/catalog/function-info-query/function-origin.d.ts +3 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +3 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +5 -4
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +7 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +9 -9
- package/queries/catalog/input-sources-query/simple-input-classifier.js +1 -1
- package/queries/catalog/linter-query/linter-query-executor.js +4 -1
- package/queries/catalog/linter-query/linter-query-format.d.ts +2 -2
- package/queries/catalog/linter-query/linter-query-format.js +16 -11
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -0
- package/queries/catalog/origin-query/origin-query-format.js +1 -0
- package/queries/catalog/project-query/project-query-format.d.ts +2 -1
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +1 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +10 -7
- package/queries/catalog/signature-query/signature-query-executor.js +14 -15
- package/queries/catalog/signature-query/signature-query-format.d.ts +21 -20
- package/queries/catalog/signature-query/signature-query-render.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +9 -5
- package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
- package/queries/catalog/taint-query/taint-query-format.d.ts +1 -1
- package/queries/query.d.ts +61 -10
- package/queries/query.js +59 -37
- package/r-bridge/data/data.d.ts +39 -28
- package/r-bridge/data/data.js +37 -28
- package/r-bridge/init.js +1 -1
- package/r-bridge/lang-4.x/ast/model/model.d.ts +10 -1
- package/r-bridge/lang-4.x/ast/model/model.js +30 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +25 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +2 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -2
- 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-comment.d.ts +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-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -3
- 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-if-then-else.d.ts +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-logical.d.ts +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-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -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-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +5 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -7
- 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-unary-op.d.ts +3 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -5
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +7 -2
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +14 -6
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/visitor.js +2 -2
- package/r-bridge/lang-4.x/ast/model/type.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/type.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -2
- package/r-bridge/parser.d.ts +8 -2
- package/r-bridge/parser.js +6 -0
- package/r-bridge/shell-executor.d.ts +2 -2
- package/r-bridge/shell-executor.js +3 -2
- package/r-bridge/shell.d.ts +2 -2
- package/r-bridge/shell.js +3 -2
- package/reconstruct/auto-select/magic-comments.js +1 -1
- package/reconstruct/reconstruct.d.ts +0 -5
- package/reconstruct/reconstruct.js +6 -5
- package/search/flowr-search-builder.d.ts +14 -0
- package/search/flowr-search-builder.js +7 -0
- package/search/flowr-search-executor.js +2 -2
- package/search/flowr-search-filters.js +10 -11
- package/search/flowr-search.js +1 -1
- package/search/search-executor/search-enrichers.d.ts +2 -0
- package/search/search-executor/search-enrichers.js +6 -1
- package/search/search-executor/search-generators.d.ts +2 -3
- package/search/search-executor/search-generators.js +18 -14
- package/search/search-executor/search-mappers.js +1 -1
- package/search/search-executor/search-transformer.d.ts +2 -2
- package/search/search-executor/search-transformer.js +6 -6
- package/search/search-logger.d.ts +1 -0
- package/search/search-logger.js +6 -0
- package/slicing/criterion/parse.d.ts +2 -1
- package/slicing/criterion/parse.js +2 -1
- package/slicing/static/removal-slice.js +2 -1
- package/slicing/static/slice-call.d.ts +30 -4
- package/slicing/static/slice-call.js +74 -9
- package/slicing/static/slicer-types.d.ts +2 -1
- package/slicing/static/static-slicer.js +66 -11
- package/slicing/static/visiting-queue.d.ts +2 -0
- package/slicing/static/visiting-queue.js +4 -0
- package/taint-analysis/builder/report-template.d.ts +3 -3
- package/util/arg-matching.d.ts +1 -1
- package/util/collections/relation.d.ts +23 -0
- package/util/collections/relation.js +63 -0
- package/util/fixpoint.d.ts +65 -0
- package/util/fixpoint.js +216 -0
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
- package/util/json.d.ts +4 -0
- package/util/json.js +12 -3
- package/util/mermaid/cfg.js +1 -2
- package/util/mermaid/dfg.d.ts +1 -1
- package/util/mermaid/dfg.js +1 -1
- package/util/mermaid/mermaid.d.ts +2 -1
- package/util/monoid.d.ts +26 -0
- package/util/monoid.js +31 -0
- package/util/prefix.d.ts +1 -1
- package/util/r-base-packages.d.ts +10 -7
- package/util/r-base-packages.js +11 -6
- package/util/r-package-urls.d.ts +10 -9
- package/util/r-value.js +2 -1
- package/util/r-version-order.d.ts +2 -0
- package/util/r-version-order.js +19 -0
- package/util/r-version.d.ts +2 -1
- package/util/r-version.js +2 -14
- package/util/range.d.ts +38 -29
- package/util/range.js +10 -5
- package/util/simple-df/dfg-ascii.js +2 -2
- package/util/text/ansi.d.ts +13 -9
- package/util/text/ansi.js +4 -6
- package/util/text/strings.d.ts +10 -3
- package/util/text/strings.js +10 -1
- package/util/version.d.ts +1 -1
- package/util/version.js +2 -1
- package/dataflow/environments/default-builtin-config.d.ts +0 -8856
- package/dataflow/environments/default-builtin-config.js +0 -1735
- package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -33
- package/r-bridge/lang-4.x/ast/model/operators.js +0 -54
- package/taint-analysis/eval/eval.d.ts +0 -1
- package/taint-analysis/eval/eval.js +0 -124
- package/taint-analysis/eval/instrumentation.d.ts +0 -59
- package/taint-analysis/eval/instrumentation.js +0 -124
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toUnnamedArgument = toUnnamedArgument;
|
|
4
4
|
exports.wrapArgumentsUnnamed = wrapArgumentsUnnamed;
|
|
5
|
+
const node_id_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
5
6
|
const range_1 = require("../../../../../../util/range");
|
|
6
7
|
const r_function_call_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
7
8
|
const r_argument_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
@@ -20,7 +21,7 @@ function toUnnamedArgument(node, idMap) {
|
|
|
20
21
|
location: node.location ?? range_1.SourceRange.invalid(),
|
|
21
22
|
info: {
|
|
22
23
|
...node.info,
|
|
23
|
-
id: node.info.id
|
|
24
|
+
id: node_id_1.NodeId.argumentOf(node.info.id)
|
|
24
25
|
},
|
|
25
26
|
name: undefined,
|
|
26
27
|
value: node
|
|
@@ -4,22 +4,10 @@ import type { ParentInformation } from '../../../../../../r-bridge/lang-4.x/ast/
|
|
|
4
4
|
import type { PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
5
5
|
import { RSymbol } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
6
6
|
import { NodeId } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
7
|
-
/**
|
|
8
|
-
* Processes different types of access operations.
|
|
9
|
-
*
|
|
10
|
-
* Example:
|
|
11
|
-
* ```r
|
|
12
|
-
* a[i]
|
|
13
|
-
* a$foo
|
|
14
|
-
* a[[i]]
|
|
15
|
-
* a@foo
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
7
|
+
/** Processes different types of access operations. e.g. `a[i] a$foo a[[i]] a@foo`. */
|
|
18
8
|
export declare function processAccess<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: {
|
|
19
9
|
treatIndicesAsString: boolean;
|
|
20
10
|
resolveField?: boolean;
|
|
21
11
|
}): DataflowInformation;
|
|
22
|
-
/**
|
|
23
|
-
* Converts symbol arguments to string arguments within the specified range.
|
|
24
|
-
*/
|
|
12
|
+
/** Converts symbol arguments to string arguments within the specified range. */
|
|
25
13
|
export declare function symbolArgumentsToStrings<OtherInfo>(args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], firstIndexInclusive?: number, lastIndexInclusive?: number): PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[];
|
|
@@ -19,21 +19,12 @@ const linker_1 = require("../../../../linker");
|
|
|
19
19
|
const default_builtin_config_1 = require("../../../../../environments/default-builtin-config");
|
|
20
20
|
const resolve_helper_1 = require("../../../../../environments/resolve-helper");
|
|
21
21
|
const r_function_call_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
22
|
+
const built_in_class_generator_1 = require("./built-in-class-generator");
|
|
22
23
|
function tableAssignmentProcessor(name, args, rootId, data, outInfo) {
|
|
23
24
|
outInfo.definitionRootNodes.push(rootId);
|
|
24
25
|
return (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, origin: built_in_proc_name_1.BuiltInProcName.TableAssignment }).information;
|
|
25
26
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Processes different types of access operations.
|
|
28
|
-
*
|
|
29
|
-
* Example:
|
|
30
|
-
* ```r
|
|
31
|
-
* a[i]
|
|
32
|
-
* a$foo
|
|
33
|
-
* a[[i]]
|
|
34
|
-
* a@foo
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
27
|
+
/** Processes different types of access operations. e.g. `a[i] a$foo a[[i]] a@foo`. */
|
|
37
28
|
function processAccess(name, args, rootId, data, config) {
|
|
38
29
|
if (args.length < 1) {
|
|
39
30
|
logger_1.dataflowLogger.warn(`Access ${identifier_1.Identifier.getName(name.content)} has less than 1 argument, skipping`);
|
|
@@ -69,7 +60,7 @@ function processAccess(name, args, rootId, data, config) {
|
|
|
69
60
|
&& args.length >= 2 && args[1] !== r_function_call_1.EmptyArgument) {
|
|
70
61
|
const stackEnvState = (0, built_in_stack_env_1.resolveNodeToStackEnv)(head.value, data);
|
|
71
62
|
const envState = stackEnvState
|
|
72
|
-
?? (r_symbol_1.RSymbol.is(head.value) ? (0, built_in_envir_utils_1.resolveSymbolToEnvir)(head.value.content, head.value.info.id, data)?.envDef.envState :
|
|
63
|
+
?? (r_symbol_1.RSymbol.is(head.value) ? (0, built_in_envir_utils_1.resolveSymbolToEnvir)(head.value.content, head.value.info.id, data)?.envDef.envState : (0, built_in_class_generator_1.resolveConstructorInstanceEnvState)(head.value, data));
|
|
73
64
|
if (envState) {
|
|
74
65
|
const fieldName = (0, linker_1.accessedFieldName)(r_argument_1.RArgument.valueOf(args[1]), config.treatIndicesAsString);
|
|
75
66
|
const fieldDefs = fieldName
|
|
@@ -83,17 +74,7 @@ function processAccess(name, args, rootId, data, config) {
|
|
|
83
74
|
}
|
|
84
75
|
return {
|
|
85
76
|
...info,
|
|
86
|
-
/*
|
|
87
|
-
* Keep active nodes in case of assignments etc.
|
|
88
|
-
* We make them maybe as a kind of hack.
|
|
89
|
-
* This way when using
|
|
90
|
-
* ```ts
|
|
91
|
-
* a[[1]] <- 3
|
|
92
|
-
* a[[2]] <- 4
|
|
93
|
-
* a
|
|
94
|
-
* ```
|
|
95
|
-
* the read for a will use both accesses as potential definitions and not just the last one!
|
|
96
|
-
*/
|
|
77
|
+
/* Keep active nodes in case of assignments etc. We make them maybe as a kind of hack. */
|
|
97
78
|
unknownReferences: (0, reference_to_maybe_1.makeAllMaybe)(info.unknownReferences, info.graph, info.environment, false),
|
|
98
79
|
entryPoint: rootId,
|
|
99
80
|
/** it is, to be precise, the accessed element we want to map to maybe */
|
|
@@ -102,15 +83,7 @@ function processAccess(name, args, rootId, data, config) {
|
|
|
102
83
|
})
|
|
103
84
|
};
|
|
104
85
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Processes different types of number-based access operations.
|
|
107
|
-
*
|
|
108
|
-
* Example:
|
|
109
|
-
* ```r
|
|
110
|
-
* a[i]
|
|
111
|
-
* a[[i]]
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
86
|
+
/** Processes different types of number-based access operations. e.g. `a[i] a[[i]]`. */
|
|
114
87
|
function processNumberBasedAccess(data, name, args, rootId, head) {
|
|
115
88
|
const existing = data.environment.current.memory.get(':=');
|
|
116
89
|
const outInfo = { definitionRootNodes: [] };
|
|
@@ -128,14 +101,19 @@ function processNumberBasedAccess(data, name, args, rootId, head) {
|
|
|
128
101
|
if (existing !== undefined) {
|
|
129
102
|
data.environment.current.writableMemory.set(':=', existing);
|
|
130
103
|
}
|
|
131
|
-
|
|
132
|
-
|
|
104
|
+
const table = head.value;
|
|
105
|
+
if (table && outInfo.definitionRootNodes.length > 0) {
|
|
106
|
+
/* the table changes in place: the change reads the table it changes, and every variable holding it sees the change */
|
|
107
|
+
const name = table.lexeme ?? '';
|
|
108
|
+
const before = (resolve_helper_1.Resolve.byName(name, fnCall.information.environment) ?? []).filter(d => !node_id_1.NodeId.isBuiltIn(d.nodeId));
|
|
109
|
+
const [environment, envId] = (0, built_in_envir_utils_1.rebindAliases)(fnCall.information.environment, name, table.info.id, rootId);
|
|
110
|
+
fnCall.information.environment = environment;
|
|
111
|
+
(0, built_in_assignment_1.markAsAssignment)(fnCall.information, { type: identifier_1.ReferenceType.Variable, name, nodeId: table.info.id, definedAt: rootId, cds: [], envId }, outInfo.definitionRootNodes, rootId, data);
|
|
112
|
+
before.forEach(d => fnCall.information.graph.addEdge(table.info.id, d.nodeId, edge_1.EdgeType.Reads));
|
|
133
113
|
}
|
|
134
114
|
return fnCall;
|
|
135
115
|
}
|
|
136
|
-
/**
|
|
137
|
-
* Converts symbol arguments to string arguments within the specified range.
|
|
138
|
-
*/
|
|
116
|
+
/** Converts symbol arguments to string arguments within the specified range. */
|
|
139
117
|
function symbolArgumentsToStrings(args, firstIndexInclusive = 1, lastIndexInclusive = args.length - 1) {
|
|
140
118
|
const newArgs = args.slice();
|
|
141
119
|
// if the argument is a symbol, we convert it to a string for this perspective
|
|
@@ -159,15 +137,7 @@ function symbolArgumentsToStrings(args, firstIndexInclusive = 1, lastIndexInclus
|
|
|
159
137
|
}
|
|
160
138
|
return newArgs;
|
|
161
139
|
}
|
|
162
|
-
/**
|
|
163
|
-
* Processes different types of string-based access operations.
|
|
164
|
-
*
|
|
165
|
-
* Example:
|
|
166
|
-
* ```r
|
|
167
|
-
* a$foo
|
|
168
|
-
* a@foo
|
|
169
|
-
* ```
|
|
170
|
-
*/
|
|
140
|
+
/** Processes different types of string-based access operations. e.g. `a$foo a@foo`. */
|
|
171
141
|
function processStringBasedAccess(args, data, name, rootId) {
|
|
172
142
|
return (0, known_call_handling_1.processKnownFunctionCall)({
|
|
173
143
|
name,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DataflowProcessorInformation } from '../../../../../processor';
|
|
2
2
|
import type { ParentInformation, RNodeWithParent } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
3
3
|
import { type PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
4
|
-
import { type
|
|
4
|
+
import { type BrandedIdentifier } from '../../../../../environments/identifier';
|
|
5
|
+
import { AmbientStateName, type KeyedState } from '../../../../../environments/ambient-state-name';
|
|
5
6
|
/**
|
|
6
7
|
* Where a call names the entries of a {@link KeyedState} it sets, declared in the built-in configuration.
|
|
7
8
|
* An entry we cannot name is the {@link UnknownKey}.
|
|
@@ -13,7 +14,7 @@ export type AmbientKeys = {
|
|
|
13
14
|
*/
|
|
14
15
|
readonly from: 'argument-names';
|
|
15
16
|
/** arguments to leave out, like `par(no.readonly = TRUE)` */
|
|
16
|
-
readonly ignore?: readonly
|
|
17
|
+
readonly ignore?: readonly BrandedIdentifier[];
|
|
17
18
|
} | {
|
|
18
19
|
/** every unnamed argument names an entry, like `pacman::p_load(a, b)`; quoted ones are names themselves, others are looked up */
|
|
19
20
|
readonly from: 'unnamed';
|
|
@@ -28,7 +29,7 @@ export type AmbientKeys = {
|
|
|
28
29
|
/** the formals of the function, for matching the arguments */
|
|
29
30
|
readonly signature: readonly string[];
|
|
30
31
|
/** the parameters to take the entries from, the first one given wins (`attach(what, name = "x")` is `x`) */
|
|
31
|
-
readonly names: readonly
|
|
32
|
+
readonly names: readonly BrandedIdentifier[];
|
|
32
33
|
/** the entry set if none of the parameters is given */
|
|
33
34
|
readonly fallback?: string;
|
|
34
35
|
/**
|
|
@@ -38,8 +39,8 @@ export type AmbientKeys = {
|
|
|
38
39
|
readonly quoted?: boolean | string;
|
|
39
40
|
};
|
|
40
41
|
/** The strings the value at `value` may have, `undefined` if we do not know. */
|
|
41
|
-
export declare function stringValuesOf<OtherInfo>(value: RNodeWithParent<OtherInfo> | undefined, data: DataflowProcessorInformation<OtherInfo & ParentInformation>):
|
|
42
|
+
export declare function stringValuesOf<OtherInfo>(value: RNodeWithParent<OtherInfo> | undefined, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): BrandedIdentifier[] | undefined;
|
|
42
43
|
/** The entries the call with the arguments `args` names, see {@link AmbientKeys}. */
|
|
43
|
-
export declare function keysOf<OtherInfo>(keys: AmbientKeys, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], data: DataflowProcessorInformation<OtherInfo & ParentInformation>):
|
|
44
|
+
export declare function keysOf<OtherInfo>(keys: AmbientKeys, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], data: DataflowProcessorInformation<OtherInfo & ParentInformation>): readonly BrandedIdentifier[];
|
|
44
45
|
/** The pseudo variables a write to the given entries of `state` defines: the entries and what every write to the state adds to. No entry has an empty name. */
|
|
45
|
-
export declare function keyedWrites(state: KeyedState, given: readonly
|
|
46
|
+
export declare function keyedWrites(state: KeyedState, given: readonly BrandedIdentifier[]): AmbientStateName[];
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.stringValuesOf = stringValuesOf;
|
|
4
4
|
exports.keysOf = keysOf;
|
|
5
5
|
exports.keyedWrites = keyedWrites;
|
|
6
|
+
const logic_1 = require("../../../../../../util/logic");
|
|
6
7
|
const r_function_call_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
7
8
|
const r_string_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
8
9
|
const r_symbol_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol");
|
|
@@ -36,17 +37,17 @@ function quotedName(node) {
|
|
|
36
37
|
}
|
|
37
38
|
return undefined;
|
|
38
39
|
}
|
|
39
|
-
/** Whether the value at `node` is `TRUE
|
|
40
|
+
/** Whether the value at `node` is `TRUE`, {@link Ternary.Never} if there is no flag. */
|
|
40
41
|
function flagValue(node, data) {
|
|
41
42
|
const values = node === undefined ? [] : node_value_1.NodeValue.setOf(node.info.id, data)?.elements;
|
|
42
43
|
if (node === undefined) {
|
|
43
|
-
return
|
|
44
|
+
return logic_1.Ternary.Never;
|
|
44
45
|
}
|
|
45
46
|
else if (values === undefined || values.length === 0 || values.some(v => v.type !== 'logical' || typeof v.value !== 'boolean')) {
|
|
46
|
-
return
|
|
47
|
+
return logic_1.Ternary.Maybe;
|
|
47
48
|
}
|
|
48
49
|
const isTrue = values.map(v => v.type === 'logical' && v.value === true);
|
|
49
|
-
return isTrue.every(Boolean) ?
|
|
50
|
+
return isTrue.every(Boolean) ? logic_1.Ternary.Always : isTrue.some(Boolean) ? logic_1.Ternary.Maybe : logic_1.Ternary.Never;
|
|
50
51
|
}
|
|
51
52
|
function parameterKeys(keys, args, data) {
|
|
52
53
|
const bound = match_args_1.MatchArgs.toNames(args, keys.signature);
|
|
@@ -55,9 +56,9 @@ function parameterKeys(keys, args, data) {
|
|
|
55
56
|
return keys.fallback === undefined ? [] : [keys.fallback];
|
|
56
57
|
}
|
|
57
58
|
/* whether the argument is looked up as a value, which the flag switches on for a quoted one */
|
|
58
|
-
const looksUp = typeof keys.quoted === 'string' ? flagValue(bound.get(keys.quoted)?.value, data) : keys.quoted ?
|
|
59
|
-
const name = looksUp ===
|
|
60
|
-
const values = looksUp ===
|
|
59
|
+
const looksUp = typeof keys.quoted === 'string' ? flagValue(bound.get(keys.quoted)?.value, data) : keys.quoted ? logic_1.Ternary.Never : logic_1.Ternary.Always;
|
|
60
|
+
const name = looksUp === logic_1.Ternary.Always ? undefined : quotedName(value);
|
|
61
|
+
const values = looksUp === logic_1.Ternary.Never && name !== undefined ? [] : stringValuesOf(value, data) ?? [ambient_state_name_1.UnknownKey];
|
|
61
62
|
return name === undefined ? values : [name, ...values];
|
|
62
63
|
}
|
|
63
64
|
/** The entries the call with the arguments `args` names, see {@link AmbientKeys}. */
|
|
@@ -66,7 +67,7 @@ function keysOf(keys, args, data) {
|
|
|
66
67
|
case 'constant':
|
|
67
68
|
return [keys.key];
|
|
68
69
|
case 'argument-names':
|
|
69
|
-
return args.flatMap(a => {
|
|
70
|
+
return args.flatMap((a) => {
|
|
70
71
|
if (a === r_function_call_1.EmptyArgument) {
|
|
71
72
|
return [];
|
|
72
73
|
}
|
|
@@ -79,7 +80,7 @@ function keysOf(keys, args, data) {
|
|
|
79
80
|
case 'parameter':
|
|
80
81
|
return parameterKeys(keys, args, data);
|
|
81
82
|
case 'unnamed':
|
|
82
|
-
return args.flatMap(a => a === r_function_call_1.EmptyArgument || a.name !== undefined || a.value === undefined ? []
|
|
83
|
+
return args.flatMap((a) => a === r_function_call_1.EmptyArgument || a.name !== undefined || a.value === undefined ? []
|
|
83
84
|
: (keys.quoted ? quotedName(a.value) : undefined) ?? stringValuesOf(a.value, data) ?? [ambient_state_name_1.UnknownKey]);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
@@ -2,84 +2,40 @@ import type { DataflowProcessorInformation } from '../../../../../processor';
|
|
|
2
2
|
import { type ControlDependency, DataflowInformation, type ExitPoint } from '../../../../../info';
|
|
3
3
|
import type { ParentInformation } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
4
4
|
import { type PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
5
|
+
import { type DataflowGraphVertexFunctionCall } from '../../../../../graph/vertex';
|
|
5
6
|
import { type FnSig } from '../../../../../environments/built-in-props';
|
|
6
7
|
import { NodeId } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
7
|
-
import {
|
|
8
|
+
import { type NamedInGraphIdentifierDefinition, type BrandedIdentifier, Identifier, type IdentifierDefinition, type IdentifierReference } from '../../../../../environments/identifier';
|
|
8
9
|
import { type REnvironmentInformation } from '../../../../../environments/environment';
|
|
9
10
|
import { RNode } from '../../../../../../r-bridge/lang-4.x/ast/model/model';
|
|
10
11
|
import type { LinkTo } from '../../../../../../queries/catalog/call-context-query/call-context-query-format';
|
|
11
12
|
import type { DataflowGraph } from '../../../../../graph/graph';
|
|
13
|
+
import type { FlowrConfig } from '../../../../../../config';
|
|
12
14
|
import { RSymbol } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
13
|
-
import { KeyedState } from '../../../../../environments/ambient-state-name';
|
|
15
|
+
import { AmbientStateName, KeyedState } from '../../../../../environments/ambient-state-name';
|
|
14
16
|
import { type AmbientKeys } from './built-in-ambient-keys';
|
|
17
|
+
import { AmbientSingleState, AmbientStateAccessType } from '../../../../../environments/built-in-kinds';
|
|
18
|
+
export { PrintingOptions, AmbientStateAccessType } from '../../../../../environments/built-in-kinds';
|
|
15
19
|
/** Whether calling `definition` runs a body flowR cannot see: a library function's, or whatever a parameter is bound to. */
|
|
16
20
|
export declare function hidesBody(definition: IdentifierDefinition): boolean;
|
|
21
|
+
/** Whether the call `call` of a function body reaches a built-in only once linked where the function is called, through a parameter or a name the body cannot resolve. */
|
|
22
|
+
export declare function reachesBuiltInLate(call: DataflowGraphVertexFunctionCall): boolean;
|
|
17
23
|
/** A call into code flowR cannot see may read any option, draw random numbers (with `draws` advancing the generator), and with `graphics` draw on the device. */
|
|
18
24
|
export declare function readsAllAmbientState<OtherInfo>(res: DataflowInformation, rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, graphics: boolean, draws?: boolean): DataflowInformation;
|
|
19
25
|
/** What an assignment writes beyond its target: only a global `.Random.seed` sets {@link AmbientStateName.rng}. */
|
|
20
|
-
export declare function ambientWritesOfAssignment(environment: REnvironmentInformation, target: Identifier, rootId: NodeId, cds: readonly ControlDependency[] | undefined, global: boolean): REnvironmentInformation;
|
|
26
|
+
export declare function ambientWritesOfAssignment(graph: DataflowGraph, environment: REnvironmentInformation, target: Identifier, rootId: NodeId, cds: readonly ControlDependency[] | undefined, global: boolean): REnvironmentInformation;
|
|
21
27
|
/** Rebinding or removing the names (all of them if `undefined`) may release an object a finalizer is registered for. */
|
|
22
|
-
export declare function ambientWritesOfRelease(environment: REnvironmentInformation, names: readonly Identifier[] | undefined, rootId: NodeId, cds: readonly ControlDependency[] | undefined): REnvironmentInformation;
|
|
28
|
+
export declare function ambientWritesOfRelease(graph: DataflowGraph, environment: REnvironmentInformation, names: readonly Identifier[] | undefined, rootId: NodeId, cds: readonly ControlDependency[] | undefined): REnvironmentInformation;
|
|
23
29
|
/** Ambient writes stay out of `out` (see {@link withAccess}), so a part that only maybe runs marks its writes as maybe in `target` here. */
|
|
24
30
|
export declare function makeAmbientWritesMaybe(after: REnvironmentInformation, before: REnvironmentInformation, target: REnvironmentInformation, cds: readonly ControlDependency[]): void;
|
|
25
31
|
/** The states written in `after` that `before` does not hold, as by a promise (`delayedAssign`) whose writes only happen once a read forces it. */
|
|
26
|
-
export declare function ambientWritesBetween(after: REnvironmentInformation, before: REnvironmentInformation):
|
|
32
|
+
export declare function ambientWritesBetween(after: REnvironmentInformation, before: REnvironmentInformation): AmbientStateName[];
|
|
27
33
|
/** Notes that a definition binds a promise or a text connection, which reads have to look for from now on. */
|
|
28
34
|
export declare function markForcing(environment: REnvironmentInformation): void;
|
|
29
35
|
/** Whether a definition seen so far binds a promise or a text connection, see {@link markForcing}. */
|
|
30
36
|
export declare function mayForce(environment: REnvironmentInformation): boolean;
|
|
31
37
|
/** The state a symbol reads, plus the maybe-writes of forcing a promise bound to it. */
|
|
32
38
|
export declare function ambientAccessOfSymbol<OtherInfo>(res: DataflowInformation, symbol: RSymbol<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
33
|
-
/** Options that affect how values are printed and formatted (read by `print`, `format`, and `cat`). */
|
|
34
|
-
export declare const PrintingOptions: readonly string[];
|
|
35
|
-
/** How a call accesses the {@link AmbientStateName|ambient state}. */
|
|
36
|
-
export declare const enum AmbientStateAccessType {
|
|
37
|
-
/** `options(...)`: named arguments set options, unnamed strings query them, anything else sets unknown options */
|
|
38
|
-
SetOptions = "set-options",
|
|
39
|
-
/** `getOption(x)`: reads the option named by the first argument */
|
|
40
|
-
GetOption = "get-option",
|
|
41
|
-
/** reads the given options, like `cat` reads `digits` (see {@link AmbientStateAccess#dispatchOn} for `print`) */
|
|
42
|
-
ReadOptions = "read-options",
|
|
43
|
-
/** writes the graphics state, unless all arguments are unnamed strings (see {@link AmbientStateAccess#queryOnUnnamedStrings}) */
|
|
44
|
-
SetGraphics = "set-graphics",
|
|
45
|
-
/** writes the palette, which all devices share; without arguments it only reads it */
|
|
46
|
-
SetPalette = "set-palette",
|
|
47
|
-
/** reads the graphics state and the palette, like every plot does */
|
|
48
|
-
ReadGraphics = "read-graphics",
|
|
49
|
-
/** opens a device, which starts with a fresh graphics state */
|
|
50
|
-
OpenDevice = "open-device",
|
|
51
|
-
/** closes a device (or all of them), returning to the state of another open device */
|
|
52
|
-
CloseDevice = "close-device",
|
|
53
|
-
/** makes another open device the active one */
|
|
54
|
-
SwitchDevice = "switch-device",
|
|
55
|
-
/** evaluates its unevaluated argument, like `evalq`, see {@link evaluatesCapturedCode} */
|
|
56
|
-
EvaluateQuoted = "evaluate-quoted",
|
|
57
|
-
/** sets the state of the random number generator, like `set.seed`, and its kind from the arguments at {@link AmbientStateAccess#kindFrom} on */
|
|
58
|
-
SetRng = "set-rng",
|
|
59
|
-
/** draws from the random number generator, which reads its state and advances it, like `runif` */
|
|
60
|
-
DrawRng = "draw-rng",
|
|
61
|
-
/** reads a file, like `read.csv`, so it sees what was written to the files before */
|
|
62
|
-
ReadFiles = "read-files",
|
|
63
|
-
/** writes a file, like `write.csv` */
|
|
64
|
-
WriteFiles = "write-files",
|
|
65
|
-
/** `setwd(dir)`: changes the working directory, returning the previous one */
|
|
66
|
-
SetWorkingDirectory = "set-working-directory",
|
|
67
|
-
/** `getwd()`: reads the working directory */
|
|
68
|
-
GetWorkingDirectory = "get-working-directory",
|
|
69
|
-
/** `textConnection(object, open)`: opened for writing, it binds the variable `object` names to what is written to it */
|
|
70
|
-
OpenTextConnection = "open-text-connection",
|
|
71
|
-
/** `reg.finalizer(e, f)`: registers `f` to run once `e` is released */
|
|
72
|
-
RegisterFinalizer = "register-finalizer",
|
|
73
|
-
/** `gc()`: may run every registered finalizer whose object is released */
|
|
74
|
-
RunFinalizers = "run-finalizers",
|
|
75
|
-
/** sets entries of a keyed state, like `Sys.setenv(A = "1")` sets the environment variable `A`, see {@link AmbientKeys} */
|
|
76
|
-
SetKeyed = "set-keyed",
|
|
77
|
-
ReadKeyed = "read-keyed",
|
|
78
|
-
/** sets a state without entries, like `sink(file)` diverts the output */
|
|
79
|
-
SetState = "set-state",
|
|
80
|
-
/** reads a state without entries, like `search()` reads the search path */
|
|
81
|
-
ReadState = "read-state"
|
|
82
|
-
}
|
|
83
39
|
/** An {@link AmbientStateAccessType} together with what refines it for some of the types. */
|
|
84
40
|
export type AmbientStateAccess = {
|
|
85
41
|
readonly type: AmbientStateAccessType.SetOptions | AmbientStateAccessType.GetOption | AmbientStateAccessType.ReadGraphics | AmbientStateAccessType.SetPalette | AmbientStateAccessType.OpenDevice | AmbientStateAccessType.SwitchDevice | AmbientStateAccessType.DrawRng | AmbientStateAccessType.SetWorkingDirectory | AmbientStateAccessType.GetWorkingDirectory | AmbientStateAccessType.OpenTextConnection | AmbientStateAccessType.RegisterFinalizer | AmbientStateAccessType.RunFinalizers;
|
|
@@ -98,8 +54,6 @@ export type AmbientStateAccess = {
|
|
|
98
54
|
readonly keys: readonly string[];
|
|
99
55
|
/** the argument `print(x)` dispatches on: a package method may read any option unless the value is plain */
|
|
100
56
|
readonly dispatchOn?: number;
|
|
101
|
-
} | {
|
|
102
|
-
readonly type: AmbientStateAccessType.EvaluateQuoted;
|
|
103
57
|
} | {
|
|
104
58
|
readonly type: AmbientStateAccessType.CloseDevice;
|
|
105
59
|
/** `graphics.off()` closes every device */
|
|
@@ -110,7 +64,7 @@ export type AmbientStateAccess = {
|
|
|
110
64
|
readonly keys: AmbientKeys;
|
|
111
65
|
} | {
|
|
112
66
|
readonly type: AmbientStateAccessType.ReadState;
|
|
113
|
-
readonly state:
|
|
67
|
+
readonly state: AmbientStateName;
|
|
114
68
|
} | {
|
|
115
69
|
/** reads the entries the call names, like `Sys.getenv("HOME")`, all of them if it names none */
|
|
116
70
|
readonly type: AmbientStateAccessType.ReadKeyed;
|
|
@@ -119,7 +73,7 @@ export type AmbientStateAccess = {
|
|
|
119
73
|
} | {
|
|
120
74
|
readonly type: AmbientStateAccessType.SetState;
|
|
121
75
|
/** the pseudo variable the call sets, like {@link AmbientStateName.sink} */
|
|
122
|
-
readonly state:
|
|
76
|
+
readonly state: AmbientStateName;
|
|
123
77
|
/** `Sys.umask()` only queries the state */
|
|
124
78
|
readonly queryWithoutArguments?: boolean;
|
|
125
79
|
} | {
|
|
@@ -131,6 +85,8 @@ export type AmbientStateAccess = {
|
|
|
131
85
|
/** a query also reads what the last plot left behind (`par("usr")`), linked like an unknown side effect */
|
|
132
86
|
readonly queryLinksTo?: LinkTo<RegExp | string>;
|
|
133
87
|
};
|
|
88
|
+
/** Whether a call drawing on a device writes its canvas, see `semantics.ambient.drawingWritesDevice`. */
|
|
89
|
+
export declare function drawingWritesDevice(config: FlowrConfig): boolean;
|
|
134
90
|
/** Wires the {@link AmbientStateAccess} of a call into its dataflow information: reads become unknown references, writes define the pseudo variable globally. */
|
|
135
91
|
export declare function applyAmbientStateAccess<OtherInfo>(res: DataflowInformation, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[] | UnknownArguments, rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, access: AmbientStateAccess | readonly AmbientStateAccess[]): DataflowInformation;
|
|
136
92
|
/** The arguments of a call made on our behalf, like `do.call(par, args)`, which we cannot see. */
|
|
@@ -141,22 +97,17 @@ export declare function applyAmbientStateOfCallee<OtherInfo>(res: DataflowInform
|
|
|
141
97
|
/** Marks the call `callId` to the built-ins `targets` through a parameter or a variable as the unknown side effect they have, see {@link WritesEnvironment}. */
|
|
142
98
|
export declare function hiddenSideEffects(graph: DataflowGraph, environment: REnvironmentInformation, callId: NodeId, targets: readonly IdentifierDefinition[]): void;
|
|
143
99
|
/** The (maybe) writes of the call `callId` to the built-in `target` through a parameter, like `g <- function(f, ...) f(...); g(options, digits = 3)`. */
|
|
144
|
-
export declare function writesOfHiddenBuiltIn(target: IdentifierDefinition, callId: NodeId): (
|
|
145
|
-
name: string;
|
|
146
|
-
})[];
|
|
100
|
+
export declare function writesOfHiddenBuiltIn(target: IdentifierDefinition, callId: NodeId, drawing?: boolean): (NamedInGraphIdentifierDefinition<AmbientStateName>)[];
|
|
147
101
|
/** The states the call to the built-in `target` through a parameter reads, see {@link writesOfHiddenBuiltIn}. */
|
|
148
|
-
export declare function readsOfHiddenBuiltIn(target: IdentifierDefinition):
|
|
149
|
-
/**
|
|
150
|
-
* Whether the call to `fn` only queries the state it may set, as `par("mar")`, `options("digits")` and `palette()`
|
|
151
|
-
* do, which hand that state back visibly where setting it returns the previous one invisibly.
|
|
152
|
-
*/
|
|
102
|
+
export declare function readsOfHiddenBuiltIn(target: IdentifierDefinition): AmbientStateName[];
|
|
103
|
+
/** Whether the call to `fn` only queries the state it may set, as `par("mar")`, `options("digits")` and `palette()` do, which hand that state back visibly where setting it returns the previous one invisibly. */
|
|
153
104
|
export declare function callOnlyQueries<OtherInfo>(fn: Identifier, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], environment: REnvironmentInformation): boolean;
|
|
154
105
|
/** Links state reads in a loop body to the body's own writes of a later iteration and returns them, as the first iteration reads what is there before the loop. */
|
|
155
106
|
export declare function linkAmbientStateWithinLoop(graph: DataflowGraph, reads: readonly IdentifierReference[], body: DataflowInformation): IdentifierReference[];
|
|
156
107
|
/** A scoped state change (`withr`, `rlang`): `with_*` undoes it after its code, `local_*` when the calling function returns. */
|
|
157
108
|
export interface AmbientScope {
|
|
158
109
|
/** the state the scope changes; the keyed ones (`options`, environment variables, locale) take the entries the call names */
|
|
159
|
-
readonly state:
|
|
110
|
+
readonly state: AmbientSingleState | KeyedState.Option | KeyedState.Env | KeyedState.Locale;
|
|
160
111
|
/** the formals in order, used to bind the arguments */
|
|
161
112
|
readonly params: readonly string[];
|
|
162
113
|
/** the formal evaluated with the change in effect, absent for the `local_*` variants */
|
|
@@ -170,6 +121,8 @@ export interface AmbientScope {
|
|
|
170
121
|
export declare function processAmbientScope<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, scope: AmbientScope): DataflowInformation;
|
|
171
122
|
/** Evaluating captured code may access any state; `Quoted.finalize` drops the writes again once the code is known to change none. */
|
|
172
123
|
export declare function evaluatesCapturedCode<OtherInfo>(res: DataflowInformation, rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
124
|
+
/** What the implicit `print` of a top-level value reads (see {@link readsOfAutoPrint}): every option if a method may print it (`dispatched`). */
|
|
125
|
+
export declare function autoPrintReads(dispatched: boolean): AmbientStateName[];
|
|
173
126
|
/** R prints every visible top-level value (see {@link autoPrints}) by an implicit `print`, which reads the options the configured `print` reads for that value. */
|
|
174
127
|
export declare function readsOfAutoPrint<OtherInfo>(processed: DataflowInformation, expression: RNode<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
175
128
|
/** whether the value of the top-level `expression` is visible, so that R prints it, decided on its vertex */
|
|
@@ -178,4 +131,7 @@ export declare function autoPrints<OtherInfo>(expression: RNode<OtherInfo & Pare
|
|
|
178
131
|
export declare function applyAmbientStateOfCalledBuiltIns<OtherInfo>(res: DataflowInformation, callId: NodeId, builtIns: readonly NodeId[], before: REnvironmentInformation, graph: DataflowGraph, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
179
132
|
/** With `warn >= 2` R turns warnings into errors, so whatever may warn in `block` is a maybe error exit reading the options that may set `warn`. */
|
|
180
133
|
export declare function errorsOfWarnings<OtherInfo>(block: RNode<OtherInfo & ParentInformation>, after: REnvironmentInformation, graph: DataflowGraph, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): ExitPoint[];
|
|
181
|
-
|
|
134
|
+
/** What may signal a condition of the class `name` when `block` runs, which a handler for it depends on: everything that may warn, and for any class other than a warning also what muffles warnings, as that lets other conditions through. */
|
|
135
|
+
export declare function signalSites<OtherInfo>(block: RNode<OtherInfo & ParentInformation>, name: BrandedIdentifier, graph: DataflowGraph, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, link: boolean): NodeId[];
|
|
136
|
+
/** Whether running `block` may signal a condition a handler for the class `condition` catches, so whether the handler may run. */
|
|
137
|
+
export declare function maySignal<OtherInfo>(block: RNode<OtherInfo & ParentInformation>, condition: BrandedIdentifier, graph: DataflowGraph, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, after: REnvironmentInformation): boolean;
|