@eagleoutice/flowr 2.17.6 → 2.17.7
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 +9 -9
- package/abstract-interpretation/absint-inference.d.ts +9 -25
- package/abstract-interpretation/absint-inference.js +7 -21
- package/abstract-interpretation/branch-paths-interpreter.js +1 -5
- package/abstract-interpretation/branch-paths.d.ts +1 -2
- package/abstract-interpretation/data-frame/arguments.d.ts +3 -14
- package/abstract-interpretation/data-frame/arguments.js +2 -10
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +4 -12
- package/abstract-interpretation/data-frame/dataframe-domain.js +6 -20
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +2 -6
- package/abstract-interpretation/data-frame/dataframe-semantics.js +161 -327
- package/abstract-interpretation/data-frame/resolve-args.d.ts +2 -6
- package/abstract-interpretation/data-frame/semantics.d.ts +3 -0
- package/abstract-interpretation/data-frame/semantics.js +20 -42
- package/abstract-interpretation/data-frame/shape-inference.d.ts +5 -15
- package/abstract-interpretation/domains/abstract-domain.d.ts +7 -21
- package/abstract-interpretation/domains/abstract-domain.js +6 -18
- package/abstract-interpretation/domains/interval-domain.d.ts +2 -6
- package/abstract-interpretation/domains/interval-domain.js +3 -10
- package/abstract-interpretation/domains/lattice.d.ts +14 -42
- package/abstract-interpretation/domains/set-range-domain.d.ts +6 -18
- package/abstract-interpretation/domains/set-range-domain.js +4 -12
- package/abstract-interpretation/domains/state-domain.d.ts +9 -27
- package/abstract-interpretation/domains/value-abstract-domain.d.ts +22 -66
- package/abstract-interpretation/domains/value-abstract-domain.js +3 -9
- package/abstract-interpretation/unsupported-functions.d.ts +2 -6
- package/abstract-interpretation/unsupported-functions.js +3 -9
- package/abstract-interpretation/value-semantics.d.ts +1 -2
- package/benchmark/slicer.d.ts +4 -11
- package/benchmark/slicer.js +8 -24
- package/benchmark/stats/count-comments.d.ts +1 -3
- package/benchmark/stats/count-comments.js +1 -3
- package/benchmark/stats/print.d.ts +3 -10
- package/benchmark/stats/print.js +39 -110
- package/benchmark/stats/sigdb-counts.js +1 -5
- package/benchmark/stats/size-of.js +3 -13
- package/benchmark/stats/stats.d.ts +1 -3
- package/benchmark/stopwatch.d.ts +1 -3
- package/benchmark/stopwatch.js +1 -3
- package/benchmark/summarizer/first-phase/input.d.ts +2 -6
- package/benchmark/summarizer/first-phase/input.js +2 -6
- package/benchmark/summarizer/first-phase/process.d.ts +4 -12
- package/benchmark/summarizer/first-phase/process.js +22 -39
- package/benchmark/summarizer/second-phase/graph.d.ts +0 -1
- package/benchmark/summarizer/second-phase/graph.js +9 -33
- package/benchmark/summarizer/second-phase/process.d.ts +4 -12
- package/benchmark/summarizer/second-phase/process.js +78 -221
- package/benchmark/summarizer/summarizer.d.ts +4 -12
- package/cli/benchmark-app.js +1 -5
- package/cli/benchmark-helper-app.js +2 -10
- package/cli/common/options.d.ts +1 -3
- package/cli/common/options.js +1 -3
- package/cli/common/script.d.ts +1 -3
- package/cli/common/script.js +3 -11
- package/cli/common/scripts-info.d.ts +2 -7
- package/cli/common/scripts-info.js +2 -6
- package/cli/flowr-main-options.d.ts +1 -3
- package/cli/flowr-main-options.js +6 -31
- package/cli/flowr.js +5 -8
- package/cli/repl/commands/repl-commands.d.ts +5 -15
- package/cli/repl/commands/repl-commands.js +7 -17
- package/cli/repl/commands/repl-dataflow.js +4 -4
- package/cli/repl/commands/repl-execute.d.ts +1 -4
- package/cli/repl/commands/repl-execute.js +1 -4
- package/cli/repl/commands/repl-main.d.ts +4 -14
- package/cli/repl/commands/repl-main.js +1 -5
- package/cli/repl/commands/repl-query.js +2 -10
- package/cli/repl/commands/repl-signature.js +2 -3
- package/cli/repl/completion.d.ts +11 -3
- package/cli/repl/completion.js +32 -0
- package/cli/repl/core.d.ts +5 -16
- package/cli/repl/core.js +7 -19
- package/cli/repl/execute.js +3 -11
- package/cli/repl/ghost-hint.js +6 -6
- package/cli/repl/parser/slice-query-parser.d.ts +3 -9
- package/cli/repl/parser/slice-query-parser.js +6 -10
- package/cli/repl/print-version.d.ts +2 -6
- package/cli/repl/print-version.js +4 -8
- package/cli/repl/prompt.d.ts +1 -0
- package/cli/repl/prompt.js +1 -0
- package/cli/repl/server/connection.d.ts +2 -6
- package/cli/repl/server/connection.js +8 -35
- package/cli/repl/server/messages/all-messages.d.ts +3 -9
- package/cli/repl/server/messages/all-messages.js +1 -4
- package/cli/repl/server/messages/message-analysis.d.ts +6 -18
- package/cli/repl/server/messages/message-error.d.ts +1 -3
- package/cli/repl/server/messages/message-hello.d.ts +2 -7
- package/cli/repl/server/messages/message-repl.d.ts +1 -1
- package/cli/repl/server/messages/message-slice.d.ts +2 -7
- package/cli/repl/server/net.d.ts +3 -11
- package/cli/repl/server/net.js +1 -3
- package/cli/repl/server/send.d.ts +2 -6
- package/cli/repl/server/send.js +2 -6
- package/cli/repl/server/server.js +1 -6
- package/cli/repl/server/validate.d.ts +3 -9
- package/cli/repl/server/validate.js +3 -9
- package/cli/script-core/summarizer-core.d.ts +1 -3
- package/cli/script-core/summarizer-core.js +1 -3
- package/cli/summarizer-app.js +1 -4
- package/cli/wiki.d.ts +1 -3
- package/cli/wiki.js +3 -15
- package/clones/algorithms/baxter-ast.js +2 -2
- package/clones/clone-ast.js +2 -2
- package/clones/clone-detector.js +2 -2
- package/config.d.ts +5 -15
- package/config.js +17 -59
- package/control-flow/basic-cfg-guided-visitor.d.ts +2 -6
- package/control-flow/basic-cfg-guided-visitor.js +2 -6
- package/control-flow/cfg-dead-code.d.ts +1 -1
- package/control-flow/cfg-dead-code.js +16 -41
- package/control-flow/cfg-properties.d.ts +1 -3
- package/control-flow/cfg-properties.js +1 -3
- package/control-flow/cfg-simplification.d.ts +2 -6
- package/control-flow/cfg-simplification.js +2 -6
- package/control-flow/cfg-to-basic-blocks.d.ts +1 -3
- package/control-flow/cfg-to-basic-blocks.js +2 -9
- package/control-flow/control-flow-graph.d.ts +16 -49
- package/control-flow/control-flow-graph.js +60 -194
- package/control-flow/dfg-cfg-guided-visitor.d.ts +2 -6
- package/control-flow/dfg-cfg-guided-visitor.js +2 -6
- package/control-flow/happens-before.d.ts +1 -3
- package/control-flow/happens-before.js +1 -3
- package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -7
- package/control-flow/semantic-cfg-guided-visitor.js +12 -45
- package/control-flow/simple-visitor.d.ts +1 -5
- package/control-flow/simple-visitor.js +1 -5
- package/control-flow/syntax-cfg-guided-visitor.d.ts +23 -67
- package/control-flow/syntax-cfg-guided-visitor.js +22 -66
- package/control-flow/useless-loop.d.ts +0 -5
- package/control-flow/useless-loop.js +0 -5
- package/core/pipeline-executor.d.ts +1 -4
- package/core/pipeline-executor.js +2 -8
- package/core/print/print.d.ts +4 -14
- package/core/print/slice-diff-ansi.d.ts +1 -3
- package/core/print/slice-diff-ansi.js +2 -7
- package/core/steps/all/core/01-parse-tree-sitter.js +1 -4
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +1 -1
- package/core/steps/all/static-slicing/00-slice.d.ts +1 -1
- package/core/steps/all/static-slicing/00-slice.js +1 -3
- package/core/steps/all/static-slicing/10-reconstruct.js +1 -3
- package/core/steps/pipeline/create-pipeline.d.ts +1 -3
- package/core/steps/pipeline/create-pipeline.js +2 -8
- package/core/steps/pipeline/default-pipelines.d.ts +48 -323
- package/core/steps/pipeline/default-pipelines.js +9 -47
- package/core/steps/pipeline/invalid-pipeline-error.d.ts +1 -3
- package/core/steps/pipeline/invalid-pipeline-error.js +1 -3
- package/core/steps/pipeline/pipeline.d.ts +1 -6
- package/core/steps/pipeline-step.d.ts +2 -6
- package/data/packed.js +2 -2
- package/dataflow/cluster.d.ts +1 -3
- package/dataflow/cluster.js +1 -3
- package/dataflow/environments/ambient-contract.d.ts +102 -0
- package/dataflow/environments/ambient-contract.js +134 -0
- package/dataflow/environments/ambient-effect.d.ts +72 -8
- package/dataflow/environments/ambient-effect.js +59 -17
- package/dataflow/environments/ambient-state-name.d.ts +5 -1
- package/dataflow/environments/ambient-state-name.js +8 -5
- package/dataflow/environments/append.d.ts +1 -3
- package/dataflow/environments/append.js +2 -7
- package/dataflow/environments/apply-kill.d.ts +2 -3
- package/dataflow/environments/apply-kill.js +24 -49
- package/dataflow/environments/built-in-config.d.ts +1 -2
- package/dataflow/environments/built-in-proc-name.d.ts +2 -6
- package/dataflow/environments/built-in-proc-name.js +2 -6
- package/dataflow/environments/built-in-props.js +1 -4
- package/dataflow/environments/built-in.d.ts +2 -3
- package/dataflow/environments/built-in.js +3 -6
- package/dataflow/environments/clone.js +1 -4
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-functions.js +4 -4
- package/dataflow/environments/default-builtin-config/define-helpers.d.ts +4 -0
- package/dataflow/environments/default-builtin-config/define-helpers.js +4 -0
- package/dataflow/environments/default-builtin-config/dev-tooling.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/dev-tooling.js +10 -7
- package/dataflow/environments/default-builtin-config/graphics-devices.js +1 -1
- package/dataflow/environments/default-builtin-config/guard-builders.d.ts +7 -0
- package/dataflow/environments/default-builtin-config/guard-builders.js +7 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +2 -2
- package/dataflow/environments/default-builtin-config/guards.js +2 -7
- package/dataflow/environments/default-builtin-config/index.d.ts +2 -2
- package/dataflow/environments/default-builtin-config/package-data-table.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/package-data-table.js +2 -3
- package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/package-utils.js +18 -4
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +71 -0
- package/dataflow/environments/default-builtin-config/shared-configs.js +19 -4
- package/dataflow/environments/define.js +1 -4
- package/dataflow/environments/diff.d.ts +4 -10
- package/dataflow/environments/diff.js +3 -9
- package/dataflow/environments/environment.d.ts +2 -4
- package/dataflow/environments/environment.js +9 -18
- package/dataflow/environments/frame-memory.d.ts +0 -1
- package/dataflow/environments/frame-memory.js +0 -1
- package/dataflow/environments/overwrite.js +1 -4
- package/dataflow/environments/query-fn-props.d.ts +9 -3
- package/dataflow/environments/query-fn-props.js +37 -63
- package/dataflow/environments/reference-to-maybe.d.ts +3 -6
- package/dataflow/environments/reference-to-maybe.js +1 -3
- package/dataflow/environments/resolve-helper.d.ts +3 -2
- package/dataflow/environments/resolve-helper.js +2 -0
- package/dataflow/environments/scoping.js +2 -8
- package/dataflow/eval/resolve/alias-tracking.d.ts +2 -0
- package/dataflow/eval/resolve/alias-tracking.js +52 -80
- package/dataflow/eval/resolve/resolve-argument.d.ts +3 -3
- package/dataflow/eval/resolve/resolve-argument.js +8 -13
- package/dataflow/eval/resolve/resolve-get.js +1 -4
- package/dataflow/eval/resolve/resolve-strings.js +3 -3
- package/dataflow/eval/resolve/resolve-working-directory.js +1 -3
- package/dataflow/eval/resolve/resolve.d.ts +1 -1
- package/dataflow/eval/resolve/resolve.js +15 -16
- package/dataflow/eval/values/general.js +10 -11
- package/dataflow/eval/values/intervals/interval-constants.d.ts +0 -2
- package/dataflow/eval/values/intervals/interval-constants.js +1 -9
- package/dataflow/eval/values/logical/logical-constants.js +1 -4
- package/dataflow/eval/values/scalar/scalar-constants.d.ts +2 -6
- package/dataflow/eval/values/scalar/scalar-constants.js +4 -18
- package/dataflow/eval/values/sets/set-constants.js +1 -4
- package/dataflow/eval/values/vectors/vector-constants.js +1 -5
- package/dataflow/extractor.js +103 -16
- package/dataflow/fn/argument-roles.d.ts +2 -2
- package/dataflow/fn/argument-roles.js +9 -5
- package/dataflow/fn/call-sites.d.ts +57 -0
- package/dataflow/fn/call-sites.js +167 -0
- package/dataflow/fn/class-declaration.js +2 -2
- package/dataflow/fn/dispatch.js +6 -5
- package/dataflow/fn/exceptions-of-function.d.ts +1 -1
- package/dataflow/fn/frame-reflection.d.ts +3 -3
- package/dataflow/fn/function-props.d.ts +1 -1
- package/dataflow/fn/function-props.js +1 -4
- package/dataflow/fn/function-semantics.d.ts +14 -1
- package/dataflow/fn/function-semantics.js +3 -0
- package/dataflow/fn/guards/built-in-guards.d.ts +2 -2
- package/dataflow/fn/guards/built-in-guards.js +5 -11
- package/dataflow/fn/guards/call-contracts.js +1 -1
- package/dataflow/fn/guards/function-guards.d.ts +3 -3
- package/dataflow/fn/guards/function-guards.js +17 -15
- package/dataflow/fn/guards/guard-claims.js +15 -14
- package/dataflow/fn/guards/guard-knowledge.d.ts +1 -1
- package/dataflow/fn/guards/guard-term.js +2 -2
- package/dataflow/fn/guards/stated-guards.js +1 -1
- package/dataflow/fn/guards/stored-location.d.ts +21 -0
- package/dataflow/fn/guards/stored-location.js +21 -0
- package/dataflow/fn/strict-function.d.ts +1 -1
- package/dataflow/fn/strict-function.js +7 -9
- package/dataflow/graph/call-graph.d.ts +1 -1
- package/dataflow/graph/call-graph.js +1 -5
- package/dataflow/graph/dataflowgraph-builder.d.ts +3 -2
- package/dataflow/graph/dataflowgraph-builder.js +22 -29
- package/dataflow/graph/df-helper.js +18 -31
- package/dataflow/graph/edge.d.ts +3 -9
- package/dataflow/graph/edge.js +2 -6
- package/dataflow/graph/graph-helper.d.ts +2 -3
- package/dataflow/graph/graph.d.ts +1 -2
- package/dataflow/graph/graph.js +8 -13
- package/dataflow/graph/match-args.d.ts +1 -1
- package/dataflow/graph/match-args.js +13 -31
- package/dataflow/graph/quads.js +2 -7
- package/dataflow/graph/vertex.d.ts +1 -1
- package/dataflow/graph/vertex.js +1 -5
- package/dataflow/hooks.d.ts +1 -1
- package/dataflow/info.d.ts +8 -25
- package/dataflow/info.js +9 -32
- package/dataflow/internal/control-flow.d.ts +1 -2
- package/dataflow/internal/linker.d.ts +2 -3
- package/dataflow/internal/linker.js +38 -39
- package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +3 -8
- package/dataflow/internal/process/functions/call/argument/make-argument.js +3 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +3 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +10 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +31 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +18 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +54 -63
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +12 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +9 -11
- 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 +2 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +1 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +17 -40
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +6 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +23 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +9 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +2 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +10 -34
- 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 +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +29 -128
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +4 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +7 -17
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -9
- 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-recall.d.ts +1 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +4 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +0 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +0 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +2 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +1 -6
- 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 +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +5 -23
- 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 +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +14 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +17 -28
- package/dataflow/internal/process/functions/call/common.d.ts +2 -2
- package/dataflow/internal/process/functions/call/common.js +4 -5
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -3
- package/dataflow/internal/process/functions/call/named-call-handling.js +2 -2
- package/dataflow/internal/process/functions/call/nse-kind.d.ts +1 -4
- package/dataflow/internal/process/functions/call/nse-kind.js +1 -4
- package/dataflow/internal/process/functions/call/nse.js +1 -6
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -2
- package/dataflow/internal/process/functions/call/quoted.js +1 -1
- package/dataflow/internal/process/functions/process-argument.d.ts +2 -6
- package/dataflow/internal/process/functions/process-argument.js +3 -11
- package/dataflow/internal/process/functions/process-parameter.d.ts +0 -1
- package/dataflow/internal/process/functions/process-parameter.js +0 -1
- package/dataflow/internal/process/process-named-call.d.ts +1 -3
- package/dataflow/internal/process/process-named-call.js +1 -3
- package/dataflow/internal/process/process-value.d.ts +1 -4
- package/dataflow/internal/process/process-value.js +2 -9
- package/dataflow/origin/dfg-get-origin.d.ts +1 -3
- package/dataflow/origin/dfg-get-origin.js +10 -30
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +0 -1
- package/dataflow/origin/dfg-get-symbol-refs.js +0 -1
- package/dataflow/processor.d.ts +8 -24
- package/dataflow/processor.js +1 -0
- package/documentation/data/dfg/doc-ambient.js +12 -3
- package/documentation/data/dfg/doc-data-dfg-util.d.ts +2 -6
- package/documentation/data/dfg/doc-data-dfg-util.js +2 -6
- package/documentation/data/faq/faqs.js +1 -3
- package/documentation/data/faq/recommended-configs.js +2 -15
- package/documentation/data/faq/wiki-faq-store.d.ts +1 -3
- package/documentation/data/faq/wiki-faq-store.js +4 -13
- package/documentation/data/interface/doc-writing-code.d.ts +1 -3
- package/documentation/data/interface/doc-writing-code.js +4 -12
- package/documentation/data/server/doc-data-server-messages.js +28 -120
- package/documentation/doc-capabilities.js +2 -2
- package/documentation/doc-readme.d.ts +2 -5
- package/documentation/doc-readme.js +4 -18
- package/documentation/doc-util/doc-benchmarks.d.ts +2 -6
- package/documentation/doc-util/doc-benchmarks.js +2 -6
- package/documentation/doc-util/doc-cfg.d.ts +4 -10
- package/documentation/doc-util/doc-cfg.js +7 -21
- package/documentation/doc-util/doc-cli-option.d.ts +4 -10
- package/documentation/doc-util/doc-cli-option.js +3 -9
- package/documentation/doc-util/doc-dfg.d.ts +10 -9
- package/documentation/doc-util/doc-dfg.js +9 -24
- package/documentation/doc-util/doc-escape.js +1 -7
- package/documentation/doc-util/doc-files.d.ts +2 -6
- package/documentation/doc-util/doc-files.js +2 -6
- package/documentation/doc-util/doc-general.d.ts +0 -10
- package/documentation/doc-util/doc-general.js +0 -18
- package/documentation/doc-util/doc-normalized-ast.js +4 -7
- package/documentation/doc-util/doc-playground.d.ts +1 -1
- package/documentation/doc-util/doc-query.d.ts +6 -8
- package/documentation/doc-util/doc-query.js +9 -12
- package/documentation/doc-util/doc-repl.d.ts +1 -3
- package/documentation/doc-util/doc-repl.js +1 -3
- package/documentation/doc-util/doc-search.d.ts +1 -3
- package/documentation/doc-util/doc-search.js +2 -7
- package/documentation/doc-util/doc-server-message.d.ts +4 -12
- package/documentation/doc-util/doc-server-message.js +4 -12
- package/documentation/doc-util/doc-structure.d.ts +5 -7
- package/documentation/doc-util/doc-structure.js +9 -9
- package/documentation/doc-util/doc-types.d.ts +4 -12
- package/documentation/doc-util/doc-types.js +29 -127
- package/documentation/issue-linting-rule.d.ts +2 -5
- package/documentation/issue-linting-rule.js +1 -3
- package/documentation/wiki-absint.js +3 -6
- package/documentation/wiki-analyzer.d.ts +2 -5
- package/documentation/wiki-analyzer.js +22 -61
- package/documentation/wiki-cfg.d.ts +1 -2
- package/documentation/wiki-cfg.js +23 -56
- package/documentation/wiki-core.d.ts +3 -8
- package/documentation/wiki-core.js +32 -59
- package/documentation/wiki-create-linting-rules.d.ts +1 -2
- package/documentation/wiki-create-linting-rules.js +1 -4
- package/documentation/wiki-dataflow-graph.d.ts +2 -5
- package/documentation/wiki-dataflow-graph.js +73 -129
- package/documentation/wiki-engine.d.ts +2 -5
- package/documentation/wiki-engine.js +3 -11
- package/documentation/wiki-faq.d.ts +2 -5
- package/documentation/wiki-faq.js +1 -3
- package/documentation/wiki-helper-objects.d.ts +2 -5
- package/documentation/wiki-helper-objects.js +3 -5
- package/documentation/wiki-interface.d.ts +2 -5
- package/documentation/wiki-interface.js +14 -54
- package/documentation/wiki-linter.d.ts +2 -8
- package/documentation/wiki-linter.js +23 -94
- package/documentation/wiki-linting-and-testing.d.ts +2 -5
- package/documentation/wiki-linting-and-testing.js +4 -9
- package/documentation/wiki-mk/doc-context.d.ts +6 -14
- package/documentation/wiki-mk/doc-context.js +8 -28
- package/documentation/wiki-mk/doc-maker.d.ts +9 -27
- package/documentation/wiki-mk/doc-maker.js +6 -18
- package/documentation/wiki-normalized-ast.d.ts +2 -5
- package/documentation/wiki-normalized-ast.js +2 -7
- package/documentation/wiki-onboarding.d.ts +2 -5
- package/documentation/wiki-onboarding.js +1 -3
- package/documentation/wiki-overview.d.ts +2 -5
- package/documentation/wiki-overview.js +1 -3
- package/documentation/wiki-query.d.ts +2 -5
- package/documentation/wiki-query.js +165 -343
- package/documentation/wiki-search.d.ts +2 -5
- package/documentation/wiki-search.js +1 -3
- package/documentation/wiki-setup.d.ts +2 -5
- package/documentation/wiki-setup.js +1 -3
- package/documentation/wiki-signature-database.d.ts +2 -5
- package/documentation/wiki-signature-database.js +3 -5
- package/engines.d.ts +1 -4
- package/engines.js +1 -4
- package/linter/linter-executor.d.ts +1 -3
- package/linter/linter-executor.js +3 -11
- package/linter/linter-fix.d.ts +5 -0
- package/linter/linter-fix.js +7 -22
- package/linter/linter-format.d.ts +23 -55
- package/linter/linter-format.js +13 -26
- package/linter/linter-rules.d.ts +87 -74
- package/linter/linter-rules.js +20 -8
- package/linter/linter-tags.d.ts +9 -29
- package/linter/linter-tags.js +9 -29
- package/linter/rules/{absolute-path.d.ts → absolute-file-paths.d.ts} +10 -10
- package/linter/rules/{absolute-path.js → absolute-file-paths.js} +16 -20
- package/linter/rules/cmd-check/call-arguments.js +2 -11
- package/linter/rules/cmd-check/class-string-comparison.js +1 -4
- package/linter/rules/cmd-check/cmd-check-util.d.ts +3 -0
- package/linter/rules/cmd-check/cmd-check-util.js +17 -7
- package/linter/rules/cmd-check/compiled-code.js +6 -6
- package/linter/rules/cmd-check/dependency-declaration.js +4 -10
- package/linter/rules/cmd-check/description-metadata.js +5 -9
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +9 -2
- package/linter/rules/cmd-check/documentation-mismatch.js +11 -69
- package/linter/rules/cmd-check/file-checks.d.ts +5 -0
- package/linter/rules/cmd-check/file-checks.js +5 -3
- package/linter/rules/cmd-check/foreign-function-calls.js +5 -7
- package/linter/rules/cmd-check/global-environment-modification.js +6 -9
- package/linter/rules/cmd-check/namespace-tampering.js +14 -24
- package/linter/rules/cmd-check/non-ascii-code.js +1 -4
- package/linter/rules/cmd-check/package-data.js +4 -4
- package/linter/rules/cmd-check/package-files.d.ts +1 -3
- package/linter/rules/cmd-check/package-files.js +2 -2
- package/linter/rules/cmd-check/package-hooks.js +1 -4
- package/linter/rules/cmd-check/package-metafiles.d.ts +2 -2
- package/linter/rules/cmd-check/package-metafiles.js +5 -23
- package/linter/rules/cmd-check/package-runtime.js +6 -19
- package/linter/rules/cmd-check/package-structure.js +7 -8
- package/linter/rules/cmd-check/rd-files.d.ts +2 -2
- package/linter/rules/cmd-check/rd-files.js +31 -37
- package/linter/rules/cmd-check/s-three-method-consistency.js +8 -13
- package/linter/rules/cmd-check/true-false-abbreviation.js +1 -3
- package/linter/rules/dataframe-access-validation.d.ts +9 -9
- package/linter/rules/dataframe-access-validation.js +2 -2
- package/linter/rules/dead-code.js +2 -15
- package/linter/rules/deprecated-functions.d.ts +2 -4
- package/linter/rules/deprecated-functions.js +45 -141
- package/linter/rules/file-path-validity.d.ts +1 -3
- package/linter/rules/file-path-validity.js +20 -61
- package/linter/rules/function-finder-util.d.ts +4 -9
- package/linter/rules/function-finder-util.js +5 -16
- package/linter/rules/interactive-functions.js +1 -3
- package/linter/rules/naming-convention.d.ts +5 -15
- package/linter/rules/naming-convention.js +14 -54
- package/linter/rules/network-functions.d.ts +3 -7
- package/linter/rules/network-functions.js +1 -3
- package/linter/rules/overwritten-file.js +4 -4
- package/linter/rules/problematic-inputs.d.ts +1 -2
- package/linter/rules/problematic-inputs.js +1 -4
- package/linter/rules/process-state-in-session.d.ts +0 -1
- package/linter/rules/process-state-in-session.js +6 -6
- package/linter/rules/roxygen-arguments.d.ts +6 -6
- package/linter/rules/roxygen-arguments.js +2 -2
- package/linter/rules/seeded-randomness.d.ts +2 -4
- package/linter/rules/seeded-randomness.js +9 -9
- package/linter/rules/software-has-license.js +1 -3
- package/linter/rules/software-has-tests.js +2 -10
- package/linter/rules/{stop-with-call-arg.d.ts → stop-call.d.ts} +6 -6
- package/linter/rules/{stop-with-call-arg.js → stop-call.js} +4 -6
- package/linter/rules/syntactically-valid.js +17 -44
- package/linter/rules/unclosed-connection.d.ts +1 -2
- package/linter/rules/unclosed-connection.js +1 -4
- package/linter/rules/undefined-symbol.js +24 -60
- package/linter/rules/unescaped-arguments.d.ts +10 -30
- package/linter/rules/unescaped-arguments.js +20 -53
- package/linter/rules/{unused-definition.d.ts → unused-definitions.d.ts} +12 -14
- package/linter/rules/{unused-definition.js → unused-definitions.js} +41 -84
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/unused-import.js +4 -13
- package/linter/rules/useless-loop.js +3 -13
- package/package.json +1 -1
- package/project/cache/flowr-analyzer-cache.d.ts +2 -7
- package/project/cache/flowr-analyzer-cache.js +5 -14
- package/project/cache/flowr-analyzer-controlflow-cache.d.ts +2 -3
- package/project/cache/flowr-analyzer-controlflow-cache.js +0 -1
- package/project/cache/flowr-cache.d.ts +2 -7
- package/project/cache/flowr-cache.js +2 -7
- package/project/context/abstract-flowr-analyzer-context.d.ts +7 -22
- package/project/context/abstract-flowr-analyzer-context.js +5 -16
- package/project/context/flowr-analyzer-context.d.ts +7 -12
- package/project/context/flowr-analyzer-context.js +8 -22
- package/project/context/flowr-analyzer-dependencies-context.d.ts +7 -19
- package/project/context/flowr-analyzer-dependencies-context.js +6 -21
- package/project/context/flowr-analyzer-environment-context.d.ts +12 -30
- package/project/context/flowr-analyzer-environment-context.js +4 -15
- package/project/context/flowr-analyzer-files-context.d.ts +14 -37
- package/project/context/flowr-analyzer-files-context.js +27 -87
- package/project/context/flowr-analyzer-gas-context.d.ts +1 -0
- package/project/context/flowr-analyzer-gas-context.js +9 -31
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +4 -10
- package/project/context/flowr-analyzer-incremental-analysis-context.js +2 -6
- package/project/context/flowr-analyzer-loading-order-context.d.ts +5 -15
- package/project/context/flowr-analyzer-meta-context.d.ts +8 -33
- package/project/context/flowr-analyzer-meta-context.js +0 -1
- package/project/context/flowr-file.d.ts +6 -14
- package/project/context/flowr-file.js +1 -3
- package/project/dependency-version-space.d.ts +1 -3
- package/project/dependency-version-space.js +41 -135
- package/project/flowr-analyzer-builder.d.ts +7 -5
- package/project/flowr-analyzer-builder.js +10 -12
- package/project/flowr-analyzer.d.ts +12 -34
- package/project/flowr-analyzer.js +5 -14
- package/project/incremental/incremental-parse/edit-computation.js +1 -8
- package/project/incremental/incremental-parse/incremental-parse.js +3 -12
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +13 -35
- package/project/plugins/file-plugins/files/flowr-description-file.js +12 -38
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +1 -2
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +1 -4
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -2
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +8 -42
- package/project/plugins/file-plugins/files/flowr-news-file.js +1 -7
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +1 -2
- package/project/plugins/file-plugins/files/flowr-rd-file.js +17 -32
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +15 -40
- package/project/plugins/file-plugins/files/flowr-rda-file.js +343 -819
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +6 -18
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +10 -34
- package/project/plugins/file-plugins/files/flowr-rsession-file.d.ts +1 -2
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +4 -13
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +4 -18
- package/project/plugins/file-plugins/files/flowr-sysdata-file.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -5
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +2 -6
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +2 -6
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +1 -4
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -4
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rsession-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rsession-file-plugin.js +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +1 -3
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +1 -3
- package/project/plugins/flowr-analyzer-plugin.d.ts +2 -6
- package/project/plugins/flowr-analyzer-plugin.js +2 -6
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +1 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +1 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -4
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +2 -2
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +13 -9
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +0 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +7 -35
- package/project/plugins/package-version-plugins/package.d.ts +1 -1
- package/project/plugins/plugin-registry.d.ts +3 -10
- package/project/plugins/plugin-registry.js +3 -10
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +1 -1
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -8
- package/project/sigdb/build.d.ts +2 -0
- package/project/sigdb/build.js +119 -185
- package/project/sigdb/decode.d.ts +1 -1
- package/project/sigdb/decode.js +3 -4
- package/project/sigdb/guarded-source.js +2 -2
- package/project/sigdb/manifest.js +10 -10
- package/project/sigdb/memory-source.d.ts +1 -1
- package/project/sigdb/memory-source.js +1 -1
- package/project/sigdb/on-demand/package-sources.js +2 -2
- package/project/sigdb/on-demand/recoverer.d.ts +1 -1
- package/project/sigdb/on-demand/remote-sources.js +2 -2
- package/project/sigdb/reader.d.ts +36 -25
- package/project/sigdb/reader.js +63 -81
- package/project/sigdb/sigdb-download.js +2 -12
- package/project/sigdb/signature-db.d.ts +1 -1
- package/project/sigdb/signature-db.js +6 -6
- package/project/sigdb/spec-query.js +4 -4
- package/queries/base-query-format.js +2 -8
- package/queries/catalog/absint-query/absint-query-format.d.ts +1 -3
- package/queries/catalog/absint-query/absint-query-format.js +4 -19
- package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +2 -4
- package/queries/catalog/ambient-access-query/ambient-access-query-format.js +2 -4
- package/queries/catalog/call-context-query/call-context-query-executor.js +7 -45
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +6 -21
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -11
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +4 -10
- package/queries/catalog/call-context-query/identify-link-to-relation.d.ts +1 -4
- package/queries/catalog/call-context-query/identify-link-to-relation.js +1 -4
- package/queries/catalog/call-graph-query/call-graph-query-executor.d.ts +1 -3
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +2 -7
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -3
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +3 -7
- package/queries/catalog/cluster-query/cluster-query-format.js +5 -13
- package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +2 -4
- package/queries/catalog/code-clones-query/code-clones-query-format.js +5 -18
- package/queries/catalog/config-query/config-query-format.d.ts +1 -3
- package/queries/catalog/config-query/config-query-format.js +1 -3
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +3 -10
- package/queries/catalog/control-flow-query/control-flow-query-format.js +5 -13
- package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +2 -4
- package/queries/catalog/data-columns-query/data-columns-query-format.js +5 -10
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +2 -6
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +3 -11
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -6
- package/queries/catalog/dataflow-query/dataflow-query-format.js +3 -11
- package/queries/catalog/dependencies-query/data-flow.js +5 -4
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -3
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +13 -15
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -3
- package/queries/catalog/dependencies-query/dependencies-query-format.js +10 -34
- package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +0 -1
- package/queries/catalog/dependencies-query/function-info/remote-functions.d.ts +6 -5
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +24 -17
- package/queries/catalog/dependencies-query/function-info/tagged-functions.js +1 -4
- package/queries/catalog/dependencies-query/function-info/test-functions.js +2 -8
- package/queries/catalog/dependencies-query/function-info/transform-functions.js +1 -4
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +1 -3
- package/queries/catalog/dependencies-query/function-info/write-functions.js +1 -3
- package/queries/catalog/dependencies-query/plot-description.js +2 -2
- package/queries/catalog/dice-query/dice-query-format.js +2 -8
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -3
- package/queries/catalog/does-call-query/does-call-query-format.js +8 -35
- package/queries/catalog/files-query/files-query-format.d.ts +3 -7
- package/queries/catalog/files-query/files-query-format.js +8 -46
- package/queries/catalog/function-info-query/function-info-query-executor.js +1 -7
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +1 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +1 -3
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -4
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -3
- package/queries/catalog/id-map-query/id-map-query-format.js +3 -11
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +1 -3
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +2 -7
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +1 -4
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -2
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +5 -11
- package/queries/catalog/input-sources-query/simple-input-classifier.js +2 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -7
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +7 -10
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +2 -2
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +4 -6
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +2 -2
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +4 -7
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -7
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -3
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -7
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +1 -3
- package/queries/catalog/linter-query/linter-query-format.d.ts +2 -4
- package/queries/catalog/linter-query/linter-query-format.js +4 -26
- package/queries/catalog/location-map-query/location-map-query-format.js +4 -20
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +2 -6
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +3 -11
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -3
- package/queries/catalog/origin-query/origin-query-format.js +3 -14
- package/queries/catalog/project-query/project-query-format.d.ts +3 -5
- package/queries/catalog/project-query/project-query-format.js +2 -7
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +4 -10
- package/queries/catalog/provenance-query/provenance-query-format.js +3 -10
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +3 -7
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +6 -23
- package/queries/catalog/search-query/search-query-format.d.ts +1 -3
- package/queries/catalog/search-query/search-query-format.js +3 -11
- package/queries/catalog/signature-query/signature-query-executor.d.ts +1 -1
- package/queries/catalog/signature-query/signature-query-executor.js +15 -40
- package/queries/catalog/signature-query/signature-query-render.d.ts +1 -1
- package/queries/catalog/signature-query/signature-query-render.js +6 -4
- package/queries/catalog/slice-query-options.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -4
- package/queries/catalog/taint-query/taint-query-format.d.ts +3 -5
- package/queries/catalog/taint-query/taint-query-format.js +5 -46
- package/queries/query-function-filter.js +7 -33
- package/queries/query-function-property.d.ts +1 -1
- package/queries/query-function-property.js +4 -7
- package/queries/query-meta.d.ts +2 -0
- package/queries/query-meta.js +8 -0
- package/queries/query-print.d.ts +6 -10
- package/queries/query-print.js +20 -75
- package/queries/query.d.ts +20 -32
- package/queries/query.js +46 -70
- package/queries/virtual-query/compound-query.d.ts +2 -7
- package/queries/virtual-query/compound-query.js +2 -8
- package/queries/virtual-query/virtual-queries.js +1 -3
- package/r-bridge/data/get.d.ts +1 -3
- package/r-bridge/data/get.js +1 -3
- package/r-bridge/lang-4.x/ast/model/model.d.ts +19 -59
- package/r-bridge/lang-4.x/ast/model/model.js +9 -27
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +5 -14
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +2 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +9 -25
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +6 -18
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -8
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -11
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +4 -11
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +2 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +2 -7
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +5 -15
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +3 -10
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +3 -8
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +2 -7
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +2 -5
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -8
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -2
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +4 -14
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +42 -126
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -6
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +1 -3
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +18 -0
- package/r-bridge/lang-4.x/ast/model/processing/role.js +25 -0
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +1 -3
- package/r-bridge/lang-4.x/ast/model/syntax-version.js +2 -2
- package/r-bridge/lang-4.x/ast/model/type.d.ts +1 -5
- package/r-bridge/lang-4.x/ast/model/type.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/json/format.d.ts +5 -17
- package/r-bridge/lang-4.x/ast/parser/json/format.js +4 -20
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -7
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +2 -12
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-break.js +1 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +1 -6
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +1 -7
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +3 -23
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +1 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-comment.js +1 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/other/normalize-line-directive.js +7 -30
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.d.ts +1 -3
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.js +2 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +3 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +6 -21
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-single-node.js +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +4 -20
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +7 -19
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +8 -26
- package/r-bridge/lang-4.x/ast/parser/main/normalizer-data.d.ts +4 -12
- package/r-bridge/lang-4.x/ast/parser/main/normalizer-data.js +1 -3
- package/r-bridge/lang-4.x/convert-values.d.ts +6 -20
- package/r-bridge/lang-4.x/convert-values.js +10 -41
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -5
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +1 -3
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +0 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +39 -208
- package/r-bridge/parser.d.ts +1 -3
- package/r-bridge/parser.js +1 -4
- package/r-bridge/retriever.d.ts +5 -16
- package/r-bridge/retriever.js +5 -17
- package/r-bridge/roxygen2/documentation-provider.d.ts +1 -1
- package/r-bridge/roxygen2/roxygen-ast.d.ts +5 -15
- package/r-bridge/roxygen2/roxygen-ast.js +2 -6
- package/r-bridge/roxygen2/roxygen-parse.d.ts +2 -1
- package/r-bridge/roxygen2/roxygen-parse.js +4 -13
- package/r-bridge/shell-executor.d.ts +3 -9
- package/r-bridge/shell-executor.js +4 -13
- package/r-bridge/shell.d.ts +7 -24
- package/r-bridge/shell.js +8 -29
- package/reconstruct/auto-select/auto-select-defaults.d.ts +1 -3
- package/reconstruct/auto-select/auto-select-defaults.js +1 -3
- package/reconstruct/reconstruct.js +5 -15
- package/search/flowr-search-builder.d.ts +16 -48
- package/search/flowr-search-builder.js +15 -46
- package/search/flowr-search-executor.d.ts +1 -3
- package/search/flowr-search-executor.js +1 -3
- package/search/flowr-search-filters.d.ts +5 -9
- package/search/flowr-search-filters.js +4 -13
- package/search/flowr-search-printer.d.ts +3 -9
- package/search/flowr-search-printer.js +3 -9
- package/search/flowr-search-traverse.d.ts +1 -3
- package/search/flowr-search-traverse.js +1 -3
- package/search/flowr-search.d.ts +6 -19
- package/search/search-executor/search-enrichers.d.ts +5 -15
- package/search/search-executor/search-enrichers.js +6 -25
- package/search/search-executor/search-generators.d.ts +3 -9
- package/search/search-executor/search-generators.js +4 -10
- package/search/search-executor/search-mappers.d.ts +1 -3
- package/search/search-executor/search-mappers.js +1 -3
- package/search/search-executor/search-transformer.d.ts +3 -9
- package/search/search-executor/search-transformer.js +2 -6
- package/search/search-optimizer/search-optimizer.d.ts +1 -4
- package/search/search-optimizer/search-optimizer.js +4 -26
- package/slicing/criterion/collect-all.d.ts +1 -3
- package/slicing/criterion/filters/all-variables.js +2 -9
- package/slicing/criterion/parse.d.ts +2 -6
- package/slicing/criterion/parse.js +3 -9
- package/slicing/static/fingerprint.d.ts +1 -1
- package/slicing/static/removal-slice.js +2 -2
- package/slicing/static/slice-call.d.ts +2 -4
- package/slicing/static/slice-call.js +2 -4
- package/slicing/static/slicer-types.d.ts +3 -9
- package/slicing/static/static-slicer.d.ts +1 -4
- package/slicing/static/static-slicer.js +7 -11
- package/slicing/static/visiting-queue.d.ts +0 -1
- package/slicing/static/visiting-queue.js +0 -1
- package/taint-analysis/builder/domain.d.ts +1 -2
- package/taint-analysis/builder/domain.js +1 -6
- package/taint-analysis/builder/report-template.d.ts +4 -11
- package/taint-analysis/builder/report-template.js +2 -7
- package/taint-analysis/builder/taint-analysis-definition.d.ts +2 -3
- package/taint-analysis/builder/taint-analysis-definition.js +1 -5
- package/taint-analysis/builder/taint-analysis.d.ts +9 -25
- package/taint-analysis/builder/taint-analysis.js +1 -3
- package/taint-analysis/builtin-index-bridge.js +1 -7
- package/taint-analysis/function-categories.d.ts +4 -7
- package/taint-analysis/function-categories.js +4 -15
- package/taint-analysis/predefined/normalization.js +5 -10
- package/taint-analysis/predefined/predefined.d.ts +0 -1
- package/taint-analysis/predefined/predefined.js +1 -2
- package/taint-analysis/predefined/randomness-analysis.js +4 -16
- package/taint-analysis/predefined/secret-analysis.js +2 -8
- package/taint-analysis/predefined/security-analysis.js +9 -43
- package/taint-analysis/taint-mapping.d.ts +4 -13
- package/taint-analysis/taint-mapping.js +3 -9
- package/taint-analysis/taint-resolve.d.ts +2 -3
- package/taint-analysis/taint-visitor.d.ts +1 -3
- package/taint-analysis/taint-visitor.js +2 -2
- package/util/arg-matching.js +4 -4
- package/util/assert.d.ts +1 -3
- package/util/assert.js +2 -5
- package/util/collections/arrays.d.ts +9 -30
- package/util/collections/arrays.js +5 -18
- package/util/collections/defaultmap.d.ts +2 -7
- package/util/collections/defaultmap.js +2 -7
- package/util/collections/objectmap.d.ts +2 -6
- package/util/collections/objectmap.js +2 -6
- package/util/collections/set.d.ts +2 -6
- package/util/collections/set.js +2 -6
- package/util/diff-graph.d.ts +1 -3
- package/util/diff-graph.js +2 -8
- package/util/diff.d.ts +2 -6
- package/util/diff.js +1 -3
- package/util/files.d.ts +3 -9
- package/util/files.js +3 -9
- package/util/flowr-version.d.ts +2 -4
- package/util/flowr-version.js +3 -5
- package/util/html-hover-over.d.ts +1 -5
- package/util/html-hover-over.js +1 -5
- package/util/json.d.ts +1 -3
- package/util/json.js +1 -3
- package/util/log.d.ts +2 -1
- package/util/log.js +7 -14
- package/util/mermaid/ast.d.ts +3 -7
- package/util/mermaid/ast.js +2 -6
- package/util/mermaid/cfg.d.ts +2 -4
- package/util/mermaid/cfg.js +4 -8
- package/util/mermaid/dfg.d.ts +5 -15
- package/util/mermaid/dfg.js +20 -16
- package/util/mermaid/mermaid.d.ts +4 -13
- package/util/mermaid/mermaid.js +5 -19
- package/util/numbers.d.ts +1 -3
- package/util/numbers.js +1 -3
- package/util/objects.d.ts +4 -10
- package/util/objects.js +7 -6
- package/util/os.d.ts +1 -3
- package/util/os.js +1 -3
- package/util/parallel.d.ts +1 -4
- package/util/parallel.js +1 -4
- package/util/proc.js +2 -2
- package/util/quads.d.ts +6 -19
- package/util/quads.js +2 -7
- package/util/r-author.d.ts +1 -3
- package/util/r-author.js +2 -10
- package/util/r-license.d.ts +2 -6
- package/util/r-license.js +10 -43
- package/util/r-regex.d.ts +1 -3
- package/util/r-regex.js +1 -3
- package/util/r-value.d.ts +3 -9
- package/util/r-value.js +7 -21
- package/util/random.d.ts +1 -3
- package/util/random.js +1 -3
- package/util/range.d.ts +22 -66
- package/util/range.js +22 -66
- package/util/schema.d.ts +4 -13
- package/util/schema.js +4 -13
- package/util/simple-df/dfg-ascii.d.ts +1 -3
- package/util/simple-df/dfg-ascii.js +5 -27
- package/util/simple-df/dfg-view.d.ts +1 -3
- package/util/simple-df/dfg-view.js +1 -3
- package/util/slice-direction.d.ts +1 -3
- package/util/slice-direction.js +1 -3
- package/util/summarizer.d.ts +3 -8
- package/util/summarizer.js +1 -3
- package/util/text/ansi.d.ts +5 -15
- package/util/text/ansi.js +5 -15
- package/util/text/args.d.ts +8 -2
- package/util/text/args.js +41 -9
- package/util/text/playground-link.d.ts +9 -0
- package/util/text/playground-link.js +15 -11
- package/util/text/r-highlight.js +6 -6
- package/util/text/strings.d.ts +6 -19
- package/util/text/strings.js +7 -24
- package/util/text/time.d.ts +1 -3
- package/util/text/time.js +1 -3
- package/util/version.d.ts +3 -9
- package/util/version.js +4 -8
|
@@ -17,9 +17,7 @@ import type { FlowrConfig } from '../../config';
|
|
|
17
17
|
* already covered transitively.
|
|
18
18
|
*/
|
|
19
19
|
export type StepProcessingFunction = (results: Record<string, unknown>, input: Record<string, unknown>, config: FlowrConfig) => unknown;
|
|
20
|
-
/**
|
|
21
|
-
* This represents the required execution frequency of a step.
|
|
22
|
-
*/
|
|
20
|
+
/** This represents the required execution frequency of a step. */
|
|
23
21
|
export declare const enum PipelineStepStage {
|
|
24
22
|
/** This step has to be executed once per file */
|
|
25
23
|
OncePerFile = 0,
|
|
@@ -30,9 +28,7 @@ export declare const enum PipelineStepStage {
|
|
|
30
28
|
export type PipelineStepName = string & {
|
|
31
29
|
__brand?: 'StepName';
|
|
32
30
|
};
|
|
33
|
-
/**
|
|
34
|
-
* Contains the data to specify the order of {@link IPipelineStep|steps} in a pipeline.
|
|
35
|
-
*/
|
|
31
|
+
/** Contains the data to specify the order of {@link IPipelineStep|steps} in a pipeline. */
|
|
36
32
|
export interface IPipelineStepOrder<Name extends PipelineStepName = PipelineStepName> {
|
|
37
33
|
/**
|
|
38
34
|
* Name of the respective step, it does not have to be unique in general but only unique per-pipeline.
|
package/data/packed.js
CHANGED
|
@@ -7,7 +7,7 @@ const lz_string_1 = require("lz-string");
|
|
|
7
7
|
function unpack(nodes) {
|
|
8
8
|
const done = [];
|
|
9
9
|
const at = (i) => i in done ? done[i] : (done[i] = build(nodes[i]));
|
|
10
|
-
|
|
10
|
+
function build(node) {
|
|
11
11
|
if (!Array.isArray(node)) {
|
|
12
12
|
return node;
|
|
13
13
|
}
|
|
@@ -16,7 +16,7 @@ function unpack(nodes) {
|
|
|
16
16
|
}
|
|
17
17
|
const keys = at(-1 - node[0]);
|
|
18
18
|
return Object.fromEntries(keys.map((k, j) => [k, at(node[j + 1])]));
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
return at(nodes.length - 1);
|
|
21
21
|
}
|
|
22
22
|
/** Decompresses generated data on the first call. The data is the JSON of a {@link Packed} table (prefix `p`) or of the value (prefix `r`). */
|
package/dataflow/cluster.d.ts
CHANGED
|
@@ -17,7 +17,5 @@ export interface DataflowGraphCluster {
|
|
|
17
17
|
/** If the cluster contains unknown side effects */
|
|
18
18
|
readonly hasUnknownSideEffects: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Find all clusters in the given dataflow graph.
|
|
22
|
-
*/
|
|
20
|
+
/** Find all clusters in the given dataflow graph. */
|
|
23
21
|
export declare function findAllClusters(graph: DataflowGraph): DataflowGraphClusters;
|
package/dataflow/cluster.js
CHANGED
|
@@ -5,9 +5,7 @@ const edge_1 = require("./graph/edge");
|
|
|
5
5
|
const assert_1 = require("../util/assert");
|
|
6
6
|
const vertex_1 = require("./graph/vertex");
|
|
7
7
|
const identifier_1 = require("./environments/identifier");
|
|
8
|
-
/**
|
|
9
|
-
* Find all clusters in the given dataflow graph.
|
|
10
|
-
*/
|
|
8
|
+
/** Find all clusters in the given dataflow graph. */
|
|
11
9
|
function findAllClusters(graph) {
|
|
12
10
|
const clusters = [];
|
|
13
11
|
// we reverse the vertices since dependencies usually point "backwards" from later nodes
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type AmbientCondition, type AmbientEffect, type AmbientEffects, type AmbientFamilySummary } from './ambient-effect';
|
|
2
|
+
import { type BrandedIdentifier, Identifier } from './identifier';
|
|
3
|
+
import type { BuiltInFnInfo } from './built-in-props';
|
|
4
|
+
import { type ConditionDecision, type DecidedAgainst } from '../internal/process/functions/call/built-in/built-in-ambient-state';
|
|
5
|
+
import { Ternary } from '../../util/logic';
|
|
6
|
+
import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
7
|
+
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
8
|
+
import { type PotentiallyEmptyRArgument } from '../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
9
|
+
import type { ResolveInfo } from '../eval/resolve/alias-tracking';
|
|
10
|
+
import { type CallSite } from '../fn/call-sites';
|
|
11
|
+
/** An {@link AmbientEffect} of one call, with what its arguments decide of it, see {@link AmbientContract.narrow}. */
|
|
12
|
+
export interface CallAmbientEffect {
|
|
13
|
+
/** the effect without the conditions the arguments decide to hold, so what stays is what they leave open */
|
|
14
|
+
readonly effect: AmbientEffect;
|
|
15
|
+
/** {@link Ternary.Always} if the call has the effect, {@link Ternary.Maybe} if the arguments leave that open */
|
|
16
|
+
readonly happens: Ternary.Always | Ternary.Maybe;
|
|
17
|
+
/** the entries the arguments name, where the effect names entries by them (`library(dplyr)` names `dplyr`), see {@link AmbientEffect#member} */
|
|
18
|
+
readonly keys?: readonly BrandedIdentifier[];
|
|
19
|
+
/** the argument nodes naming {@link CallAmbientEffect#keys} */
|
|
20
|
+
readonly namedBy?: readonly NodeId[];
|
|
21
|
+
/** per condition of the effect as declared, what the arguments decide of it */
|
|
22
|
+
readonly decisions: AmbientDecisions;
|
|
23
|
+
/** the argument nodes the conditions were decided on, those of all {@link CallAmbientEffect#decisions} */
|
|
24
|
+
readonly decidedBy: readonly NodeId[];
|
|
25
|
+
}
|
|
26
|
+
/** What the arguments of a call decide of one {@link AmbientCondition}: whether it holds and the argument nodes that decided it. */
|
|
27
|
+
export interface AmbientDecision extends ConditionDecision {
|
|
28
|
+
readonly condition: AmbientCondition;
|
|
29
|
+
}
|
|
30
|
+
/** The {@link AmbientDecision}s of the conditions {@link AmbientEffect#when} and {@link AmbientEffect#unless} of an effect, absent where it has none. */
|
|
31
|
+
export interface AmbientDecisions {
|
|
32
|
+
readonly when?: AmbientDecision;
|
|
33
|
+
readonly unless?: AmbientDecision;
|
|
34
|
+
}
|
|
35
|
+
/** The {@link AmbientEffect}s of one call, narrowed to what its arguments say, see {@link AmbientContract.narrow}. */
|
|
36
|
+
export interface NarrowedAmbient {
|
|
37
|
+
readonly effects: readonly CallAmbientEffect[];
|
|
38
|
+
/** the effects the arguments rule out, with the argument nodes that rule them out */
|
|
39
|
+
readonly ruledOut: readonly {
|
|
40
|
+
readonly effect: AmbientEffect;
|
|
41
|
+
readonly decisions: AmbientDecisions;
|
|
42
|
+
readonly decidedBy: readonly NodeId[];
|
|
43
|
+
}[];
|
|
44
|
+
/** the {@link NarrowedAmbient#effects} grouped as {@link AmbientFamilySummary}, the conditions left open still in them, see {@link AmbientWording} for their words */
|
|
45
|
+
readonly summary: readonly AmbientFamilySummary[];
|
|
46
|
+
}
|
|
47
|
+
/** The ambient contract of a call for one definition it may call, see {@link AmbientContract.ofCall}. */
|
|
48
|
+
export interface CallAmbientContract extends NarrowedAmbient {
|
|
49
|
+
/** the call of the built-in */
|
|
50
|
+
readonly call: NodeId;
|
|
51
|
+
/** the definition called, `maps::map` rather than `purrr::map` */
|
|
52
|
+
readonly definition: Identifier;
|
|
53
|
+
/** the built-in id the call links to for {@link CallAmbientContract#definition} */
|
|
54
|
+
readonly target: NodeId;
|
|
55
|
+
/** the calls of functions the program defines that {@link CallAmbientContract#call} is reached through, outermost first, empty if it is the call asked for; the effects are those of {@link CallAmbientContract#call} whenever it runs */
|
|
56
|
+
readonly through: readonly NodeId[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The ambient contracts of functions: what a call does to the global state, with the conditions of {@link AmbientEffect#when} and
|
|
60
|
+
* {@link AmbientEffect#unless} as data to evaluate rather than words to parse, and narrowed to what the arguments of one call decide.
|
|
61
|
+
* `map(add = TRUE)` of `maps` adds to the plot and starts none, `map(...)` in a function forwarding its arguments may do either.
|
|
62
|
+
* @helper dataflow
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const info = await Resolve.infoOf(analyzer);
|
|
66
|
+
* for(const contract of AmbientContract.ofCall(id, info)) {
|
|
67
|
+
* console.log(contract.definition, contract.summary);
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare const AmbientContract: {
|
|
72
|
+
readonly name: "AmbientContract";
|
|
73
|
+
/**
|
|
74
|
+
* Whether the condition holds for the arguments `args` of a call, with the argument nodes deciding it.
|
|
75
|
+
* Without `against`, only what is written decides (`add = TRUE`); with it, the values the analysis resolves do (`add = a` with `a <- TRUE`).
|
|
76
|
+
* A forwarded `...` may give any argument, so it leaves what it could give open.
|
|
77
|
+
*/
|
|
78
|
+
readonly decide: <OtherInfo>(this: void, condition: AmbientCondition, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], against?: DecidedAgainst<OtherInfo>) => ConditionDecision;
|
|
79
|
+
/** The effects of a configuration, with those its tags imply, as {@link AmbientContract.narrow} takes them. */
|
|
80
|
+
readonly effectsOf: (this: void, config: BuiltInFnInfo | undefined) => readonly AmbientEffect[];
|
|
81
|
+
/**
|
|
82
|
+
* The `effects` narrowed to the arguments `args` of a call: an effect they rule out is gone, a condition they decide to hold is dropped,
|
|
83
|
+
* and with `against` the entries the arguments name are resolved.
|
|
84
|
+
*/
|
|
85
|
+
readonly narrow: <OtherInfo>(this: void, effects: AmbientEffects | undefined, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], against?: DecidedAgainst<OtherInfo>) => NarrowedAmbient;
|
|
86
|
+
/**
|
|
87
|
+
* The `effects` narrowed to each of the argument lists `lists` a call stands for (see {@link CallSites.contexts}) and joined:
|
|
88
|
+
* an effect happens surely only if it does for every list, it is ruled out only if every list rules it out,
|
|
89
|
+
* and a condition is dropped only if every list decides it.
|
|
90
|
+
*/
|
|
91
|
+
readonly narrowAcross: <OtherInfo>(this: void, effects: AmbientEffects | undefined, lists: readonly (readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[])[], against?: DecidedAgainst<OtherInfo>) => NarrowedAmbient;
|
|
92
|
+
/**
|
|
93
|
+
* The ambient contracts of the call `call` of a finished analysis, one per built-in definition the call may reach,
|
|
94
|
+
* as `map(...)` may call `maps::map` as well as `purrr::map`, which do different things to the global state.
|
|
95
|
+
* A definition flowR states no effects for has no contract.
|
|
96
|
+
* The contracts are interprocedural: a call of a function the program defines has the contracts of the calls its body makes,
|
|
97
|
+
* narrowed to what the call gives (`g <- function(...) maps::map(...)` and `g(add = TRUE)` adds to the plot),
|
|
98
|
+
* and a call handing on parameters (`maps::map(...)` within `g`) is narrowed to what the known calls of its function give, see {@link CallSites.contexts}.
|
|
99
|
+
* The `sites` are the calls the body of `call` is reached through, innermost first.
|
|
100
|
+
*/
|
|
101
|
+
readonly ofCall: (this: void, call: NodeId, info: ResolveInfo, sites?: readonly CallSite[]) => readonly CallAmbientContract[];
|
|
102
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmbientContract = void 0;
|
|
4
|
+
const ambient_effect_1 = require("./ambient-effect");
|
|
5
|
+
const identifier_1 = require("./identifier");
|
|
6
|
+
const built_in_ambient_state_1 = require("../internal/process/functions/call/built-in/built-in-ambient-state");
|
|
7
|
+
const built_in_ambient_keys_1 = require("../internal/process/functions/call/built-in/built-in-ambient-keys");
|
|
8
|
+
const logic_1 = require("../../util/logic");
|
|
9
|
+
const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
10
|
+
const r_function_call_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
11
|
+
const vertex_1 = require("../graph/vertex");
|
|
12
|
+
const edge_1 = require("../graph/edge");
|
|
13
|
+
const df_helper_1 = require("../graph/df-helper");
|
|
14
|
+
const arrays_1 = require("../../util/collections/arrays");
|
|
15
|
+
const assert_1 = require("../../util/assert");
|
|
16
|
+
const call_sites_1 = require("../fn/call-sites");
|
|
17
|
+
/** The decisions of several argument lists joined: a condition holds surely, or surely not, only if it does so for every list. */
|
|
18
|
+
function joined(condition, decisions) {
|
|
19
|
+
return condition === undefined ? undefined : {
|
|
20
|
+
condition,
|
|
21
|
+
holds: decisions.map(d => d.holds).reduce((a, b) => a === b ? a : logic_1.Ternary.Maybe),
|
|
22
|
+
decidedBy: (0, arrays_1.uniqueArray)(decisions.flatMap(d => d.decidedBy))
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** What each of the argument lists `lists` decides of the conditions of `effect`, see {@link AmbientContract.narrowAcross}. */
|
|
26
|
+
function decisionsOf(effect, lists, against) {
|
|
27
|
+
const { when, unless } = effect;
|
|
28
|
+
const of = (condition) => joined(condition, condition === undefined ? [] : lists.map(args => (0, built_in_ambient_state_1.decide)(condition, args, against)));
|
|
29
|
+
return { ...when === undefined ? {} : { when: of(when) }, ...unless === undefined ? {} : { unless: of(unless) } };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The ambient contracts of functions: what a call does to the global state, with the conditions of {@link AmbientEffect#when} and
|
|
33
|
+
* {@link AmbientEffect#unless} as data to evaluate rather than words to parse, and narrowed to what the arguments of one call decide.
|
|
34
|
+
* `map(add = TRUE)` of `maps` adds to the plot and starts none, `map(...)` in a function forwarding its arguments may do either.
|
|
35
|
+
* @helper dataflow
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const info = await Resolve.infoOf(analyzer);
|
|
39
|
+
* for(const contract of AmbientContract.ofCall(id, info)) {
|
|
40
|
+
* console.log(contract.definition, contract.summary);
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
exports.AmbientContract = {
|
|
45
|
+
name: 'AmbientContract',
|
|
46
|
+
/**
|
|
47
|
+
* Whether the condition holds for the arguments `args` of a call, with the argument nodes deciding it.
|
|
48
|
+
* Without `against`, only what is written decides (`add = TRUE`); with it, the values the analysis resolves do (`add = a` with `a <- TRUE`).
|
|
49
|
+
* A forwarded `...` may give any argument, so it leaves what it could give open.
|
|
50
|
+
*/
|
|
51
|
+
decide(condition, args, against) {
|
|
52
|
+
return (0, built_in_ambient_state_1.decide)(condition, args, against);
|
|
53
|
+
},
|
|
54
|
+
/** The effects of a configuration, with those its tags imply, as {@link AmbientContract.narrow} takes them. */
|
|
55
|
+
effectsOf(config) {
|
|
56
|
+
return ambient_effect_1.Ambient.list((0, ambient_effect_1.withImpliedAmbient)(config)?.ambient);
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* The `effects` narrowed to the arguments `args` of a call: an effect they rule out is gone, a condition they decide to hold is dropped,
|
|
60
|
+
* and with `against` the entries the arguments name are resolved.
|
|
61
|
+
*/
|
|
62
|
+
narrow(effects, args, against) {
|
|
63
|
+
return exports.AmbientContract.narrowAcross(effects, [args], against);
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* The `effects` narrowed to each of the argument lists `lists` a call stands for (see {@link CallSites.contexts}) and joined:
|
|
67
|
+
* an effect happens surely only if it does for every list, it is ruled out only if every list rules it out,
|
|
68
|
+
* and a condition is dropped only if every list decides it.
|
|
69
|
+
*/
|
|
70
|
+
narrowAcross(effects, lists, against) {
|
|
71
|
+
const kept = [];
|
|
72
|
+
const ruledOut = [];
|
|
73
|
+
for (const effect of ambient_effect_1.Ambient.list(effects)) {
|
|
74
|
+
const each = lists.map(args => (0, built_in_ambient_state_1.applies)(effect, args, against));
|
|
75
|
+
const happens = each.reduce((a, b) => a === b ? a : logic_1.Ternary.Maybe);
|
|
76
|
+
const decisions = decisionsOf(effect, lists, against);
|
|
77
|
+
const decidedBy = (0, arrays_1.uniqueArray)([...decisions.when?.decidedBy ?? [], ...decisions.unless?.decidedBy ?? []]);
|
|
78
|
+
if (happens === logic_1.Ternary.Never) {
|
|
79
|
+
ruledOut.push({ effect, decisions, decidedBy });
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const { when, unless, ...rest } = effect;
|
|
83
|
+
const narrowed = {
|
|
84
|
+
...rest,
|
|
85
|
+
...when !== undefined && decisions.when?.holds !== logic_1.Ternary.Always ? { when } : {},
|
|
86
|
+
...unless !== undefined && decisions.unless?.holds !== logic_1.Ternary.Never ? { unless } : {}
|
|
87
|
+
};
|
|
88
|
+
const member = effect.member;
|
|
89
|
+
const naming = lists.filter((_, i) => each[i] !== logic_1.Ternary.Never);
|
|
90
|
+
const named = against === undefined || member === undefined || member === 'every' ? undefined : {
|
|
91
|
+
keys: (0, arrays_1.uniqueArray)(naming.flatMap(args => (0, built_in_ambient_keys_1.keysOf)(member, args, against))),
|
|
92
|
+
namedBy: (0, arrays_1.uniqueArray)(naming.flatMap(args => (0, built_in_ambient_keys_1.keyArgumentsOf)(member, args)))
|
|
93
|
+
};
|
|
94
|
+
kept.push({ effect: narrowed, happens: happens, decisions, decidedBy, ...named });
|
|
95
|
+
}
|
|
96
|
+
return { effects: kept, ruledOut, summary: (0, ambient_effect_1.summaryOfEffects)(kept.map(e => e.effect)) };
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* The ambient contracts of the call `call` of a finished analysis, one per built-in definition the call may reach,
|
|
100
|
+
* as `map(...)` may call `maps::map` as well as `purrr::map`, which do different things to the global state.
|
|
101
|
+
* A definition flowR states no effects for has no contract.
|
|
102
|
+
* The contracts are interprocedural: a call of a function the program defines has the contracts of the calls its body makes,
|
|
103
|
+
* narrowed to what the call gives (`g <- function(...) maps::map(...)` and `g(add = TRUE)` adds to the plot),
|
|
104
|
+
* and a call handing on parameters (`maps::map(...)` within `g`) is narrowed to what the known calls of its function give, see {@link CallSites.contexts}.
|
|
105
|
+
* The `sites` are the calls the body of `call` is reached through, innermost first.
|
|
106
|
+
*/
|
|
107
|
+
ofCall(call, info, sites = []) {
|
|
108
|
+
const graph = info.graph;
|
|
109
|
+
const vertex = graph?.getVertex(call);
|
|
110
|
+
const node = info.idMap?.get(call);
|
|
111
|
+
if (graph === undefined || !vertex_1.DfgVertex.isFunctionCall(vertex) || !r_function_call_1.RFunctionCall.is(node)) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
const index = info.ctx.env.builtInIndex;
|
|
115
|
+
const targets = df_helper_1.Dataflow.targetsOf(graph, call, edge_1.EdgeType.Calls).filter(node_id_1.NodeId.isBuiltIn);
|
|
116
|
+
const lists = targets.length === 0 ? [] : call_sites_1.CallSites.contexts(node.arguments, graph, sites, info.ctx);
|
|
117
|
+
/* a target naming no package may be the definition of any package, so each one has its contract */
|
|
118
|
+
const own = targets.flatMap(target => {
|
|
119
|
+
const pkgFn = node_id_1.NodeId.toPkgFn(target);
|
|
120
|
+
const named = pkgFn === undefined ? vertex.name : identifier_1.Identifier.make(pkgFn[1], pkgFn[0]);
|
|
121
|
+
const entries = identifier_1.Identifier.getNamespace(named) === undefined ? index.definitionsOf(identifier_1.Identifier.getName(named)) : [index.get(named)].filter(assert_1.isNotUndefined);
|
|
122
|
+
return entries.flatMap(entry => {
|
|
123
|
+
const effects = exports.AmbientContract.effectsOf({ props: entry.props, tags: entry.tags, sig: entry.sig, ambient: entry.ambient });
|
|
124
|
+
return effects.length === 0 ? [] : [{ call, through: [], definition: entry.name, target, ...exports.AmbientContract.narrowAcross(effects, lists, info) }];
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
const inner = df_helper_1.Dataflow.calleeDefinitionsOf(graph, call).filter(definition => !sites.some(s => s.definition === definition)).flatMap(definition => {
|
|
128
|
+
const site = { call: node, definition };
|
|
129
|
+
return call_sites_1.CallSites.callsWithin(definition, graph).flatMap(id => exports.AmbientContract.ofCall(id, info, [site, ...sites]).map(c => ({ ...c, through: [call, ...c.through] })));
|
|
130
|
+
});
|
|
131
|
+
return [...own, ...inner];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=ambient-contract.js.map
|
|
@@ -531,6 +531,44 @@ export declare const Ambient: {
|
|
|
531
531
|
readonly access: AmbientVerb.Builds;
|
|
532
532
|
};
|
|
533
533
|
};
|
|
534
|
+
readonly installed: {
|
|
535
|
+
readonly reads: {
|
|
536
|
+
readonly family: AmbientFamilyName;
|
|
537
|
+
readonly access: AmbientVerb.Reads;
|
|
538
|
+
};
|
|
539
|
+
readonly writes: {
|
|
540
|
+
readonly family: AmbientFamilyName;
|
|
541
|
+
readonly access: AmbientVerb.Writes;
|
|
542
|
+
};
|
|
543
|
+
readonly adds: {
|
|
544
|
+
readonly family: AmbientFamilyName;
|
|
545
|
+
readonly access: AmbientVerb.Adds;
|
|
546
|
+
};
|
|
547
|
+
readonly resets: {
|
|
548
|
+
readonly family: AmbientFamilyName;
|
|
549
|
+
readonly access: AmbientVerb.Resets;
|
|
550
|
+
};
|
|
551
|
+
readonly kills: {
|
|
552
|
+
readonly family: AmbientFamilyName;
|
|
553
|
+
readonly access: AmbientVerb.Kills;
|
|
554
|
+
};
|
|
555
|
+
readonly opens: {
|
|
556
|
+
readonly family: AmbientFamilyName;
|
|
557
|
+
readonly access: AmbientVerb.Opens;
|
|
558
|
+
};
|
|
559
|
+
readonly closes: {
|
|
560
|
+
readonly family: AmbientFamilyName;
|
|
561
|
+
readonly access: AmbientVerb.Closes;
|
|
562
|
+
};
|
|
563
|
+
readonly switches: {
|
|
564
|
+
readonly family: AmbientFamilyName;
|
|
565
|
+
readonly access: AmbientVerb.Switches;
|
|
566
|
+
};
|
|
567
|
+
readonly builds: {
|
|
568
|
+
readonly family: AmbientFamilyName;
|
|
569
|
+
readonly access: AmbientVerb.Builds;
|
|
570
|
+
};
|
|
571
|
+
};
|
|
534
572
|
readonly rng: {
|
|
535
573
|
readonly reads: {
|
|
536
574
|
readonly family: AmbientFamilyName;
|
|
@@ -976,25 +1014,51 @@ export interface AmbientFamilyWords extends AmbientWords {
|
|
|
976
1014
|
export declare const AmbientFamilyInfo: Readonly<Record<AmbientFamilyName, AmbientFamilyWords>>;
|
|
977
1015
|
/** The words for every access verb, see {@link AmbientFamilyInfo}. */
|
|
978
1016
|
export declare const AmbientVerbInfo: Readonly<Record<AmbientVerb, AmbientWords>>;
|
|
979
|
-
/**
|
|
1017
|
+
/** How an access names the entries of its part it is about: as the configuration states them, or by the resource formals naming the files. */
|
|
1018
|
+
export type AmbientMembers = AmbientKeys | 'every' | {
|
|
1019
|
+
readonly from: 'resources';
|
|
1020
|
+
readonly formals: readonly BrandedIdentifier[];
|
|
1021
|
+
};
|
|
1022
|
+
/** One access of a built-in to a part, as {@link ambientSummaryOf} lists it; {@link AmbientWording} words it. */
|
|
980
1023
|
export interface AmbientAccessSummary {
|
|
981
1024
|
readonly part: AmbientFamilyName;
|
|
982
1025
|
readonly access: AmbientVerb;
|
|
983
|
-
/** the access
|
|
984
|
-
readonly
|
|
985
|
-
/** the
|
|
986
|
-
readonly
|
|
987
|
-
/**
|
|
988
|
-
readonly
|
|
1026
|
+
/** the access happens only if this holds, see {@link AmbientEffect#when} */
|
|
1027
|
+
readonly when?: AmbientCondition;
|
|
1028
|
+
/** the access happens only unless this holds, see {@link AmbientEffect#unless} */
|
|
1029
|
+
readonly unless?: AmbientCondition;
|
|
1030
|
+
/** how the call names the entries it is about, empty for all of the part or the active instance */
|
|
1031
|
+
readonly names: readonly AmbientMembers[];
|
|
989
1032
|
}
|
|
990
1033
|
/** The accesses of a built-in to one part of the global state and the parts belonging to it, see {@link ambientSummaryOf}. */
|
|
991
1034
|
export interface AmbientFamilySummary {
|
|
992
1035
|
readonly family: AmbientFamilyName;
|
|
993
|
-
readonly label: string;
|
|
994
1036
|
readonly accesses: readonly AmbientAccessSummary[];
|
|
995
1037
|
}
|
|
1038
|
+
/** The words for a condition, `add is TRUE`, as {@link AmbientAccessSummary#when} shows it. */
|
|
1039
|
+
export declare function conditionWords(condition: AmbientCondition): string;
|
|
996
1040
|
/**
|
|
997
1041
|
* The {@link AmbientEffect}s of a built-in, including those its tags imply, grouped by the part they access (a part of the active device under the device)
|
|
998
1042
|
* and by verb, with the entries each access names: `graphics device: opens device, reads plot, adds to plot`.
|
|
999
1043
|
*/
|
|
1000
1044
|
export declare function ambientSummaryOf(config: BuiltInFnInfo | undefined): readonly AmbientFamilySummary[];
|
|
1045
|
+
/** The {@link AmbientEffect}s grouped as {@link ambientSummaryOf} does, with no implied ones added. */
|
|
1046
|
+
export declare function summaryOfEffects(effects: AmbientEffects | undefined): readonly AmbientFamilySummary[];
|
|
1047
|
+
/**
|
|
1048
|
+
* The words for what {@link ambientSummaryOf} and {@link AmbientContract} state as data, the one place a page, the wiki, or a query
|
|
1049
|
+
* turns a part, an access, the entries it names, or the conditions it happens under into text.
|
|
1050
|
+
* @helper dataflow
|
|
1051
|
+
*/
|
|
1052
|
+
export declare const AmbientWording: {
|
|
1053
|
+
readonly name: "AmbientWording";
|
|
1054
|
+
/** The label of a part, `graphics device`. */
|
|
1055
|
+
readonly family: (this: void, family: AmbientFamilyName) => string;
|
|
1056
|
+
/** The access as a page shows it, `adds to plot`. */
|
|
1057
|
+
readonly access: (this: void, { part, access }: Pick<AmbientAccessSummary, "part" | "access">) => string;
|
|
1058
|
+
/** The entries the access is about, `digits` or `named by file`, empty for all of the part or the active instance. */
|
|
1059
|
+
readonly members: (this: void, { names }: Pick<AmbientAccessSummary, "names">) => readonly string[];
|
|
1060
|
+
/** The words for one condition, `add is TRUE`. */
|
|
1061
|
+
readonly condition: typeof conditionWords;
|
|
1062
|
+
/** When the access happens, `if add is TRUE`, all of them have to hold, empty if it always does. */
|
|
1063
|
+
readonly conditions: (this: void, { when, unless }: Pick<AmbientAccessSummary, "when" | "unless">) => readonly string[];
|
|
1064
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AmbientVerbInfo = exports.AmbientFamilyInfo = exports.Ambient = exports.AmbientVerb = exports.AmbientPart = void 0;
|
|
3
|
+
exports.AmbientWording = exports.AmbientVerbInfo = exports.AmbientFamilyInfo = exports.Ambient = exports.AmbientVerb = exports.AmbientPart = void 0;
|
|
4
4
|
exports.withImpliedAmbient = withImpliedAmbient;
|
|
5
5
|
exports.declaresAmbient = declaresAmbient;
|
|
6
|
+
exports.conditionWords = conditionWords;
|
|
6
7
|
exports.ambientSummaryOf = ambientSummaryOf;
|
|
8
|
+
exports.summaryOfEffects = summaryOfEffects;
|
|
7
9
|
const built_in_props_1 = require("./built-in-props");
|
|
8
10
|
const ambient_state_name_1 = require("./ambient-state-name");
|
|
9
11
|
const arrays_1 = require("../../util/collections/arrays");
|
|
@@ -83,6 +85,7 @@ exports.Ambient = {
|
|
|
83
85
|
env: effectsOf(ambient_state_name_1.KeyedState.Env),
|
|
84
86
|
locale: effectsOf(ambient_state_name_1.KeyedState.Locale),
|
|
85
87
|
searchPath: effectsOf(ambient_state_name_1.KeyedState.SearchPath),
|
|
88
|
+
installed: effectsOf(ambient_state_name_1.KeyedState.InstalledPackages),
|
|
86
89
|
rng: effectsOf(AmbientPart.Rng),
|
|
87
90
|
rngKind: effectsOf(AmbientPart.RngKind),
|
|
88
91
|
wd: effectsOf(AmbientPart.WorkingDirectory),
|
|
@@ -126,13 +129,16 @@ function withFileAccess(config) {
|
|
|
126
129
|
function withImplicitAccess(config) {
|
|
127
130
|
const { tags, ambient } = config;
|
|
128
131
|
/* what always goes to the message sink, like `message`, does not print to the output sink */
|
|
129
|
-
const
|
|
132
|
+
const stated = exports.Ambient.list(ambient);
|
|
133
|
+
const printsToMessages = stated.some(e => e.family === exports.Ambient.messageSink.adds.family && e.when === undefined && e.unless === undefined);
|
|
134
|
+
/* a package attached must be installed, so the load reads the entries it attaches */
|
|
135
|
+
const installed = stated.some(e => e.family === ambient_state_name_1.KeyedState.InstalledPackages) ? [] : [{ ...exports.Ambient.installed.reads, member: stated.find(e => e.family === ambient_state_name_1.KeyedState.SearchPath && e.access === AmbientVerb.Writes)?.member }];
|
|
130
136
|
const implied = [
|
|
131
137
|
...tags?.includes(built_in_props_1.SemanticCallTag.Process) ? [exports.Ambient.env.reads] : [],
|
|
132
|
-
...tags?.includes(built_in_props_1.SemanticCallTag.LoadsPackage) ? [exports.Ambient.libPaths.reads] : [],
|
|
138
|
+
...tags?.includes(built_in_props_1.SemanticCallTag.LoadsPackage) ? [exports.Ambient.libPaths.reads, ...installed] : [],
|
|
133
139
|
...tags?.includes(built_in_props_1.SemanticCallTag.Prints) && !printsToMessages ? [exports.Ambient.sink.adds] : []
|
|
134
140
|
];
|
|
135
|
-
return implied.length === 0 ? config : { ...config, ambient: [...
|
|
141
|
+
return implied.length === 0 ? config : { ...config, ambient: [...stated, ...implied] };
|
|
136
142
|
}
|
|
137
143
|
/** The configuration with the {@link AmbientEffect}s its tags imply added to the ones it states. */
|
|
138
144
|
function withImpliedAmbient(config) {
|
|
@@ -155,6 +161,7 @@ exports.AmbientFamilyInfo = {
|
|
|
155
161
|
[ambient_state_name_1.KeyedState.Env]: { label: 'environment variables', noun: 'environment variables', description: 'The environment variables of the R process by name, like TZ or LANG, which R and every child process read.' },
|
|
156
162
|
[ambient_state_name_1.KeyedState.Locale]: { label: 'locale', noun: 'locale', description: 'The locale categories like LC_COLLATE, which sorting, formatting, and messages follow.' },
|
|
157
163
|
[ambient_state_name_1.KeyedState.SearchPath]: { label: 'search path', noun: 'search path', description: 'The packages and environments attached, in which R looks up a name the code does not define.' },
|
|
164
|
+
[ambient_state_name_1.KeyedState.InstalledPackages]: { label: 'installed packages', noun: 'installed packages', description: 'The packages installed in the library by name, which install.packages adds, remove.packages removes, and every package load reads.' },
|
|
158
165
|
[AmbientPart.Rng]: { label: 'random numbers', noun: 'random number generator', verbs: { [AmbientVerb.Adds]: 'draws from', [AmbientVerb.Writes]: 'seeds' }, description: 'The state of the random number generator, which set.seed sets and every draw advances.' },
|
|
159
166
|
[AmbientPart.RngKind]: { label: 'random number kind', noun: 'generator kind', of: AmbientPart.Rng, description: 'Which random number generator R uses, which RNGkind sets and set.seed keeps unless it is given one.' },
|
|
160
167
|
[AmbientPart.WorkingDirectory]: { label: 'working directory', noun: 'working directory', description: 'The directory relative paths start from, which setwd changes.' },
|
|
@@ -179,21 +186,26 @@ exports.AmbientVerbInfo = {
|
|
|
179
186
|
[AmbientVerb.Switches]: { label: 'switches', description: 'The call makes another open instance the active one.' },
|
|
180
187
|
[AmbientVerb.Builds]: { label: 'builds an object drawing', description: 'The call builds an object that only draws once it is printed, like a ggplot.' }
|
|
181
188
|
};
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return effect.family === AmbientPart.Files && effect.sig !== undefined ? effect.sig.filter(([, p]) => (p & built_in_props_1.ArgProp.Resource) !== 0).map(([n]) => `named by ${n}`) : [];
|
|
189
|
+
function membersOf(effect) {
|
|
190
|
+
if (effect.member !== undefined) {
|
|
191
|
+
return [effect.member];
|
|
186
192
|
}
|
|
187
|
-
|
|
193
|
+
const formals = effect.family === AmbientPart.Files && effect.sig !== undefined ? effect.sig.filter(([, p]) => (p & built_in_props_1.ArgProp.Resource) !== 0).map(([n]) => n) : [];
|
|
194
|
+
return formals.length === 0 ? [] : [{ from: 'resources', formals }];
|
|
195
|
+
}
|
|
196
|
+
function memberWords(member) {
|
|
197
|
+
if (member === 'every') {
|
|
188
198
|
return ['every open one'];
|
|
189
199
|
}
|
|
190
200
|
switch (member.from) {
|
|
201
|
+
case 'resources': return member.formals.map(n => `named by ${n}`);
|
|
191
202
|
case 'constant': return member.keys;
|
|
192
203
|
case 'argument-names': return ['the names of the arguments'];
|
|
193
204
|
case 'unnamed': return ['the unnamed arguments'];
|
|
194
205
|
case 'parameter': return [`named by ${member.names.join(' or ')}${member.fallback === undefined ? '' : `, else ${member.fallback}`}`];
|
|
195
206
|
}
|
|
196
207
|
}
|
|
208
|
+
/** The words for a condition, `add is TRUE`, as {@link AmbientAccessSummary#when} shows it. */
|
|
197
209
|
function conditionWords(condition) {
|
|
198
210
|
if (condition === 'no-arguments') {
|
|
199
211
|
return 'it has no arguments';
|
|
@@ -217,18 +229,48 @@ function conditionWords(condition) {
|
|
|
217
229
|
* and by verb, with the entries each access names: `graphics device: opens device, reads plot, adds to plot`.
|
|
218
230
|
*/
|
|
219
231
|
function ambientSummaryOf(config) {
|
|
232
|
+
return summaryOfEffects(withImpliedAmbient(config)?.ambient);
|
|
233
|
+
}
|
|
234
|
+
/** The {@link AmbientEffect}s grouped as {@link ambientSummaryOf} does, with no implied ones added. */
|
|
235
|
+
function summaryOfEffects(effects) {
|
|
220
236
|
const families = new Map();
|
|
221
|
-
for (const effect of exports.Ambient.list(
|
|
222
|
-
const
|
|
223
|
-
const family = words.of ?? effect.family;
|
|
237
|
+
for (const effect of exports.Ambient.list(effects)) {
|
|
238
|
+
const family = exports.AmbientFamilyInfo[effect.family].of ?? effect.family;
|
|
224
239
|
const accesses = families.get(family) ?? new Map();
|
|
225
240
|
families.set(family, accesses);
|
|
226
|
-
const
|
|
227
|
-
const key =
|
|
228
|
-
const known = accesses.get(key) ?? { part: effect.family, access: effect.access,
|
|
241
|
+
const { when, unless } = effect;
|
|
242
|
+
const key = JSON.stringify([effect.family, effect.access, when, unless]);
|
|
243
|
+
const known = accesses.get(key) ?? { part: effect.family, access: effect.access, ...when === undefined ? {} : { when }, ...unless === undefined ? {} : { unless }, names: [] };
|
|
229
244
|
accesses.set(key, known);
|
|
230
|
-
known.
|
|
245
|
+
known.names = [...known.names, ...membersOf(effect)];
|
|
231
246
|
}
|
|
232
|
-
return [...families].map(([family, accesses]) => ({ family,
|
|
247
|
+
return [...families].map(([family, accesses]) => ({ family, accesses: [...accesses.values()] }));
|
|
233
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* The words for what {@link ambientSummaryOf} and {@link AmbientContract} state as data, the one place a page, the wiki, or a query
|
|
251
|
+
* turns a part, an access, the entries it names, or the conditions it happens under into text.
|
|
252
|
+
* @helper dataflow
|
|
253
|
+
*/
|
|
254
|
+
exports.AmbientWording = {
|
|
255
|
+
name: 'AmbientWording',
|
|
256
|
+
/** The label of a part, `graphics device`. */
|
|
257
|
+
family(family) {
|
|
258
|
+
return exports.AmbientFamilyInfo[family].label;
|
|
259
|
+
},
|
|
260
|
+
/** The access as a page shows it, `adds to plot`. */
|
|
261
|
+
access({ part, access }) {
|
|
262
|
+
const words = exports.AmbientFamilyInfo[part];
|
|
263
|
+
return `${words.verbs?.[access] ?? exports.AmbientVerbInfo[access].label} ${words.noun}`;
|
|
264
|
+
},
|
|
265
|
+
/** The entries the access is about, `digits` or `named by file`, empty for all of the part or the active instance. */
|
|
266
|
+
members({ names }) {
|
|
267
|
+
return (0, arrays_1.uniqueArray)(names.flatMap(memberWords));
|
|
268
|
+
},
|
|
269
|
+
/** The words for one condition, `add is TRUE`. */
|
|
270
|
+
condition: conditionWords,
|
|
271
|
+
/** When the access happens, `if add is TRUE`, all of them have to hold, empty if it always does. */
|
|
272
|
+
conditions({ when, unless }) {
|
|
273
|
+
return [...when === undefined ? [] : [`if ${conditionWords(when)}`], ...unless === undefined ? [] : [`unless ${conditionWords(unless)}`]];
|
|
274
|
+
}
|
|
275
|
+
};
|
|
234
276
|
//# sourceMappingURL=ambient-effect.js.map
|
|
@@ -10,8 +10,12 @@ export declare enum KeyedState {
|
|
|
10
10
|
/** the graphics parameters `par(mfrow = c(1, 2))` sets, on top of the whole graphics state */
|
|
11
11
|
Par = "par",
|
|
12
12
|
/** the entries of the search path (`library(dplyr)` adds `dplyr`, `detach(package:dplyr)` removes it) */
|
|
13
|
-
SearchPath = "search-path"
|
|
13
|
+
SearchPath = "search-path",
|
|
14
|
+
/** the packages installed in the library (`install.packages("dplyr")` installs `dplyr`, `remove.packages("dplyr")` removes it) */
|
|
15
|
+
InstalledPackages = "installed-packages"
|
|
14
16
|
}
|
|
17
|
+
/** What a package name looks like, other than a path, url, or remote reference (`user/repo`) naming a package only implicitly. */
|
|
18
|
+
export declare const PlainPackageName: RegExp;
|
|
15
19
|
/** The key standing for any entry of a {@link KeyedState} we cannot name. */
|
|
16
20
|
export declare const UnknownKey = "*";
|
|
17
21
|
/** The name of a global pseudo variable tracking a part of the global state, see the helper of the same name. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeyedAccumulators = exports.MessageSinks = exports.OutputSinks = exports.GraphicsDevices = exports.AmbientStateName = exports.UnknownKey = exports.KeyedState = void 0;
|
|
3
|
+
exports.KeyedAccumulators = exports.MessageSinks = exports.OutputSinks = exports.GraphicsDevices = exports.AmbientStateName = exports.UnknownKey = exports.PlainPackageName = exports.KeyedState = void 0;
|
|
4
4
|
/** The states made of named entries: setting one entry replaces its pseudo variable `#<state>:<key>`, adds to the accumulating `all` of the state, and an entry we cannot name adds to `#<state>:*` instead (`options(op)`, `Sys.setenv(...)`). */
|
|
5
5
|
var KeyedState;
|
|
6
6
|
(function (KeyedState) {
|
|
@@ -14,6 +14,8 @@ var KeyedState;
|
|
|
14
14
|
KeyedState["Par"] = "par";
|
|
15
15
|
/** the entries of the search path (`library(dplyr)` adds `dplyr`, `detach(package:dplyr)` removes it) */
|
|
16
16
|
KeyedState["SearchPath"] = "search-path";
|
|
17
|
+
/** the packages installed in the library (`install.packages("dplyr")` installs `dplyr`, `remove.packages("dplyr")` removes it) */
|
|
18
|
+
KeyedState["InstalledPackages"] = "installed-packages";
|
|
17
19
|
})(KeyedState || (exports.KeyedState = KeyedState = {}));
|
|
18
20
|
/** The pseudo variable all writes to a {@link KeyedState} add to. */
|
|
19
21
|
const AllOfKeyedState = {
|
|
@@ -21,12 +23,13 @@ const AllOfKeyedState = {
|
|
|
21
23
|
[KeyedState.Env]: '#env',
|
|
22
24
|
[KeyedState.Locale]: '#locale',
|
|
23
25
|
[KeyedState.Par]: '#graphics',
|
|
24
|
-
[KeyedState.SearchPath]: '#search-path'
|
|
26
|
+
[KeyedState.SearchPath]: '#search-path',
|
|
27
|
+
[KeyedState.InstalledPackages]: '#installed-packages'
|
|
25
28
|
};
|
|
26
29
|
/** What R puts before the name of an entry that is no part of its key: `search()` lists `package:dplyr` for the entry `dplyr`. */
|
|
27
|
-
const EntryPrefix = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
const EntryPrefix = { [KeyedState.SearchPath]: 'package:' };
|
|
31
|
+
/** What a package name looks like, other than a path, url, or remote reference (`user/repo`) naming a package only implicitly. */
|
|
32
|
+
exports.PlainPackageName = /^[A-Za-z][A-Za-z0-9.]*$/;
|
|
30
33
|
/** The key standing for any entry of a {@link KeyedState} we cannot name. */
|
|
31
34
|
exports.UnknownKey = '*';
|
|
32
35
|
/** Graphics parameters, options and other global state, tracked as global pseudo variables (`#...`) so readers link to the calls that set them. */
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { REnvironmentInformation } from './environment';
|
|
2
2
|
import type { IdentifierDefinition } from './identifier';
|
|
3
|
-
/**
|
|
4
|
-
* Merges two arrays of identifier definitions into a fresh array, unique by `nodeId` and `definedAt`.
|
|
5
|
-
*/
|
|
3
|
+
/** Merges two arrays of identifier definitions into a fresh array, unique by `nodeId` and `definedAt`. */
|
|
6
4
|
export declare function uniqueMergeValuesInDefinitions(old: readonly IdentifierDefinition[], value: readonly IdentifierDefinition[]): IdentifierDefinition[];
|
|
7
5
|
/**
|
|
8
6
|
* Adds all writes of `next` to `base` (i.e., the operations of `next` *might* happen).
|
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.uniqueMergeValuesInDefinitions = uniqueMergeValuesInDefinitions;
|
|
4
4
|
exports.appendEnvironment = appendEnvironment;
|
|
5
5
|
const scoping_1 = require("./scoping");
|
|
6
|
-
/**
|
|
7
|
-
* Merges two arrays of identifier definitions into a fresh array, unique by `nodeId` and `definedAt`.
|
|
8
|
-
*/
|
|
6
|
+
/** Merges two arrays of identifier definitions into a fresh array, unique by `nodeId` and `definedAt`. */
|
|
9
7
|
function uniqueMergeValuesInDefinitions(old, value) {
|
|
10
8
|
const result = old.slice();
|
|
11
9
|
for (const v of value) {
|
|
@@ -25,9 +23,6 @@ function appendEnvironment(base, next) {
|
|
|
25
23
|
}
|
|
26
24
|
({ base, next } = (0, scoping_1.padToCommonScope)(base, next));
|
|
27
25
|
// packages attached below the global env are unified branch-wise by Environment#append
|
|
28
|
-
return {
|
|
29
|
-
current: base.current.append(next.current),
|
|
30
|
-
level: base.level,
|
|
31
|
-
};
|
|
26
|
+
return { current: base.current.append(next.current), level: base.level };
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=append.js.map
|