@eagleoutice/flowr 2.14.4 → 2.15.1
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 +77 -64
- package/abstract-interpretation/absint-inference.d.ts +347 -0
- package/abstract-interpretation/{absint-visitor.js → absint-inference.js} +327 -97
- package/abstract-interpretation/abstract-semantics.d.ts +246 -0
- package/abstract-interpretation/abstract-semantics.js +3 -0
- package/abstract-interpretation/data-frame/{mappers/arguments.d.ts → arguments.d.ts} +18 -16
- package/abstract-interpretation/data-frame/{mappers/arguments.js → arguments.js} +20 -21
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +52 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1665 -0
- package/abstract-interpretation/data-frame/resolve-args.js +4 -4
- package/abstract-interpretation/data-frame/semantics.d.ts +15 -21
- package/abstract-interpretation/data-frame/semantics.js +27 -29
- package/abstract-interpretation/data-frame/shape-inference.d.ts +28 -24
- package/abstract-interpretation/data-frame/shape-inference.js +14 -79
- package/abstract-interpretation/domains/interval-domain.d.ts +5 -1
- package/abstract-interpretation/domains/interval-domain.js +25 -33
- package/abstract-interpretation/domains/multi-value-state-domain.d.ts +6 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +24 -4
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -6
- package/abstract-interpretation/domains/partial-product-domain.js +26 -43
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -6
- package/abstract-interpretation/domains/positive-interval-domain.js +3 -29
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +6 -0
- package/abstract-interpretation/domains/set-range-domain.js +29 -62
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +9 -2
- package/abstract-interpretation/domains/state-abstract-domain.js +26 -37
- package/abstract-interpretation/domains/{state-domain-like.d.ts → state-domain.d.ts} +10 -6
- package/abstract-interpretation/domains/{state-domain-like.js → state-domain.js} +1 -1
- package/abstract-interpretation/value-semantics.d.ts +113 -0
- package/abstract-interpretation/value-semantics.js +115 -0
- package/benchmark/slicer.js +12 -6
- package/benchmark/stats/feature-counts.d.ts +2 -1
- package/benchmark/stats/feature-counts.js +25 -1
- package/benchmark/stats/stats.d.ts +4 -0
- package/benchmark/summarizer/second-phase/graph.js +7 -0
- package/cli/repl/commands/repl-parse.js +11 -22
- package/cli/repl/parser/slice-query-parser.d.ts +2 -0
- package/cli/repl/parser/slice-query-parser.js +1 -0
- package/config.d.ts +30 -205
- package/config.js +37 -3
- package/control-flow/cfg-properties.d.ts +5 -0
- package/control-flow/cfg-properties.js +25 -7
- package/control-flow/control-flow-graph.d.ts +11 -37
- package/control-flow/control-flow-graph.js +33 -77
- package/control-flow/semantic-cfg-guided-visitor.d.ts +63 -320
- package/control-flow/semantic-cfg-guided-visitor.js +65 -320
- package/dataflow/environments/built-in-config.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +4 -0
- package/dataflow/environments/built-in-props.d.ts +192 -82
- package/dataflow/environments/built-in-props.js +336 -106
- package/dataflow/environments/built-in.d.ts +21 -9
- package/dataflow/environments/built-in.js +43 -12
- package/dataflow/environments/default-builtin-config.d.ts +3219 -313
- package/dataflow/environments/default-builtin-config.js +803 -1012
- package/dataflow/environments/environment.d.ts +26 -49
- package/dataflow/environments/environment.js +34 -47
- package/dataflow/environments/group-generics.d.ts +11 -2
- package/dataflow/environments/group-generics.js +22 -3
- package/dataflow/environments/identifier.d.ts +106 -6
- package/dataflow/environments/identifier.js +19 -1
- package/dataflow/environments/query-fn-props.d.ts +16 -8
- package/dataflow/environments/query-fn-props.js +45 -21
- package/dataflow/environments/resolve-by-name.js +9 -2
- package/dataflow/environments/scoping.d.ts +5 -0
- package/dataflow/environments/scoping.js +11 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
- package/dataflow/eval/resolve/alias-tracking.js +24 -6
- package/dataflow/eval/resolve/resolve-numbers.d.ts +182 -7
- package/dataflow/eval/resolve/resolve-numbers.js +44 -9
- package/dataflow/eval/resolve/resolve-strings.d.ts +79 -2
- package/dataflow/eval/resolve/resolve-strings.js +16 -7
- package/dataflow/eval/resolve/resolve.d.ts +5 -22
- package/dataflow/eval/resolve/resolve.js +34 -34
- package/dataflow/eval/values/general.d.ts +9 -1
- package/dataflow/eval/values/general.js +22 -3
- package/dataflow/eval/values/sets/set-constants.d.ts +5 -0
- package/dataflow/eval/values/sets/set-constants.js +9 -1
- package/dataflow/eval/values/string/string-constants.d.ts +16 -15
- package/dataflow/eval/values/string/string-constants.js +59 -27
- package/dataflow/extractor.d.ts +2 -1
- package/dataflow/extractor.js +16 -4
- package/dataflow/fn/argument-roles.d.ts +35 -0
- package/dataflow/fn/argument-roles.js +252 -0
- package/dataflow/fn/class-declaration.d.ts +148 -0
- package/dataflow/fn/class-declaration.js +317 -0
- package/dataflow/fn/condition-handlers.d.ts +5 -0
- package/dataflow/fn/condition-handlers.js +13 -0
- package/dataflow/fn/exceptions-of-function.d.ts +21 -7
- package/dataflow/fn/exceptions-of-function.js +74 -43
- package/dataflow/fn/frame-reflection.d.ts +46 -0
- package/dataflow/fn/frame-reflection.js +169 -0
- package/dataflow/fn/function-props.d.ts +32 -0
- package/dataflow/fn/function-props.js +160 -0
- package/dataflow/fn/higher-order-function.d.ts +23 -5
- package/dataflow/fn/higher-order-function.js +64 -18
- package/dataflow/fn/strict-function.d.ts +24 -2
- package/dataflow/fn/strict-function.js +49 -19
- package/dataflow/graph/call-graph.js +10 -2
- package/dataflow/graph/df-helper.d.ts +1 -12
- package/dataflow/graph/df-helper.js +2 -19
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +2 -2
- package/dataflow/graph/graph.d.ts +39 -188
- package/dataflow/graph/graph.js +46 -163
- package/dataflow/graph/match-args.d.ts +34 -2
- package/dataflow/graph/match-args.js +45 -12
- package/dataflow/graph/vertex.d.ts +8 -0
- package/dataflow/info.d.ts +7 -5
- package/dataflow/info.js +1 -5
- package/dataflow/internal/control-flow.js +20 -17
- package/dataflow/internal/linker.d.ts +8 -37
- package/dataflow/internal/linker.js +22 -55
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +8 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +43 -50
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.d.ts +23 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.js +24 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +0 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +73 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +131 -92
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +17 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +187 -99
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +0 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +31 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +101 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +23 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +22 -1
- package/dataflow/internal/process/functions/call/common.d.ts +4 -6
- package/dataflow/internal/process/functions/call/common.js +2 -2
- package/dataflow/internal/process/functions/call/deferred.d.ts +1 -1
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +5 -3
- package/dataflow/internal/process/functions/call/known-call-handling.js +6 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +19 -13
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -2
- package/dataflow/internal/process/functions/call/quoted.js +144 -28
- package/dataflow/origin/dfg-get-origin.js +23 -10
- package/dataflow/processor.d.ts +2 -1
- package/dataflow/processor.js +6 -0
- package/documentation/data/interface/doc-writing-code.js +2 -0
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/wiki-absint.d.ts +11 -14
- package/documentation/wiki-absint.js +73 -59
- package/documentation/wiki-core.js +64 -24
- package/documentation/wiki-linter.js +1 -0
- package/documentation/wiki-query.js +82 -264
- package/documentation/wiki-signature-database.js +17 -5
- package/gas.d.ts +91 -47
- package/gas.js +97 -13
- package/index.d.ts +31 -0
- package/index.js +52 -0
- package/linter/linter-rules.d.ts +87 -23
- package/linter/linter-rules.js +3 -1
- package/linter/rules/absolute-path.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +10 -8
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.js +14 -5
- package/linter/rules/file-path-validity.d.ts +1 -1
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +13 -2
- package/linter/rules/network-functions.d.ts +10 -5
- package/linter/rules/network-functions.js +48 -36
- package/linter/rules/no-leaked-credentials.d.ts +1 -1
- package/linter/rules/problematic-inputs.d.ts +1 -1
- package/linter/rules/problematic-inputs.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +3 -2
- package/linter/rules/seeded-randomness.js +7 -3
- package/linter/rules/software-has-license.d.ts +1 -1
- package/linter/rules/software-has-tests.d.ts +1 -1
- package/linter/rules/stop-with-call-arg.d.ts +1 -1
- package/linter/rules/syntactically-valid.d.ts +1 -1
- package/linter/rules/unclosed-connection.d.ts +3 -3
- package/linter/rules/unclosed-connection.js +3 -4
- package/linter/rules/undefined-symbol.d.ts +1 -1
- package/linter/rules/unescaped-arguments.d.ts +161 -0
- package/linter/rules/unescaped-arguments.js +293 -0
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/unused-definition.js +49 -4
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/useless-loop.d.ts +1 -1
- package/package.json +3 -198
- package/project/context/flowr-analyzer-environment-context.d.ts +12 -1
- package/project/context/flowr-analyzer-environment-context.js +33 -1
- package/project/context/flowr-analyzer-files-context.d.ts +24 -1
- package/project/context/flowr-analyzer-files-context.js +42 -21
- package/project/context/flowr-analyzer-functions-context.d.ts +8 -0
- package/project/context/flowr-analyzer-functions-context.js +2 -0
- package/project/context/flowr-analyzer-gas-context.d.ts +9 -1
- package/project/context/flowr-analyzer-gas-context.js +21 -0
- package/project/context/flowr-file.d.ts +16 -1
- package/project/context/flowr-file.js +26 -2
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +19 -20
- package/project/plugins/file-plugins/files/flowr-description-file.js +55 -41
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +9 -4
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +11 -3
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +6 -9
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +5 -21
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +11 -12
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +48 -61
- package/project/plugins/file-plugins/files/flowr-news-file.d.ts +3 -12
- package/project/plugins/file-plugins/files/flowr-news-file.js +2 -19
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +145 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +676 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +122 -422
- package/project/plugins/file-plugins/files/flowr-rda-file.js +517 -1005
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +8 -2
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +10 -1
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +7 -2
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +9 -1
- package/project/plugins/file-plugins/files/flowr-sysdata-file.d.ts +17 -0
- package/project/plugins/file-plugins/files/flowr-sysdata-file.js +40 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +3 -1
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.d.ts +58 -0
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.js +95 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.d.ts +23 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +33 -72
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +17 -15
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +20 -37
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +29 -53
- package/project/plugins/package-version-plugins/package.js +2 -1
- package/project/plugins/plugin-registry.d.ts +3 -1
- package/project/plugins/plugin-registry.js +11 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +20 -4
- package/project/sigdb/build.d.ts +9 -15
- package/project/sigdb/build.js +101 -42
- package/project/sigdb/decode.d.ts +10 -4
- package/project/sigdb/decode.js +60 -21
- package/project/sigdb/memory-source.d.ts +4 -0
- package/project/sigdb/memory-source.js +8 -0
- package/project/sigdb/reader.d.ts +57 -100
- package/project/sigdb/reader.js +157 -108
- package/project/sigdb/schema.d.ts +90 -26
- package/project/sigdb/schema.js +12 -6
- package/queries/base-query-format.d.ts +7 -0
- package/queries/base-query-format.js +29 -0
- package/queries/catalog/absint-query/absint-query-executor.js +8 -6
- package/queries/catalog/absint-query/absint-query-format.d.ts +20 -9
- package/queries/catalog/absint-query/absint-query-format.js +32 -19
- package/queries/catalog/call-context-query/call-context-query-executor.js +3 -3
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -1
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +33 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +2 -2
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +14 -4
- package/queries/catalog/dependencies-query/function-info/read-functions.js +7 -121
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +4 -46
- package/queries/catalog/dependencies-query/function-info/write-functions.js +3 -76
- package/queries/catalog/dependencies-query/implicit-echo.js +2 -2
- package/queries/catalog/dependencies-query/link-devices.d.ts +2 -2
- package/queries/catalog/dependencies-query/link-devices.js +6 -7
- package/queries/catalog/dice-query/dice-query-executor.js +1 -1
- package/queries/catalog/dice-query/dice-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-executor.js +4 -0
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -1
- package/queries/catalog/files-query/files-query-format.d.ts +1 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +1 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -17
- package/queries/catalog/input-sources-query/input-sources-query-format.js +11 -27
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +3 -8
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -11
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +4 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +60 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +35 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +63 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -6
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +3 -8
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -11
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +3 -8
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -12
- package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +3 -8
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -14
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -10
- package/queries/catalog/signature-query/signature-query-executor.js +87 -93
- package/queries/catalog/signature-query/signature-query-format.d.ts +20 -5
- package/queries/catalog/signature-query/signature-query-format.js +16 -4
- package/queries/catalog/signature-query/signature-query-render.js +18 -4
- package/queries/catalog/slice-query-options.d.ts +14 -0
- package/queries/catalog/slice-query-options.js +15 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +2 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.js +7 -5
- package/queries/query-function-filter.d.ts +8 -3
- package/queries/query-function-filter.js +16 -6
- package/queries/query.d.ts +38 -38
- package/queries/query.js +30 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +5 -0
- package/r-bridge/lang-4.x/ast/model/model.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +17 -9
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +35 -27
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -22
- package/reconstruct/reconstruct.d.ts +9 -20
- package/reconstruct/reconstruct.js +66 -28
- package/search/flowr-search-filters.d.ts +7 -6
- package/search/flowr-search-filters.js +6 -4
- package/search/search-executor/search-enrichers.d.ts +10 -10
- package/search/search-executor/search-enrichers.js +32 -3
- package/search/search-executor/search-transformer.js +15 -23
- package/slicing/criterion/parse.js +2 -12
- package/slicing/static/slice-call.js +1 -8
- package/slicing/static/static-slicer.js +1 -1
- package/util/collections/bimap.js +14 -6
- package/util/objects.js +16 -17
- package/util/r-value.d.ts +5 -4
- package/util/record.d.ts +38 -3
- package/util/record.js +48 -1
- package/util/simple-df/dfg-ascii.js +1 -1
- package/util/text/strings.d.ts +5 -0
- package/util/text/strings.js +10 -0
- package/util/version.js +2 -2
- package/abstract-interpretation/absint-visitor.d.ts +0 -223
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -19
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -151
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +0 -287
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +0 -1096
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -15
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -207
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +0 -6
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +0 -25
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +0 -31
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +0 -56
|
@@ -31,6 +31,7 @@ export declare const RString: {
|
|
|
31
31
|
stableId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => string | undefined;
|
|
32
32
|
span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../../util/range").SourceRange | undefined;
|
|
33
33
|
topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
34
|
+
findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
34
35
|
getType: (this: void, node: RNode) => RType;
|
|
35
36
|
visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
36
37
|
collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -36,6 +36,7 @@ export declare const RSymbol: {
|
|
|
36
36
|
readonly stableId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => string | undefined;
|
|
37
37
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../../util/range").SourceRange | undefined;
|
|
38
38
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
39
|
+
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
39
40
|
readonly getType: (this: void, node: RNode) => RType;
|
|
40
41
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
41
42
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -29,6 +29,7 @@ export declare const RUnaryOp: {
|
|
|
29
29
|
readonly stableId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => string | undefined;
|
|
30
30
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../../util/range").SourceRange | undefined;
|
|
31
31
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
32
|
+
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
32
33
|
readonly getType: (this: void, node: RNode) => RType;
|
|
33
34
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
34
35
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -27,6 +27,7 @@ export declare const RWhileLoop: {
|
|
|
27
27
|
readonly stableId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => string | undefined;
|
|
28
28
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../../util/range").SourceRange | undefined;
|
|
29
29
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
30
|
+
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
30
31
|
readonly getType: (this: void, node: RNode) => RType;
|
|
31
32
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
32
33
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -20,6 +20,12 @@ export declare const NodeId: {
|
|
|
20
20
|
* This allows us to use numeric ids without storing them as strings, while still allowing custom string ids if needed.
|
|
21
21
|
*/
|
|
22
22
|
readonly normalize: (this: void, id: NodeId) => NodeId;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the id belongs to a node the analyzed code writes. flowR wraps a deferred expression
|
|
25
|
+
* (`on.exit` and its relatives) in a definition of its own, and that definition carries an id no node
|
|
26
|
+
* of the ast does.
|
|
27
|
+
*/
|
|
28
|
+
readonly isWritten: (this: void, id: NodeId) => boolean;
|
|
23
29
|
/**
|
|
24
30
|
* The prefix used for built-in function or operator ids.
|
|
25
31
|
*/
|
|
@@ -63,13 +69,15 @@ export declare const NodeId: {
|
|
|
63
69
|
* @see {@link toBuiltIn} - to convert a built-in function or operator name to a built-in id
|
|
64
70
|
*/
|
|
65
71
|
readonly fromBuiltIn: <T extends string>(this: void, id: BuiltIn<T>) => T;
|
|
72
|
+
/**
|
|
73
|
+
* The lexeme of the {@link RNode|node} the id belongs to, as the analyzed code writes it.
|
|
74
|
+
* @see {@link NodeId.recoverContent} - for what a call or a use stands for rather than how it is written
|
|
75
|
+
*/
|
|
76
|
+
readonly recoverName: (this: void, id: NodeId, idMap?: AstIdMap) => string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* What the node the id belongs to stands for: the name a call resolved to, the unquoted name of a use, and
|
|
79
|
+
* the lexeme of anything else.
|
|
80
|
+
* @see {@link NodeId.recoverName} - for the lexeme alone, which needs no graph
|
|
81
|
+
*/
|
|
82
|
+
readonly recoverContent: (this: void, id: NodeId, graph: DataflowGraph) => string | undefined;
|
|
66
83
|
};
|
|
67
|
-
/**
|
|
68
|
-
* Recovers the lexeme of a {@link RNode|node} from its id in the {@link AstIdMap|id map}.
|
|
69
|
-
* @see {@link recoverContent} - to recover the content of a node
|
|
70
|
-
*/
|
|
71
|
-
export declare function recoverName(id: NodeId, idMap?: AstIdMap): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Recovers the content of a {@link RNode|node} from its id in the {@link DataflowGraph|dataflow graph}.
|
|
74
|
-
*/
|
|
75
|
-
export declare function recoverContent(id: NodeId, graph: DataflowGraph): string | undefined;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeId = void 0;
|
|
4
|
-
exports.recoverName = recoverName;
|
|
5
|
-
exports.recoverContent = recoverContent;
|
|
6
4
|
const vertex_1 = require("../../../../../dataflow/graph/vertex");
|
|
7
5
|
const retriever_1 = require("../../../../retriever");
|
|
8
6
|
const identifier_1 = require("../../../../../dataflow/environments/identifier");
|
|
@@ -26,6 +24,14 @@ exports.NodeId = {
|
|
|
26
24
|
}
|
|
27
25
|
return id;
|
|
28
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* Whether the id belongs to a node the analyzed code writes. flowR wraps a deferred expression
|
|
29
|
+
* (`on.exit` and its relatives) in a definition of its own, and that definition carries an id no node
|
|
30
|
+
* of the ast does.
|
|
31
|
+
*/
|
|
32
|
+
isWritten(id) {
|
|
33
|
+
return typeof exports.NodeId.normalize(id) === 'number';
|
|
34
|
+
},
|
|
29
35
|
/**
|
|
30
36
|
* The prefix used for built-in function or operator ids.
|
|
31
37
|
*/
|
|
@@ -88,32 +94,34 @@ exports.NodeId = {
|
|
|
88
94
|
*/
|
|
89
95
|
fromBuiltIn(id) {
|
|
90
96
|
return id.slice(builtInPrefixLength);
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* The lexeme of the {@link RNode|node} the id belongs to, as the analyzed code writes it.
|
|
100
|
+
* @see {@link NodeId.recoverContent} - for what a call or a use stands for rather than how it is written
|
|
101
|
+
*/
|
|
102
|
+
recoverName(id, idMap) {
|
|
103
|
+
return idMap?.get(id)?.lexeme;
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* What the node the id belongs to stands for: the name a call resolved to, the unquoted name of a use, and
|
|
107
|
+
* the lexeme of anything else.
|
|
108
|
+
* @see {@link NodeId.recoverName} - for the lexeme alone, which needs no graph
|
|
109
|
+
*/
|
|
110
|
+
recoverContent(id, graph) {
|
|
111
|
+
const vertex = graph.getVertex(id);
|
|
112
|
+
if (vertex && vertex_1.FunctionCallVertex.is(vertex) && vertex.name) {
|
|
113
|
+
return identifier_1.Identifier.toString(vertex.name);
|
|
114
|
+
}
|
|
115
|
+
const node = graph.idMap?.get(id);
|
|
116
|
+
if (node === undefined) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const lexeme = node.lexeme ?? node.info.fullLexeme ?? '';
|
|
120
|
+
if (vertex_1.UseVertex.is(vertex)) {
|
|
121
|
+
return (0, retriever_1.removeRQuotes)(lexeme);
|
|
122
|
+
}
|
|
123
|
+
return lexeme;
|
|
91
124
|
}
|
|
92
125
|
};
|
|
93
126
|
const builtInPrefixLength = exports.NodeId.builtInPrefix.length;
|
|
94
|
-
/**
|
|
95
|
-
* Recovers the lexeme of a {@link RNode|node} from its id in the {@link AstIdMap|id map}.
|
|
96
|
-
* @see {@link recoverContent} - to recover the content of a node
|
|
97
|
-
*/
|
|
98
|
-
function recoverName(id, idMap) {
|
|
99
|
-
return idMap?.get(id)?.lexeme;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Recovers the content of a {@link RNode|node} from its id in the {@link DataflowGraph|dataflow graph}.
|
|
103
|
-
*/
|
|
104
|
-
function recoverContent(id, graph) {
|
|
105
|
-
const vertex = graph.getVertex(id);
|
|
106
|
-
if (vertex && vertex_1.FunctionCallVertex.is(vertex) && vertex.name) {
|
|
107
|
-
return identifier_1.Identifier.toString(vertex.name);
|
|
108
|
-
}
|
|
109
|
-
const node = graph.idMap?.get(id);
|
|
110
|
-
if (node === undefined) {
|
|
111
|
-
return undefined;
|
|
112
|
-
}
|
|
113
|
-
const lexeme = node.lexeme ?? node.info.fullLexeme ?? '';
|
|
114
|
-
if (vertex_1.UseVertex.is(vertex)) {
|
|
115
|
-
return (0, retriever_1.removeRQuotes)(lexeme);
|
|
116
|
-
}
|
|
117
|
-
return lexeme;
|
|
118
|
-
}
|
|
119
127
|
//# sourceMappingURL=node-id.js.map
|
|
@@ -131,6 +131,8 @@ function convertTreeNode(node) {
|
|
|
131
131
|
const body = children.slice(1, -1).map(n => [n, convertTreeNode(n)]);
|
|
132
132
|
const remainingComments = linkCommentsToNextNodes(body, comments);
|
|
133
133
|
const closing = children[children.length - 1];
|
|
134
|
+
const openText = opening.text;
|
|
135
|
+
const closeText = closing.text;
|
|
134
136
|
return {
|
|
135
137
|
type: type_1.RType.ExpressionList,
|
|
136
138
|
location: undefined,
|
|
@@ -140,14 +142,14 @@ function convertTreeNode(node) {
|
|
|
140
142
|
{
|
|
141
143
|
type: type_1.RType.Symbol,
|
|
142
144
|
location: makeSourceRange(opening),
|
|
143
|
-
content: (0, retriever_1.removeRQuotes)(
|
|
144
|
-
lexeme:
|
|
145
|
+
content: (0, retriever_1.removeRQuotes)(openText),
|
|
146
|
+
lexeme: openText,
|
|
145
147
|
...defaultInfo()
|
|
146
148
|
}, {
|
|
147
149
|
type: type_1.RType.Symbol,
|
|
148
150
|
location: makeSourceRange(closing),
|
|
149
|
-
content: (0, retriever_1.removeRQuotes)(
|
|
150
|
-
lexeme:
|
|
151
|
+
content: (0, retriever_1.removeRQuotes)(closeText),
|
|
152
|
+
lexeme: closeText,
|
|
151
153
|
...defaultInfo()
|
|
152
154
|
}
|
|
153
155
|
],
|
|
@@ -243,12 +245,13 @@ function convertTreeNode(node) {
|
|
|
243
245
|
case tree_sitter_types_1.TreeSitterType.UnaryOperator: {
|
|
244
246
|
const [comments, children] = splitComments(nonErrorChildren(node));
|
|
245
247
|
const [op, operand] = children;
|
|
248
|
+
const opText = op.text;
|
|
246
249
|
return {
|
|
247
250
|
type: type_1.RType.UnaryOp,
|
|
248
251
|
operand: convertTreeNode(operand),
|
|
249
252
|
location: makeSourceRange(op),
|
|
250
|
-
operator:
|
|
251
|
-
lexeme:
|
|
253
|
+
operator: opText,
|
|
254
|
+
lexeme: opText,
|
|
252
255
|
info: {
|
|
253
256
|
...defaultInfo().info,
|
|
254
257
|
adToks: comments.map(c => c[1]),
|
|
@@ -261,11 +264,12 @@ function convertTreeNode(node) {
|
|
|
261
264
|
break;
|
|
262
265
|
}
|
|
263
266
|
const [lhs, int, rhs] = children;
|
|
267
|
+
const rhsText = rhs.text;
|
|
264
268
|
return {
|
|
265
269
|
type: type_1.RType.Symbol,
|
|
266
270
|
location: makeSourceRange(rhs),
|
|
267
|
-
content: identifier_1.Identifier.make(
|
|
268
|
-
lexeme:
|
|
271
|
+
content: identifier_1.Identifier.make(rhsText, lhs.text, int.text === ':::'),
|
|
272
|
+
lexeme: rhsText,
|
|
269
273
|
...defaultInfo(),
|
|
270
274
|
info: {
|
|
271
275
|
...defaultInfo().info,
|
|
@@ -313,13 +317,14 @@ function convertTreeNode(node) {
|
|
|
313
317
|
const body = children[2 + variable.length + 1 + sequence.length + 1];
|
|
314
318
|
const [variableComments, [variableNode]] = splitComments(variable);
|
|
315
319
|
const [sequenceComments, [sequenceNode]] = splitComments(sequence);
|
|
320
|
+
const variableText = variableNode.text;
|
|
316
321
|
return {
|
|
317
322
|
type: type_1.RType.ForLoop,
|
|
318
323
|
variable: {
|
|
319
324
|
type: type_1.RType.Symbol,
|
|
320
325
|
location: makeSourceRange(variableNode),
|
|
321
|
-
content: (0, retriever_1.removeRQuotes)(
|
|
322
|
-
lexeme:
|
|
326
|
+
content: (0, retriever_1.removeRQuotes)(variableText),
|
|
327
|
+
lexeme: variableText,
|
|
323
328
|
info: {
|
|
324
329
|
fullRange: undefined,
|
|
325
330
|
adToks: [],
|
|
@@ -380,11 +385,12 @@ function convertTreeNode(node) {
|
|
|
380
385
|
const [comments, noCommentrawArgs] = splitComments(rawArgs);
|
|
381
386
|
const args = (0, arrays_1.splitArrayOn)(noCommentrawArgs.slice(1, -1), x => x.type === 'comma');
|
|
382
387
|
const funcRange = makeSourceRange(func);
|
|
388
|
+
const funcText = func.text;
|
|
383
389
|
const mappedArgs = args.map(n => n.length === 0 ? r_function_call_1.EmptyArgument : convertTreeNode(n[0]));
|
|
384
390
|
const call = {
|
|
385
391
|
arguments: mappedArgs,
|
|
386
392
|
location: funcRange,
|
|
387
|
-
lexeme:
|
|
393
|
+
lexeme: funcText,
|
|
388
394
|
...defaultInfo(),
|
|
389
395
|
info: {
|
|
390
396
|
...defaultInfo().info,
|
|
@@ -397,7 +403,7 @@ function convertTreeNode(node) {
|
|
|
397
403
|
funcNode = {
|
|
398
404
|
...funcNode,
|
|
399
405
|
type: type_1.RType.Symbol,
|
|
400
|
-
content: (0, retriever_1.removeRQuotes)(
|
|
406
|
+
content: (0, retriever_1.removeRQuotes)(funcText)
|
|
401
407
|
};
|
|
402
408
|
}
|
|
403
409
|
return {
|
|
@@ -491,13 +497,14 @@ function convertTreeNode(node) {
|
|
|
491
497
|
const [bracket, ...argsClosing] = nonErrorChildren(content);
|
|
492
498
|
const [argsComments, argsNoComments] = splitComments(argsClosing.slice(0, -1));
|
|
493
499
|
const args = (0, arrays_1.splitArrayOn)(argsNoComments, x => x.type === 'comma');
|
|
500
|
+
const bracketText = bracket.text;
|
|
494
501
|
return {
|
|
495
502
|
type: type_1.RType.Access,
|
|
496
|
-
operator:
|
|
503
|
+
operator: bracketText,
|
|
497
504
|
accessed: convertTreeNode(func),
|
|
498
505
|
access: args.map(n => n.length === 0 ? r_function_call_1.EmptyArgument : convertTreeNode(n[0])),
|
|
499
506
|
location: makeSourceRange(bracket),
|
|
500
|
-
lexeme:
|
|
507
|
+
lexeme: bracketText,
|
|
501
508
|
info: {
|
|
502
509
|
...defaultInfo().info,
|
|
503
510
|
adToks: argsComments.map(c => c[1]),
|
|
@@ -507,25 +514,27 @@ function convertTreeNode(node) {
|
|
|
507
514
|
case tree_sitter_types_1.TreeSitterType.ExtractOperator: {
|
|
508
515
|
const [lhs, operator, rhs] = nonErrorChildren(node);
|
|
509
516
|
const rhsRange = makeSourceRange(rhs);
|
|
517
|
+
const rhsText = rhs?.text;
|
|
518
|
+
const operatorText = operator.text;
|
|
510
519
|
return {
|
|
511
520
|
type: type_1.RType.Access,
|
|
512
|
-
operator:
|
|
521
|
+
operator: operatorText,
|
|
513
522
|
accessed: convertTreeNode(lhs),
|
|
514
523
|
access: [{
|
|
515
524
|
type: type_1.RType.Argument,
|
|
516
525
|
name: undefined,
|
|
517
526
|
value: convertTreeNode(rhs),
|
|
518
527
|
location: rhsRange,
|
|
519
|
-
lexeme:
|
|
528
|
+
lexeme: rhsText,
|
|
520
529
|
info: {
|
|
521
530
|
fullRange: rhsRange,
|
|
522
531
|
adToks: [],
|
|
523
|
-
fullLexeme:
|
|
532
|
+
fullLexeme: rhsText,
|
|
524
533
|
tsId: rhs?.id
|
|
525
534
|
}
|
|
526
535
|
}],
|
|
527
536
|
location: makeSourceRange(operator),
|
|
528
|
-
lexeme:
|
|
537
|
+
lexeme: operatorText,
|
|
529
538
|
...defaultInfo()
|
|
530
539
|
};
|
|
531
540
|
}
|
|
@@ -595,16 +604,17 @@ function convertTreeNode(node) {
|
|
|
595
604
|
name.content = name.content.slice(1, -1);
|
|
596
605
|
}
|
|
597
606
|
const nameRange = makeSourceRange(nameNode);
|
|
607
|
+
const nameLexeme = nameNode.text;
|
|
598
608
|
return {
|
|
599
609
|
type: type_1.RType.Argument,
|
|
600
610
|
name,
|
|
601
611
|
value: valueNode ? convertTreeNode(valueNode) : undefined,
|
|
602
612
|
location: nameRange,
|
|
603
|
-
lexeme:
|
|
613
|
+
lexeme: nameLexeme,
|
|
604
614
|
info: {
|
|
605
615
|
fullRange: nameRange,
|
|
606
616
|
adToks: commentChildren.map(c => c[1]),
|
|
607
|
-
fullLexeme:
|
|
617
|
+
fullLexeme: nameLexeme,
|
|
608
618
|
tsId: nameNode.id
|
|
609
619
|
}
|
|
610
620
|
};
|
|
@@ -662,13 +672,14 @@ function splitComments(nodes) {
|
|
|
662
672
|
const others = [];
|
|
663
673
|
for (const node of nodes) {
|
|
664
674
|
if (node.type === tree_sitter_types_1.TreeSitterType.Comment) {
|
|
675
|
+
const commentText = node.text;
|
|
665
676
|
comments.push([node, {
|
|
666
677
|
type: type_1.RType.Comment,
|
|
667
678
|
location: makeSourceRange(node),
|
|
668
|
-
lexeme:
|
|
679
|
+
lexeme: commentText,
|
|
669
680
|
info: {
|
|
670
681
|
adToks: [],
|
|
671
|
-
fullLexeme:
|
|
682
|
+
fullLexeme: commentText,
|
|
672
683
|
tsId: node.id
|
|
673
684
|
}
|
|
674
685
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This module has one goal (and is to be rewritten soon to achieve that goal,
|
|
3
|
-
*
|
|
2
|
+
* This module has one goal (and is to be rewritten soon to achieve that goal, as the file itself is way too long).
|
|
3
|
+
* See {@link reconstructToCode}.
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
@@ -14,28 +14,18 @@ import type { InlineWarning } from './inline/source-inline-map';
|
|
|
14
14
|
*/
|
|
15
15
|
export type InlineFull = boolean | 'banner';
|
|
16
16
|
interface Selection {
|
|
17
|
-
/**
|
|
18
|
-
* The set of node ids to be reconstructed.
|
|
19
|
-
*/
|
|
17
|
+
/** The set of node ids to be reconstructed. */
|
|
20
18
|
nodes: ReadonlySet<NodeId>;
|
|
21
|
-
/**
|
|
22
|
-
* @see {@link ReconstructRequiredInput#reconstructFiles}
|
|
23
|
-
*/
|
|
19
|
+
/** @see {@link ReconstructRequiredInput#reconstructFiles} */
|
|
24
20
|
reconstructFiles?: 'all' | number[];
|
|
25
21
|
/**
|
|
26
|
-
* If set, selected `source()` calls are replaced by the (spliced) reconstruction of the sourced file,
|
|
27
|
-
*
|
|
28
|
-
* Requires {@link Selection#sourceMap} to be provided. Overrides {@link Selection#reconstructFiles}.
|
|
29
|
-
* @see {@link SourceInlineMap.build}
|
|
22
|
+
* If set, selected `source()` calls are replaced by the (spliced) reconstruction of the sourced file, producing a
|
|
23
|
+
* single self-contained reconstruction. Requires {@link Selection#sourceMap}; overrides {@link Selection#reconstructFiles}.
|
|
30
24
|
*/
|
|
31
25
|
inlineSources?: boolean;
|
|
32
26
|
/**
|
|
33
|
-
* If set, every file is reconstructed into a single self-contained text, in
|
|
34
|
-
*
|
|
35
|
-
* _are_ sourced explicitly are spliced into their `source()` call instead of being repeated at the top level.
|
|
36
|
-
* Pass `'banner'` to precede every inlined file with a banner comment naming it.
|
|
37
|
-
* Requires {@link Selection#sourceMap} to be provided. Overrides {@link Selection#inlineSources} and
|
|
38
|
-
* {@link Selection#reconstructFiles}.
|
|
27
|
+
* If set, every file is reconstructed into a single self-contained text, in flowR's loading order; files sourced
|
|
28
|
+
* explicitly are spliced into their `source()` call instead of repeated at the top level (`'banner'` names each).
|
|
39
29
|
*/
|
|
40
30
|
inlineFull?: InlineFull;
|
|
41
31
|
/**
|
|
@@ -53,8 +43,7 @@ export interface ReconstructionResult {
|
|
|
53
43
|
/** warnings raised while inlining `source()` calls (only set when {@link Selection#inlineSources} is active) */
|
|
54
44
|
inlineWarnings?: InlineWarning[];
|
|
55
45
|
/**
|
|
56
|
-
* The reconstructed files, in loading order, each with the path it came from (absent for inline code).
|
|
57
|
-
* `code` holds the same parts, joined into one string when only a single file was reconstructed.
|
|
46
|
+
* The reconstructed files, in loading order, each with the path it came from (absent for inline code); `code` holds the same parts joined into one string.
|
|
58
47
|
* Not set by the inlinings, whose whole purpose is to produce one self-contained text.
|
|
59
48
|
*/
|
|
60
49
|
files?: readonly {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* This module has one goal (and is to be rewritten soon to achieve that goal,
|
|
4
|
-
*
|
|
3
|
+
* This module has one goal (and is to be rewritten soon to achieve that goal, as the file itself is way too long).
|
|
4
|
+
* See {@link reconstructToCode}.
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,7 +9,10 @@ exports.reconstructLogger = void 0;
|
|
|
9
9
|
exports.reconstructToCode = reconstructToCode;
|
|
10
10
|
const log_1 = require("../util/log");
|
|
11
11
|
const assert_1 = require("../util/assert");
|
|
12
|
+
const r_expression_list_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-expression-list");
|
|
13
|
+
const r_comment_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-comment");
|
|
12
14
|
const model_1 = require("../r-bridge/lang-4.x/ast/model/model");
|
|
15
|
+
const r_binary_op_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-binary-op");
|
|
13
16
|
const r_pipe_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-pipe");
|
|
14
17
|
const r_function_call_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
15
18
|
const r_argument_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
@@ -17,12 +20,32 @@ const stateful_fold_1 = require("../r-bridge/lang-4.x/ast/model/processing/state
|
|
|
17
20
|
const auto_select_defaults_1 = require("./auto-select/auto-select-defaults");
|
|
18
21
|
const identifier_1 = require("../dataflow/environments/identifier");
|
|
19
22
|
const r_string_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
23
|
+
const type_1 = require("../r-bridge/lang-4.x/ast/model/type");
|
|
20
24
|
function plain(text) {
|
|
21
25
|
return [{ line: Array.isArray(text) ? identifier_1.Identifier.toString(text) : text, indent: 0 }];
|
|
22
26
|
}
|
|
23
27
|
exports.reconstructLogger = log_1.log.getSubLogger({ name: 'reconstruct' });
|
|
24
28
|
function getLexeme(n) {
|
|
25
|
-
|
|
29
|
+
const lexeme = model_1.RNode.lexeme(n);
|
|
30
|
+
if (lexeme !== undefined) {
|
|
31
|
+
return lexeme;
|
|
32
|
+
}
|
|
33
|
+
// only expression lists may lack a lexeme of their own, so we synthesize equivalent source from their children
|
|
34
|
+
return r_expression_list_1.RExpressionList.is(n) ? synthesizeExpressionListLexeme(n) : '';
|
|
35
|
+
}
|
|
36
|
+
/** rebuilds the source of a lexeme-less expression list (e.g., a `(` or `{` wrapper) so that it still parses */
|
|
37
|
+
function synthesizeExpressionListLexeme(n) {
|
|
38
|
+
const inner = n.children
|
|
39
|
+
.filter(c => !r_comment_1.RComment.is(c))
|
|
40
|
+
.map(c => getLexeme(c))
|
|
41
|
+
.filter(c => c.length > 0)
|
|
42
|
+
.join('; ');
|
|
43
|
+
const start = r_expression_list_1.RExpressionList.groupStart(n);
|
|
44
|
+
const end = r_expression_list_1.RExpressionList.groupEnd(n);
|
|
45
|
+
if (start === undefined || end === undefined) {
|
|
46
|
+
return inner;
|
|
47
|
+
}
|
|
48
|
+
return `${identifier_1.Identifier.toString(start.content)}${inner}${identifier_1.Identifier.toString(end.content)}`;
|
|
26
49
|
}
|
|
27
50
|
function codeToText(code) {
|
|
28
51
|
return code.map(l => `${getIndentString(l.indent)}${l.line}`).join('\n');
|
|
@@ -35,8 +58,7 @@ function getArgumentLexeme(n) {
|
|
|
35
58
|
return n.info.fullLexeme ?? (n.value !== undefined ? getLexeme(n.value) : getLexeme(n));
|
|
36
59
|
}
|
|
37
60
|
function reconstructAsLeaf(leaf, configuration) {
|
|
38
|
-
|
|
39
|
-
return selectionHasLeaf ? foldToConst(leaf) : [];
|
|
61
|
+
return isSelected(configuration, leaf) ? foldToConst(leaf) : [];
|
|
40
62
|
}
|
|
41
63
|
function foldToConst(n) {
|
|
42
64
|
return plain(getLexeme(n));
|
|
@@ -93,6 +115,14 @@ function reconstructUnaryOp(leaf, operand, configuration) {
|
|
|
93
115
|
}
|
|
94
116
|
return foldToConst(leaf);
|
|
95
117
|
}
|
|
118
|
+
/** whether the value of `n` is the value of its rhs alone, i.e. the lhs may be dropped without changing the result */
|
|
119
|
+
function evaluatesToRhs(n) {
|
|
120
|
+
if (r_pipe_1.RPipe.is(n)) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
const info = r_binary_op_1.RBinaryOp.getOperatorInfo(n);
|
|
124
|
+
return info?.usedAs === 'assignment' && info.stringUsedInRAst !== type_1.RawRType.RightAssign;
|
|
125
|
+
}
|
|
96
126
|
function reconstructBinaryOp(n, lhs, rhs, config) {
|
|
97
127
|
if (lhs.length === 0 && rhs.length === 0) {
|
|
98
128
|
if (isSelected(config, n)) {
|
|
@@ -102,7 +132,11 @@ function reconstructBinaryOp(n, lhs, rhs, config) {
|
|
|
102
132
|
return [];
|
|
103
133
|
}
|
|
104
134
|
}
|
|
105
|
-
else if (lhs.length === 0) {
|
|
135
|
+
else if (lhs.length === 0) {
|
|
136
|
+
// dropping the lhs is only sound if the operator evaluates to its rhs, otherwise we have to keep the operation
|
|
137
|
+
if (isSelected(config, n) && !evaluatesToRhs(n)) {
|
|
138
|
+
return plain(getLexeme(n));
|
|
139
|
+
}
|
|
106
140
|
return rhs;
|
|
107
141
|
}
|
|
108
142
|
else if (rhs.length === 0) {
|
|
@@ -169,8 +203,7 @@ function reconstructBodyWithHeader(header, body, onEmpty) {
|
|
|
169
203
|
}
|
|
170
204
|
}
|
|
171
205
|
function reconstructRepeatLoop(loop, body, configuration) {
|
|
172
|
-
|
|
173
|
-
if (!sel) {
|
|
206
|
+
if (!isSelected(configuration, loop)) {
|
|
174
207
|
return body;
|
|
175
208
|
}
|
|
176
209
|
return reconstructBodyWithHeader({ line: 'repeat', indent: 0 }, body, '{}');
|
|
@@ -220,8 +253,7 @@ function reconstructIfThenElse(ifThenElse, condition, then, otherwise, config) {
|
|
|
220
253
|
}
|
|
221
254
|
}
|
|
222
255
|
function reconstructWhileLoop(loop, condition, body, configuration) {
|
|
223
|
-
|
|
224
|
-
if (!sel && condition.length === 0) {
|
|
256
|
+
if (!isSelected(configuration, loop) && condition.length === 0) {
|
|
225
257
|
return body;
|
|
226
258
|
}
|
|
227
259
|
else if (body.length === 0 && condition.length === 0) {
|
|
@@ -248,7 +280,6 @@ function reconstructWhileLoop(loop, condition, body, configuration) {
|
|
|
248
280
|
}
|
|
249
281
|
}
|
|
250
282
|
function reconstructParameters(parameters) {
|
|
251
|
-
// const baseParameters = parameters.flatMap(p => plain(getLexeme(p)))
|
|
252
283
|
return parameters.map(p => {
|
|
253
284
|
if (p.defaultValue !== undefined) {
|
|
254
285
|
return `${getLexeme(p.name)}=${getLexeme(p.defaultValue)}`;
|
|
@@ -292,6 +323,22 @@ function reconstructParameter(parameter, name, defaultValue, configuration) {
|
|
|
292
323
|
return name;
|
|
293
324
|
}
|
|
294
325
|
}
|
|
326
|
+
/** whether any ancestor of `n` is part of the reconstruction and hence may consume the value of `n` */
|
|
327
|
+
function hasSelectedAncestor(n, config) {
|
|
328
|
+
const { idMap } = config.fullAst;
|
|
329
|
+
let parentId = n.info.parent;
|
|
330
|
+
while (parentId !== undefined) {
|
|
331
|
+
const parent = idMap.get(parentId);
|
|
332
|
+
if (parent === undefined) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
else if (isSelected(config, parent)) {
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
parentId = parent.info.parent;
|
|
339
|
+
}
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
295
342
|
function reconstructFunctionDefinition(definition, functionParameters, body, config) {
|
|
296
343
|
// if a definition is not selected, we only use the body - slicing will always select the definition if it is required
|
|
297
344
|
if (functionParameters.every(p => p.length === 0)) {
|
|
@@ -300,7 +347,7 @@ function reconstructFunctionDefinition(definition, functionParameters, body, con
|
|
|
300
347
|
if (empty && selected) { // give function stub
|
|
301
348
|
return plain(`${definition.lexeme}(${reconstructParameters(definition.parameters).join(', ')}) { }`);
|
|
302
349
|
}
|
|
303
|
-
else if (!selected) { // do not require function
|
|
350
|
+
else if (!selected && !hasSelectedAncestor(definition, config)) { // do not require function
|
|
304
351
|
return body;
|
|
305
352
|
}
|
|
306
353
|
}
|
|
@@ -345,9 +392,8 @@ function reconstructSpecialInfixFunctionCall(args, call) {
|
|
|
345
392
|
return plain(`${lhsLexeme} ${identifier_1.Identifier.toString(call.functionName.content)} ${rhsLexeme}`);
|
|
346
393
|
}
|
|
347
394
|
/**
|
|
348
|
-
* If `inlineSources` is active and this
|
|
349
|
-
*
|
|
350
|
-
* to signal that the call should be reconstructed as usual (e.g., an unresolvable `source()`).
|
|
395
|
+
* If `inlineSources` is active and this is a selected, resolvable `source()` call, returns the reconstruction to
|
|
396
|
+
* splice in its place (or the literal call at a cycle edge); `undefined` means reconstruct as usual.
|
|
351
397
|
*/
|
|
352
398
|
function tryInlineSourceCall(call, config) {
|
|
353
399
|
const id = call.info.id;
|
|
@@ -365,7 +411,7 @@ function tryInlineSourceCall(call, config) {
|
|
|
365
411
|
}
|
|
366
412
|
const childConfig = {
|
|
367
413
|
...config,
|
|
368
|
-
visited: new Set([
|
|
414
|
+
visited: visited.union(new Set([config.currentFile ?? 0, targetFile])),
|
|
369
415
|
currentFile: targetFile
|
|
370
416
|
};
|
|
371
417
|
return stripOuterExpressionList(reconstructFileCode(config.fullAst, targetFile, childConfig));
|
|
@@ -402,8 +448,7 @@ function reconstructFunctionCall(call, functionName, args, configuration) {
|
|
|
402
448
|
if (call.named && selected) {
|
|
403
449
|
return plain(getLexeme(call));
|
|
404
450
|
}
|
|
405
|
-
|
|
406
|
-
if (functionName.length === 0 && filteredArgs.length === 0) {
|
|
451
|
+
if (functionName.length === 0 && args.every(a => a === undefined || a.length === 0)) {
|
|
407
452
|
return [];
|
|
408
453
|
}
|
|
409
454
|
if (args.length === 0) {
|
|
@@ -421,10 +466,7 @@ function reconstructFunctionCall(call, functionName, args, configuration) {
|
|
|
421
466
|
return plain(getLexeme(call));
|
|
422
467
|
}
|
|
423
468
|
}
|
|
424
|
-
/**
|
|
425
|
-
* The fold functions used to reconstruct the ast in {@link reconstructToCode}.
|
|
426
|
-
*/
|
|
427
|
-
// escalates with undefined if all are undefined
|
|
469
|
+
/** The fold functions used to reconstruct the ast in {@link reconstructToCode}. */
|
|
428
470
|
const reconstructAstFolds = {
|
|
429
471
|
// we just pass down the state information so everyone has them
|
|
430
472
|
down: (_n, c) => c,
|
|
@@ -480,11 +522,8 @@ function reconstructFileCode(ast, fileIndex, config) {
|
|
|
480
522
|
return (0, stateful_fold_1.foldAstStateful)(ast.ast.files[fileIndex].root, config, reconstructAstFolds);
|
|
481
523
|
}
|
|
482
524
|
/**
|
|
483
|
-
* Reconstructs parts of a normalized R ast into R code on an expression basis.
|
|
484
|
-
* @
|
|
485
|
-
* @param selection - The selection of nodes to be reconstructed (probably the {@link NodeId|NodeIds} identified by the slicer)
|
|
486
|
-
* @param autoSelectIf - A predicate that can be used to force the reconstruction of a node
|
|
487
|
-
* @returns The number of lines for which `autoSelectIf` triggered, as well as the reconstructed code itself.
|
|
525
|
+
* Reconstructs parts of a normalized R ast into R code on an expression basis; `selection` gives the node ids to reconstruct (probably identified by the slicer), `autoSelectIf` can force additional ones.
|
|
526
|
+
* @returns the reconstructed code, plus the number of lines for which `autoSelectIf` triggered.
|
|
488
527
|
*/
|
|
489
528
|
function reconstructToCode(ast, selection, autoSelectIf = auto_select_defaults_1.doNotAutoSelect) {
|
|
490
529
|
if (exports.reconstructLogger.settings.minLevel <= 1 /* LogLevel.Trace */) {
|
|
@@ -533,7 +572,6 @@ function reconstructToCode(ast, selection, autoSelectIf = auto_select_defaults_1
|
|
|
533
572
|
const indices = selection.reconstructFiles === 'all' ? ast.ast.files.map((_, i) => i) : (selection.reconstructFiles ?? [0]);
|
|
534
573
|
(0, assert_1.guard)(indices.every(i => i >= 0 && i < ast.ast.files.length), `reconstructToCode: reconstructFiles contains invalid file indices: ${JSON.stringify(indices)} for ast with ${ast.ast.files.length} files`);
|
|
535
574
|
const results = [];
|
|
536
|
-
// fold of the normalized ast
|
|
537
575
|
for (const i of indices) {
|
|
538
576
|
results.push(removeOuterExpressionListIfApplicable(reconstructFileCode(ast, i, {
|
|
539
577
|
selection: selection.nodes, autoSelectIf: autoSelectIfWrapper, fullAst: ast, currentFile: i
|
|
@@ -6,7 +6,7 @@ import type { Enrichment } from './search-executor/search-enrichers';
|
|
|
6
6
|
import type { DataflowInformation } from '../dataflow/info';
|
|
7
7
|
import type { BuiltInProcName } from '../dataflow/environments/built-in-proc-name';
|
|
8
8
|
import type { RoleInParent } from '../r-bridge/lang-4.x/ast/model/processing/role';
|
|
9
|
-
import type {
|
|
9
|
+
import type { PropSelector } from '../dataflow/environments/built-in-props';
|
|
10
10
|
export type FlowrFilterName = keyof typeof FlowrFilters;
|
|
11
11
|
interface FlowrFilterWithArgs<Filter extends FlowrFilterName, Args extends FlowrFilterArgs<Filter>> {
|
|
12
12
|
name: Filter;
|
|
@@ -40,8 +40,9 @@ export declare enum FlowrFilter {
|
|
|
40
40
|
*/
|
|
41
41
|
FilePathFilter = "file-path-filter",
|
|
42
42
|
/**
|
|
43
|
-
* Only returns function calls
|
|
44
|
-
* the user_ or _every call that closes a device_ can be searched for without naming a
|
|
43
|
+
* Only returns function calls carrying the given {@link CallProp}/{@link SemanticCallTag} properties, so that
|
|
44
|
+
* _every call that asks the user_ or _every call that closes a device_ can be searched for without naming a
|
|
45
|
+
* single function.
|
|
45
46
|
* This filter accepts {@link CallPropsArgs}.
|
|
46
47
|
*/
|
|
47
48
|
CallProps = "call-props"
|
|
@@ -88,9 +89,9 @@ export interface FilePathFilterArgs {
|
|
|
88
89
|
filePathRegex: string | RegExp;
|
|
89
90
|
}
|
|
90
91
|
export interface CallPropsArgs {
|
|
91
|
-
/** the
|
|
92
|
-
props:
|
|
93
|
-
/** whether a call has to carry every
|
|
92
|
+
/** the properties to look for, e.g. `[SemanticCallTag.User, CallProp.Pure]` */
|
|
93
|
+
props: PropSelector;
|
|
94
|
+
/** whether a call has to carry every one of {@link props} or just one of them (the default) */
|
|
94
95
|
matchType?: 'some' | 'every';
|
|
95
96
|
}
|
|
96
97
|
type ValidFilterTypes<F extends FlowrFilter = FlowrFilter> = FlowrFilterName | FlowrFilterWithArgs<F, FlowrFilterArgs<F>> | RType | VertexType;
|