@eagleoutice/flowr 2.17.5 → 2.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -51
- package/abstract-interpretation/absint-inference.d.ts +4 -4
- package/abstract-interpretation/absint-inference.js +11 -11
- package/abstract-interpretation/abstract-semantics.d.ts +2 -1
- package/abstract-interpretation/branch-paths-interpreter.d.ts +1 -0
- package/abstract-interpretation/branch-paths-interpreter.js +60 -0
- package/abstract-interpretation/branch-paths.d.ts +60 -0
- package/abstract-interpretation/branch-paths.js +120 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +6 -1
- package/abstract-interpretation/data-frame/dataframe-semantics.js +60 -1
- package/abstract-interpretation/data-frame/semantics.js +4 -10
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
- package/cli/repl/core.js +51 -0
- package/control-flow/cfg-dead-code.js +12 -7
- package/data/packed.d.ts +10 -0
- package/data/packed.js +33 -0
- package/data/r-base-guards.generated.d.ts +7 -0
- package/data/r-base-guards.generated.js +12 -0
- package/data/r-datasets.generated.d.ts +4 -0
- package/data/r-datasets.generated.js +10 -0
- package/data/r-formals.generated.d.ts +4 -0
- package/data/r-formals.generated.js +10 -0
- package/data/r-group-method-guards.generated.d.ts +3 -0
- package/data/r-group-method-guards.generated.js +8 -0
- package/dataflow/environments/ambient-effect.d.ts +1000 -0
- package/dataflow/environments/ambient-effect.js +234 -0
- package/dataflow/environments/ambient-state-name.d.ts +45 -2
- package/dataflow/environments/ambient-state-name.js +61 -3
- package/dataflow/environments/apply-kill.js +11 -4
- package/dataflow/environments/built-in-kinds.d.ts +4 -46
- package/dataflow/environments/built-in-kinds.js +6 -2
- package/dataflow/environments/built-in-props.d.ts +16 -4
- package/dataflow/environments/built-in-props.js +11 -3
- package/dataflow/environments/built-in.d.ts +6 -1
- package/dataflow/environments/built-in.js +13 -36
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-functions.js +110 -52
- package/dataflow/environments/default-builtin-config/base-language.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-language.js +11 -8
- package/dataflow/environments/default-builtin-config/dev-tooling.js +1 -1
- package/dataflow/environments/default-builtin-config/file-io.js +6 -4
- package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/graphics-devices.js +24 -14
- package/dataflow/environments/default-builtin-config/guard-builders.d.ts +16 -0
- package/dataflow/environments/default-builtin-config/guard-builders.js +29 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-lang.d.ts +15 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +228 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-ops.d.ts +11 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +154 -0
- package/dataflow/environments/default-builtin-config/guards.d.ts +9 -0
- package/dataflow/environments/default-builtin-config/guards.js +211 -0
- package/dataflow/environments/default-builtin-config/index.d.ts +3 -3
- package/dataflow/environments/default-builtin-config/index.js +22 -7
- package/dataflow/environments/default-builtin-config/media-formats.js +4 -4
- package/dataflow/environments/default-builtin-config/package-spatial.js +2 -1
- package/dataflow/environments/default-builtin-config/package-tidyverse.js +3 -2
- package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/package-utils.js +5 -2
- package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/parallel-execution.js +3 -1
- package/dataflow/environments/default-builtin-config/r-formals.d.ts +13 -0
- package/dataflow/environments/default-builtin-config/r-formals.js +110 -0
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +138 -77
- package/dataflow/environments/default-builtin-config/shared-configs.js +52 -88
- package/dataflow/environments/default-builtin-config/statistics.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/statistics.js +4 -1
- package/dataflow/environments/diff.js +5 -2
- package/dataflow/environments/environment.d.ts +20 -0
- package/dataflow/environments/environment.js +39 -4
- package/dataflow/environments/group-generics.d.ts +5 -1
- package/dataflow/environments/group-generics.js +13 -3
- package/dataflow/environments/guard-facts.d.ts +169 -0
- package/dataflow/environments/guard-facts.js +26 -0
- package/dataflow/environments/identifier.d.ts +9 -1
- package/dataflow/environments/identifier.js +5 -0
- package/dataflow/environments/pkg-name.d.ts +1 -0
- package/dataflow/environments/query-fn-props.d.ts +3 -5
- package/dataflow/environments/query-fn-props.js +44 -21
- package/dataflow/environments/removal-marker.d.ts +2 -0
- package/dataflow/environments/removal-marker.js +5 -0
- package/dataflow/eval/resolve/resolve-strings.d.ts +2 -5
- package/dataflow/eval/resolve/resolve-strings.js +2 -2
- package/dataflow/extractor.js +24 -15
- package/dataflow/fn/condition-handlers.d.ts +2 -0
- package/dataflow/fn/condition-handlers.js +3 -1
- package/dataflow/fn/frame-reflection.d.ts +4 -2
- package/dataflow/fn/frame-reflection.js +16 -0
- package/dataflow/fn/function-props.js +15 -22
- package/dataflow/fn/function-semantics.d.ts +31 -1
- package/dataflow/fn/function-semantics.js +15 -0
- package/dataflow/fn/guards/built-in-guards.d.ts +112 -0
- package/dataflow/fn/guards/built-in-guards.js +199 -0
- package/dataflow/fn/guards/call-contracts.d.ts +97 -0
- package/dataflow/fn/guards/call-contracts.js +331 -0
- package/dataflow/fn/guards/condition-grouping.d.ts +20 -0
- package/dataflow/fn/guards/condition-grouping.js +135 -0
- package/dataflow/fn/guards/function-guards.d.ts +112 -0
- package/dataflow/fn/guards/function-guards.js +1549 -0
- package/dataflow/fn/guards/group-method-guards.d.ts +28 -0
- package/dataflow/fn/guards/group-method-guards.js +56 -0
- package/dataflow/fn/guards/guard-claims.d.ts +125 -0
- package/dataflow/fn/guards/guard-claims.js +678 -0
- package/dataflow/fn/guards/guard-knowledge.d.ts +41 -0
- package/dataflow/fn/guards/guard-knowledge.js +180 -0
- package/dataflow/fn/guards/guard-term-syntax.d.ts +9 -0
- package/dataflow/fn/guards/guard-term-syntax.js +210 -0
- package/dataflow/fn/guards/guard-term.d.ts +136 -0
- package/dataflow/fn/guards/guard-term.js +550 -0
- package/dataflow/fn/guards/stated-guards.d.ts +13 -0
- package/dataflow/fn/guards/stated-guards.js +35 -0
- package/dataflow/fn/higher-order-function.d.ts +2 -0
- package/dataflow/fn/higher-order-function.js +1 -0
- package/dataflow/fn/strict-function.d.ts +4 -0
- package/dataflow/fn/strict-function.js +66 -17
- package/dataflow/graph/ambient-access.d.ts +4 -1
- package/dataflow/graph/ambient-access.js +8 -2
- package/dataflow/graph/closure-frames.js +1 -1
- package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
- package/dataflow/graph/dataflowgraph-builder.js +2 -2
- package/dataflow/graph/df-helper.d.ts +6 -0
- package/dataflow/graph/df-helper.js +15 -0
- package/dataflow/graph/graph.d.ts +12 -6
- package/dataflow/graph/graph.js +21 -28
- package/dataflow/info.d.ts +2 -1
- package/dataflow/info.js +3 -1
- package/dataflow/internal/dispatch-linking.d.ts +3 -1
- package/dataflow/internal/dispatch-linking.js +1 -0
- package/dataflow/internal/linker.d.ts +2 -0
- package/dataflow/internal/linker.js +115 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -57
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +471 -295
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +13 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +106 -19
- 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 +24 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +33 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +23 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +19 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +347 -46
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +110 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +9 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +28 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +16 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +37 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +55 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +64 -7
- 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 +160 -20
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +6 -0
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +142 -4
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
- package/dataflow/internal/process/functions/call/quoted.js +23 -4
- package/dataflow/processor.d.ts +2 -0
- package/documentation/data/dfg/doc-ambient.d.ts +4 -0
- package/documentation/data/dfg/doc-ambient.js +74 -0
- package/documentation/wiki-dataflow-graph.js +10 -4
- package/documentation/wiki-linter.js +12 -0
- package/documentation/wiki-query.js +112 -1
- package/linter/linter-rules.d.ts +41 -1
- package/linter/linter-rules.js +5 -1
- package/linter/rules/call-contracts.d.ts +40 -0
- package/linter/rules/call-contracts.js +56 -0
- package/linter/rules/cmd-check/bogus-return.js +1 -1
- package/linter/rules/cmd-check/call-arguments.js +5 -6
- package/linter/rules/cmd-check/cmd-check-util.d.ts +0 -6
- package/linter/rules/cmd-check/cmd-check-util.js +0 -28
- package/linter/rules/cmd-check/package-hooks.js +2 -1
- package/linter/rules/cmd-check/s-three-method-consistency.js +1 -1
- package/linter/rules/interactive-functions.d.ts +30 -0
- package/linter/rules/interactive-functions.js +87 -0
- package/linter/rules/process-state-in-session.js +1 -1
- package/linter/rules/undefined-symbol-util.d.ts +1 -1
- package/linter/rules/undefined-symbol-util.js +8 -2
- package/linter/rules/undefined-symbol.js +18 -7
- package/linter/rules/useless-loop.d.ts +1 -1
- package/package.json +1 -1
- package/project/context/flowr-analyzer-dependencies-context.js +2 -1
- package/project/flowr-analyzer.d.ts +1 -0
- package/project/flowr-analyzer.js +5 -5
- package/project/sigdb/build.js +14 -4
- package/project/sigdb/decode.d.ts +3 -0
- package/project/sigdb/decode.js +10 -1
- package/project/sigdb/guarded-source.d.ts +6 -0
- package/project/sigdb/guarded-source.js +29 -0
- package/project/sigdb/reader.d.ts +5 -0
- package/project/sigdb/reader.js +27 -1
- package/project/sigdb/schema.d.ts +24 -2
- package/queries/catalog/absint-query/absint-query-format.d.ts +6 -3
- package/queries/catalog/absint-query/absint-query-format.js +57 -2
- package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +6 -2
- package/queries/catalog/ambient-access-query/ambient-access-query-format.js +48 -3
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -2
- package/queries/catalog/cluster-query/cluster-query-format.js +19 -2
- package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +5 -2
- package/queries/catalog/code-clones-query/code-clones-query-format.js +34 -2
- package/queries/catalog/config-query/config-query-format.d.ts +5 -2
- package/queries/catalog/config-query/config-query-format.js +41 -2
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +5 -2
- package/queries/catalog/control-flow-query/control-flow-query-format.js +19 -2
- package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +72 -0
- package/queries/catalog/data-columns-query/data-columns-query-format.js +215 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +5 -2
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +38 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.js +18 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +8 -3
- package/queries/catalog/dependencies-query/function-info/other-path-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/tagged-functions.d.ts +11 -0
- package/queries/catalog/dependencies-query/function-info/tagged-functions.js +18 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +7 -2
- package/queries/catalog/dice-query/dice-query-format.js +34 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -4
- package/queries/catalog/does-call-query/does-call-query-format.js +114 -2
- package/queries/catalog/files-query/files-query-format.d.ts +5 -2
- package/queries/catalog/files-query/files-query-format.js +45 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +6 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +303 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +8 -4
- package/queries/catalog/happens-before-query/happens-before-query-format.js +37 -2
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -2
- package/queries/catalog/id-map-query/id-map-query-format.js +18 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +5 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +29 -2
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +37 -0
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +125 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -2
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +54 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +23 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +15 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +8 -2
- package/queries/catalog/linter-query/linter-query-format.js +69 -4
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -3
- package/queries/catalog/location-map-query/location-map-query-format.js +70 -2
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -2
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +18 -2
- package/queries/catalog/origin-query/origin-query-format.d.ts +6 -3
- package/queries/catalog/origin-query/origin-query-format.js +29 -2
- package/queries/catalog/project-query/project-query-format.d.ts +6 -3
- package/queries/catalog/project-query/project-query-format.js +98 -2
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +6 -3
- package/queries/catalog/provenance-query/provenance-query-format.js +30 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +9 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +38 -2
- package/queries/catalog/search-query/search-query-format.d.ts +5 -2
- package/queries/catalog/search-query/search-query-format.js +23 -2
- package/queries/catalog/signature-query/signature-query-executor.js +3 -1
- package/queries/catalog/signature-query/signature-query-format.d.ts +3 -0
- package/queries/catalog/signature-query/signature-query-render.js +23 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +13 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.js +55 -2
- package/queries/catalog/taint-query/taint-query-format.d.ts +6 -3
- package/queries/catalog/taint-query/taint-query-format.js +28 -2
- package/queries/query.d.ts +48 -27
- package/queries/query.js +6 -4
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -0
- package/r-bridge/shell.js +7 -2
- package/reconstruct/reconstruct.js +18 -3
- package/slicing/static/removal-slice.js +4 -3
- package/slicing/static/slice-call.d.ts +11 -0
- package/slicing/static/slice-call.js +43 -2
- package/slicing/static/static-slicer.d.ts +2 -0
- package/slicing/static/static-slicer.js +137 -21
- package/slicing/static/visiting-queue.d.ts +2 -0
- package/slicing/static/visiting-queue.js +4 -0
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
- package/util/objects.d.ts +2 -0
- package/util/objects.js +5 -0
- package/util/r-datasets.d.ts +27 -0
- package/util/r-datasets.js +45 -0
- package/util/text/playground-link.d.ts +2 -0
- package/util/text/playground-link.js +2 -0
- package/queries/catalog/absint-query/absint-query-executor.d.ts +0 -6
- package/queries/catalog/absint-query/absint-query-executor.js +0 -61
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +0 -6
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +0 -50
- package/queries/catalog/cluster-query/cluster-query-executor.d.ts +0 -6
- package/queries/catalog/cluster-query/cluster-query-executor.js +0 -21
- package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +0 -6
- package/queries/catalog/code-clones-query/code-clones-query-executor.js +0 -38
- package/queries/catalog/config-query/config-query-executor.d.ts +0 -6
- package/queries/catalog/config-query/config-query-executor.js +0 -45
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +0 -6
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +0 -21
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +0 -6
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +0 -40
- package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +0 -6
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +0 -20
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +0 -9
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +0 -18
- package/queries/catalog/dice-query/dice-query-executor.d.ts +0 -8
- package/queries/catalog/dice-query/dice-query-executor.js +0 -37
- package/queries/catalog/does-call-query/does-call-query-executor.d.ts +0 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +0 -116
- package/queries/catalog/files-query/files-query-executor.d.ts +0 -6
- package/queries/catalog/files-query/files-query-executor.js +0 -47
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +0 -6
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +0 -307
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +0 -7
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +0 -40
- package/queries/catalog/id-map-query/id-map-query-executor.d.ts +0 -6
- package/queries/catalog/id-map-query/id-map-query-executor.js +0 -20
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -6
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +0 -31
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +0 -4
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +0 -58
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +0 -7
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +0 -25
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +0 -7
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +0 -17
- package/queries/catalog/linter-query/linter-query-executor.d.ts +0 -9
- package/queries/catalog/linter-query/linter-query-executor.js +0 -62
- package/queries/catalog/location-map-query/location-map-query-executor.d.ts +0 -7
- package/queries/catalog/location-map-query/location-map-query-executor.js +0 -73
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +0 -6
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +0 -20
- package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -6
- package/queries/catalog/origin-query/origin-query-executor.js +0 -31
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -6
- package/queries/catalog/project-query/project-query-executor.js +0 -103
- package/queries/catalog/provenance-query/provenance-query-executor.d.ts +0 -6
- package/queries/catalog/provenance-query/provenance-query-executor.js +0 -33
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +0 -10
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +0 -40
- package/queries/catalog/search-query/search-query-executor.d.ts +0 -6
- package/queries/catalog/search-query/search-query-executor.js +0 -25
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +0 -14
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +0 -59
- package/queries/catalog/taint-query/taint-query-executor.d.ts +0 -7
- package/queries/catalog/taint-query/taint-query-executor.js +0 -30
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BrandedIdentifier } from '../../environments/identifier';
|
|
2
|
+
import type { GuardFactsLookup } from '../../environments/guard-facts';
|
|
3
|
+
import { GuardTerm } from './guard-term';
|
|
4
|
+
/**
|
|
5
|
+
* What a value of a class vector R makes, like `c("POSIXct", "POSIXt")`, runs for a member of a group generic, and what that asks:
|
|
6
|
+
* the method of the base packages dispatch finds for it.
|
|
7
|
+
*/
|
|
8
|
+
export interface GroupMethodGuard {
|
|
9
|
+
/** the class vector, as `oldClass` returns it */
|
|
10
|
+
readonly classes: readonly string[];
|
|
11
|
+
/** the method, written `generic.class` */
|
|
12
|
+
readonly method: string;
|
|
13
|
+
/** the formals of the method, the first ones standing for what is dispatched on */
|
|
14
|
+
readonly formals: readonly BrandedIdentifier[];
|
|
15
|
+
/** what the method asks of its formals for the member, `.Generic` being its name */
|
|
16
|
+
readonly requires: GuardTerm;
|
|
17
|
+
}
|
|
18
|
+
/** The operands a member of the group dispatches on: both of an operator, the first one else. */
|
|
19
|
+
export declare function dispatchedOperands(this: void, name: BrandedIdentifier): number;
|
|
20
|
+
/**
|
|
21
|
+
* What the methods the base packages define for the classes of R's own values ask on a call of the member `name` of a group generic,
|
|
22
|
+
* each as a condition that holds unless the operand is of another class: R does not look for a method of an operand without a class,
|
|
23
|
+
* and one of a class outside these may bring a method from anywhere, so all that is stated is what these classes run.
|
|
24
|
+
* @param name - the member called, like `sin`
|
|
25
|
+
* @param operands - what the call hands over for what is dispatched on, `undefined` where flowR cannot state it, and a constant having no class
|
|
26
|
+
* @param excluded - the classes with a method of the program, which may run instead
|
|
27
|
+
*/
|
|
28
|
+
export declare function groupMethodConditions(this: void, name: BrandedIdentifier, operands: readonly (GuardTerm | undefined)[], excluded: ReadonlySet<string>, facts?: GuardFactsLookup): GuardTerm[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dispatchedOperands = dispatchedOperands;
|
|
4
|
+
exports.groupMethodConditions = groupMethodConditions;
|
|
5
|
+
const group_generics_1 = require("../../environments/group-generics");
|
|
6
|
+
const r_group_method_guards_generated_1 = require("../../../data/r-group-method-guards.generated");
|
|
7
|
+
const guard_term_1 = require("./guard-term");
|
|
8
|
+
/* what these read is the frame of the method, which the call of the member does not have */
|
|
9
|
+
const OfTheFrame = new Set(['nargs', 'missing', 'sys.call', 'sys.function', 'match.call', 'parent.frame', 'environment', 'NextMethod', 'UseMethod', 'standardGeneric', 'callGeneric', 'on.exit']);
|
|
10
|
+
/** The condition with every part that reads the frame of the method weakened into `TRUE`, the condition being in negation normal form. */
|
|
11
|
+
function withoutFrame(term) {
|
|
12
|
+
if (guard_term_1.GuardTerm.isCall(term) && term.known && (term.fn === '&&' || term.fn === '||')) {
|
|
13
|
+
const operands = term.args.map(a => withoutFrame(a.value));
|
|
14
|
+
return term.fn === '&&' ? guard_term_1.GuardTerm.all(...operands) : guard_term_1.GuardTerm.any(...operands);
|
|
15
|
+
}
|
|
16
|
+
return [...OfTheFrame].some(fn => guard_term_1.GuardTerm.mentions(term, fn)) ? guard_term_1.GuardTerm.True : term;
|
|
17
|
+
}
|
|
18
|
+
/** The operands a member of the group dispatches on: both of an operator, the first one else. */
|
|
19
|
+
function dispatchedOperands(name) {
|
|
20
|
+
return (0, group_generics_1.s3GroupGenericOf)(name) === 'Ops' ? 2 : 1;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* What the methods the base packages define for the classes of R's own values ask on a call of the member `name` of a group generic,
|
|
24
|
+
* each as a condition that holds unless the operand is of another class: R does not look for a method of an operand without a class,
|
|
25
|
+
* and one of a class outside these may bring a method from anywhere, so all that is stated is what these classes run.
|
|
26
|
+
* @param name - the member called, like `sin`
|
|
27
|
+
* @param operands - what the call hands over for what is dispatched on, `undefined` where flowR cannot state it, and a constant having no class
|
|
28
|
+
* @param excluded - the classes with a method of the program, which may run instead
|
|
29
|
+
*/
|
|
30
|
+
function groupMethodConditions(name, operands, excluded, facts) {
|
|
31
|
+
const entries = (0, r_group_method_guards_generated_1.RGroupMethodGuards)()[String(name)] ?? [];
|
|
32
|
+
const dispatched = operands.slice(0, dispatchedOperands(name));
|
|
33
|
+
/* the classes asking the same, so that each operand needs only one condition for them */
|
|
34
|
+
const byAsked = new Map();
|
|
35
|
+
for (const { classes, formals, requires } of entries.filter(e => !e.classes.some(c => excluded.has(c)))) {
|
|
36
|
+
const asked = guard_term_1.GuardTerm.substituteCondition(withoutFrame(requires), new Map(formals.slice(0, dispatched.length).flatMap((f, at) => {
|
|
37
|
+
const operand = dispatched[at];
|
|
38
|
+
return operand === undefined ? [] : [[f, operand]];
|
|
39
|
+
})), undefined, facts);
|
|
40
|
+
const key = guard_term_1.GuardTerm.render(asked);
|
|
41
|
+
if (!guard_term_1.GuardTerm.isTrue(asked)) {
|
|
42
|
+
byAsked.set(key, { asked, classes: [...byAsked.get(key)?.classes ?? [], classes] });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return [...byAsked.values()].flatMap(({ asked, classes }) => dispatched.flatMap((operand, at) => {
|
|
46
|
+
/* the other operand having a class may bring a method of its own */
|
|
47
|
+
const others = dispatched.filter((_, i) => i !== at);
|
|
48
|
+
if (operand === undefined || operand.kind === 'constant' || others.includes(undefined)) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const notOfClass = classes.map(cls => guard_term_1.GuardTerm.known('!', guard_term_1.GuardTerm.known('identical', guard_term_1.GuardTerm.known('oldClass', operand), cls.length === 1 ? guard_term_1.GuardTerm.string(cls[0]) : guard_term_1.GuardTerm.known('c', ...cls.map(guard_term_1.GuardTerm.string)))));
|
|
52
|
+
const classed = others.filter(o => o.kind !== 'constant').map(o => guard_term_1.GuardTerm.known('is.object', o));
|
|
53
|
+
return [guard_term_1.GuardTerm.any(guard_term_1.GuardTerm.all(...notOfClass), ...classed, asked)];
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=group-method-guards.js.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { BrandedIdentifier } from '../../environments/identifier';
|
|
2
|
+
import { GuardTerm } from './guard-term';
|
|
3
|
+
import { type GuardFactsLookup, type ReturnedValue } from '../../environments/guard-facts';
|
|
4
|
+
/** The inclusive bounds of a number, the upper one `Infinity` if there is none; JSON turns that into `null`, so it is stated as such. */
|
|
5
|
+
export type ClaimedRange = readonly [lower: number | null, upper: number | null];
|
|
6
|
+
/**
|
|
7
|
+
* What a call that returns normally has made sure of one of the formals of a function, each read off the guards.
|
|
8
|
+
* A field left out claims nothing.
|
|
9
|
+
*/
|
|
10
|
+
export interface FormalClaim {
|
|
11
|
+
/** the value has one of these types (see {@link RValueType}) */
|
|
12
|
+
readonly types?: readonly string[];
|
|
13
|
+
/** the same, for a value without a class attribute, as those can bring methods of their own; only stated if it says more than {@link FormalClaim.types} */
|
|
14
|
+
readonly unclassedTypes?: readonly string[];
|
|
15
|
+
/** a character value holds only these, or abbreviates one of them if {@link FormalClaim.partial} is set, numbers and logicals are only stated for a value that is one */
|
|
16
|
+
readonly values?: readonly (string | number | boolean)[];
|
|
17
|
+
/** the {@link FormalClaim.values} are matched partially, as `match.arg` does */
|
|
18
|
+
readonly partial?: boolean;
|
|
19
|
+
/** `class(x)` holds at least one of these, or `x` is an S4 object that `is` one, as `inherits` asks `is` for those */
|
|
20
|
+
readonly classes?: readonly string[];
|
|
21
|
+
/** the bounds of what the formal measures: `value` for a number without a class attribute, only stated if the formal is one, else `length`, `nchar`, `nrow`, `ncol`, `NROW`, or `NCOL`, which are taken to be whole numbers, as an S3 method of `length` returning anything else breaks its contract */
|
|
22
|
+
readonly bounds?: Readonly<Record<string, ClaimedRange>>;
|
|
23
|
+
/** no element is `NA` */
|
|
24
|
+
readonly notNA?: boolean;
|
|
25
|
+
/** must be usable as a function: being one, naming one, or being bound to a name another function can be found by */
|
|
26
|
+
readonly callable?: boolean;
|
|
27
|
+
/** every element is a whole number, as `trunc(x) == x` asks */
|
|
28
|
+
readonly whole?: boolean;
|
|
29
|
+
/** what the formal has to complete into a name that exists, like `paste0("f_", x)` */
|
|
30
|
+
readonly resolves?: readonly ClaimedName[];
|
|
31
|
+
/** what holds in each of the cases a branch on the formal tells apart, like `if(is.logical(center)) ... else ...` */
|
|
32
|
+
readonly cases?: readonly FormalCase[];
|
|
33
|
+
}
|
|
34
|
+
/** One of the cases a branch on a formal tells apart, with what a normal return makes sure of in it. */
|
|
35
|
+
export interface FormalCase {
|
|
36
|
+
/** the condition of the case, in R syntax */
|
|
37
|
+
readonly when: string;
|
|
38
|
+
/** what holds of the formal in the case beyond what its condition says, see {@link claimBeyond} */
|
|
39
|
+
readonly claim: FormalClaim;
|
|
40
|
+
/** what relates the formal to others in the case, see {@link ClaimedRelation} */
|
|
41
|
+
readonly relations?: readonly ClaimedRelation[];
|
|
42
|
+
}
|
|
43
|
+
/** A condition with the conditions of the path it was found on, see {@link casesOf}. */
|
|
44
|
+
export interface CaseClause {
|
|
45
|
+
readonly requires: GuardTerm;
|
|
46
|
+
/** what held on the way to the condition, outermost first */
|
|
47
|
+
readonly under?: readonly GuardTerm[];
|
|
48
|
+
}
|
|
49
|
+
/** A name a function looks up at run time, built from a formal. */
|
|
50
|
+
export interface ClaimedName {
|
|
51
|
+
/** how the function spells it, in R syntax */
|
|
52
|
+
readonly expression: string;
|
|
53
|
+
/** what comes before the formal in the name, if that is known */
|
|
54
|
+
readonly prefix?: string;
|
|
55
|
+
/** what comes after the formal in the name, if that is known */
|
|
56
|
+
readonly suffix?: string;
|
|
57
|
+
/** the values of the formal that make it a function the program defines, which does not rule out functions from elsewhere */
|
|
58
|
+
readonly candidates?: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
/** What `claim` says beyond `known`, each part `known` already makes sure of left out, so a case does not repeat its condition or what always holds. */
|
|
61
|
+
export declare function claimBeyond(this: void, claim: FormalClaim, known: FormalClaim): FormalClaim;
|
|
62
|
+
/** A comparison relating what two formals hold, like `length(x) >= m`, which holds on a normal return unless something else let the call through. */
|
|
63
|
+
export interface ClaimedRelation {
|
|
64
|
+
/** the comparison in R syntax */
|
|
65
|
+
readonly holds: string;
|
|
66
|
+
/** the formals it relates */
|
|
67
|
+
readonly formals: readonly BrandedIdentifier[];
|
|
68
|
+
/** what lets a call through instead, in R syntax */
|
|
69
|
+
readonly unless?: string;
|
|
70
|
+
/** the same, as a claim, if it speaks of a single formal */
|
|
71
|
+
readonly unlessClaim?: {
|
|
72
|
+
readonly formal: BrandedIdentifier;
|
|
73
|
+
readonly claim: FormalClaim;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** The relations between formals the given conditions state, each one a comparison of two sides that read different formals. */
|
|
77
|
+
export declare function relationsOf(this: void, conditions: readonly GuardTerm[], facts: GuardFactsLookup): ClaimedRelation[];
|
|
78
|
+
/** A claim on one formal that holds unless something else lets the call through, like `missing(package) || is.character(character.only)`. */
|
|
79
|
+
export interface ConditionalClaim {
|
|
80
|
+
readonly formal: BrandedIdentifier;
|
|
81
|
+
readonly claim: FormalClaim;
|
|
82
|
+
/** what lets a call through instead, in R syntax */
|
|
83
|
+
readonly unless: string;
|
|
84
|
+
}
|
|
85
|
+
/** The claims the given conditions make on a formal unless something not about that formal holds, see {@link ConditionalClaim}. */
|
|
86
|
+
export declare function conditionalClaimsOf(this: void, conditions: readonly GuardTerm[], formals: readonly BrandedIdentifier[], facts: GuardFactsLookup): ConditionalClaim[];
|
|
87
|
+
/**
|
|
88
|
+
* The cases of each formal: the first branch on it alone that the conditions were found under, as `if(is.logical(center)) ... else ...`,
|
|
89
|
+
* where both ways something more is asked of it, each with what a normal return makes sure of in it.
|
|
90
|
+
*/
|
|
91
|
+
export declare function casesOf(this: void, clauses: readonly CaseClause[], formals: readonly BrandedIdentifier[], facts: GuardFactsLookup): Record<BrandedIdentifier, FormalCase[]>;
|
|
92
|
+
/** Whether every value passing `conditions` passes `implied` as far as the types can tell; as a wrong guess only loses a clause, not what is left. */
|
|
93
|
+
export declare function impliedBy(this: void, implied: GuardTerm, conditions: readonly GuardTerm[], formals: readonly BrandedIdentifier[], facts: GuardFactsLookup): boolean;
|
|
94
|
+
/** What the given conditions, all of which hold on a normal return, claim about each of the given formals; a formal without any claim is left out. */
|
|
95
|
+
export declare function claimsOf(this: void, conditions: readonly GuardTerm[], formals: readonly BrandedIdentifier[], facts: GuardFactsLookup): Record<BrandedIdentifier, FormalClaim>;
|
|
96
|
+
/** One way a function returns normally: the value it returns, `undefined` if flowR cannot state it, and what holds on the way there. */
|
|
97
|
+
export interface ReturnedTerm {
|
|
98
|
+
readonly value: GuardTerm | undefined;
|
|
99
|
+
readonly holds: readonly GuardTerm[];
|
|
100
|
+
}
|
|
101
|
+
/** What a function is stated to return, a classed value bringing a method of its own making it a case of the unclassed one, see {@link ReturnedValue.dispatchesOn}. */
|
|
102
|
+
export declare function returnedClaimOf(this: void, returned: ReturnedValue): FormalClaim | undefined;
|
|
103
|
+
/** What holds of the value of every normal return, given what holds of the formals on every one of them, `undefined` if that is nothing. */
|
|
104
|
+
export declare function returnsOf(this: void, returned: readonly ReturnedTerm[], conditions: readonly GuardTerm[], facts: GuardFactsLookup): FormalClaim | undefined;
|
|
105
|
+
/** The formal every normal return hands back unchanged, if there is one. */
|
|
106
|
+
export declare function returnedFormalOf(this: void, returned: readonly ReturnedTerm[], facts: GuardFactsLookup): BrandedIdentifier | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* A condition as a reader without flowR's notation reads it, `undefined` if it reads as written: each `succeeds` stated by what it checks,
|
|
109
|
+
* and, for a condition of a call of a member of a group generic, a class letting the call through as the method it may bring.
|
|
110
|
+
* @param group - the group generic the failing call dispatches through, like `Math`
|
|
111
|
+
*/
|
|
112
|
+
export declare function readingOf(this: void, condition: GuardTerm, facts: GuardFactsLookup, group?: BrandedIdentifier): string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Reads a claim on `formal` as conditions written the way R would test them, all of which hold, like
|
|
115
|
+
* `typeof(m) in {integer, double}`, `length(m) == 1`, and `m >= 0`.
|
|
116
|
+
*/
|
|
117
|
+
export declare function claimConditions(this: void, formal: string, { types, unclassedTypes, values, partial, classes, bounds, notNA, callable, whole, resolves }: FormalClaim): string[];
|
|
118
|
+
/** Reads a claim in a few words each, as a page or a terminal shows it. */
|
|
119
|
+
export declare function claimWords(this: void, claim: FormalClaim): string[];
|
|
120
|
+
/** Each case of a claim as its condition and what holds in it, see {@link claimConditions}; `stated` are the relations said of the formals on their own. */
|
|
121
|
+
export declare function caseConditions(this: void, formal: string, claim: FormalClaim, stated?: readonly string[]): string[];
|
|
122
|
+
/** What a call returns in a few words, see {@link claimWords}: what holds of it, and the formal it hands back. */
|
|
123
|
+
export declare function returnWords(this: void, returns: FormalClaim | undefined, passes: BrandedIdentifier | undefined): string[];
|
|
124
|
+
/** The same as {@link claimConditions}, of the value a call returns, named `result`. */
|
|
125
|
+
export declare function returnConditions(this: void, returns: FormalClaim | undefined, passes: BrandedIdentifier | undefined): string[];
|